A data transmission method and system

CN116781402BActive Publication Date: 2026-09-01BEIJING DONGFANG JINGHAI ELECTRONIC TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310916545.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-25
Publication Date
2026-09-01
Estimated Expiration
2043-07-25

AI Technical Summary

Technical Problem

还存在一部分网关系统,使用Linux已存在的虚拟网卡(Tunnel,TUN)技术来实现透明代理,但TUN技术在部份资源受限的Linux系统(如定制的平板设备)上并非默认支持(甚至可能由于资源受限而无法支持),且使用TUN技术实现透明代理必须按照TUN要求设置相关的路由并发送必须的地址解析协议(AddressResolutionProtocol,ARP)报文,对于要实现“透明”代理来说,设置路由的这个限制,可能导致透明代理的“透明性”降低

Benefits of technology

[0051]According to the data transmission method of this invention, by encapsulating a loopback interface, when a data packet sent by the sending end is received, the five-tuple information in the data packet is directly changed based on the routing principle. The resulting new data packet is then transmitted to the protocol proxy component for processing through the loopback interface. Finally, the five-tuple information of the processed data packet is replaced with the original five-tuple information before being sent. This method can achieve transparent proxying of the communication protocol. In the implementation process, there is no need to use TUN technology, which can bypass the problem that the resource-constrained Linux system cannot provide TUN, and avoid the compatibility limitations of using TUN technology. Furthermore, no related routing needs to be set up, which improves the transparency and technical compatibility of the protocol proxy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116781402B_ABST
    Figure CN116781402B_ABST
Patent Text Reader

Abstract

This invention relates to the field of information technology, specifically providing a data transmission method and system. The method includes: acquiring a first data packet sent by a sending end; generating a first loopback interface data packet based on the first data packet, and transmitting the first loopback interface data packet to a protocol proxy component based on the loopback interface; receiving a second loopback interface data packet transmitted by the protocol proxy component based on the loopback interface, wherein the second loopback interface data packet is obtained by the protocol proxy component after processing the message data in the first loopback interface data packet; generating a second data packet based on the second loopback interface data packet, and sending the second data packet to a receiving end; wherein the second data packet includes the same five-tuple as the first data packet. This data transmission method achieves transparent proxying of the communication protocol by encapsulating the loopback interface, improving the transparency and technical compatibility of the protocol proxy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of information technology, and in particular to a data transmission method and system. Background Technology

[0002] In the security protection system of power monitoring system, a gateway system is usually used to isolate different security zones in the power monitoring system. When devices in different security zones need to communicate with each other, they send data packets to the gateway system, which then performs the proxy communication.

[0003] Current gateway systems often lack or fail to proxy communication protocols, especially encrypted secure protocols. They also lack the ability to decrypt and analyze protocol information through proxy technology, or to block protocols when necessary. Other gateway systems, while capable of protocol proxying, require configuring proxy parameters on the protocol client, resulting in opaque proxying. Still other gateway systems utilize Linux's existing virtual network interface (Tunnel, TUN) technology for transparent proxying. However, TUN technology is not supported by default on some resource-constrained Linux systems (such as customized tablets) (and may even be unsupported due to resource limitations). Furthermore, using TUN for transparent proxying requires configuring relevant routes and sending necessary Address Resolution Protocol (ARP) packets according to TUN requirements. This routing limitation can reduce the transparency of the proxy. Summary of the Invention

[0004] In view of the above-mentioned problems in the prior art, the purpose of the present invention is to provide a data transmission method and system that can realize transparent proxy of communication protocols, and improve the transparency and technical compatibility of protocol proxy.

[0005] To address the above problems, the present invention provides a data transmission method, comprising:

[0006] Obtain the first data packet sent by the sender;

[0007] A first loopback interface data packet is generated based on the first data packet, and the first loopback interface data packet is transmitted to the protocol proxy component based on the loopback interface;

[0008] The protocol proxy component receives a second loopback interface data packet transmitted based on the loopback interface, wherein the second loopback interface data packet is obtained by the protocol proxy component after processing the message data in the first loopback interface data packet;

[0009] A second data packet is generated based on the second loopback interface data packet, and the second data packet is sent to the receiving end; wherein, the second data packet includes the same five-tuple as the first data packet.

[0010] Further, the step of generating a first loopback interface data packet based on the first data packet, and transmitting the first loopback interface data packet to the protocol proxy component based on the loopback interface, includes:

[0011] Replace the first quintuple in the first data packet with the second quintuple to obtain the first loopback interface data packet;

[0012] The first loopback interface data packet is sent to the loopback interface so that the protocol proxy component can listen for and obtain the first loopback interface data packet from the loopback interface.

[0013] Further, the step of generating the second data packet based on the second loopback interface data packet includes:

[0014] Determine the target quintuple corresponding to the third quintuple in the second loopback interface data packet from at least one first quintuple; wherein each of the first quintuples is a quintuple in each of the first data packets sent by the sender;

[0015] Replace the third quintuple in the second loopback interface data packet with the target quintuple to obtain the second data packet.

[0016] Further, determining the target quintuple corresponding to the third quintuple in the second loopback interface data packet from at least one first quintuple includes:

[0017] Obtain the first correspondence relationship, which is used to represent the correspondence between the five-tuple in the first data packet and the five-tuple in the corresponding first loopback interface data packet;

[0018] Receive the second correspondence sent by the protocol proxy component, the second correspondence being used to represent the correspondence between the five-tuple in the first loopback interface data packet and the corresponding five-tuple in the second loopback interface data packet;

[0019] Based on the first correspondence and the second correspondence, a target quintuple corresponding to the third quintuple in the second loopback interface data packet is determined from the at least one first quintuple.

[0020] Furthermore, the method further includes:

[0021] Determine the receiving port number corresponding to the first data packet;

[0022] Determine whether the receiving port number matches the target port number that needs to be proxied;

[0023] If a match is determined, the step of generating a first loopback interface data packet based on the first data packet is performed.

[0024] Another aspect of the present invention provides a data transmission method, comprising:

[0025] The protocol parsing component obtains the first data packet sent by the sender;

[0026] The protocol parsing component generates a first loopback interface data packet based on the first data packet, and transmits the first loopback interface data packet to the protocol proxy component based on the loopback interface;

