Data transmission method and device, equipment, storage medium and program product

By aggregating multiple short data frames into one long data frame at the sending end and dismantling it at the receiving end, the problem of low communication efficiency caused by small data packets and high interaction frequency in industrial application scenarios is solved, and network transmission efficiency is improved. And reduce the network forwarding pressure.

CN118803093APending Publication Date: 2024-10-18CHINA MOBILE COMM LTD RES INST +1
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410101261.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-24
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

In industrial application scenarios, the characteristics of small data packets and high interaction frequency lead to a significant decrease in the proportion of data frame payload after tunnel encapsulation, resulting in a significant reduction in communication efficiency.

Method used

By aggregating multiple short data frames into one long data frame at the sending end, dismantling them at the receiving end, and sharing the same tunnel encapsulation structure for transmission, network communication frequency is reduced and network transmission efficiency is improved.

Benefits of technology

It significantly improves network transmission efficiency, reduces network communication frequency, reduces network forwarding pressure, and ensures stable and efficient business operation in 5G+ industrial application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118803093A_ABST
    Figure CN118803093A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method and device, equipment, a storage medium and a program product. A data communication link between a sending end and a receiving end is established; when the first data packets are received, performing data packet aggregation on the plurality of first data packets to generate a second data packet; packaging the second data packet by adopting a tunnel protocol to generate a packaged data packet; and sending the encapsulated data packet to the receiving end, so that the receiving end carries out de-encapsulation and data packet splitting on the encapsulated data packet to obtain a plurality of first data packets. According to the invention, the plurality of short data frames share the same tunnel packaging structure, so that the network transmission efficiency can be effectively improved, the network communication frequency is reduced, and the network forwarding pressure is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a data transmission method, device, equipment, storage medium and program product. Background Art

[0002] When the industrial network penetrates the traditional enterprise data communication network, 5G and other conventional IP networks in the industry field, data encapsulation is often required to solve the problems of non-interoperability between heterogeneous networks and inability of cross-domain transmission in the Layer 2 network. In actual projects, industrial traffic can be encapsulated in TCP / IP messages or UDP / IP messages. The tunneling protocol in data communication is a technology that encapsulates communication data between different networks in data packets of the transmission protocol. It allows data to be transmitted between different networks while protecting the security and integrity of the data. The tunneling protocol can establish a virtual connection between different network devices, allowing data to be transmitted through a public network or different physical networks. The main purpose of the tunneling protocol is to overcome the physical and protocol differences between networks, enable different networks to be interconnected, and protect the privacy and security of data during transmission.

[0003] The characteristics of traditional industrial control traffic are small data packets and high transmission frequency. When the control device and the controlled device establish a complete transmission channel, both ends will exchange data packets at the negotiated or default frequency regardless of whether there is a new real-time information interaction demand. In the 5G+ application scenarios of various industries, industrial traffic (industrial bus, industrial Ethernet, etc.) needs to be TCP / UDP encapsulated before it can be transmitted between heterogeneous network systems. In order to break through the routing barrier or Layer 2 forwarding barrier between heterogeneous systems, on-site projects often use tunnel encapsulation technology to re-encapsulate industrial traffic.

[0004] However, in industrial application scenarios, small data packets and high interaction frequency are common characteristics. For this type of data frame, the amount of information added to the tunnel header cannot be ignored compared to the amount of information in the industrial communication itself, resulting in a significant decrease in the payload ratio of the entire data frame after encapsulation, causing a significant reduction in communication efficiency. Summary of the invention

[0005] The purpose of the embodiments of the present invention is to provide a data transmission method, apparatus, device, storage medium and program product, which can effectively improve network transmission efficiency and reduce network communication frequency by sharing the same tunnel encapsulation structure for several short data frames, thereby alleviating network forwarding pressure.

[0006] To achieve the above object, an embodiment of the present invention provides a data transmission method, which is applied to a sending end, and the method includes:

[0007] Establishing a data communication link between the transmitting end and the receiving end;

[0008] When a first data packet is received, aggregating a plurality of first data packets to generate a second data packet;

[0009] Encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet;

[0010] The encapsulated data packet is sent to the receiving end.

[0011] As an improvement of the above solution, the establishing of a data communication link between the transmitting end and the receiving end includes:

[0012] Configure link establishment parameters and parameters to be negotiated; wherein the link establishment parameters include a preset tunnel interface ID, a tunnel interface operation protocol, and an IP address of the receiving end;

[0013] Sending a first detection message to the receiving end through the preset tunnel interface according to the IP address of the receiving end and the tunnel interface operation protocol;

[0014] When receiving the second detection message returned by the receiving end, establishing an adjacency relationship with the receiving end;

[0015] After establishing an adjacency relationship with the receiving end, sending a parameter negotiation message to the receiving end; wherein the parameter negotiation message includes the parameter to be negotiated;

[0016] Performing parameter negotiation according to the parameter negotiation message to generate final negotiation parameters;

[0017] After the parameter negotiation is completed, a confirmation message is sent to the receiving end to establish a data communication link with the receiving end.

[0018] As an improvement of the above solution, the parameter negotiation method is:

[0019] The sending end and the receiving end have the same priority and do not perform interactive parameter negotiation, then the sending end and the receiving end both adopt the minimum parameter principle to determine the final negotiation parameters; or,

[0020] The sending end and the receiving end have the same priority and do not perform interactive parameter negotiation, then the sending end and the receiving end both adopt the maximum parameter principle to determine the final negotiation parameters; or,

