[go: up one dir, main page]

RU2822609C9 - Method and apparatus for forwarding packets for heterogeneous network - Google Patents

Method and apparatus for forwarding packets for heterogeneous network Download PDF

Info

Publication number
RU2822609C9
RU2822609C9 RU2022101659A RU2022101659A RU2822609C9 RU 2822609 C9 RU2822609 C9 RU 2822609C9 RU 2022101659 A RU2022101659 A RU 2022101659A RU 2022101659 A RU2022101659 A RU 2022101659A RU 2822609 C9 RU2822609 C9 RU 2822609C9
Authority
RU
Russia
Prior art keywords
packet
client
server
forwarding
response
Prior art date
Application number
RU2022101659A
Other languages
Russian (ru)
Other versions
RU2822609C1 (en
Inventor
Хао ЦЗИНЬ
Яофэн ТУ
Бинь ГО
Иньцзюнь ХАНЬ
Цзюньнин СЮЙ
Original Assignee
Зте Корпорейшн
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Зте Корпорейшн filed Critical Зте Корпорейшн
Publication of RU2822609C1 publication Critical patent/RU2822609C1/en
Application granted granted Critical
Publication of RU2822609C9 publication Critical patent/RU2822609C9/en

Links

Abstract

FIELD: physics.
SUBSTANCE: invention relates to communication technologies. Technical result is achieved by forwarding an interaction packet between a client and a server based on a user mode protocol stack, which includes receiving a request packet sent by the client, and sending the first response packet to the client in response to the request packet, adding the request packet to the first buffer queue and forwarding the request packet to the server so that the server sends the second response packet in response to the request packet, receiving a second response packet and sending an acknowledgment packet to the server based on the second response packet and adding the second response packet to the second buffer queue and sending the second response packet to the client.
EFFECT: high efficiency by forwarding packets at the transport level by a forwarding module.
9 cl, 6 dwg

Description

Область техникиField of technology

Настоящая заявка относится к области коммуникационных технологий и, в частности, к методу и устройству пересылки пакетов для гетерогенной сети.The present application relates to the field of communication technologies and, in particular, to a method and device for forwarding packets for a heterogeneous network.

Уровень техникиState of the art

Сеть на стороне сетевого сервера очень стабильна и поддерживает запросы пользователей с высокой степенью многопоточности и высокой пропускной способностью. Беспроводная мобильная сеть имеет присущие ей характеристики передачи данных, такие как нарушение пересылки пакетов, неспособность точно и своевременно определить потерю пакетов и нехватка ресурсов в загруженное время. При возникновении вышеуказанных ситуаций скорость доступа пользователя к Интернету быстро меняется, что влияет на качество доступа к Интернету мобильных пользователей.The network on the network server side is very stable and supports user requests with high multi-threading and high bandwidth. The wireless mobile network has its own data transmission characteristics, such as packet forwarding failure, inability to accurately and timely detect packet loss, and resource shortage during busy times. When the above situations occur, the user's Internet access speed changes rapidly, affecting the quality of mobile users' Internet access.

Технология прокси-серверов в смежных областях техники в основном основана на технологии прямого прокси-сервера и технологии обратного прокси-сервера. Соединения по протоколу управления передачей данных (Transmission Control Protocol, TCP) соответственно устанавливаются между прокси-службой и двумя концами связи, то есть, прокси-служба должна установить TCP-соединение как с клиентом доступа, так и с сервером, а затем интерактивно пересылать данные на уровне сеанса. Технология прямого прокси-сервера является непрозрачной для клиента, а технология обратного прокси-сервера является непрозрачной для сервера.Proxy server technology in related fields of technology is mainly based on forward proxy server technology and reverse proxy server technology. Transmission Control Protocol (TCP) connections are respectively established between the proxy service and the two ends of the communication, that is, the proxy service must establish a TCP connection with both the access client and the server, and then interactively forward data at the session level. The forward proxy server technology is opaque to the client, and the reverse proxy server technology is opaque to the server.

Сущность изобретенияThe essence of the invention

Техническая проблема, решаемая вариантами осуществления по настоящей заявке, заключается в реализации прозрачной прокси-службы между клиентом и сервером, и решении проблемы влияния на производительность пересылки из-за нескольких копий данных между пользовательским режимом и режимом ядра в прокси-службе. Варианты осуществления по настоящей заявке обеспечивают способ и устройство пересылки пакетов для гетерогенной сети.The technical problem solved by the embodiments of the present application is to implement a transparent proxy service between a client and a server, and to solve the problem of the impact on forwarding performance due to multiple copies of data between the user mode and the kernel mode in the proxy service. The embodiments of the present application provide a method and device for forwarding packets for a heterogeneous network.

Способ пересылки пакетов для гетерогенной сети в соответствии с вариантами осуществления по настоящей заявке включает следующее: принимается запрос на установление соединения, отправленный клиентом; запрос на установление соединения направляется на сервер, чтобы установить соединение между клиентом и сервером; пакет взаимодействия пересылается между клиентом и сервером на основе стека протоколов пользовательского режима.A packet forwarding method for a heterogeneous network according to embodiments of the present application includes the following: a connection request sent by a client is received; the connection request is forwarded to a server to establish a connection between the client and the server; an interaction packet is forwarded between the client and the server based on a user mode protocol stack.

Согласно способу пересылки пакетов для гетерогенной сети в вариантах осуществления по настоящей заявке, посредством выполнения пересылки пакетов на транспортном уровне можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно способу пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки посредника, а также поддерживается шифрование по протоколу безопасности на транспортном уровне (Transport Layer Security, TLS) и т.д., что повышает безопасность и надежность пересылки пакетов.According to the packet forwarding method for a heterogeneous network in the embodiments of the present application, by performing packet forwarding at the transport layer, it is possible to avoid the bottleneck problem in the proxy service performance caused by multiple copies of a packet in the user mode and the kernel mode during the forwarding process, thereby realizing zero-copy packet forwarding based on the user mode protocol stack and effectively improving the system performance. In addition, according to the packet forwarding method of the present application, there is no need to create a fictitious intermediary and there is no risk of an intermediary attack, and encryption by the Transport Layer Security (TLS) protocol, etc. is supported, which improves the security and reliability of packet forwarding.

Согласно некоторым вариантам осуществления по настоящей заявке, операция установления соединения между клиентом и сервером включает в себя следующее: запрос на установление соединения, отправленный клиентом, принимается и пересылается на сервер, после чего сервер отправляет первое ответное сообщение клиенту в ответ на запрос на установление соединения; первое ответное сообщение принимается и передается клиенту, после чего клиент отправляет второе ответное сообщение на сервер в ответ на первое ответное сообщение; и второе ответное сообщение принимается и передается на сервер, чтобы установить соединение между клиентом и сервером.According to some embodiments of the present application, the operation of establishing a connection between a client and a server includes the following: a request for establishing a connection sent by the client is received and forwarded to the server, after which the server sends a first response message to the client in response to the request for establishing a connection; the first response message is received and transmitted to the client, after which the client sends a second response message to the server in response to the first response message; and the second response message is received and transmitted to the server to establish a connection between the client and the server.

В некоторых вариантах осуществления по настоящей заявке операция принятия и пересылки серверу запроса на установление соединения, отправленного клиентом, включает в себя следующее: запрос на установление соединения, отправленный клиентом, принимается в соответствии с заданным маршрутом по умолчанию; на основе запроса на установление соединения создается сессия, и запрос на установление соединения пересылается на сервер после обновления адреса запроса на установление соединения.In some embodiments of the present application, the operation of receiving and forwarding to the server a connection request sent by a client includes the following: the connection request sent by the client is received in accordance with a specified default route; a session is created based on the connection request, and the connection request is forwarded to the server after updating the address of the connection request.

Согласно некоторым вариантам осуществления по настоящей заявке, содержимое сообщения сеанса включает: серийный номер соединения и размер окна.According to some embodiments of the present application, the contents of a session message include: a connection serial number and a window size.

В некоторых вариантах осуществления по настоящей заявке операция пересылки пакета взаимодействия между клиентом и сервером на основе стека протоколов пользовательского режима включает следующее: принимается пакет запроса, отправленный клиентом, и первый пакет ответа отправляется клиенту в ответ на пакет запроса; пакет запроса добавляется в первую буферную очередь и направляется на сервер, после чего сервер отправляет пакет второго ответа в ответ на пакет запроса; принимается пакет второго ответа, и пакет подтверждения (АСК) отправляется на сервер на основе пакета второго ответа; пакет второго ответа добавляется во вторую буферную очередь и отправляется клиенту.In some embodiments of the present application, an operation of forwarding an interaction packet between a client and a server based on a user mode protocol stack includes the following: a request packet sent by a client is received, and a first response packet is sent to the client in response to the request packet; the request packet is added to a first buffer queue and sent to the server, after which the server sends a second response packet in response to the request packet; the second response packet is received, and an acknowledgement (ACK) packet is sent to the server based on the second response packet; the second response packet is added to a second buffer queue and sent to the client.

Согласно некоторым вариантам осуществления по настоящей заявке, способ дополнительно включает следующее: в случае, если емкость данных пакета второго ответа во второй буферной очереди больше порогового значения, размер окна пакета запроса, отправляемого на сервер, уменьшается, чтобы снизить скорость отправки пакетов сервером.According to some embodiments of the present application, the method further comprises the following: if the data capacity of the second response packet in the second buffer queue is greater than a threshold value, the window size of the request packet sent to the server is reduced to reduce the rate at which the server sends packets.

В некоторых вариантах осуществления по настоящей заявке способ дополнительно включает следующее: в случае, если клиент не получает пакет второго ответа в течение заранее определенного периода времени, пакет второго ответа снова добавляется во вторую буферную очередь и отправляется клиенту.In some embodiments of the present application, the method further comprises the following: if the client does not receive the second response packet within a predetermined period of time, the second response packet is again added to the second buffer queue and sent to the client.

Согласно некоторым вариантам осуществления по настоящей заявке, способ дополнительно включает следующее: в случае, если в процессе взаимодействия пакетов будет обнаружена потеря пакетов, размер окна пакета взаимодействия корректируется до заданного порогового значения.According to some embodiments of the present application, the method further comprises the following: if a packet loss is detected during the packet interaction process, the packet interaction window size is adjusted to a specified threshold value.

Варианты осуществления по настоящей заявке также обеспечивают устройство пересылки пакетов для гетерогенной сети, которое включает модуль пересылки.Embodiments of the present application also provide a packet forwarding device for a heterogeneous network that includes a forwarding module.

Модуль пересылки настроен на пересылку запроса на установление соединения и ответного сообщения между клиентом и сервером, установление соединения между клиентом и сервером и пересылку пакета взаимодействия между клиентом и сервером на основе стека протоколов пользовательского режима.The forwarding module is configured to forward the connection request and response message between the client and the server, establish the connection between the client and the server, and forward the communication packet between the client and the server based on the user mode protocol stack.

Согласно устройству пересылки пакетов для гетерогенной сети в вариантах осуществления по настоящей заявке, посредством выполнения пересылки пакетов на транспортном уровне модулем пересылки можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно устройству пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки посредника, а также поддерживается шифрование TLS и т.д., что повышает безопасность и надежность пересылки пакетов.According to the packet forwarding device for a heterogeneous network in the embodiments of the present application, by performing packet forwarding at the transport layer by the forwarding module, it is possible to avoid the bottleneck problem in the proxy service performance caused by multiple copies of a packet in the user mode and kernel mode during forwarding, thereby realizing zero-copy packet forwarding based on the user mode protocol stack and effectively improving the system performance. In addition, according to the packet forwarding device of the present application, there is no need to create a dummy intermediary and there is no risk of a man-in-the-middle attack, and TLS encryption etc. are supported, which improves the security and reliability of packet forwarding.

Варианты осуществления по настоящей заявке также предоставляют машиночитаемый носитель информации, в котором хранится программа для осуществления передачи информации. Программа, выполняемая процессором, осуществляет операции вышеописанного способа пересылки пакетов для гетерогенной сети.The embodiments of the present application also provide a machine-readable storage medium in which a program for performing the transmission of information is stored. The program, executed by the processor, performs the operations of the above-described method for forwarding packets for a heterogeneous network.

Согласно машиночитаемому носителю в вариантах осуществления по настоящей заявки, посредством выполнения способа пересылки пакетов для гетерогенной сети, пересылка пакетов может выполняться на транспортном уровне прокси-узла, и можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно способу пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки через посредника, а также поддерживается шифрование TLS и т.д., что повышает безопасность и надежность пересылки пакетов.According to the machine-readable medium in the embodiments of the present application, by implementing the packet forwarding method for a heterogeneous network, the packet forwarding can be performed at the transport layer of the proxy node, and the bottleneck problem in the proxy service performance caused by multiple copies of the packet in the user mode and the kernel mode during the forwarding process can be avoided, thereby realizing the zero-copy packet forwarding based on the user mode protocol stack and effectively improving the system performance. In addition, according to the packet forwarding method of the present application, there is no need to create a fictitious intermediary and there is no risk of a man-in-the-middle attack, and TLS encryption, etc. are supported, which improves the security and reliability of the packet forwarding.

Варианты осуществления по настоящей заявке также обеспечивают устройство прокси-узла, которое включает: память, процессор и компьютерную программу, которая хранится в памяти и способна работать на процессоре. Компьютерная программа, выполняемая процессором, осуществляет операции вышеописанного способа пересылки пакетов для гетерогенной сети.The embodiments of the present application also provide a proxy node device that includes: a memory, a processor, and a computer program that is stored in the memory and is capable of running on the processor. The computer program executed by the processor performs the operations of the above-described method for forwarding packets for a heterogeneous network.

Согласно устройству прокси-узла в вариантах осуществления по настоящей заявке, пересылка пакетов может выполняться на транспортном уровне прокси-узла, что позволяет избежать проблемы «узкого места» в производительности прокси-службы, вызываемой несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки.According to the device of the proxy node in the embodiments of the present application, packet forwarding can be performed at the transport layer of the proxy node, which makes it possible to avoid the problem of a “bottleneck” in the performance of the proxy service caused by multiple copies of a packet in user mode and kernel mode during the forwarding process.

Краткое описание чертежейBrief description of the drawings

На фиг. 1 представлена схема прокси-службы в смежных областях техники.Fig. 1 shows a diagram of a proxy service in related fields of technology.

На фиг. 2 представлена схема устройства пересылки пакетов для гетерогенной сети в соответствии с некоторыми вариантами осуществления по настоящей заявке.Fig. 2 is a diagram of a packet forwarding device for a heterogeneous network in accordance with some embodiments of the present application.

На фиг. 3 представлена схема устройства пересылки пакетов для гетерогенной сети в соответствии с некоторыми вариантами осуществления по настоящей заявке.Fig. 3 is a diagram of a packet forwarding device for a heterogeneous network in accordance with some embodiments of the present application.

На фиг. 4 представлена блок-схема устройства пересылки пакетов для гетерогенной сети в соответствии с некоторыми вариантами осуществления по настоящей заявке.Fig. 4 is a block diagram of a packet forwarding device for a heterogeneous network in accordance with some embodiments of the present application.

На фиг. 5 представлена блок-схема установления соединения между клиентом и сервером в соответствии с некоторыми вариантами осуществления по настоящей заявке.Fig. 5 is a block diagram of establishing a connection between a client and a server in accordance with some embodiments of the present application.

На фиг. 6 представлена блок-схема способа взаимодействия пакетов для гетерогенной сети в соответствии с некоторыми вариантами осуществления по настоящей заявке.Fig. 6 is a block diagram of a method for packet interaction for a heterogeneous network in accordance with some embodiments of the present application.

Подробное описание вариантов осуществленияDetailed description of embodiments

Чтобы более подробно описать технические средства, используемые в вариантах осуществления по настоящей заявке для достижения заданной цели, а также их эффективность, настоящая заявка подробно описана ниже в сочетании с прилагаемыми чертежами и примерными вариантами осуществления.In order to describe in more detail the technical means used in the embodiments of the present application to achieve the given purpose, as well as their effectiveness, the present application is described in detail below in conjunction with the accompanying drawings and exemplary embodiments.

Как показано на фиг. 1, в смежных областях техники прокси-служба между клиентом А и сервером В представляет собой псевдопрозрачную технологию, например, НАРrоху. Процесс работы прокси-службы подробно описан ниже.As shown in Fig. 1, in related fields of technology, the proxy service between client A and server B is a pseudo-transparent technology, such as HAProxy. The operation process of the proxy service is described in detail below.

Клиент А инициирует запрос на установление соединения с сервером В, а прокси-сервер Р перехватывает запрос на установление соединения и маскируется под сервер В для завершения трехэтапного квитирования с клиентом А.Client A initiates a connection request to server B, and proxy server P intercepts the connection request and masquerades as server B to complete the three-way handshake with client A.

Когда клиент А инициирует запрос службы, прокси-сервер Р маскируется под клиента А, чтобы установить соединение с сервером В, и инициирует запрос.When client A initiates a service request, proxy server P masquerades as client A to establish a connection to server B and initiates the request.

Сервер В отправляет ответное сообщение на прокси-сервер Р, процесс прокси-сервера получает ответное сообщение и ищет соединение клиента А; а прокси-сервер Р находит соответствующее соединение и маскируется под сервер В, чтобы отправить ответное сообщение клиенту А.Server B sends a response message to proxy P, the proxy process receives the response message and looks for a connection from client A; and proxy P finds a matching connection and masquerades as server B to send a response message to client A.

В приведенном выше техническом решении прокси-сервер Р прозрачен как для клиента А, так и для сервера В, но ему все равно необходимо установить соединение с клиентом А и сервером В соответственно, и существует риск атаки через посредника, поэтому поддержка таких каналов шифрования, как TLS и HTTP Security (HTTPS), невозможна. Кроме того, в процессе пересылки потоки данных должны приниматься на прикладном уровне и отправляться с прикладного уровня на узел назначения, при этом создается несколько копий между режимом ядра и пользовательским режимом, вследствие чего возникает «узкое место» в производительности.In the above technical solution, the proxy server P is transparent to both client A and server B, but it still needs to establish a connection with client A and server B respectively, and there is a risk of man-in-the-middle attack, so it is not possible to support encryption channels such as TLS and HTTP Security (HTTPS). In addition, in the forwarding process, data streams must be received at the application layer and sent from the application layer to the destination node, and multiple copies are created between the kernel mode and the user mode, which causes a performance bottleneck.

Как показано на фиг. 2 и фиг. 4, способ пересылки пакетов для гетерогенной сети, согласно некоторым вариантам осуществления по настоящей заявке, включает описанные ниже операции S101 и S102.As shown in Fig. 2 and Fig. 4, a packet forwarding method for a heterogeneous network according to some embodiments of the present application includes the following operations S101 and S102.

На этапе S101 принимается запрос на установление соединения, отправленный клиентом, и запрос на установление соединения отправляется на сервер, чтобы установить соединение между клиентом и сервером.In step S101, a connection request sent by the client is received, and the connection request is sent to the server to establish a connection between the client and the server.

На этапе S102 пакет взаимодействия пересылается между клиентом и сервером на основе стека протоколов пользовательского режима.In step S102, an interaction packet is forwarded between the client and the server based on the user mode protocol stack.

Следует отметить, что по настоящей заявке, как показано на фиг.2, между клиентом и сервером установлен прокси-узел. Прокси-узел настроен на пересылку пакета взаимодействия между клиентом и сервером. Кроме того, прокси-узел в вариантах осуществления по настоящей заявке выполняет пересылку пакетов через транспортный уровень. Таким образом, прокси-узел может реализовать прозрачную прокси-службу и пересылку пакетов на основе стека протоколов пользовательского режима.It should be noted that according to the present application, as shown in Fig. 2, a proxy node is installed between the client and the server. The proxy node is configured to forward the interaction packet between the client and the server. In addition, the proxy node in the embodiments according to the present application performs packet forwarding through the transport layer. Thus, the proxy node can implement a transparent proxy service and packet forwarding based on the user mode protocol stack.

Согласно способу пересылки пакетов для гетерогенной сети в вариантах осуществления по настоящей заявке, посредством выполнения пересылки пакетов на транспортном уровне можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно способу пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки через посредника, а также поддерживается шифрование TLS и т.д., что повышает безопасность и надежность пересылки пакетов.According to the packet forwarding method for a heterogeneous network in the embodiments of the present application, by performing packet forwarding at the transport layer, it is possible to avoid the bottleneck problem in the proxy service performance caused by multiple copies of a packet in the user mode and kernel mode during forwarding, thereby realizing zero-copy packet forwarding based on the user mode protocol stack and effectively improving the system performance. In addition, according to the packet forwarding method of the present application, there is no need to create a dummy intermediary and there is no risk of a man-in-the-middle attack, and TLS encryption, etc., are supported, which improves the security and reliability of packet forwarding.

Как показано на фиг. 5, согласно некоторым вариантам осуществления по настоящей заявке, операция пересылки запроса на установление соединения и ответного сообщения между клиентом и сервером включает указанные ниже операции S201-S203.As shown in Fig. 5, according to some embodiments of the present application, the operation of forwarding a connection request and a response message between a client and a server includes the following operations S201-S203.

На этапе S201 запрос на установление соединения, отправленный клиентом, принимается и передается на сервер, после чего сервер отправляет первое ответное сообщение клиенту в ответ на запрос на установление соединения.In step S201, a connection request sent by the client is received and transmitted to the server, after which the server sends a first response message to the client in response to the connection request.

На этапе S202 первое ответное сообщение принимается и передается клиенту, после чего клиент отправляет второе ответное сообщение на сервер в ответ на первое ответное сообщение.In step S202, the first response message is received and transmitted to the client, after which the client sends a second response message to the server in response to the first response message.

На этапе S203 второе ответное сообщение принимается и передается на сервер, чтобы установить соединение между клиентом и сервером.In step S203, the second response message is received and transmitted to the server to establish a connection between the client and the server.

Следует отметить, что «запрос на установление соединения» в данном случае может быть SYN-запросом, а «первое ответное сообщение» и «второе ответное сообщение» могут быть пакетами АСК. Например, клиент может отправить SYN-запрос на сервер через прокси-узел, после получения SYN-запроса сервер отправляет пакет АСК клиенту через прокси-узел, и после получения пакета АСК клиент отправляет пакет АСК серверу через прокси-узел, чтобы завершить трехэтапное квитирование между клиентом и сервером для установления ТСР-соединения между клиентом и сервером.It should be noted that the "connection request" in this case may be a SYN request, and the "first response message" and "second response message" may be ACK packets. For example, the client may send a SYN request to the server through the proxy node, after receiving the SYN request, the server sends an ACK packet to the client through the proxy node, and after receiving the ACK packet, the client sends an ACK packet to the server through the proxy node to complete the three-way handshake between the client and the server to establish a TCP connection between the client and the server.

В некоторых вариантах осуществления по настоящей заявке операция приема и передачи серверу запроса на установление соединения, отправленного клиентом, включает указанные ниже операции.In some embodiments of the present application, the operation of receiving and transmitting to the server a connection request sent by the client includes the following operations.

Запрос на установление соединения, отправленный клиентом, принимается в соответствии с заданным маршрутом по умолчанию.A connection request sent by a client is accepted according to the specified default route.

На основе запроса на установление соединения создается сессия, и запрос на установление соединения пересылается на сервер после обновления адреса запроса на установление соединения.Based on the connection request, a session is created and the connection request is forwarded to the server after updating the connection request address.

Согласно некоторым вариантам осуществления по настоящей заявке, содержимое сообщения сеанса включает: серийный номер соединения и размер окна.According to some embodiments of the present application, the contents of a session message include: a connection serial number and a window size.

Следует отметить, что между транспортным уровнем и сетевым уровнем прокси-узла установлен модуль TCP Optimizer (ТСРО), который настроен на двунаправленную пересылку TCP-пакета. Например, если клиент UE желает установить связь с WEB-сервером SP, клиент UE сначала инициирует SYN-запрос с целевым портом 80 на WEB-сервер и настраивает маршрут по умолчанию, чтобы направить SYN-запрос на промежуточный прокси-узел. Прокси-узел настраивает правило пересылки TCP-пакета с целевым портом 80 в стеке протокола, а IP-уровень отправляет пакет для обработки в модуль ТСРО. Модуль ТСРО создает сессию, записывает порядковый номер нового TCP-соединения, размер окна и другую информацию, обновляет МАС-адрес в соответствии с адресом маршрутизации, а затем отправляет пакет через сетевой адаптер. Например, если клиент отправляет пакет на сервер, модуль ТСРО обновляет МАС-адрес клиента до МАС-адреса прокси-узла в соответствии с адресом маршрутизации и отправляет пакет на сервер через сетевой адаптер. IP-адрес источника и порт пакета установления соединения, получаемые сервером, происходят от клиента UE, чтобы отправить пакет SYN+ACK клиенту UE.It should be noted that between the transport layer and the network layer of the proxy node, a TCP Optimizer (TCPO) module is installed, which is configured to forward the TCP packet in both directions. For example, if the UE client wants to establish a connection with the SP WEB server, the UE client first initiates a SYN request with the target port 80 to the WEB server and configures a default route to forward the SYN request to the intermediate proxy node. The proxy node configures a TCP packet forwarding rule with the target port 80 in the protocol stack, and the IP layer sends the packet to the TCPO module for processing. The TCPO module creates a session, records the sequence number of the new TCP connection, the window size and other information, updates the MAC address according to the routing address, and then forwards the packet through the network adapter. For example, if the client sends a packet to the server, the TCPO module updates the MAC address of the client to the MAC address of the proxy node according to the routing address and sends the packet to the server through the network adapter. The source IP address and port of the connection establishment packet obtained by the server come from the client UE to send a SYN+ACK packet to the client UE.

Как показано на фиг. 3 и фиг. 6, в некоторых вариантах осуществления по настоящей заявке операция пересылки пакета взаимодействия между клиентом и сервером на основе стека протоколов пользовательского режима включает указанные ниже операции S401 S404.As shown in Fig. 3 and Fig. 6, in some embodiments of the present application, the operation of forwarding an interaction packet between a client and a server based on a user mode protocol stack includes the following operations S401 S404.

На этапе S401 принимается пакет запроса, отправленный клиентом, и в ответ на пакет запроса клиенту отправляется первый пакет ответа.In step S401, a request packet sent by the client is received, and a first response packet is sent to the client in response to the request packet.

На этапе S402 пакет запроса добавляется в первую очередь и направляется на сервер, после чего сервер отправляет пакет второго ответа в ответ на пакет запроса.In step S402, a request packet is added first and forwarded to the server, after which the server sends a second response packet in response to the request packet.

На этапе S403 принимается пакет второго ответа, и на сервер отправляется пакет подтверждения на основе пакета второго ответа.In step S403, the second response packet is received, and an acknowledgement packet based on the second response packet is sent to the server.

На этапе S404 пакет второго ответа добавляется во вторую буферную очередь и отправляется клиенту.In step S404, the second response packet is added to the second buffer queue and sent to the client.

Следует отметить, что, как показано на фиг.3, после завершения трехэтапного квитирования для установления соединения между клиентом и сервером, клиент может отправить пакет запроса на сервер. Заданный маршрут по умолчанию направляет пакет запроса на прокси-узел. Модуль ТСРО прокси-узла получает пакет запроса, добавляет пакет запроса в буферную очередь А для пересылки пакета запроса на сервер и отправляет пакет АСК клиенту. После получения пакета второго ответа от сервера, модуль ТСРО добавляет пакет второго ответа в очередь В для пересылки пакета второго ответа клиенту и отправляет пакет АСК на сервер для подтверждения получения данных.It should be noted that, as shown in Fig. 3, after the three-way handshake for establishing a connection between the client and the server is completed, the client can send a request packet to the server. The specified default route forwards the request packet to the proxy node. The TCPO module of the proxy node receives the request packet, adds the request packet to the buffer queue A to forward the request packet to the server, and sends an ACK packet to the client. After receiving the second response packet from the server, the TCPO module adds the second response packet to the queue B to forward the second response packet to the client, and sends an ACK packet to the server to acknowledge receipt of the data.

Согласно некоторым вариантам осуществления по настоящей заявке, способ дополнительно включает следующее: в случае, если емкость данных пакета второго ответа во второй буферной очереди больше порогового значения, размер окна пакета запроса, отправляемого на сервер, уменьшается, чтобы снизить скорость отправки пакетов сервером. Как показано на фиг. 3, если сеть на стороне клиента создает слишком большое количество нераспределенных данных в буферной очереди В, размер окна объявления, отправленного на сервер, может быть уменьшен, чтобы проинформировать сервер об уменьшении скорости передачи данных. Таким образом, реализуется оптимизация в процессе взаимодействия пакетов и эффективно решаются проблемы перегрузок, потери пакетов и т.д.According to some embodiments of the present application, the method further comprises the following: if the data capacity of the second response packet in the second buffer queue is greater than a threshold value, the window size of the request packet sent to the server is reduced to reduce the packet sending rate of the server. As shown in Fig. 3, if the network on the client side creates too much unallocated data in the buffer queue B, the window size of the advertisement sent to the server can be reduced to inform the server of the reduction in the data transmission rate. In this way, optimization is realized in the process of packet interaction and problems of congestion, packet loss, etc. are effectively solved.

В некоторых вариантах осуществления по настоящей заявке способ дополнительно включает следующее: в случае, если клиент не получает пакет второго ответа в течение заранее определенного периода времени, пакет второго ответа снова добавляется во вторую буферную очередь и отправляется клиенту. Как показано на фиг. 3, данные в буферной очереди В выводятся из очереди по одному, и пакет данных пересылается клиенту. При получении пакета АСК прокси-узел может немедленно удалить соответствующий пакет из очереди. Может быть установлен таймер повторной передачи. Если клиент не получает пакет данных в течение заранее определенного периода времени, клиент может повторно передать пакет ответа. Таким образом, эффективно предотвращается проблема потери пакетов.In some embodiments of the present application, the method further comprises the following: if the client does not receive the second response packet within a predetermined period of time, the second response packet is again added to the second buffer queue and sent to the client. As shown in Fig. 3, the data in the buffer queue B is taken out of the queue one by one, and the data packet is forwarded to the client. When receiving the ACK packet, the proxy node can immediately remove the corresponding packet from the queue. A retransmission timer can be set. If the client does not receive the data packet within a predetermined period of time, the client can retransmit the response packet. In this way, the packet loss problem is effectively prevented.

Согласно некоторым вариантам осуществления по настоящей заявке, способ дополнительно включает следующее: в случае, если в процессе взаимодействия пакетов будет обнаружена потеря пакетов, размер окна пакета взаимодействия корректируется до заданного порогового значения. Следует отметить, что «заданный порог» здесь может быть «порогом медленного старта». Порог медленного старта можно понимать как максимальное значение медленного старта в процессе отправки пакета. Посредством настройки размера окна, равного порогу медленного старта, можно пропустить этап медленного старта и перейти непосредственно к этапу предотвращения перегрузки, и, таким образом, процесс взаимодействия пакетов между клиентом и сервером оптимизируется и ускоряется.According to some embodiments of the present application, the method further comprises the following: if a packet loss is detected during the packet interaction process, the packet interaction window size is adjusted to a predetermined threshold. It should be noted that the "predetermined threshold" here may be a "slow start threshold". The slow start threshold may be understood as the maximum value of the slow start during the packet sending process. By setting the window size equal to the slow start threshold, the slow start stage can be skipped and directly proceed to the congestion avoidance stage, and thus the packet interaction process between the client and the server is optimized and accelerated.

Как показано на фиг. 2 и фиг. 3, устройство пересылки пакетов для гетерогенной сети, согласно некоторым вариантам осуществления по настоящей заявке, включает модуль пересылки. Модулем пересылки может быть модуль ТСРО, настроенный на пересылку запроса на установление соединения и ответного сообщения между клиентом и сервером, установление соединения между клиентом и сервером и пересылку пакета взаимодействия между клиентом и сервером на основе стека протоколов пользовательского режима.As shown in Fig. 2 and Fig. 3, a packet forwarding device for a heterogeneous network according to some embodiments of the present application includes a forwarding module. The forwarding module may be a TCPO module configured to forward a connection request and a response message between a client and a server, establish a connection between the client and the server, and forward an interaction packet between the client and the server based on a user mode protocol stack.

Согласно устройству пересылки пакетов для гетерогенной сети в вариантах осуществления по настоящей заявке, посредством выполнения пересылки пакетов на транспортном уровне модулем пересылки можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно устройству пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки посредника, а также поддерживается шифрование TLS и т.д., что повышает безопасность и надежность пересылки пакетов.According to the packet forwarding device for a heterogeneous network in the embodiments of the present application, by performing packet forwarding at the transport layer by the forwarding module, it is possible to avoid the bottleneck problem in the proxy service performance caused by multiple copies of a packet in the user mode and kernel mode during forwarding, thereby realizing zero-copy packet forwarding based on the user mode protocol stack and effectively improving the system performance. In addition, according to the packet forwarding device of the present application, there is no need to create a dummy intermediary and there is no risk of a man-in-the-middle attack, and TLS encryption etc. are supported, which improves the security and reliability of packet forwarding.

В машиночитаемом носителе информации, согласно вариантам осуществления по настоящей заявке, хранится программа для осуществления передачи информации. Программа, выполняемая процессором, осуществляет операции вышеописанного способа пересылки пакетов для гетерогенной сети.In the machine-readable information carrier, according to the embodiments of the present application, a program for implementing the transmission of information is stored. The program executed by the processor performs the operations of the above-described method for forwarding packets for a heterogeneous network.

Согласно машиночитаемому носителю в вариантах осуществления по настоящей заявки, посредством выполнения способа пересылки пакетов для гетерогенной сети, пересылка пакетов может выполняться на транспортном уровне прокси-узла, и можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно способу пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки через посредника, а также поддерживается шифрование TLS и т.д., что повышает безопасность и надежность пересылки пакетов.According to the machine-readable medium in the embodiments of the present application, by implementing the packet forwarding method for a heterogeneous network, the packet forwarding can be performed at the transport layer of the proxy node, and the bottleneck problem in the proxy service performance caused by multiple copies of the packet in the user mode and the kernel mode during the forwarding process can be avoided, thereby realizing the zero-copy packet forwarding based on the user mode protocol stack and effectively improving the system performance. In addition, according to the packet forwarding method of the present application, there is no need to create a fictitious intermediary and there is no risk of a man-in-the-middle attack, and TLS encryption, etc. are supported, which improves the security and reliability of the packet forwarding.

Устройство прокси-узла, в соответствии с вариантами осуществления по настоящей заявке, включает: память, процессор и компьютерную программу, которая хранится в памяти и способна работать на процессоре. Компьютерная программа, выполняемая процессором, осуществляет операции вышеописанного способа пересылки пакетов для гетерогенной сети.The proxy node device, in accordance with the embodiments of the present application, includes: a memory, a processor, and a computer program that is stored in the memory and is capable of running on the processor. The computer program, executed by the processor, performs the operations of the above-described method for forwarding packets for a heterogeneous network.

Согласно устройству прокси-узла в вариантах осуществления по настоящей заявке, пересылка пакетов может выполняться на транспортном уровне устройства прокси-узла, и можно избежать проблемы «узкого места» в производительности прокси-службы, вызванной несколькими копиями пакета в пользовательском режиме и режиме ядра в процессе пересылки, тем самым реализуя пересылку пакетов с нулевой копией на основе стека протоколов пользовательского режима, и эффективно улучшая производительность системы. Кроме того, согласно способу пересылки пакетов по настоящей заявке, нет необходимости в создании фиктивного посредника и отсутствует риск атаки через посредника, а также поддерживается шифрование TLS и т.д., что повышает безопасность и надежность пересылки пакетов.According to the device of the proxy node in the embodiments of the present application, packet forwarding can be performed at the transport layer of the proxy node device, and the bottleneck problem in the performance of the proxy service caused by multiple copies of the packet in the user mode and the kernel mode during the forwarding process can be avoided, thereby realizing zero-copy packet forwarding based on the user mode protocol stack and effectively improving the performance of the system. In addition, according to the packet forwarding method of the present application, there is no need to create a dummy intermediary and there is no risk of a man-in-the-middle attack, and TLS encryption, etc., are supported, which improves the security and reliability of packet forwarding.

Следует отметить, что компания Intel запускает проект Data Plane Development Kit (DPDK), который поддерживает отправку и прием сетевых пакетов пользовательского режима. В настоящее время система отправки и приема DPDK используется в основном для пересылки пакетов между сетевыми устройствами. В вариантах осуществления по настоящей заявке DPDK используется в качестве отправляющей и принимающей структуры прозрачного прокси-сервера, а стек протоколов TCP/IP с открытым исходным кодом Berkeley Software Distribution (BSD) используется в качестве стека протоколов пользовательского режима. Также могут использоваться другие стеки протоколов пользовательского режима.It should be noted that Intel is launching a Data Plane Development Kit (DPDK) project that supports sending and receiving user-mode network packets. Currently, the DPDK sending and receiving system is mainly used to forward packets between network devices. In the embodiments of the present application, the DPDK is used as a sending and receiving structure of a transparent proxy server, and the open source Berkeley Software Distribution (BSD) TCP/IP protocol stack is used as a user-mode protocol stack. Other user-mode protocol stacks may also be used.

Принимая в качестве примера, что пользователь мобильного телефона получает доступ к веб-страницам через браузер, ниже представлены способ и устройство пересылки пакетов для гетерогенной сети в соответствии с вариантами осуществления по настоящей заявке. Как показано на фиг. 2 и фиг. 3, прокси-узел встроен между стороной пользователя (UE) и поставщиком услуг (SP), прозрачная пересылка пакетов реализована на основе стека протоколов DPDK+ пользовательский режим TCP/IP, а стек протоколов TCP оптимизирован и ускорен в соответствии с характеристиками передачи данных в беспроводных сетях, чтобы улучшить доступ в Интернет для мобильных пользователей. Как показано на фиг. 2 и фиг. 3, конкретный процесс описывается следующим образом.Taking as an example that a mobile phone user accesses web pages through a browser, a packet forwarding method and device for a heterogeneous network according to the embodiments of the present application are provided below. As shown in Fig. 2 and Fig. 3, a proxy node is embedded between the user side (UE) and the service provider (SP), transparent packet forwarding is realized based on the DPDK+ user mode TCP/IP protocol stack, and the TCP protocol stack is optimized and accelerated according to the data transmission characteristics of wireless networks, so as to improve Internet access for mobile users. As shown in Fig. 2 and Fig. 3, a specific process is described as follows.

Клиент UE инициирует SYN-запрос с целевым портом 80 на WEB-сервер SP и настраивает маршрут по умолчанию для направления SYN-запроса на промежуточный прокси-узел.The UE client initiates a SYN request with target port 80 to the SP WEB server and configures a default route to direct the SYN request to the intermediate proxy node.

Прокси-узел настраивает правило пересылки TCP-пакета с целевым портом 80 в стеке протокола, а IP-уровень отправляет пакет для обработки модулем ТСРО в модуль ТСРО.The proxy node configures a TCP packet forwarding rule with the target port 80 in the protocol stack, and the IP layer sends the packet to the TCP module for processing.

Модуль ТСРО создает сессию, записывает порядковый номер нового TCP-со единения, размер окна и другую информацию, обновляет МАС-адрес в соответствии с адресом маршрутизации, а затем отправляет пакет через сетевой адаптер.The TCPO module creates a session, records the new TCP connection sequence number, window size, and other information, updates the MAC address to match the routing address, and then sends the packet through the network adapter.

IP-адрес источника и порт пакета установления соединения, получаемые SP, происходят от клиента UE, чтобы отправить пакет SYN+ACK в UE.The source IP address and port of the connection establishment packet received by the SP are from the UE client to send the SYN+ACK packet to the UE.

Прокси-узел передает пакет от SP в модуль ТСРО, а модуль ТСРО направляет пакеты SYN+ACK в UE.The proxy node forwards the packet from the SP to the TCPO module, and the TCPO module forwards SYN+ACK packets to the UE.

UE получает пакет SYN+ACK и отправляет пакет АСК, SP получает пакет АСК, и UE завершает трехэтапное квитирование с SP.The UE receives the SYN+ACK packet and sends an ACK packet, the SP receives the ACK packet, and the UE completes the three-way handshake with the SP.

Клиент UE отправляет запрос GET в модуль ТСРО.The UE client sends a GET request to the TCPO module.

Модуль ТСРО принимает пакет данных, заносит пакет данных в буферную очередь А, отправляет пакет АСК в UE и пересылает пакет запроса в SP.The TCPO module receives the data packet, places the data packet into the buffer queue A, sends an ACK packet to the UE, and forwards the request packet to the SP.

Модуль ТСРО получает пакет ответа, отправленный SP, заносит пакет ответа в буферную очередь В и отправляет пакет АСК в SP для подтверждения приема данных. Если сеть на стороне UE создает большое количество нераспределенных данных в очереди В, размер окна объявления, отправляемого в SP, уменьшается, и SP информируется о необходимости снизить скорость передачи данных.The TCPO module receives the response packet sent by the SP, puts the response packet into the buffer queue B, and sends an ACK packet to the SP to acknowledge the receipt of the data. If the network on the UE side creates a large amount of unallocated data in the queue B, the size of the advertisement window sent to the SP is reduced, and the SP is informed to reduce the data transmission rate.

Пакеты данных в буферной очереди В выводятся из очереди по одному и передаются клиенту. Устанавливается таймер повторной передачи, и если таймер истекает, указанный пакет передается повторно, а пакет в очереди удаляется сразу после получения АСК.The data packets in buffer queue B are dequeued one at a time and transmitted to the client. A retransmission timer is set, and if the timer expires, the specified packet is retransmitted, and the packet in the queue is removed immediately after receiving an ACK.

UE активно разрывает соединение. ТСРО прозрачно передает пакет квитирования четыре раза и разрывает соединение с SP.The UE actively releases the connection. The TCPO transparently transmits the acknowledgement packet four times and releases the connection with the SP.

После получения запроса на разрыв соединения от SP, если в очереди В есть нераспределенные сообщения, ТСРО маскируется под UE для разрыва соединения с SP, а затем разрывает соединение с UE после того, как данные в очереди В будут полностью отправлены.After receiving a connection release request from the SP, if there are undistributed messages in queue B, the TCPO masquerades as a UE to release the connection with the SP, and then releases the connection with the UE after the data in queue B is completely sent.

Осуществление пересылки пакетов между клиентом и сервером с помощью вышеуказанного прокси-узла имеет следующие преимущества.Implementing packet forwarding between the client and the server using the above proxy node has the following advantages.

(1) Полностью прозрачный прокси-сервер: как показано на фиг. 2, прокси-узел пересылает пакет на уровне TCP и изменяет физический адрес на уровне IP. Процесс прозрачной передачи трехэтапного квитирования может заменить полный процесс квитирования по сравнению с традиционным прокси-процессом. Модуль ТСРО устанавливается между L3 (сетевой уровень) и L4 (транспортный уровень) стека протоколов TCP/IP пользовательского режима для реализации функции прозрачного прокси. UE инициирует запрос, который по умолчанию направляется на прокси-сервер, при прохождении через модуль ТСРО запрос направляется непосредственно в сеть SP, IP-адреса источника и цели остаются неизменными, а адрес L2 (уровень Ethernet) заполняется на основе фактического маршрута. Пакет, отправленный из SP в UE, пересылается в UE через ТСРО. Прокси-сервер только пересылает TCP-пакет и не выполняет сборку и разборку пакета. Копирование, чтение и запись пакета не задействуются, нет необходимости устанавливать связь между UE и SP, поэтому нет риска атаки через посредника, и также поддерживается шифрование передачи TLS и т.д.(1) Fully transparent proxy: As shown in Fig. 2, the proxy node forwards the packet at the TCP layer and changes the physical address at the IP layer. The transparent forwarding process of the three-way handshake can replace the entire handshake process compared with the traditional proxy process. The TCPO module is installed between L3 (network layer) and L4 (transport layer) of the user mode TCP/IP protocol stack to realize the transparent proxy function. The UE initiates a request, which is forwarded to the proxy by default, when passing through the TCPO module, the request is directly forwarded to the SP network, the source and destination IP addresses remain unchanged, and the L2 (Ethernet layer) address is filled in based on the actual route. The packet sent from the SP to the UE is forwarded to the UE through the TCPO. The proxy only forwards the TCP packet and does not perform packet assembly and disassembly. There is no need to copy, read and write the packet, there is no need to establish communication between UE and SP, so there is no risk of man-in-the-middle attack, and TLS transmission encryption etc. are also supported.

(2) Оптимизация ускорения TCP: модуль ТСРО прозрачного прокси-узла делит ТСР-соединение между UE и SP на два сегмента и гибко управляет размером окна объявления; модуль ТСРО изменяет размер окна объявления в соответствии с длиной буферной очереди для управления скоростью передачи данных со стороны источника. Модуль ТСРО оптимизирует производительность пересылки пакетов TCP посредством буферизации, контроля перегрузки и других механизмов на основе характеристик передачи данных в беспроводной сетевой среде и характеристик поведения мобильных пользователей, тем самым уменьшая снижение скорости доступа в Интернет, вызванное нарушением беспроводной передачи, потерей пакетов и другими проблемами, и улучшая качество доступа в Интернет для мобильных пользователей 2G/3G/4G.(2) TCP acceleration optimization: The TCPO module of the transparent proxy node divides the TCP connection between the UE and the SP into two segments and flexibly controls the advertisement window size; the TCPO module changes the advertisement window size according to the length of the buffer queue to control the data transmission rate of the source side. The TCPO module optimizes the forwarding performance of TCP packets through buffering, congestion control and other mechanisms based on the transmission characteristics of the wireless network environment and the behavior characteristics of mobile users, thereby reducing the degradation of Internet access speed caused by wireless transmission disruption, packet loss and other problems, and improving the Internet access quality for 2G/3G/4G mobile users.

(3) Поддержка разрыва сегментированного соединения: узел, который разрывает связь, активно разрывает связь немедленно, а другая сторона ждет полной отправки данных, прежде чем разрывать соединение.(3) Support segmented connection teardown: The node that tears down the connection actively tears down the connection immediately, and the other side waits for the data to be completely sent before tearing down the connection.

(4) Двунаправленная буферизация данных: после получения АСК пакет данных удаляется из буферной очереди для осуществления буферизации данных.(4) Bidirectional data buffering: After receiving ACK, the data packet is removed from the buffer queue to perform data buffering.

(5) Поддержка время ожидания до повторной передачи: пакет данных повторно передается из буферной очереди без необходимости повторной передачи данных от первоначального отправителя.(5) Support retransmission timeout: The data packet is retransmitted from the buffer queue without the need for the original sender to retransmit the data.

(6) Гибкий контроль перегрузок: после обнаружения потери пакетов начальный размер окна устанавливается равным значению порога медленного старта, и этап медленного старта пропускается, после чего начинается непосредственно этап предотвращения перегрузки.(6) Flexible congestion control: After packet loss is detected, the initial window size is set to the slow start threshold value, and the slow start stage is skipped, and then the congestion avoidance stage itself begins.

(7) Поддержка сортировки пакетов: пакеты, идущие не по порядку, не влияют на пересылку пакетов прокси-узла.(7) Support packet sorting: Out-of-order packets will not affect the proxy node's packet forwarding.

В заключение, согласно схемам прокси-служб, представленным в вариантах осуществления по настоящей заявке, путем встраивания модуля ТСРО, который настроен на двунаправленную пересылку TCP-пакета, в стек протокола TCP/IP пользовательского режима, реализуется полностью прозрачная прокси-служба, добавляется логика оптимизации TCP, и повышается качество доступа к сети клиента. Таким образом, не только устраняется «узкое место» в производительности традиционного прокси-сервера, но и предоставляется открытая система для оптимизации TCP, что обеспечивает устойчивость и надежность родного стека протоколов, а также облегчает реализацию индивидуальных политик для служб.In conclusion, according to the proxy service schemes presented in the embodiments of the present application, by embedding the TCPO module, which is configured to bidirectionally forward a TCP packet, into the TCP/IP protocol stack of the user mode, a fully transparent proxy service is realized, TCP optimization logic is added, and the quality of access to the client network is improved. Thus, not only is the performance bottleneck of the traditional proxy server eliminated, but an open system for TCP optimization is provided, which ensures the stability and reliability of the native protocol stack, and facilitates the implementation of individual policies for services.

Очевидно, что специалисты в данной области должны понимать, что вышеуказанные модули и операции вариантов осуществления по настоящей заявке могут быть реализованы вычислительным устройством общего назначения, и они могут быть централизованы в одном вычислительном устройстве или распределены по сети, состоящей из множества вычислительных устройств. Вышеуказанные модули и операции могут быть реализованы программным кодом, который может выполняться вычислительным устройством, причем они могут быть сохранены в запоминающем устройстве и выполняться вычислительным устройством. В некоторых ситуациях представленные или описанные операции могут выполняться в порядке, отличном от описанного здесь; или они могут существовать в виде модулей интегральных схем, соответственно; или несколько модулей и операций из указанных могут быть составлены в единый модуль интегральной схемы для реализации. Поэтому настоящая заявка не ограничивается каким-либо конкретным сочетанием аппаратного и программного обеспечения.It is obvious that those skilled in the art should understand that the above modules and operations of the embodiments of the present application can be implemented by a general-purpose computing device, and they can be centralized in a single computing device or distributed over a network consisting of a plurality of computing devices. The above modules and operations can be implemented by a program code that can be executed by a computing device, and they can be stored in a memory device and executed by the computing device. In some situations, the operations shown or described can be performed in an order different from that described herein; or they can exist in the form of integrated circuit modules, respectively; or several of the modules and operations mentioned can be composed into a single integrated circuit module for implementation. Therefore, the present application is not limited to any particular combination of hardware and software.

Посредством описания примерных вариантов осуществления можно получить более глубокое и конкретное понимание технических средств, используемых в вариантах осуществления по настоящей заявке для достижения заданной цели и эффективности. Однако сопроводительные чертежи приведены только для справки и примера и не ограничивают настоящую заявку.By describing exemplary embodiments, it is possible to obtain a deeper and more specific understanding of the technical means used in the embodiments of the present application to achieve the intended purpose and effectiveness. However, the accompanying drawings are provided for reference and example only and do not limit the present application.

Claims (24)

1. Способ пересылки пакетов для гетерогенной сети, включающий:1. A packet forwarding method for a heterogeneous network, including: получение запроса на установление соединения, отправленного клиентом, и пересылку запроса на установление соединения на сервер, чтобы установить соединение между клиентом и сервером; иreceiving a connection request sent by the client and forwarding the connection request to the server to establish a connection between the client and the server; and пересылку пакета взаимодействия между клиентом и сервером на основе стека протоколов пользовательского режима;forwarding the interaction packet between the client and the server based on the user mode protocol stack; причем пересылка пакета взаимодействия между клиентом и сервером на основе стека протоколов пользовательского режима включает:wherein the forwarding of the interaction packet between the client and the server based on the user mode protocol stack includes: получение пакета запроса, отправленного клиентом, и отправку клиенту пакета первого ответа в ответ на пакет запроса;receiving a request packet sent by the client and sending a first response packet to the client in response to the request packet; добавление пакета запроса в первую буферную очередь и пересылку пакета запроса на сервер, чтобы сервер отправил пакет второго ответа в ответ на пакет запроса;adding a request packet to the first buffer queue and forwarding the request packet to the server so that the server sends a second response packet in response to the request packet; получение пакета второго ответа и отправку на сервер пакета подтверждения на основе пакета второго ответа; иreceiving a second response packet and sending an acknowledgment packet to the server based on the second response packet; and добавление пакета второго ответа во вторую буферную очередь и отправку пакета второго ответа клиенту.adding the second response packet to the second buffer queue and sending the second response packet to the client. 2. Способ пересылки пакетов для гетерогенной сети по п. 1, отличающийся тем, что установление соединения между клиентом и сервером включает:2. A method for forwarding packets for a heterogeneous network according to paragraph 1, characterized in that establishing a connection between the client and the server includes: получение запроса на установление соединения, отправленного клиентом, и пересылку запроса на установление соединения на сервер, чтобы сервер отправил первое ответное сообщение клиенту в ответ на запрос на установление соединения;receiving a connection request sent by a client and forwarding the connection request to the server so that the server sends a first response message to the client in response to the connection request; получение первого ответного сообщения и пересылку первого ответного сообщения клиенту, чтобы клиент отправил второе ответное сообщение на сервер в ответ на первое ответное сообщение; иreceiving a first response message and forwarding the first response message to the client so that the client sends a second response message to the server in response to the first response message; and получение второго ответного сообщения и пересылку второго ответного сообщения на сервер, чтобы установить соединение между клиентом и сервером.receiving the second response message and forwarding the second response message to the server to establish a connection between the client and the server. 3. Способ пересылки пакетов для гетерогенной сети согласно п. 2, отличающийся тем, что прием запроса на установление соединения, отправленного клиентом, и пересылка запроса на установление соединения на сервер включает:3. A method for forwarding packets for a heterogeneous network according to paragraph 2, characterized in that receiving a request to establish a connection sent by the client and forwarding the request to establish a connection to the server includes: получение запроса на установление соединения, отправленного клиентом, в соответствии с заданным маршрутом по умолчанию; иreceiving a connection request sent by the client in accordance with the specified default route; and создание сессии на основе запроса на установление соединения, и пересылку запроса на установление соединения на сервер после обновления адреса запроса на установление соединения.creating a session based on a connection request, and forwarding the connection request to the server after updating the connection request address. 4. Способ пересылки пакетов для гетерогенной сети согласно п. 3, отличающийся тем, что содержимое сообщения сессии включает: серийный номер соединения и размер окна.4. A method for forwarding packets for a heterogeneous network according to paragraph 3, characterized in that the contents of the session message include: a connection serial number and a window size. 5. Способ пересылки пакетов для гетерогенной сети согласно п. 1, дополнительно включающий:5. A method for forwarding packets for a heterogeneous network according to paragraph 1, additionally including: в случае если емкость данных пакета второго ответа во второй буферной очереди больше порогового значения, уменьшают размер окна пакета запроса, отправляемого на сервер, чтобы снизить скорость отправки пакетов сервером.if the data capacity of the second response packet in the second buffer queue is greater than the threshold value, the window size of the request packet sent to the server is reduced to reduce the packet sending rate by the server. 6. Способ пересылки пакетов для гетерогенной сети согласно п. 1, дополнительно включающий:6. A method for forwarding packets for a heterogeneous network according to paragraph 1, additionally including: в случае если клиент не получает пакет второго ответа в течение заранее определенного периода времени, снова добавляют пакет второго ответа во вторую буферную очередь и отправляют пакет второго ответа клиенту.if the client does not receive the second response packet within a predetermined period of time, add the second response packet back to the second buffer queue and send the second response packet to the client. 7. Способ пересылки пакетов для гетерогенной сети согласно п. 1, дополнительно включающий:7. A method for forwarding packets for a heterogeneous network according to paragraph 1, additionally including: в случае если в процессе взаимодействия пакетов обнаруживают потерю пакетов, регулируют размер окна пакета взаимодействия до заданного порогового значения.If packet loss is detected during the packet interaction process, the packet interaction window size is adjusted to a specified threshold value. 8. Машиночитаемый носитель, на котором хранится программа для осуществления передачи информации, причем программа, при выполнении процессором, выполняет операции способа пересылки пакетов для гетерогенной сети в соответствии с любым из пп. 1-7.8. A machine-readable medium on which a program for transmitting information is stored, wherein the program, when executed by the processor, performs the operations of the method for forwarding packets for a heterogeneous network in accordance with any of paragraphs 1-7. 9. Устройство прокси-узла, включающее: память, процессор и компьютерную программу, которая хранится в памяти и может выполняться на процессоре, причем компьютерная программа, при выполнении процессором, выполняет операции способа пересылки пакетов для гетерогенной сети в соответствии с любым из пп. 1-7.9. A proxy node device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, performs the operations of the packet forwarding method for a heterogeneous network in accordance with any of paragraphs 1-7.
RU2022101659A 2019-09-30 2020-09-01 Method and apparatus for forwarding packets for heterogeneous network RU2822609C9 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910942239.3 2019-09-30

Publications (2)

Publication Number Publication Date
RU2822609C1 RU2822609C1 (en) 2024-07-09
RU2822609C9 true RU2822609C9 (en) 2024-11-15

Family

ID=

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060039374A1 (en) * 2000-02-14 2006-02-23 David Belz Pipelined packet switching and queuing architecture
US20090296685A1 (en) * 2008-05-29 2009-12-03 Microsoft Corporation User-Mode Prototypes in Kernel-Mode Protocol Stacks
RU2543304C2 (en) * 2009-06-29 2015-02-27 Телефонактиеболагет Лм Эрикссон (Пабл) Packet relay method and device
CN105245271A (en) * 2015-10-27 2016-01-13 航天恒星科技有限公司 Satellite communication network acceleration device and method
US20160308771A1 (en) * 2013-12-24 2016-10-20 Huawei Technologies Co., Ltd. Data distribution method and splitter
CN108737413A (en) * 2018-05-15 2018-11-02 北京奇安信科技有限公司 Data processing method, device and the User space protocol stack of transport layer
CN110278161A (en) * 2019-05-06 2019-09-24 阿里巴巴集团控股有限公司 Message diversion method, apparatus and system based on User space protocol stack

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060039374A1 (en) * 2000-02-14 2006-02-23 David Belz Pipelined packet switching and queuing architecture
US20090296685A1 (en) * 2008-05-29 2009-12-03 Microsoft Corporation User-Mode Prototypes in Kernel-Mode Protocol Stacks
RU2543304C2 (en) * 2009-06-29 2015-02-27 Телефонактиеболагет Лм Эрикссон (Пабл) Packet relay method and device
US20160308771A1 (en) * 2013-12-24 2016-10-20 Huawei Technologies Co., Ltd. Data distribution method and splitter
CN105245271A (en) * 2015-10-27 2016-01-13 航天恒星科技有限公司 Satellite communication network acceleration device and method
CN108737413A (en) * 2018-05-15 2018-11-02 北京奇安信科技有限公司 Data processing method, device and the User space protocol stack of transport layer
CN110278161A (en) * 2019-05-06 2019-09-24 阿里巴巴集团控股有限公司 Message diversion method, apparatus and system based on User space protocol stack

Similar Documents

Publication Publication Date Title
EP3979594B1 (en) Packet forwarding method and apparatus for heterogeneous network
JP4672382B2 (en) Endpoint address change in packet networks
US7596802B2 (en) Method and system for providing connection handling
US6950947B1 (en) System for sharing network state to enhance network throughput
EP3090515B1 (en) Communication network with load balancing functionality
EP3533162B1 (en) Handling of data packet transfer via a proxy
US11223567B2 (en) Transmission control protocol session mobility
EP3588906B1 (en) Multi-path management with http/2
US9356989B2 (en) Learning values of transmission control protocol (TCP) options
WO2023151264A1 (en) Load balancing method and apparatus, node, and storage medium
US11444882B2 (en) Methods for dynamically controlling transmission control protocol push functionality and devices thereof
RU2822609C9 (en) Method and apparatus for forwarding packets for heterogeneous network
RU2822609C1 (en) Method and apparatus for forwarding packets for heterogeneous network
US10805981B2 (en) Method and apparatus for closing a transmission control protocol connection for a wireless communications network
US11044350B1 (en) Methods for dynamically managing utilization of Nagle's algorithm in transmission control protocol (TCP) connections and devices thereof
Nikitinskiy et al. A stateless transport protocol in software defined networks
HK40059701A (en) Methods for dynamically controlling transmission control protocol push functionality and devices thereof
HK40059701B (en) Methods for dynamically controlling transmission control protocol push functionality and devices thereof
Rinat IMPLEMENTATION OF HTTP/3 AND QUIC PROTOCOLS: ENHANCING SECURITY AND SPEED OF WEB CONNECTIONS
Leng et al. All-Weather Transport Essentials
CN120710987A (en) A protocol stack applied to 5G gateway and 5G gateway