[0027] The protocol proxy component processes the message data in the first loopback interface data packet;

[0028] The protocol proxy component generates a second loopback interface data packet based on the processed message data, and transmits the second loopback interface data packet to the protocol parsing component based on the loopback interface;

[0029] The protocol parsing component generates a second data packet based on the second loopback interface data packet and sends the second data packet to the receiving end; wherein, the second data packet includes the same five-tuple as the first data packet.

[0030] Furthermore, the protocol proxy component includes a proxy server and a proxy client;

[0031] The protocol proxy component processes the message data in the first loopback interface data packet, including:

[0032] The proxy server parses the data packets of the first loopback interface to obtain the corresponding message data;

[0033] The proxy server processes the message data to obtain processed message data, and then sends it to the proxy client.

[0034] The protocol proxy component generates a second loopback interface data packet based on the processed message data, including:

[0035] The proxy client generates a third quintuple corresponding to the processed message data;

[0036] The proxy client generates a second loopback interface data packet based on the third quintuple and the processed message data.

[0037] Furthermore, the method further includes:

[0038] The proxy server determines the target port number that needs to be proxied.

[0039] The proxy server sends the target port number to the protocol parsing component.

[0040] Furthermore, the method further includes:

[0041] The proxy server parses the first loopback interface data packet to obtain the corresponding second quintuple;

[0042] The proxy server determines the corresponding identification information based on the second quintuple and sends it to the proxy client;

[0043] The proxy client records the second correspondence between the identification information and the third quintuple, and sends the second correspondence to the protocol parsing component.

[0044] Another aspect of the present invention provides a data transmission system, including a protocol parsing component and a protocol proxy component;

[0045] The protocol parsing component is used to obtain the first data packet sent by the sender; generate a first loopback interface data packet based on the first data packet; and transmit the first loopback interface data packet to the protocol proxy component based on the loopback interface.

[0046] The protocol proxy component is used to process the message data in the first loopback interface data packet; generate a second loopback interface data packet based on the processed message data, and transmit the second loopback interface data packet to the protocol parsing component based on the loopback interface;

[0047] The protocol parsing component is further configured to generate a second data packet based on the second loopback interface data packet and send the second data packet to the receiving end; wherein the second data packet includes the same quintuple as the first data packet.

[0048] In another aspect, the present invention provides an electronic device including a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the data transmission method as described above.

[0049] In another aspect, the present invention provides a computer-readable storage medium storing at least one instruction or at least one program, wherein the at least one instruction or the at least one program is loaded and executed by a processor to implement the data transmission method as described above.

[0050] Due to the above technical solution, the present invention has the following beneficial effects:

[0051] According to the data transmission method of this invention, by encapsulating a loopback interface, when a data packet sent by the sending end is received, the five-tuple information in the data packet is directly changed based on the routing principle. The resulting new data packet is then transmitted to the protocol proxy component for processing through the loopback interface. Finally, the five-tuple information of the processed data packet is replaced with the original five-tuple information before being sent. This method can achieve transparent proxying of the communication protocol. In the implementation process, there is no need to use TUN technology, which can bypass the problem that the resource-constrained Linux system cannot provide TUN, and avoid the compatibility limitations of using TUN technology. Furthermore, no related routing needs to be set up, which improves the transparency and technical compatibility of the protocol proxy. Attached Figure Description

[0052] To more clearly illustrate the technical solutions of the present invention, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention, and those skilled in the art can obtain other drawings based on these drawings without any creative effort.

[0053] Figure 1 This is a schematic diagram of the implementation environment provided in one embodiment of the present invention;

[0054] Figure 2 This is a schematic diagram of the gateway system provided in one embodiment of the present invention;

[0055] Figure 3 This is a flowchart of a data transmission method provided in one embodiment of the present invention;

[0056] Figure 4 This is a flowchart of a data transmission method provided in another embodiment of the present invention;

[0057] Figure 5 This is a flowchart of a data transmission method provided in another embodiment of the present invention;

[0058] Figure 6 This is a schematic diagram of the structure of a data transmission device provided in one embodiment of the present invention;

[0059] Figure 7 This is a schematic diagram of the structure of an electronic device provided in one embodiment of the present invention. Detailed Implementation

[0060] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0061] Reference manual attached Figure 1 It illustrates a schematic diagram of the implementation environment of a data transmission method provided in an embodiment of the present invention, such as... Figure 1 As shown, the implementation environment may include a business system 110, a gateway system 120, and a plant system 130. The gateway system 120 can be directly or indirectly connected to the business system 110 and the plant system 130 via wired or wireless communication, and this embodiment of the invention does not impose any restrictions on this.

[0062] Specifically, the business system 110 may include a dispatch automation master station system and an operation ticket system of a power monitoring system, and the plant system 130 may include equipment such as substations and power plants. The gateway system 120 may use the method provided in the embodiments of the present invention to achieve transparent proxying of various types of communication protocols, and decrypt and analyze protocol information through proxy technology, and block, modify and control protocol information when necessary, thereby ensuring the communication security between the business system 110 and the plant system 130.

[0063] It should be noted that, Figure 1 The implementation environment shown is merely exemplary; in practical applications, this implementation environment may also include more than [specific examples / specifications]. Figure 1 The embodiments of the present invention do not limit the number of more or fewer components shown.

[0064] Furthermore, in conjunction with the appendix to the reference manual Figure 2 It shows a schematic diagram of the structure of a gateway system 120 provided in an embodiment of the present invention, as follows: Figure 2 As shown, the gateway system 120 may include a protocol parsing component 121, a loopback interface 122, and a protocol proxy component 123. The protocol proxy component 122 can simultaneously implement both server and client versions of the communication protocols that need to be proxied, enabling information transfer from server to client and providing an information data observer interface. In other words, the protocol proxy component 123 may include a proxy server 1231 and a proxy client 1232.

[0065] Specifically, the protocol parsing component 121 can receive protocol information (i.e., message data) of various types of communication protocols through the network port, and transmit the protocol information of the communication protocols that need to be proxied to the proxy server 1231 through the loopback interface 122. The proxy server 1231 can decrypt and analyze the protocol information, and block, modify and control the protocol information when necessary. The proxy client 1232 can transmit the protocol information processed by the proxy server 1231 to the protocol parsing component 121 through the loopback interface 122, and then forward it through the network port.