[0021] The sending end and the receiving end select a main communication end according to their respective ID values, and use the parameters to be negotiated of the main communication end as final negotiation parameters.

[0022] As an improvement of the above solution, the step of encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet includes:

[0023] Adding an IP data frame header before the frame header of the second data packet; wherein the IP data frame header is constructed according to the IP information of the sending end and the receiving end;

[0024] Adding a tunnel protocol header field after the IP data frame header;

[0025] A segmentation indication field is added after the tunnel protocol header field to generate an encapsulated data packet; wherein the segmentation indication field is used to indicate a segmentation node of each of the first data packets in the second data packet.

[0026] As an improvement of the above solution, the segmentation indication field is composed of a plurality of first sub-segmentation indication fields, the first sub-segmentation indication fields correspond to the first data packets one by one, all the first segmentation indication fields are sequentially connected according to the aggregation order of each first data packet, and are set between the tunnel protocol header field and the second data packet;

[0027] The first sub-segmentation indication field includes a segmentation bit byte, and the segmentation bit byte is used to indicate the position or length of the first data packet.

[0028] As an improvement of the above solution, the segmentation indication field is composed of a plurality of second sub-segmentation indication fields, the second sub-segmentation indication fields correspond to the first data packets one by one, and each of the second sub-segmentation indication fields is respectively set before the corresponding first data packet;

[0029] The second sub-segmentation indication field includes a segmentation bit byte, and the segmentation bit byte is used to indicate the position or length of the first data packet.

[0030] As an improvement of the above solution, the segmentation indication field is composed of a plurality of frame delimiters, the frame delimiters correspond to the first data packets one by one, and each of the frame delimiters is respectively set before the corresponding first data packet;

[0031] The frame delimiter includes a preset byte sequence, which is used to indicate the starting point and the ending point of the first data packet.

[0032] As an improvement of the above solution, when a first data packet is received, aggregating a plurality of first data packets to generate a second data packet includes:

[0033] Aggregating the received first data packets in sequence to obtain an aggregated data packet;

[0034] Determine in real time whether the aggregated data packet satisfies a preset trigger rule; wherein the preset trigger rule is generated according to the negotiation parameter;

[0035] When the preset trigger rule is met, the second data packet is generated according to the aggregated data packet.

[0036] As an improvement of the above solution, the negotiation parameters include a waiting time threshold and a standard frame length threshold of the aggregated data packet;

[0037] The preset triggering rules include:

[0038] The current waiting time of the aggregated data packet has reached the waiting time threshold; or,

[0039] The current frame length of the aggregated data packet has reached the standard frame length threshold.

[0040] As an improvement of the above solution, the negotiation parameters also include a maximum frame length threshold of the aggregated data packet and indication information of whether out-of-order aggregation is supported;

[0041] When the indication information indicates that out-of-order aggregation is not supported, the preset trigger rule further includes:

[0042] The current frame length of the aggregated data packet does not reach the standard frame length threshold, and the frame length after the aggregated data packet and the next first data packet are aggregated is greater than the maximum frame length threshold.

[0043] The embodiment of the present invention further provides a data transmission method, which is applied to a receiving end, and the method includes:

[0044] Establishing a data communication link between the transmitting end and the receiving end;

[0045] When receiving the encapsulated data packet sent by the sending end, decapsulating the encapsulated data packet using a tunnel protocol to obtain a second data packet;

[0046] The second data packet is split into data packets to obtain a plurality of first data packets.

[0047] As an improvement of the above solution, when receiving the encapsulated data packet sent by the sending end, decapsulating the encapsulated data packet using a tunnel protocol to obtain a second data packet, including:

[0048] When receiving the encapsulated data packet sent by the transmitting end, decapsulate the encapsulated data packet using the tunnel protocol to obtain a second data packet and a segmentation indication field; wherein the segmentation indication field is used to indicate a segmentation node of each of the first data packets in the second data packet;

[0049] The step of splitting the second data packet into data packets to obtain a plurality of first data packets includes:

[0050] The second data packet is split according to the segmentation indication field to obtain a plurality of first data packets.

[0051] An embodiment of the present invention further provides a data transmission device, which is applied to a sending end, and the device includes:

[0052] A first link establishing module, used to establish a data communication link between the transmitting end and the receiving end;

[0053] A data packet aggregation module, configured to aggregate a plurality of first data packets to generate a second data packet when a first data packet is received;

[0054] A data packet encapsulation module, for transporting and encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet;

[0055] The data packet sending module is used to send the encapsulated data packet to the receiving end.

[0056] An embodiment of the present invention further provides a data transmission device, which is applied to a receiving end, and the device includes:

[0057] A second link establishment module, used to establish a data communication link between the sending end and the receiving end;

[0058] A data packet decapsulation module, configured to, when receiving an encapsulated data packet sent by the sending end, decapsulate the encapsulated data packet using a tunnel protocol to obtain a second data packet;

[0059] The data packet splitting module is used to split the second data packet into data packets to obtain a plurality of first data packets.

[0060] An embodiment of the present invention further provides a data transmission device, comprising a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements any one of the data transmission methods described above when executing the computer program.

[0061] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the data transmission methods described above.

[0062] An embodiment of the present invention further provides a computer program product, which includes a computer program or a computer instruction. When the computer program or the computer instruction is executed by a processor, the data transmission method as described in any one of the above is implemented.