[0066] It should be noted that, Figure 2 The gateway system shown is exemplary; in practical applications, this gateway system may also include more than [specific features]. Figure 2 The embodiments of the present invention do not limit the number of more or fewer components shown.

[0067] Reference manual attached Figure 3 This illustrates the flow of a data transmission method provided by an embodiment of the present invention, which can be applied to... Figure 2 In the gateway system, specifically such as Figure 3 As shown, the method may include the following steps:

[0068] S301: The protocol parsing component obtains the first data packet sent by the sender.

[0069] In this embodiment of the invention, the transmitting end can be different devices in different application scenarios. For example, in a power monitoring system scenario, the transmitting end can be various devices in the business system, which may include the power monitoring system's dispatch automation master station system and operation ticket system, etc. The transmitting end can also be various devices in a power plant system, such as substations and power plants.

[0070] In this embodiment of the invention, the sending end can send a first data packet to the protocol parsing component using a pre-established communication protocol connection. Correspondingly, the protocol parsing component can receive the first data packet sent by the sending end through a network port.

[0071] The first data packet may include a first 5-tuple and message data. The first 5-tuple may include a source Internet Protocol Address (IP) address, a source port number, a destination IP address, a destination port number, and a communication protocol. The source IP address is the IP address of the sending end, the source port number is a randomly generated port number, the destination IP address is the IP address of the receiving end, and the destination port number is the port number of the communication protocol service used to transmit the first data packet. The communication protocol is the communication protocol used in this communication.

[0072] The communication protocol can be any existing type of communication protocol, including encrypted protocols. For example, the communication protocol can include, but is not limited to, Hypertext Transfer Protocol (HTTP), Transmission Control Protocol (TCP), Internet Protocol (IP), and Secure Shell (SSH) protocol. This embodiment of the invention does not limit the type of communication protocol.

[0073] It should be noted that, in this embodiment of the invention, the sending end that sends data to the protocol parsing component can be one or more, and the first data packet sent by the sending end can also be one or more. Different first data packets can be sent using different communication protocols, and this embodiment of the invention does not impose specific restrictions on this.

[0074] In one possible embodiment, before executing step S301, the protocol proxy component may also start setting the target port number of the communication protocol to be proxied and start the protocol service, so that the protocol parsing component only executes step S302 when it receives a data packet from the corresponding port. Different communication protocols may correspond to different port numbers.

[0075] Specifically, the protocol proxy component may include a proxy server and a proxy client; the method may further include: the proxy server determining the target port number to be proxied; the proxy server sending the target port number to the protocol parsing component. The target port number may be one or more.

[0076] Accordingly, after step S301, the method may further include: the protocol parsing component determining the receiving port number corresponding to the first data packet; the protocol parsing component determining whether the receiving port number matches the target port number that needs to be proxied; if it is determined that they match, the protocol parsing component executes step S302.

[0077] The receiving port number can be the port number of the communication protocol service that transmits the first data packet. Specifically, the destination port number can be obtained from the first 5-tuple of the first data packet and used as the receiving port number corresponding to the first data packet.

[0078] Specifically, the protocol parsing component can compare the receiving port number with each of one or more target port numbers. If the receiving port number is the same as a target port number, it can be determined that the receiving port number matches the target port number that needs to be proxied; otherwise, it can be determined that they do not match.

[0079] For example, assuming the proxy server determines that the target port numbers to be proxied are 120, 123, and 128, and the first 5-tuple of the first data packet received by the protocol parsing component is "source IP address: 1.1.1.1; source port number: 124; destination IP address: 1.1.1.2; destination port number: 123; communication protocol: TCP", then it can be determined that the receiving port number corresponding to the first data packet is 123, which matches the target port number to be proxied.

[0080] It is understood that, by pre-setting the protocol port number to be proxied, the embodiments of the present invention can achieve proxying of any known protocol (including encrypted protocols) based on the port number, and can achieve precise control over the protocol.

[0081] S302: The protocol parsing component generates a first loopback interface data packet based on the first data packet.

[0082] In this embodiment of the invention, by encapsulating the loopback interface, the IP address and port number in the data packet can be directly changed based on the routing principle, and then transmitted to the protocol proxy component through the loopback interface to realize the communication protocol proxy.

[0083] In practical applications, since the encapsulated loopback interface only has one IP address, 127.0.0.1, data packets with other IP addresses sent through the loopback interface will not enter the protocol stack but will be directly filtered out. Therefore, the protocol parsing component can convert the real IP address in the first data packet to 127.0.0.1, thereby converting the real data packet into a data packet on the loopback interface, allowing the data packet to enter the protocol stack and be read and processed by the proxy server and proxy client.

[0084] In one possible embodiment, the protocol parsing component generating the first loopback interface data packet based on the first data packet may include: the protocol parsing component replacing the first quintuple in the first data packet with the second quintuple to obtain the first loopback interface data packet.

[0085] Specifically, after receiving the first data packet, the protocol parsing component can parse the first data packet to obtain the corresponding first 5-tuple and message data. The protocol parsing component can also generate a second 5-tuple, which can be a loopback interface 5-tuple, that is, the source IP address and destination IP address in the second 5-tuple are both the loopback interface IP address 127.0.0.1.

[0086] Specifically, the destination port number in the second 5-tuple can be the port number of the loopback interface, which can be predetermined by the proxy server in the protocol proxy component and sent to the protocol parsing component. The destination port number in the second 5-tuple corresponds to the target port number that needs to be proxied. The source port number in the second 5-tuple can be generated according to preset rules. The rules can be preset according to actual conditions, as long as the generated port number is not repeated in the entire system. This embodiment of the invention does not impose specific restrictions on this.

[0087] In practical applications, when determining the target port number to be proxied, the proxy server can simultaneously determine the corresponding loopback interface port number and register the correspondence between the target port number and the loopback interface port number as a communication parameter from the network port to the loopback interface to the protocol parsing component. When the protocol parsing component receives a data packet from the port corresponding to the receiving port number that matches a certain target port number, it can generate a corresponding second quintuple based on the loopback interface port number corresponding to the target port number.