[0063] Compared with the prior art, the data transmission method, apparatus, equipment, storage medium and program product disclosed in the present invention can enable several short data frames to share the same tunnel encapsulation structure. After being aggregated into long data frames by the sending end, they are forwarded to the receiving end through the tunnel transmission path in a unified encapsulation, and then the receiving end disassembles and forwards the aggregated data frames, which can significantly improve network transmission efficiency and reduce network communication frequency, thereby alleviating network forwarding pressure and ensuring stable and efficient operation of 5G+ industrial application converged scenario services. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] Figure 1 It is a flowchart of a data transmission method provided by an embodiment of the present invention;

[0065] Figure 2 is a process topology diagram of a data transmission method in an embodiment of the present invention;

[0066] Figure 3 is a schematic diagram of the principle of first data packet aggregation in an embodiment of the present invention;

[0067] Figure 4 It is a schematic diagram of the data frame structure after tunnel encapsulation in the prior art;

[0068] Figure 5 is a schematic diagram of a data frame structure after data packets are aggregated in an embodiment of the present invention;

[0069] Figure 6 is a schematic diagram of a process for establishing a data communication link in an embodiment of the present invention;

[0070] Figure 7 It is a schematic diagram of the structure of the data segment of the traditional tunnel protocol;

[0071] Figure 8 This is a schematic diagram of a structure in which a segmentation indication field is added in the first implementation manner in an embodiment of the present invention;

[0072] Fig. 9 This is a schematic diagram of a structure in which a segmentation indication field is added in the second implementation manner in an embodiment of the present invention;

[0073] Fig.10 It is a structural diagram of adding a segmentation indication field in the third implementation mode in an embodiment of the present invention;

[0074] Fig.11 is a flow chart of another data transmission method provided by an embodiment of the present invention;

[0075] Fig.12 is a structural schematic diagram of a data transmission device provided by an embodiment of the present invention;

[0076] Fig.13It is a structural schematic diagram of another data transmission device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0077] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0078] In the description of the present application, it should be understood that the terms "center", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.

[0079] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0080] In the description of this application, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0081] See also Figure 1 , is a flow chart of a data transmission method provided by an embodiment of the present invention. The embodiment of the present invention provides a data transmission method, which is executed by a sending end. The method includes steps S11 to S14:

[0082] S11, establishing a data communication link between the transmitting end and the receiving end;

[0083] S12, when a first data packet is received, aggregating a plurality of first data packets to generate a second data packet;

[0084] S13, encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet;

[0085] S14: Send the encapsulated data packet to the receiving end.

[0086] It should be noted that the first data packet has the characteristics of small data packet and high transmission frequency, such as industrial traffic data packet. In order to avoid the problem that the effective load ratio of the entire data frame decreases significantly after such data packets are tunnel encapsulated, resulting in a significant reduction in communication efficiency, the embodiment of the present invention proposes a data transmission method based on a tunnel protocol, which uses the unified carrying capacity of tunnel encapsulation to aggregate data packets at the sending end, aggregate multiple short data packets in a tunnel encapsulation and send them as a long data frame, thereby improving the transmission efficiency of industrial traffic after tunnel encapsulation, and disassemble the aggregated data frame at the tunnel receiving end, and finally forward the re-stripped short data frame to their respective next-hop interfaces, and the user is unaware of the entire process of data packet aggregation and disassembly.

[0087] Take the first data packet as an example, which is an industrial traffic data packet. Figure 2 and Figure 3 , Figure 2 is a process topology diagram of a data transmission method in an embodiment of the present invention, Figure 3 It is a schematic diagram of the principle of performing the first data packet aggregation in an embodiment of the present invention. The sending end receives a conventional industrial traffic data packet in Ethernet / Ethernet+IP format from the southbound interface. The data packet will be transferred to the data aggregation interface for aggregation and merging of short data frames. Several short data frames will be encapsulated into a long data frame and then transferred to the conventional tunnel interface for tunnel protocol encapsulation. After the tunnel encapsulation is completed, the data frame will reach the receiving end through the data communication link. The receiving end will receive the long data frame and decapsulate the tunnel header through the conventional tunnel interface according to the established forwarding rules, and then the data aggregation interface will disassemble and forward the data frame.

[0088] It should be noted that common tunnel protocols include: Generic Routing Encapsulation (GRE), Layer 2 Tunneling (L2TP), IP Security (IPsec) and SSL / TLS tunnel.

[0089] A specific implementation scenario is used below to calculate the forwarding efficiency gain brought by the embodiment of the present invention. Taking EtherCAT station-to-station communication as an example, each EtherCAT subframe is encapsulated by IP / UDP, and the total length of the data frame can be estimated as 80 bytes.

[0090] See also Figure 4 , is a schematic diagram of the data frame structure after tunnel encapsulation in the prior art. According to the traditional solution, each data frame needs to be tunnel encapsulated before it can be transmitted between heterogeneous networks. Taking the conventional L2TP layer 2 tunnel as an example, its structure is as follows Figure 4 As shown, the total length is 138 bytes. More than ten data frames (192.168.0.105) sent to the same target are generated within 1 second at the data packet detection node. Based on ten measurements, the total length of each data frame after being individually encapsulated is 1380 bytes (10 * 138 bytes / frame).

[0091] See also Figure 5 , is a schematic diagram of a data frame structure after data packets are aggregated in an embodiment of the present invention. According to the tunnel technology of the embodiment of the present invention, a short data frame aggregation scheme is performed. Also, taking the L2TP tunnel as an example, the structure after encapsulation is as follows: Figure 5 As shown in the figure, the total length is 852 bytes. Compared with the traditional encapsulation solution, the total size of the data frame is reduced by about 38%. At the same time, the existing solution can reduce the transmission frequency from 10 times to 1 time, which greatly alleviates the pressure on the terminal uplink transmission time slot scheduling, reduces the time slot competition pressure in the multi-terminal multi-service traffic scenario, and can significantly improve the efficiency of multi-terminal collaborative transmission.

[0092] It should be noted that the transmitting end and receiving end in the embodiment of the present invention are only relative. In actual application, a communication device can be used as both a transmitting end and a receiving end, which does not affect the beneficial effects achieved by the present invention.

[0093] By adopting the technical means of the embodiments of the present invention, several short data frames can share the same tunnel encapsulation structure. After being aggregated into long data frames by the sending end, they are forwarded to the receiving end through the tunnel transmission path in a unified encapsulation. The receiving end then disassembles and forwards the aggregated data frames, which can significantly improve network transmission efficiency and reduce network communication frequency, thereby alleviating network forwarding pressure and ensuring stable and efficient operation of 5G+ industrial application converged scenario services.

[0094] As a preferred implementation, the data transmission method of the embodiment of the present invention includes optimization of at least three parts: aggregation and splitting protocol interaction process, aggregation data frame splitting indication structure, and data packet aggregation and splitting rules. The aggregation and splitting protocol interaction process is completed during the process of establishing the data communication link between the sending end and the receiving end.

[0095] Preferably, step S11, i.e., establishing a data communication link between the transmitting end and the receiving end, comprises:

[0096] S111, configuring link establishment parameters and parameters to be negotiated; wherein the link establishment parameters include a preset tunnel interface ID, a tunnel interface operation protocol, and an IP address of the receiving end;

[0097] S112, sending a first detection message to the receiving end through the preset tunnel interface according to the IP address of the receiving end and the tunnel interface operation protocol;

[0098] S113, when receiving the second detection message returned by the receiving end, establishing an adjacency relationship with the receiving end;

[0099] S114. After establishing an adjacency relationship with the receiving end, sending a parameter negotiation message to the receiving end; wherein the parameter negotiation message includes the parameter to be negotiated;

[0100] S115. Perform parameter negotiation according to the parameter negotiation message to generate final negotiation parameters;

[0101] S116. After the parameter negotiation is completed, a confirmation message is sent to the receiving end to establish a data communication link with the receiving end.

[0102] Optionally, the first detection message and the second detection message are Hello detection messages.

[0103] The data aggregation and splitting protocol interactive registration process mechanism of the embodiment of the present invention needs to run on a stable and interoperable transmission tunnel. Before the interactive process is started, the two-end communication nodes need to establish a regular tunnel communication link and support stable data encapsulation and decapsulation communication. At the same time, the two ends of the communication perform pre-setting of relevant parameters. The relevant parameters that need to be configured at both ends are: device ID, preset tunnel interface ID, protocol running on the tunnel interface, aggregation node neighbor IP address (for the sender, that is, the IP address of the receiver), waiting time threshold of the aggregated data packet, standard frame length threshold of the aggregated data packet, maximum frame length threshold of the aggregated data packet, indication information on whether out-of-order aggregation is supported, and other auxiliary information. Among them, the waiting time threshold of the aggregated data packet, the standard frame length threshold of the aggregated data packet, and the maximum frame length threshold of the aggregated data packet need to be set separately by the data flow in both directions.

[0104] Specifically, see Figure 6 , is a flow chart of establishing a data communication link in an embodiment of the present invention. The two-end devices complete the configuration of their respective link establishment parameters and parameters to be negotiated. After completing the parameter pre-configuration and starting the aggregation and splitting protocol processes, they will send Hello detection messages through the bound tunnel interfaces at the default frequency. When the sending end aggregation node successfully receives the Hello detection message sent by the opposite end aggregation node through the corresponding tunnel interface, it indicates that the sending end and the receiving end have completed the establishment of the adjacent relationship.

[0105] Then, after the adjacency relationship between the two ends is established, the nodes at both ends of the communication send parameter negotiation messages to each other, where the parameters to be negotiated include: device ID, aggregation node neighbor IP address, waiting time threshold for aggregated data packets, standard frame length threshold for aggregated data packets, maximum frame length threshold for aggregated data packets, and whether out-of-order aggregation is supported. After the parameter negotiation is completed, the two ends of the communication feedback Ack confirmation messages to the other end. When both ends receive the Ack reply from the other end, it indicates that the two ends have established a good neighbor relationship, indicating that the device registration and docking process is completed.

[0106] As a preferred implementation, the parameter negotiation method is:

[0107] The sending end and the receiving end have the same priority and do not perform interactive parameter negotiation, then the sending end and the receiving end both adopt the minimum parameter principle to determine the final negotiation parameters; or,

[0108] The sending end and the receiving end have the same priority and do not perform interactive parameter negotiation, then the sending end and the receiving end both adopt the maximum parameter principle to determine the final negotiation parameters; or,

[0109] The sending end and the receiving end select a main communication end according to their respective ID values, and use the parameters to be negotiated of the main communication end as final negotiation parameters.

[0110] In the embodiment of the present invention, parameter negotiation may follow the following three methods:

[0111] Mode 1: The priorities of both ends are the same and no interactive parameter negotiation is performed. Both ends adopt the minimum principle, and the final negotiation parameter i = Min{parameter Ai, parameter Bi};

[0112] Mode 2: The priorities of both ends are the same and no interactive parameter negotiation is performed. Both ends adopt the maximum principle, and the final negotiation parameter i = Max{parameter Ai, parameter Bi};

[0113] Method 3: The two communicating ends first elect the Master based on the value of the ID, and the parameters to be negotiated by the Master are used as the final negotiation parameters of the two communicating ends.