[0088] For example, assuming the proxy server determines that the target port numbers to be proxied are 120, 123, and 128, and the corresponding loopback interface port numbers are b, a, and c respectively, then the communication parameters from the network port to the loopback interface direction can be determined as 120→b, 123→a, and 128→c and registered with the protocol parsing component. When the protocol parsing component receives a first data packet with the first 5-tuple "Source IP address: 1.1.1.1; Source port number: 124; Destination IP address: 1.1.1.2; Destination port number: 123; Communication protocol: TCP", it can determine that the receiving port number corresponding to the first data packet is 123, the target port number matching the receiving port number is 123, and its corresponding loopback interface port number is a. Therefore, the protocol parsing component can generate a second 5-tuple "Source IP address: 127.0.0.1; Source port number: 10001; Destination IP address: 127.0.0.1; Destination port number: a; Communication protocol: TCP". The source port number 10001 is generated according to a preset rule, and the destination port number is the loopback interface port number a.

[0089] Specifically, after the protocol parsing component generates the second quintuple, it can use the second quintuple to replace the first quintuple in the first data packet, thereby forming a first loopback interface data packet that includes the second quintuple and the message data in the first data packet.

[0090] It is understood that the embodiments of the present invention, by encapsulating the loopback interface, directly change the five-tuple information in the data packet based on the routing principle, without the need to set related routes as in TUN, thus improving the transparency of the communication protocol proxy.

[0091] In one possible embodiment, after the protocol parsing component generates the second quintuple, it can also record the correspondence between the first quintuple and the second quintuple, thereby obtaining a first correspondence to represent the correspondence between the quintuple in the first data packet and the quintuple in the corresponding first loopback interface data packet.

[0092] It is understood that by recording the first correspondence, the embodiments of the present invention facilitate the subsequent retrieval of the original quintuple corresponding to the loopback interface data packet based on the first correspondence, thereby improving the overall system operating efficiency.

[0093] S303: The protocol parsing component transmits the first loopback interface data packet to the protocol proxy component based on the loopback interface.

[0094] In this embodiment of the invention, the protocol parsing component can transmit the generated first loopback interface data packet through the loopback interface.

[0095] In one possible embodiment, the protocol parsing component transmitting the first loopback interface data packet to the protocol proxy component based on the loopback interface may include: the protocol parsing component sending the first loopback interface data packet to the loopback interface, so that the protocol proxy component can listen for and obtain the first loopback interface data packet from the loopback interface.

[0096] Accordingly, the proxy server in the protocol proxy component can listen to each port of the loopback interface, or it can listen only to the ports corresponding to the loopback interface port numbers that are pre-determined to be proxied target port numbers. When the proxy server listens to the first loopback interface data packet, it can obtain the first loopback interface data packet from the loopback interface.

[0097] S304: The protocol proxy component processes the message data in the first loopback interface data packet.

[0098] In this embodiment of the invention, a communication protocol proxy function can be implemented through a protocol proxy component, including but not limited to functions such as decryption, blocking, modification, control, and encryption of communication protocol content.

[0099] In practical applications, the protocol proxy component may include a proxy server and a proxy client. The protocol parsing component can transmit the first loopback interface data packet to the proxy server. After obtaining the first loopback interface data packet, the proxy server can simulate the loopback interface address to create a proxy client that connects to the real protocol service.

[0100] In one possible embodiment, refer to the appendix to the specification. Figure 4 The protocol proxy component processes the message data in the first loopback interface data packet, which may include:

[0101] S3041: The proxy server parses the data packet of the first loopback interface to obtain the corresponding message data.

[0102] S3042: The proxy server processes the message data to obtain processed message data.

[0103] S3043: The proxy server sends the processed message data to the proxy client.

[0104] Specifically, the proxy server can use existing parsing methods to parse the message data, or it can use existing data processing methods to process the parsed message data. This embodiment of the invention will not elaborate further. The processing of the message data may include, but is not limited to, blocking, modification, and control, and this embodiment of the invention does not impose specific limitations on these methods.

[0105] In one possible embodiment, the method may further include: the proxy server parsing the first loopback interface data packet to obtain the corresponding second 5-tuple; the proxy server determining the corresponding identification information based on the second 5-tuple and sending it to the proxy client.

[0106] Specifically, the proxy server can use existing parsing methods to parse and obtain the second quintuple, which will not be described in detail here.

[0107] Alternatively, since the source port number generated by the protocol parsing component is unique when generating the second 5-tuple, the proxy server can obtain the source port number in the second 5-tuple as the identification information corresponding to the second 5-tuple. That is, the proxy server can send the source port number in the second 5-tuple to the proxy client.

[0108] Alternatively, the proxy server may also send the parsed second quintuple to the proxy client.

[0109] It is understood that, in this embodiment of the invention, the identification information corresponding to the second quintuple or the second quintuple is sent to the proxy client to facilitate the subsequent recording of the second correspondence.

[0110] S305: The protocol proxy component generates a second loopback interface data packet based on the processed message data.

[0111] In this embodiment of the invention, the protocol proxy component can transmit the processed message data to the protocol parsing component via the loopback interface, so that the protocol parsing component can send it to the receiving end. Specifically, the protocol proxy component can first generate a data packet that can be sent through the loopback interface, i.e., a second loopback interface data packet, based on the processed message data.

[0112] In practical applications, the protocol proxy component may include a proxy server and a proxy client. The proxy client can connect to the actual protocol service to realize the communication protocol proxy function.

[0113] In one possible embodiment, the protocol proxy component generating a second loopback interface data packet based on the processed message data may include:

[0114] S3051: The proxy client generates a third quintuple corresponding to the processed message data;

[0115] S3052: The proxy client generates a second loopback interface data packet based on the third quintuple and the processed message data.

[0116] Specifically, in order to enable the second loopback interface data packets to be transmitted through the loopback interface, the source IP address and destination IP address in the third 5-tuple generated by the proxy client are both the loopback interface IP address 127.0.0.1. The source port number and destination port number in the third 5-tuple can be generated according to preset rules. These rules can be pre-set according to actual conditions, as long as the generated port numbers are not repeated throughout the system. This embodiment of the invention does not impose specific restrictions on this.