[0114] By adopting the technical means of the embodiments of the present invention, a data communication link is established before the data transmission process is started, and the configuration of data encapsulation and decapsulation communication is performed, which is conducive to the subsequent aggregation, encapsulation, forwarding, decapsulation and splitting of data packets on both ends, effectively realizing the data transmission process, improving network transmission efficiency, reducing network communication frequency, and thus alleviating network forwarding pressure.

[0115] As a preferred implementation, the aggregate data frame split indication structure is completed during the process of encapsulating the second data packet at the sending end. Then step S13, that is, encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet, includes:

[0116] S131, adding an IP data frame header before the frame header of the second data packet; wherein the IP data frame header is constructed according to the IP information of the sending end and the receiving end;

[0117] S132, adding a tunnel protocol header field after the IP data frame header;

[0118] S133. Add a segmentation indication field after the tunnel protocol header field to generate an encapsulated data packet; wherein the segmentation indication field is used to indicate a segmentation node of each of the first data packets in the second data packet.

[0119] In the embodiments of the present invention, see Figure 7 , is a schematic diagram of the traditional tunnel protocol data segment structure. When data passes through a conventional tunnel interface, the tunnel interface will use the IP information of the nodes at both ends of the tunnel to build a new TCP (UDP) / IP data packet header before the original data frame header, and add a tunnel protocol header field after the newly added header. The information in the tunnel header is used for tunnel forwarding maintenance and session management, and the original data frame is placed in the payload position. The specific structure is as follows Figure 7 (a) shown.

[0120] According to the data frame aggregation scheme proposed in the embodiment of the present invention, the payload in the data frame finally transmitted through the tunnel is composed of several sub-data frames, so the data frame needs to carry an indication segmentation mark to guide the receiving end how to divide the data segments. The embodiment of the present invention inserts a "segmentation indication field" after the tunnel header field to indicate the number of aggregated data frames and the corresponding length.

[0121] This embodiment provides three methods for inserting the “split indication field”:

[0122] As a first preferred embodiment, see Figure 8 , is a structural diagram of adding a segmentation indication field under the first implementation mode in an embodiment of the present invention, the segmentation indication field is composed of a plurality of first sub-segmentation indication fields, the first sub-segmentation indication fields correspond to the first data packets one by one, all the first segmentation indication fields are sequentially connected in the aggregation order of each first data packet, and are arranged between the tunnel protocol header field and the second data packet; the first sub-segmentation indication field includes a segmentation bit byte, the segmentation bit byte is used to indicate the position or length of the first data packet, and the position can be a relative position or an absolute position.

[0123] Preferably, the first sub-division indication field further includes a tunnel protocol type byte and a bottom flag byte, and the bottom flag byte is used to indicate the sequence number of the first sub-division indication field.

[0124] Specifically, the "split indication field" is placed between the aggregate data frame payload and the tunnel header, and is composed of a number of continuously distributed structures (the first sub-split indication field) composed of "type", "split bit" and "bottom flag bit", such as Figure 8 (a) is shown. The split bit indicates the split position of the aggregated payload, which can be described quantitatively by the relative position or absolute position of the split bit or the length of the data frame. The bottom identification bit is used to indicate whether the current first sub-split indication field is the last one, prompting the receiving end to mark the beginning of the aggregated data frame, so that the receiving end can start the data frame segmentation and reassembly after collecting and analyzing all the split bit information.

[0125] Taking L2TP tunnel as a transmission channel, its traditional data frame encapsulation format is as follows: Figure 7 As shown in (b), the overall display scheme of the header will add a segmentation indication field after "L2TP-Head" and before the encapsulated second data packet (industrial protocol data). The length of the sub-data frame (first data packet) can be used as the value record of the segmentation bit. Each group of the first sub-segmentation indication fields corresponds to a subsequent sub-data frame. The receiving end can perform subsequent data frame splitting according to the length of each sub-data frame. The data frame structure is as follows: Figure 8 (b) As shown in the figure, the length of each first sub-division indication field can be set to 2 bytes. When the sub-data frame length field reaches 10 bits, it can represent the data frame length of 0-1023, and the remaining bits (6 bits) can be used for the type and bottom flag fields.

[0126] As a second preferred embodiment, see Fig. 9 , is a structural diagram of adding a segmentation indication field under the second implementation mode in an embodiment of the present invention, wherein the segmentation indication field is composed of a plurality of second sub-segmentation indication fields, each of which corresponds to the first data packet one by one, and each of the second sub-segmentation indication fields is respectively arranged before the corresponding first data packet; the second sub-segmentation indication field includes a segmentation bit byte, and the segmentation bit byte is used to indicate the position or length of the first data packet.

[0127] Preferably, the second sub-division indication field also includes a tunnel protocol type byte.

[0128] Specifically, the second sub-segmentation indication field is placed before each first data packet, and each second sub-segmentation indication field is composed of "type" and "segmentation bit" as a whole, and is used as a segmentation mark before each sub-data frame, such as Fig. 9(a) is shown. The split indication bit indicates the split position of the aggregated payload, which can be described quantitatively by the relative position or absolute position of the split bit, or by the length of the data frame. This data structure can support the receiving end to receive and retrieve at any time. When the receiver receives the first sub-data frame structure, it can synchronously read and forward the sub-data frame through the second sub-split indication field before the data frame.

[0129] Taking L2TP tunnel as a transmission channel, its traditional data frame encapsulation format is as follows: Figure 7 As shown in (b), the overall display scheme of the header will insert the second sub-segmentation indication field in sequence after "L2TP-Head" and before each encapsulated first data packet (industrial protocol data). The sub-data frame length can be used as the value record of the segmentation bit. Each group of second sub-segmentation indication fields corresponds to adjacent sub-data frames. The receiving end can sequentially split the data frame according to the length of each sub-data frame. The data frame structure is as follows: Fig. 9 (b) The length of each second sub-division indication field can be set to 2 bytes. When the sub-data frame length field reaches 10 bits, it can represent the data frame length of 0-1023, and the remaining bits (6 bits) can be used for fields such as type.

[0130] As a third preferred embodiment, see Fig.10 , is a structural diagram of adding a segmentation indication field under the third implementation mode in an embodiment of the present invention, wherein the segmentation indication field is composed of a plurality of frame delimiters, each of the frame delimiters corresponds to the first data packet one by one, and each of the frame delimiters is respectively arranged before the corresponding first data packet; the frame delimiter includes a preset byte sequence for indicating the starting point and the ending point of the first data packet.

[0131] Specifically, the frame delimiter is used as the overall segmentation indication field (no type or bottom flag field), and a special frame delimiter marker byte string is inserted between each first data packet to mark the start and end of the first data packet data frame.

[0132] Taking L2TP tunnel encapsulation as an example, common frame delimiter markers include special byte sequences, such as 01111110 (used in HDLC and Ethernet). The receiving end determines the start and end points of the sub-data frame by detecting the frame delimiter marker, and identifies and splits the data frame. The data frame structure after adding the frame delimiter is as follows: Fig.10 shown.

[0133] By adopting the technical means of the embodiment of the present invention, a segmentation indication field is inserted during the second data packet encapsulation process to subsequently guide the receiving end to split the second data packet, thereby effectively realizing the data transmission process, improving network transmission efficiency, reducing network communication frequency, and thus alleviating network forwarding pressure.

[0134] As a preferred implementation, by setting data packet aggregation and splitting rules, the sending end completes the process of aggregating the first data packet to generate the second data packet. Then step S12, that is, when the first data packet is received, aggregating several first data packets to generate the second data packet, includes:

[0135] S121, aggregate the received first data packets in sequence to obtain an aggregated data packet;

[0136] S122, determining in real time whether the aggregated data packet satisfies a preset trigger rule; wherein the preset trigger rule is generated according to the negotiation parameter;

[0137] S123: When the preset trigger rule is met, generate the second data packet according to the aggregated data packet.

[0138] Preferably, the preset triggering rules include:

[0139] The current waiting time of the aggregated data packet has reached the waiting time threshold; or,

[0140] The current frame length of the aggregated data packet has reached the standard frame length threshold; or,

[0141] When the indication information indicates that out-of-order aggregation is not supported, the current frame length of the aggregated data packet does not reach the standard frame length threshold, and the frame length after the aggregated data packet and the next first data packet are aggregated is greater than the maximum frame length threshold.

[0142] It should be noted that the data aggregation solution can be effective for all data flows or for some data flows, and specific traffic can be selectively introduced to the data aggregation interface through Route-Policy and other methods to achieve the aggregation function of specific data flows. After the protocol runs normally and stably, both ends need to continue to send Hello detection messages at a certain period to ensure the stability of the protocol connection.

[0143] In the embodiment of the present invention, each tunnel encapsulation structure can be regarded as a "shift" of the sender in preparing the data frame of the receiver. The shift can start the forwarding process according to the following three triggering rules:

[0144] a. The waiting time after the formation of the "class train" is greater than the set waiting time threshold Departure_Time, and the number of sub-data frames in the class train is not zero;

[0145] b. The spliced ​​length of the "train" is greater than or equal to the standard frame length threshold departure_length;

[0146] If the triggering rules a or b above are met, the "train" is generated into a second data packet for encapsulation and forwarding.

[0147] c. The length of the "train" does not reach the standard frame length threshold departure_length, but because the length of the newly arrived first data packet is too long, if the length after merging is greater than the set maximum frame length threshold max_length, the merging is abandoned, and,

[0148] c-1: If the sending end does not support out-of-order aggregation through protocol negotiation, the current "train" immediately enters the encapsulation interface to start forwarding, and the newly arrived long data frames are immediately stored in the next new "train" and the timing is refreshed;

[0149] c-2: If the sending end supports out-of-order aggregation through protocol negotiation, the current "train" continues to comply with triggering rules a and b and keeps waiting. The newly arrived long data frame can enter the encapsulation interface and start forwarding before the current "train".

[0150] By adopting the technical means of the embodiments of the present invention, by setting the trigger rules for data packet aggregation and splitting, the aggregation of the first data packet and the generation of the second data packet are achieved, the data transmission process is effectively realized, the network transmission efficiency is improved, the network communication frequency is reduced, and the network forwarding pressure is alleviated.

[0151] See also Fig.11 , is a flow chart of another data transmission method provided by an embodiment of the present invention. The embodiment of the present invention provides a data transmission method, which is executed by a receiving end. The method includes steps S21 to S23:

[0152] S21, establishing a data communication link between the transmitting end and the receiving end;

[0153] S22, when receiving the encapsulated data packet sent by the sending end, decapsulate the encapsulated data packet using the tunnel protocol to obtain a second data packet;

[0154] S23. Split the second data packet into data packets to obtain a plurality of first data packets.