[0117] For example, the proxy client can generate the third 5-tuple as "Source IP address: 127.0.0.1; Source port number: 20001; Destination IP address: 127.0.0.1; Destination port number: 30001; Communication protocol: TCP". The source port number 20001 and the destination port number 30001 are generated according to preset rules.

[0118] Specifically, the proxy client can use existing methods to package the third quintuple and the processed message data to obtain the second loopback interface data packet.

[0119] In one possible embodiment, after the proxy client receives the identification information corresponding to the second quintuple sent by the proxy server, it can record the correspondence between the identification information and the third quintuple to obtain a second correspondence. The second correspondence is then registered as a communication parameter from the loopback interface to the network port to the protocol parsing component, so that in subsequent steps the protocol parsing component can determine the original quintuple corresponding to the third quintuple based on the second correspondence and the recorded first correspondence.

[0120] Alternatively, if the identification information is the source port number in the second quintuple, the proxy client can record the correspondence between the source port number and the third quintuple to obtain a second correspondence.

[0121] For example, assuming the proxy server sends the source port number 10001 from the second quintuple to the proxy client, the proxy client can record the correspondence between the source port number 10001 and the third quintuple "Source IP address: 127.0.0.1; Source port number: 20001; Destination IP address: 127.0.0.1; Destination port number: 30001; Communication protocol: TCP", thus obtaining a second correspondence. The proxy client can register the obtained second correspondence: source port number 10001 → "Source IP address: 127.0.0.1; Source port number: 20001; Destination IP address: 127.0.0.1; Destination port number: 30001; Communication protocol: TCP" as communication parameters from the loopback interface to the network port direction to the protocol parsing component.

[0122] Alternatively, when the proxy server sends the second quintuple to the proxy client, the proxy client can directly record the correspondence between the second quintuple and the third quintuple to obtain the second correspondence.

[0123] It is understood that by recording the second correspondence, the embodiments of the present invention facilitate the subsequent retrieval of the original quintuple corresponding to the loopback interface data packet based on the second correspondence, thereby improving the overall system operating efficiency.

[0124] S306: The protocol proxy component transmits the second loopback interface data packet to the protocol parsing component based on the loopback interface.

[0125] In this embodiment of the invention, the protocol proxy component can send the second loopback interface data packet to the loopback interface. Correspondingly, the protocol parsing component can receive the second loopback interface data packet from the loopback interface.

[0126] In practical applications, the protocol proxy component may include a proxy server and a proxy client. The proxy client may send the second loopback interface data packet according to the third quintuple generated in step S3051, so as to send the second loopback interface data packet to the loopback interface.

[0127] In one possible embodiment, the proxy client may also register the recorded second correspondence as a communication parameter from the loopback interface to the network port to the protocol parsing component.

[0128] S307: The protocol parsing component generates a second data packet based on the second loopback interface data packet and sends the second data packet to the receiving end; wherein, the second data packet includes the same 5-tuple as the first data packet.

[0129] In this embodiment of the invention, after receiving the second loopback interface data packet, the protocol parsing component can replace the 5-tuple in the second loopback interface data packet with the original 5-tuple (i.e., the 5-tuple of the first data packet corresponding to the second loopback interface data packet), and then send the obtained second data packet to the receiving end through the network interface. Since the 5-tuple of the data packet received by the receiving end is the same as the 5-tuple of the data packet sent by the sending end, it cannot perceive the protocol proxy process of the gateway system. In other words, the method provided by this embodiment of the invention can achieve protocol proxy transparency.

[0130] In one possible embodiment, the protocol parsing component generating the second data packet based on the second loopback interface data packet may include: the protocol parsing component determining a target quintuple corresponding to a third quintuple in the second loopback interface data packet from at least one first quintuple; wherein each of the first quintuples is a quintuple in each of the first data packets sent by the sender; the protocol parsing component replacing the third quintuple in the second loopback interface data packet with the target quintuple to obtain the second data packet.

[0131] Specifically, since the protocol parsing component can receive one or more first data packets sent by one or more senders through the network interface, and each first data packet includes a first 5-tuple, the protocol parsing component can obtain at least one first 5-tuple (i.e., the original 5-tuple). When the protocol parsing component receives a second loopback interface data packet transmitted from the loopback interface, it needs to determine the original 5-tuple corresponding to the third 5-tuple in the second loopback interface data packet as the target 5-tuple.

[0132] Alternatively, the protocol parsing component can search for the target quintuple corresponding to the third quintuple from at least one first quintuple obtained, based on the second correspondence sent by the protocol proxy component and the first correspondence recorded by itself.

[0133] Specifically, the protocol parsing component determining the target quintuple corresponding to the third quintuple in the second loopback interface data packet from at least one first quintuple may include: the protocol parsing component obtaining a first correspondence, the first correspondence representing the correspondence between quintuples in the first data packet and quintuples in the corresponding first loopback interface data packet; the protocol parsing component receiving a second correspondence sent by the protocol proxy component, the second correspondence representing the correspondence between quintuples in the first loopback interface data packet and quintuples in the corresponding second loopback interface data packet; and the protocol parsing component determining the target quintuple corresponding to the third quintuple in the second loopback interface data packet from the at least one first quintuple based on the first correspondence and the second correspondence.

[0134] Alternatively, when the second correspondence is a correspondence between the identifier information of the second quintet and the third quintet, the identifier information corresponding to the third quintet can be determined first based on the second correspondence, and then the corresponding second quintet can be determined based on the identifier information. Then, the first quintet corresponding to the second quintet can be determined based on the first correspondence, thereby obtaining the target quintet corresponding to the third quintet in the second loopback interface data packet.

[0135] For example, suppose the protocol parsing component receives the second correspondence sent by the protocol proxy component as follows: source port number 10001 → "source IP address: 127.0.0.1; source port number: 20001; destination IP address: 127.0.0.1; destination port number: 30001; communication protocol: TCP". The protocol parsing component can determine, based on the second correspondence, that the second quintuplet corresponding to the third quintuplet "Source IP address: 127.0.0.1; Source port number: 20001; Destination IP address: 127.0.0.1; Destination port number: 30001; Communication protocol: TCP" is "Source IP address: 127.0.0.1; Source port number: 10001; Destination IP address: 127.0.0.1; Destination port number: a; Communication protocol: TCP". Then, based on the first correspondence recorded by the protocol parsing component, the first quintuplet corresponding to the second quintuplet can be determined as "Source IP address: 1.1.1.1; Source port number: 124; Destination IP address: 1.1.1.2; Destination port number: 123; Communication protocol: TCP".

[0136] Alternatively, when the second correspondence is a correspondence between the second quintuple and the third quintuple, the second quintuple corresponding to the third quintuple can be directly determined according to the second correspondence, and the first quintuple corresponding to the second quintuple can be determined according to the first correspondence, thereby obtaining the target quintuple corresponding to the third quintuple in the second loopback interface data packet.

[0137] Specifically, after obtaining the second data packet, the protocol parsing component can send the second data packet to the receiving end through the network port.

[0138] It is understandable that, compared to the method of using TUN technology to implement transparent proxy, the data transmission method of this invention, in addition to forwarding the data packets that already exist on the network, does not need to send corresponding data packets according to routing needs, which can reduce network bandwidth consumption and save system network resources.

[0139] In one possible embodiment, when the protocol parsing component receives the response message data packet returned by the receiving end, it can proceed according to... Figure 3 The steps in the illustrated embodiment are reversed to send the response message data packet to the sending end.

[0140] Specifically, when the protocol parsing component receives the third data packet (i.e., the response message data packet) returned by the receiving end from the network interface, it can replace the five-tuple of the third data packet with the loopback interface five-tuple, and send the resulting third loopback interface data packet to the protocol proxy component through the loopback interface. The proxy client in the protocol proxy component receives and processes the response message data in the third loopback interface data packet, and sends the processed response message data to the proxy server in the protocol proxy component. The proxy server then connects and sends the fourth loopback interface data packet generated based on the processed response message data to the protocol parsing component. The protocol parsing component can replace the five-tuple in the received fourth loopback interface data packet with the original five-tuple (i.e., the five-tuple of the third data packet), obtain the fourth data packet, and send it to the sending end through the network interface.

[0141] It should be noted that the transmission method of the protocol parsing component after receiving the response message data packet can refer to [the relevant documentation / reference]. Figure 3 and Figure 4 The method embodiments shown are not described in detail here.

[0142] In summary, the data transmission method according to embodiments of the present invention, by encapsulating a loopback interface, directly modifies the 5-tuple information in the data packet based on routing principles when receiving the data packet sent by the sending end. The resulting new data packet is then transmitted to the protocol proxy component for processing via the loopback interface. Finally, the 5-tuple information of the processed data packet is replaced with the original 5-tuple information before being sent. This enables transparent proxying of the communication protocol. The implementation does not require the use of TUN technology, thus bypassing the issue of resource-constrained Linux systems not providing TUN and avoiding compatibility limitations associated with TUN technology. Furthermore, it eliminates the need for setting up related routes, improving the transparency and technical compatibility of the protocol proxy.

[0143] Reference manual attached Figure 5 It illustrates the flow of a data transmission method provided by another embodiment of the present invention, which can be applied to... Figure 2 In the protocol parsing component of the gateway system, specifically such as Figure 5 As shown, the method may include the following steps:

[0144] S501: Obtain the first data packet sent by the sender.

[0145] S502: Generate a first loopback interface data packet based on the first data packet, and transmit the first loopback interface data packet to the protocol proxy component based on the loopback interface.

[0146] In one possible embodiment, generating a first loopback interface data packet based on the first data packet and transmitting the first loopback interface data packet to the protocol proxy component based on the loopback interface may include: replacing the first 5-tuple in the first data packet with a second 5-tuple to obtain the first loopback interface data packet; sending the first loopback interface data packet to the loopback interface so that the protocol proxy component can listen for and obtain the first loopback interface data packet from the loopback interface.

[0147] S503: Receive the second loopback interface data packet transmitted by the protocol proxy component based on the loopback interface, wherein the second loopback interface data packet is obtained by the protocol proxy component after processing the message data in the first loopback interface data packet.

[0148] S504: Generate a second data packet based on the second loopback interface data packet, and send the second data packet to the receiving end; wherein, the second data packet includes the same 5-tuple as the first data packet.

[0149] In one possible embodiment, generating the second data packet based on the second loopback interface data packet may include: determining a target quintuple from at least one first quintuple that corresponds to a third quintuple in the second loopback interface data packet; wherein each of the first quintuples is a quintuple in each of the first data packets sent by the sender; and replacing the third quintuple in the second loopback interface data packet with the target quintuple to obtain the second data packet.

[0150] Specifically, determining the target quintuple corresponding to the third quintuple in the second loopback interface data packet from at least one first quintuple may include: obtaining a first correspondence, the first correspondence representing the correspondence between quintuples in the first data packet and quintuples in the corresponding first loopback interface data packet; receiving a second correspondence sent by the protocol proxy component, the second correspondence representing the correspondence between quintuples in the first loopback interface data packet and quintuples in the corresponding second loopback interface data packet; and determining the target quintuple corresponding to the third quintuple in the second loopback interface data packet from the at least one first quintuple based on the first correspondence and the second correspondence.

[0151] In one possible embodiment, the method may further include: determining the sending port information corresponding to the first data packet; determining whether the sending port information matches the target port information that needs to be proxied; and if a match is determined, performing the step of generating a first loopback interface data packet based on the first data packet.

[0152] It should be noted that the specific details of each step in the embodiments of the present invention can be found by referring to... Figure 3 and Figure 4 The specific details of each step in the method embodiment shown will not be repeated here.

[0153] An embodiment of the present invention also provides a data transmission system, which can be configured in Figure 2In the gateway system, the data transmission system may include a protocol parsing component and a protocol proxy component. The protocol parsing component is used to acquire a first data packet sent by the sender; generate a first loopback interface data packet based on the first data packet, and transmit the first loopback interface data packet to the protocol proxy component based on the loopback interface; the protocol proxy component is used to process the message data in the first loopback interface data packet; generate a second loopback interface data packet based on the processed message data, and transmit the second loopback interface data packet to the protocol parsing component based on the loopback interface; the protocol parsing component is also used to generate a second data packet based on the second loopback interface data packet, and send the second data packet to the receiver; wherein the second data packet includes the same five-tuple as the first data packet.