[0155] By adopting the technical means of the embodiments of the present invention, several short data frames can share the same tunnel encapsulation structure. After being aggregated into long data frames by the sending end, they are forwarded to the receiving end through the tunnel transmission path in a unified encapsulation. The receiving end then disassembles and forwards the aggregated data frames, which can significantly improve network transmission efficiency and reduce network communication frequency, thereby alleviating network forwarding pressure and ensuring stable and efficient operation of 5G+ industrial application converged scenario services.

[0156] Preferably, the establishing of a data communication link between the transmitting end and the receiving end comprises:

[0157] Configure link establishment parameters and parameters to be negotiated; wherein the link establishment parameters include a preset tunnel interface ID, a tunnel interface operation protocol, and an IP address of the sending end;

[0158] Sending a first detection message to the sending end through the preset tunnel interface according to the IP address of the sending end and the tunnel interface operation protocol;

[0159] When receiving the second detection message returned by the sending end, establishing an adjacency relationship with the sending end;

[0160] After establishing an adjacency relationship with the sending end, sending a parameter negotiation message to the sending end; wherein the parameter negotiation message includes the parameter to be negotiated;

[0161] Performing parameter negotiation according to the parameter negotiation message to generate final negotiation parameters;

[0162] After the parameter negotiation is completed, a confirmation message is sent to the sending end to establish a data communication link with the sending end.

[0163] As a preferred implementation, step S22, that is, when receiving the encapsulated data packet sent by the sending end, decapsulating the encapsulated data packet using a tunnel protocol to obtain a second data packet, includes:

[0164] When receiving the encapsulated data packet sent by the transmitting end, decapsulate the encapsulated data packet using the tunnel protocol to obtain a second data packet and a segmentation indication field; wherein the segmentation indication field is used to indicate a segmentation node of each of the first data packets in the second data packet;

[0165] Step S23, that is, splitting the second data packet into data packets to obtain a plurality of first data packets, includes:

[0166] The second data packet is split according to the segmentation indication field to obtain a plurality of first data packets.

[0167] It should be noted that the data transmission method executed by the receiving end in the embodiment of the present invention corresponds to all the step processes of the data transmission method executed by the sending end in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.

[0168] See also Fig.12 , is a schematic diagram of the structure of a data transmission device provided in an embodiment of the present invention. The embodiment of the present invention further provides a data transmission device 30, which is applied to a transmitting end. The device 30 includes:

[0169] A first link establishing module 31, used to establish a data communication link between the sending end and the receiving end;

[0170] The data packet aggregation module 32 is used to aggregate a plurality of first data packets to generate a second data packet when a first data packet is received;

[0171] The data packet encapsulation module 33 encapsulates the second data packet using a tunnel protocol to generate an encapsulated data packet;

[0172] The data packet sending module 34 is used to send the encapsulated data packet to the receiving end.

[0173] It should be noted that a data transmission device provided in an embodiment of the present invention is used to execute all process steps of a data transmission method executed by the sending end in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.

[0174] See also Fig.13 , is a schematic diagram of the structure of another data transmission device provided by an embodiment of the present invention. The embodiment of the present invention also provides another data transmission device 40, which is applied to a receiving end. The device 40 includes:

[0175] A second link establishing module 41, used to establish a data communication link between the sending end and the receiving end;

[0176] The data packet decapsulation module 42 is used for, when receiving the encapsulated data packet sent by the sending end, decapsulating the encapsulated data packet by using the tunnel protocol to obtain a second data packet;

[0177] The data packet splitting module 43 is used to split the second data packet into data packets to obtain a plurality of first data packets.

[0178] It should be noted that a data transmission device provided in an embodiment of the present invention is used to execute all process steps of a data transmission method executed by the receiving end in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be described in detail.

[0179] An embodiment of the present invention also provides a data transmission device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, it implements the data transmission method described in any one of the above embodiments.

[0180] It should be noted that a data transmission device provided in an embodiment of the present invention is used to execute all process steps of a data transmission method in the above embodiment, and the working principles and beneficial effects of the two correspond one to one, so they will not be repeated here.

[0181] An embodiment of the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the data transmission method described in any one of the above embodiments.

[0182] An embodiment of the present invention further provides a computer program product, which includes a computer program or computer instructions. When the computer program or the computer instructions are executed by a processor, the data transmission method as described in any one of the above embodiments is implemented.

[0183] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0184] The above is a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements and modifications without departing from the principle of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data transmission method, characterized in that: Applied to the sending end, the method includes: Establishing a data communication link between the transmitting end and the receiving end; When a first data packet is received, aggregating a plurality of first data packets to generate a second data packet; Encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet; The encapsulated data packet is sent to the receiving end.

2. The data transmission method according to claim 1, characterized in that: The establishing of a data communication link between the transmitting end and the receiving end comprises: Configure link establishment parameters and parameters to be negotiated; wherein the link establishment parameters include a preset tunnel interface ID, a tunnel interface operation protocol, and an IP address of the receiving end; Sending a first detection message to the receiving end through the preset tunnel interface according to the IP address of the receiving end and the tunnel interface operation protocol; When receiving the second detection message returned by the receiving end, establishing an adjacency relationship with the receiving end; After establishing an adjacency relationship with the receiving end, sending a parameter negotiation message to the receiving end; wherein the parameter negotiation message includes the parameter to be negotiated; Performing parameter negotiation according to the parameter negotiation message to generate final negotiation parameters; After the parameter negotiation is completed, a confirmation message is sent to the receiving end to establish a data communication link with the receiving end.