[0154] In one possible embodiment, the protocol proxy component may include a proxy server and a proxy client. The proxy server is configured to parse the first loopback interface data packet to obtain corresponding message data; process the message data to obtain processed message data, and send it to the proxy client; the proxy client is configured to generate a third quintuple corresponding to the processed message data; and generate a second loopback interface data packet based on the third quintuple and the processed message data.

[0155] Reference manual attached Figure 6 This diagram illustrates a structural schematic of a data transmission device 600 according to an embodiment of the present invention. The device 600 can be disposed in... Figure 2 In the protocol parsing component of the gateway system, specifically such as Figure 6 As shown, the device 600 may include:

[0156] The acquisition module 610 is used to acquire the first data packet sent by the sending end;

[0157] The transmission module 620 is used to generate a first loopback interface data packet based on the first data packet, and transmit the first loopback interface data packet to the protocol proxy component based on the loopback interface.

[0158] The receiving module 630 is used to receive the second loopback interface data packet transmitted by the protocol proxy component based on the loopback interface, wherein the second loopback interface data packet is obtained by the protocol proxy component after processing the message data in the first loopback interface data packet;

[0159] The sending module 640 is used to generate a second data packet based on the second loopback interface data packet and send the second data packet to the receiving end; wherein the second data packet includes the same five-tuple as the first data packet.

[0160] In one possible embodiment, the device 600 may further include:

[0161] The determining module is used to determine the sending port information corresponding to the first data packet;

[0162] The judgment module is used to determine whether the sending port information matches the target port information that needs to be proxied;

[0163] The transmission module 620 is specifically used to perform the following steps when a match is determined: generating a first loopback interface data packet based on the first data packet, and transmitting the first loopback interface data packet to the protocol proxy component based on the loopback interface.

[0164] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus provided in the above embodiments and the corresponding method embodiments belong to the same concept, and the specific implementation process can be found in the corresponding method embodiments, which will not be repeated here.

[0165] An embodiment of the present invention also provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, the at least one instruction or the at least one program being loaded and executed by the processor to implement the data transmission method provided in the above method embodiments.

[0166] Memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. Memory can primarily include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for the functions, etc.; the data storage area can store data created based on the use of the device, etc. Furthermore, memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory can also include a memory controller to provide the processor with access to the memory.

[0167] Refer to the attached reference manual Figure 7The diagram shown is a block diagram of an electronic device 700 according to an embodiment of the present invention. The electronic device 700 may include one or more processors 702, system control logic 708 connected to at least one of the processors 702, system memory 704 connected to the system control logic 708, non-volatile memory (NVM) 706 connected to the system control logic 708, and network interface 710 connected to the system control logic 708.

[0168] Processor 702 may include one or more single-core or multi-core processors. Processor 702 may include any combination of general-purpose processors and special-purpose processors (e.g., graphics processors, application processors, baseband processors, etc.). In embodiments herein, processor 702 may be configured to perform operations according to... Figures 3 to 5 One or more embodiments of the various embodiments shown.

[0169] In some embodiments, system control logic 708 may include any suitable interface controller to provide any suitable interface to at least one of the processors 702 and / or any suitable device or component communicating with system control logic 708.

[0170] In some embodiments, system control logic 708 may include one or more memory controllers to provide an interface to system memory 704. System memory 704 may be used to load and store data and / or instructions. In some embodiments, memory 704 of device 700 may include any suitable volatile memory, such as suitable dynamic random access memory (DRAM).

[0171] NVM / Memory 706 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. In some embodiments, NVM / Memory 706 may include any suitable non-volatile memory such as flash memory and / or any suitable non-volatile storage device, such as at least one of HDD (Hard Disk Drive), CD (Compact Disc) drive, and DVD (Digital Versatile Disc) drive.

[0172] NVM / Storage 706 may include a portion of storage resources mounted on the device 700, or it may be accessible by the device but is not necessarily part of the device. For example, NVM / Storage 706 may be accessed over a network via network interface 710.

[0173] Specifically, system memory 704 and NVM / memory 706 may each include a temporary copy and a permanent copy of instruction 720. Instruction 720 may include, when executed by at least one of processors 702, causing device 700 to perform, as Figures 3 to 5 Instructions for the data transmission method shown. In some embodiments, instructions 720, hardware, firmware, and / or their software components may additionally / alternatively be located in system control logic 708, network interface 710, and / or processor 702.

[0174] Network interface 710 may include a transceiver for providing a radio interface to device 700, thereby enabling communication with any other suitable device (such as a front-end module, antenna, etc.) via one or more networks. In some embodiments, network interface 710 may be integrated into other components of device 700. For example, network interface 710 may be integrated into at least one of the following: a communication module of processor 702, system memory 704, NVM / memory 706, and a firmware device (not shown) with instructions, which, when at least one of processor 702 executes the instructions, enable device 700 to implement... Figures 3 to 5 One or more embodiments of the various embodiments shown.

[0175] The network interface 710 may further include any suitable hardware and / or firmware to provide a multiple-input multiple-output radio interface. For example, the network interface 710 may be a network adapter, a wireless network adapter, a telephone modem, and / or a wireless modem.

[0176] In one embodiment, at least one of the processors 702 may be packaged together with the logic of one or more controllers for system control logic 708 to form a system-in-package (SiP). In another embodiment, at least one of the processors 702 may be integrated on the same die with the logic of one or more controllers for system control logic 708 to form a system-on-a-chip (SoC).

[0177] Device 700 may further include an input / output (I / O) device 712. The I / O device 712 may include a user interface enabling a user to interact with device 700; the peripheral component interface is designed to allow peripheral components to also interact with device 700. In some embodiments, device 700 may also include sensors for determining at least one of environmental conditions and location information related to device 700.

[0178] In some embodiments, the sensor may include, but is not limited to, a gyroscope sensor, an accelerometer, a proximity sensor, an ambient light sensor, and a positioning unit. The positioning unit may also be part of or interact with the network interface 710 to communicate with components of the positioning network (e.g., Global Positioning System (GPS) satellites).

[0179] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 700. In other embodiments of the present invention, the electronic device 700 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0180] One embodiment of the present invention also provides a computer-readable storage medium, which can be disposed in an electronic device to store at least one instruction or at least one program related to implementing a data transmission method, wherein the at least one instruction or the at least one program is loaded and executed by the processor to implement the data transmission method provided in the above-described method embodiment.

[0181] One embodiment of the present invention also provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data transmission methods provided in the various optional implementations described above.

[0182] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. Furthermore, specific embodiments have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in a different order than that shown in the embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0183] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0184] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0185] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A data transmission method, characterized in that, include: Obtain the first data packet sent by the sender; A first loopback interface data packet is generated based on the first data packet, and the first loopback interface data packet is transmitted to the protocol proxy component based on the loopback interface; The protocol proxy component receives a second loopback interface data packet transmitted based on the loopback interface, wherein the second loopback interface data packet is obtained by the protocol proxy component after processing the message data in the first loopback interface data packet; Obtain the first correspondence relationship, which is used to represent the correspondence between the five-tuple in the first data packet and the five-tuple in the corresponding first loopback interface data packet; Receive the second correspondence sent by the protocol proxy component, the second correspondence being used to represent the correspondence between the five-tuple in the first loopback interface data packet and the corresponding five-tuple in the second loopback interface data packet; Based on the first correspondence and the second correspondence, a target quintuple corresponding to the third quintuple in the second loopback interface data packet is determined from at least one first quintuple; wherein, each of the first quintuples is a quintuple in each of the first data packets sent by the sending end; The third quintuple in the second loopback interface data packet is replaced with the target quintuple to obtain the second data packet, and the second data packet is sent to the receiving end so that the receiving end cannot perceive the proxy process of the gateway system; wherein, the second data packet includes the same quintuple as the first data packet.

2. The method according to claim 1, characterized in that, The step of generating a first loopback interface data packet based on the first data packet and transmitting the first loopback interface data packet to the protocol proxy component based on the loopback interface includes: Replace the first quintuple in the first data packet with the second quintuple to obtain the first loopback interface data packet; The first loopback interface data packet is sent to the loopback interface so that the protocol proxy component can listen for and obtain the first loopback interface data packet from the loopback interface.

3. The method according to claim 1, characterized in that, The method further includes: Determine the receiving port number corresponding to the first data packet; Determine whether the receiving port number matches the target port number that needs to be proxied; If a match is determined, the step of generating a first loopback interface data packet based on the first data packet is performed.

4. A data transmission method, characterized in that, include: The protocol parsing component obtains the first data packet sent by the sender; The protocol parsing component generates a first loopback interface data packet based on the first data packet, and transmits the first loopback interface data packet to the protocol proxy component based on the loopback interface; The protocol proxy component processes the message data in the first loopback interface data packet; The protocol proxy component generates a second loopback interface data packet based on the processed message data, and transmits the second loopback interface data packet to the protocol parsing component based on the loopback interface; The protocol parsing component obtains a first correspondence relationship, which is used to represent the correspondence between the five-tuple in the first data packet and the five-tuple in the corresponding first loopback interface data packet. The protocol parsing component receives a second correspondence sent by the protocol proxy component. The second correspondence is used to represent the correspondence between the five-tuple in the first loopback interface data packet and the corresponding five-tuple in the second loopback interface data packet. The protocol parsing component determines, based on the first correspondence and the second correspondence, a target quintuple corresponding to the third quintuple in the second loopback interface data packet from at least one first quintuple; wherein each of the first quintuples is a quintuple in each of the first data packets sent by the sending end; The protocol parsing component replaces the third quintuple in the second loopback interface data packet with the target quintuple to obtain the second data packet, and sends the second data packet to the receiving end so that the receiving end cannot perceive the proxy process of the gateway system; wherein, the second data packet includes the same quintuple as the first data packet.

5. The method according to claim 4, characterized in that, The protocol proxy component includes a proxy server and a proxy client; The protocol proxy component processes the message data in the first loopback interface data packet, including: The proxy server parses the data packets of the first loopback interface to obtain the corresponding message data; The proxy server processes the message data to obtain processed message data, and then sends it to the proxy client. The protocol proxy component generates a second loopback interface data packet based on the processed message data, including: The proxy client generates a third quintuple corresponding to the processed message data; The proxy client generates a second loopback interface data packet based on the third quintuple and the processed message data.

6. The method according to claim 5, characterized in that, The method further includes: The proxy server determines the target port number that needs to be proxied. The proxy server sends the target port number to the protocol parsing component.

7. The method according to claim 6, characterized in that, The method further includes: The proxy server parses the first loopback interface data packet to obtain the corresponding second quintuple; The proxy server determines the corresponding identification information based on the second quintuple and sends it to the proxy client; The proxy client records the second correspondence between the identification information and the third quintuple, and sends the second correspondence to the protocol parsing component.

8. A data transmission system, characterized in that, Includes protocol parsing components and protocol proxy components; The protocol parsing component is used to obtain the first data packet sent by the sender; generate a first loopback interface data packet based on the first data packet; and transmit the first loopback interface data packet to the protocol proxy component based on the loopback interface. The protocol proxy component is used to process the message data in the first loopback interface data packet; A second loopback interface data packet is generated based on the processed message data, and the second loopback interface data packet is transmitted to the protocol parsing component based on the loopback interface; The protocol parsing component is also used to obtain a first correspondence relationship, which represents the correspondence between the five-tuple in the first data packet and the five-tuple in the corresponding first loopback interface data packet. The system receives a second correspondence relationship sent by the protocol proxy component. This second correspondence relationship represents the correspondence between a 5-tuple in a first loopback interface data packet and a corresponding 5-tuple in a second loopback interface data packet. Based on the first and second correspondence relationships, a target 5-tuple corresponding to a third 5-tuple in the second loopback interface data packet is determined from at least one first 5-tuple. Each first 5-tuple is a 5-tuple in a first data packet sent by the sender. The third 5-tuple in the second loopback interface data packet is replaced with the target 5-tuple to obtain a second data packet. The second data packet is then sent to the receiver so that the receiver cannot perceive the proxy process of the gateway system. The second data packet includes the same 5-tuple as the first data packet.

Citation Information

Patent Citations

  • Message processing method and proxy server

    CN112261094A

  • Mail security control method and system

    CN113422716A