3. The data transmission method according to claim 2, characterized in that: The parameter negotiation method is: If the sending end and the receiving end have the same priority and do not perform interactive parameter negotiation, the sending end and the receiving end both adopt the minimum parameter principle to determine the final negotiation parameters; or, If the sending end and the receiving end have the same priority and do not perform interactive parameter negotiation, the sending end and the receiving end both adopt the maximum parameter principle to determine the final negotiation parameters; or, The sending end and the receiving end select a main communication end according to their respective ID values, and use the parameters to be negotiated of the main communication end as final negotiation parameters.

4. The data transmission method according to claim 1, characterized in that: The step of encapsulating the second data packet by using a tunnel protocol to generate an encapsulated data packet includes: Adding an IP data frame header before the frame header of the second data packet; wherein the IP data frame header is constructed according to the IP information of the sending end and the receiving end; Adding a tunnel protocol header field after the IP data frame header; A segmentation indication field is added after the tunnel protocol header field to generate an encapsulated data packet; wherein the segmentation indication field is used to indicate a segmentation node of each of the first data packets in the second data packet.

5. The data transmission method according to claim 4, characterized in that: The segmentation indication field is composed of a plurality of first sub-segmentation indication fields, each of the first sub-segmentation indication fields corresponds to the first data packet one by one, and all the first segmentation indication fields are sequentially connected according to the aggregation order of each of the first data packets, and are arranged between the tunnel protocol header field and the second data packet; The first sub-segmentation indication field includes a segmentation bit byte, and the segmentation bit byte is used to indicate the position or length of the first data packet.

6. The data transmission method according to claim 4, characterized in that: The segmentation indication field is composed of a plurality of second sub-segmentation indication fields, each of the second sub-segmentation indication fields corresponds to the first data packet one by one, and each of the second sub-segmentation indication fields is respectively set before the corresponding first data packet; The second sub-segmentation indication field includes a segmentation bit byte, and the segmentation bit byte is used to indicate the position or length of the first data packet.

7. The data transmission method according to claim 4, characterized in that: The segmentation indication field is composed of a plurality of frame delimiters, the frame delimiters correspond to the first data packets one by one, and each of the frame delimiters is respectively set before the corresponding first data packet; The frame delimiter includes a preset byte sequence, which is used to indicate the starting point and the ending point of the first data packet.

8. The data transmission method according to claim 2, characterized in that: When a first data packet is received, aggregating a plurality of first data packets to generate a second data packet includes: Aggregating the received first data packets in sequence to obtain an aggregated data packet; Determine in real time whether the aggregated data packet satisfies a preset trigger rule; wherein the preset trigger rule is generated according to the negotiation parameter; When the preset trigger rule is met, the second data packet is generated according to the aggregated data packet.

9. The data transmission method according to claim 8, characterized in that: The negotiation parameters include a waiting time threshold and a standard frame length threshold of the aggregated data packet; The preset triggering rules include: The current waiting time of the aggregated data packet has reached the waiting time threshold; or, The current frame length of the aggregated data packet has reached the standard frame length threshold.

10. The data transmission method according to claim 9, characterized in that: The negotiation parameters also include a maximum frame length threshold of the aggregated data packet and indication information of whether out-of-order aggregation is supported; When the indication information indicates that out-of-order aggregation is not supported, the preset trigger rule further includes: The current frame length of the aggregated data packet does not reach the standard frame length threshold, and the frame length after the aggregated data packet and the next first data packet are aggregated is greater than the maximum frame length threshold.

11. A data transmission method, characterized in that: Applied to the receiving end, the method includes: Establishing a data communication link between the transmitting end and the receiving end; When receiving the encapsulated data packet sent by the sending end, decapsulating the encapsulated data packet using a tunnel protocol to obtain a second data packet; The second data packet is split into data packets to obtain a plurality of first data packets.

12. The data transmission method according to claim 11, characterized in that: When receiving the encapsulated data packet sent by the sending end, decapsulating the encapsulated data packet using a tunnel protocol to obtain a second data packet, including: When receiving the encapsulated data packet sent by the transmitting end, decapsulate the encapsulated data packet using the tunnel protocol to obtain a second data packet and a segmentation indication field; wherein the segmentation indication field is used to indicate a segmentation node of each of the first data packets in the second data packet; The step of splitting the second data packet into data packets to obtain a plurality of first data packets includes: The second data packet is split according to the segmentation indication field to obtain a plurality of first data packets.

13. A data transmission device, characterized in that: Applied to a transmitting end, the device comprises: A first link establishing module, used to establish a data communication link between the transmitting end and the receiving end; A data packet aggregation module, configured to aggregate a plurality of first data packets to generate a second data packet when a first data packet is received; A data packet encapsulation module, for transporting and encapsulating the second data packet using a tunnel protocol to generate an encapsulated data packet; The data packet sending module is used to send the encapsulated data packet to the receiving end.

14. A data transmission device, characterized in that: Applied to a receiving end, the device comprises: A second link establishment module, used to establish a data communication link between the sending end and the receiving end; A data packet decapsulation module, configured to, when receiving an encapsulated data packet sent by the sending end, decapsulate the encapsulated data packet using a tunnel protocol to obtain a second data packet; The data packet splitting module is used to split the second data packet into data packets to obtain a plurality of first data packets.

15. A data transmission device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor implements the data transmission method according to any one of claims 1 to 12 when executing the computer program.

16. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed, the device where the computer-readable storage medium is located is controlled to execute the data transmission method according to any one of claims 1 to 12.

17. A computer program product, characterized in that The computer program product comprises a computer program or a computer instruction, and when the computer program or the computer instruction is executed by a processor, the data transmission method according to any one of claims 1 to 12 is implemented.

Citation Information

Cited By

  • Data processing method and device and electronic equipment

    CN120390045A