A data transmission method, device, computer device and storage medium
By determining the packet type and utilizing the XDP program, a fast data path in IPv6 addresses, to optimize packet forwarding, the problem of increased invalid payload in segmented routing forwarding is solved, achieving efficient data transmission.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGZHOU LIZHI NETWORK TECH CO LTD
- Filing Date
- 2023-04-25
- Publication Date
- 2026-06-26
Smart Images

Figure CN116455815B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of computer networks, and more particularly to a data transmission method, apparatus, computer device, and storage medium. Background Technology
[0002] Segment routing (SR) is a source routing technique used in packet forwarding. Nodes (routers, hosts, or devices) select paths and guide packets along those paths through the network. Specifically, this is achieved by inserting an ordered segment list into the datagram header, instructing receiving nodes how to forward and process these packets. Path segments are also called "segments" and are distinguished by segment identifiers (SIDs).
[0003] In existing technologies, using segmented routing to forward data packets results in the addition of headers during packet segmentation. This increases the transmitted data by at least 24 bytes compared to the original data, with each additional segmentation node adding another 16 bytes. When the request packet payload is small, the headers of the segmented packets become a significant portion of the invalid payload.
[0004] Therefore, a mechanism is needed to address the issue of excessive invalid payload in data packets when using SR technology for segmented forwarding. Summary of the Invention
[0005] This invention provides a data transmission method, apparatus, computer device, and storage medium to address the problem of excessive invalid payload in data packets during segmented forwarding using SR technology.
[0006] In a first aspect, embodiments of the present invention provide a data transmission method, the method comprising:
[0007] The first target node receives a request to forward the data packet;
[0008] If the data packet is an IPv6 data packet, then the transmission configuration information of the data packet in the forwarding request is obtained; the transmission configuration information includes the data packet IPv6 address, IPv4 data information, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet; the second target node is the next target node after the first target node on the transmission path;
[0009] If the node code of the second target node is 0, then the IPv4 data information is forwarded to the second target node;
[0010] If the node code of the second target node is not 0, then query the IPv6 address of the second target node based on the node code;
[0011] Modify the node encoding of the IPv6 address of the second target node to 0, and forward the IPv4 data information to the second target node.
[0012] Secondly, embodiments of the present invention also provide a data transmission device, the device comprising:
[0013] The request receiving module is used by the first target node to receive a forwarding request for a data packet;
[0014] The transmission configuration information acquisition module is used to acquire the transmission configuration information of the data packet in the forwarding request if the data packet belongs to an IPv6 data packet; the transmission configuration information includes the IPv6 address of the data packet, IPv4 data information, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet; the second target node is the next target node after the first target node on the transmission path;
[0015] The first forwarding module is configured to forward the IPv4 data information to the second target node if the node code of the second target node is 0.
[0016] The query module is used to query the IPv6 address of the second target node based on the node code if the node code of the second target node is not 0.
[0017] The second forwarding module is used to modify the node code of the IPv6 address of the second target node to 0, and forward the IPv4 data information to the second target node.
[0018] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising:
[0019] One or more processors;
[0020] Memory, used to store one or more programs.
[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method as described in any one of the first aspects.
[0022] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the data transmission method as described in any one of the first aspects.
[0023] In this embodiment, after receiving a forwarding request for a data packet, the current transmission node determines whether the data packet belongs to an IPv6 data packet. If so, it obtains the transmission configuration information of the data packet from the forwarding request. The transmission configuration information includes the data packet's IPv6 address, IPv4 data information, the IPv6 address of the second target node, and the node codes of each node on the transmission path of the data packet. If the node code of the second target node is 0, the IPv4 data information is forwarded to the second target node. If the node code of the second target node is not 0, the IPv6 address of the second target node is queried based on the node code of the second target node; the node code of the IPv6 address of the second target node is modified to 0, and the IPv4 data information of the data packet is forwarded to the second target node. This achieves the goal of encoding the routing path using the last 64 bits of the IPv6 address and prioritizing the processing of data packets through the fast path forwarding procedure, thus solving the problem of excessive invalid payload added to data packets when using segmented forwarding with SR technology. Attached Figure Description
[0024] Figure 1 A flowchart of a data transmission method provided in Embodiment 1 of the present invention;
[0025] Figure 2 This is an example diagram of the IPv6 address encoding format provided in Embodiment 1 of the present invention;
[0026] Figure 3 This is an example diagram illustrating the changes in data packet content during the forwarding process, provided in Embodiment 1 of the present invention.
[0027] Figure 4 This is an example diagram of the program processing flow of a data node provided in Embodiment 1 of the present invention;
[0028] Figure 5 This is an example diagram of the path information matching table and routing node information representation provided in Embodiment 1 of the present invention;
[0029] Figure 6 This is a schematic diagram of a data transmission device provided in Embodiment 2 of the present invention;
[0030] Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Detailed Implementation
[0031] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the present invention, and not all of the structures.
[0032] Example 1
[0033] Figure 1 The flowchart illustrates a data transmission method according to Embodiment 1 of the present invention. This method can be executed by a data transmission device, which can be implemented in software and / or hardware and can be configured in a computer device, such as a server, workstation, personal computer, etc. Specifically, it includes the following steps:
[0034] Step 101: The first target node receives the data packet forwarding request.
[0035] In this embodiment of the invention, during data transmission, when data is forwarded through the source routing mechanism, the data packet is forwarded from one node to another. The forwarding process is that the data packet carries the forwarding request issued by the previous node and is sent to the next node. Therefore, when a network node receives a data packet to be forwarded, it receives a data packet forwarding request along with the data packet. The forwarding configuration and other information of the data packet can be obtained through the forwarding request.
[0036] In practical applications, forwarding requests contain information such as segmented forwarding paths from the source routing mechanism. This source routing mechanism is also called Segment Routing (SR). SR controls the forwarding path of packets through the starting node. SR divides the forwarding path into different segments. The starting node inserts multiple path segments into the packet, and intermediate nodes forward the packet according to the path segment information carried by the packet. Path segments are also called "segments" and are distinguished by segment identifiers (SIDs).
[0037] Step 102: If the data packet is an IPv6 data packet, then obtain the transmission configuration information of the data packet in the forwarding request; the transmission configuration information includes the IPv6 address of the data packet, IPv4 data information, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet; the second target node is the next target node after the first target node on the transmission path.
[0038] In this embodiment of the invention, upon receiving a segmentation forwarding request for a data packet, the system determines whether the data packet belongs to an IPv6 data packet based on its IP address encoding format. If the data packet to be transmitted belongs to an IPv6 data packet, the system further analyzes the transmission configuration information in the forwarding request within the data packet.
[0039] Specifically, if the data packet is an IPv6 data packet, it means that this data packet was pre-configured for data packet transmission information through the eXpress Data Path (XDP) program mounted on each transmission node. For example... Figure 2 As shown, the IPv6 address encoding format of the data packet includes an IPv6 header, a 64-bit host IP address, an EAFA verification code indicating that the data packet is an SP packet generated by combining the XDP mechanism and IPv6, and also includes the path number for the data packet to continue transmission, such as... Figure 2 The last column shows 1234, 5678, and 9999.
[0040] Therefore, in practical applications, by analyzing the transmission configuration information through the eXpress Data Path (XDP) program, we can obtain the IPv6 address of the data packet, the IPv4 data information, the next transmission node information, namely the IPv6 address of the second transmission node and the node codes of each node on the transmission path of the data packet.
[0041] The XDP program is mounted in each path node.
[0042] Step 103: If the node code of the second target node is 0, then forward the IPv4 data information to the second target node.
[0043] In this embodiment of the invention, when the node code of the next node to be transmitted is 0 as obtained through XDP analysis, it indicates that the next node is the destination node of this transmission, and the IPv4 data information contained in the data packet is directly forwarded to the next node.
[0044] Step 104: If the node code of the second target node is not 0, then query the IPv6 address of the second target node according to the node code.
[0045] In this embodiment of the invention, when the node code of the next node to be transmitted is not 0 as obtained through XDP analysis, the IPv6 address of the node is queried according to the node code.
[0046] Step 105: Modify the node code of the IPv6 address of the second target node to 0, and forward the IPv4 data information to the second target node.
[0047] In this embodiment of the invention, after obtaining the IP address of the target node, the IPv6 destination address in the data packet is directly modified through XDP, and then sent directly through the XDP program after modifying the IPv6 address.
[0048] In practical applications, if the current address is fd00:0002::EAFA:0300:0:0:, and the number after EAFA is 03, then the IP address of 03 is read as fd00:0003:: / 64, because the numbers after it are all 0, and 03 is the destination. A new destination address fd00:0003::EAFA:0000:0:0: is generated and then sent.
[0049] like Figure 3 The example shown illustrates the changes in packet content during data forwarding:
[0050] First, when Node 1 receives the requester's packet and determines that the source IP and destination IP conform to the traffic management rules (pre-configured or dynamically distributed), it finds the IPv6 address of the next node and the numbers of other nodes that need to be passed through to reach the destination address according to the traffic path of the rules. It combines the numbers and IPv6 addresses, where (fd00:0002::EAFA:0300:0:0:) is the address of the next node, (EAFA) indicates that the packet belongs to the packet generated by this method, and (0300) indicates that the number of the next node is 03. The nodes after 03 are 00, that is, there are no subsequent nodes. At node 03, the IPv6 header needs to be removed and the IPv4 packet is sent to the destination.
[0051] Assuming there are a total of 4 nodes in the forwarding path, their destination addresses change as follows:
[0052] 1.fd00:0002::EAFA:0304:
[0053] 2.fd00:0003::EAFA:0400:
[0054] 3.fd00:0004::EAFA:0000:
[0055] Preferably, in another embodiment of the present invention, it further includes:
[0056] Step A1: If the data packet does not belong to IPv6 data packets, determine whether the traffic forwarding rule of the data packet is a preset traffic rule.
[0057] Specifically, such as Figure 4 As shown, after the current node receives the packet from the requester, it determines that the packet is not an IPv6 packet. Then, it further determines whether the packet conforms to the traffic management rules by checking the routing path information table of the packet.
[0058] In practical applications, traffic management rules usually refer to pre-configured rules or dynamically issued rules, but of course, they are not limited to pre-configured rules or dynamically issued rules.
[0059] Preferably, in another embodiment of the present invention, step A1 may further include:
[0060] Sub-step A11: Obtain the routing path information table of the data packet.
[0061] Specifically, retrieve the routing path information table from the data packet sending request.
[0062] Sub-step A12: If the routing path information table contains the source IP address and destination IP address of the data packet, as well as the forwarding path node information, then the data packet conforms to the pre-configured rules or the dynamic distribution rules.
[0063] Specifically, if the data packet is a pre-configured or dynamically distributed data packet, then the routing path information table of the data packet contains at least the forwarding path information and the address information of the path forwarding node, such as... Figure 5 The XDP program's pre-configured or dynamically configured routing path information matching table shows relevant data configurations. It can be seen that the routing path information table contains the source IP address and destination IP address of the data packet. The forwarding path 1->2->3->, i.e., the path information of the forwarding nodes, also includes the IP address of each path node. As shown above, it can be determined that the data packet transmission mechanism is a segmented transmission mechanism and conforms to the pre-configured rules or dynamic distribution rules.
[0064] Step A2: If the traffic forwarding rule of the data packet is a preset traffic rule, then obtain the IPv4 data information of the data packet, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet.
[0065] Specifically, based on the packet path information table, if the packet conforms to the traffic forwarding rules, then the IPv4 data information of the packet, the IPv6 address of the next node (i.e., the second target node), and the node codes of each path node in the path information matching table are further obtained, such as... Figure 5 The path markers shown.
[0066] Step A3: Combine the IPv6 address of the second target node and the node codes of each node on the transmission path of the data packet into the IPv6 header of the data packet;
[0067] Specifically, the IPv6 address of the second target node (i.e., the next node) is obtained and combined with the node codes of other forwarding paths to generate a new IPv6 header.
[0068] Step A4: Combine the IPv6 header with the IPv4 data information to generate a data packet to be forwarded;
[0069] Specifically, the newly generated IPv6 header is combined with IPv4 information to form a new data packet, which is then used as the data packet to be forwarded.
[0070] Step A5: Send the data packet to be forwarded to the second target node.
[0071] Specifically, the data packet to be forwarded is sent to the next node, namely the second target node.
[0072] Preferably, in another embodiment of the present invention, it further includes:
[0073] Step B1: If the data packet belongs to IPv6, then obtain the Fast Data Path Segmentation Transmission Verification Code of the data packet;
[0074] Specifically, after determining that the received data packet is an IPv6 data packet, it is further determined whether the data packet contains a Fast Path Fragmentation Authentication Code (FAST). For example... Figure 2 As shown, in the request information of the data packet, the address encoding format of the data packet belongs to the IPv6 address encoding format, and it contains the EAFA verification code in the second column, that is, the Fast Data Path Fragmentation Authentication Code, indicating that this data packet conforms to the combined design of IPv6 and XDP.
[0075] Step B2: If the fast data path segmentation transmission verification code of the data packet is successfully obtained, proceed to the step of obtaining the transmission configuration information of the data packet in the forwarding request.
[0076] Specifically, if the data packet contains an EAFA verification code, the transmission method of this data packet refers to the design concept of SRv6, that is, by using the combination of IPv6 destination address and XDP to replace the introduction of Srv6 header, indicating that the transmission configuration information of the data packet contains transmission node path information, so proceed directly to step 102.
[0077] Preferably, in another embodiment of the present invention, it further includes:
[0078] Step C1: If obtaining the fast data path segmentation transmission verification code of the data packet fails, the data packet is returned to the sender.
[0079] Specifically, if the data packet does not contain the EAFA verification code, then the data packet does not conform to the transmission mechanism designed by combining the IPv6 destination address and XDP, so the data packet is directly returned to the sender.
[0080] Now by Figure 4 Detailed explanation of the XDP program packet processing flow for each node:
[0081] First, when a node receives a data packet, it determines whether the data packet is an IPv6 packet by checking the IP address contained in the forwarding request of the data packet. If it is, it continues to check whether the data packet contains the EAFA flag, which indicates that the data packet is an SP data packet generated by the combination of the XDP mechanism and IPv6, and the forwarding path node is 4, that is, NextHeader=4. If so, it obtains the node number of the next forwarding node from the routing path information table. If not, it returns the data packet to the sender.
[0082] Secondly, if the next node number is 0, it means that the next node is the destination node. In this case, the IPv6 header of the data packet is directly removed, and the IPv4 data information of the data packet is directly forwarded to the next node through the XDP program.
[0083] If the next node's number is not 0, then the IPv6 address of the next node is found based on the node number, and the IPv6 destination address in the data packet is directly modified using XDP. For example, if the current address is fd00:0002::EAFA:0300:0:0:, and the number after EAFA is 03, then the IP address of 03 is read as fd00:0003:: / 64. Since the numbers after EAFA are all 0, and 03 is the destination, a new destination address fd00:0003::EAFA:0000:0:0: is generated and then sent out.
[0084] like Figure 4 In another branch of the process, if the data packet is not an IPv6 data packet, it is determined whether the traffic forwarding rule of the data packet is a preset traffic rule. If it does not conform, forwarding is stopped. If it does conform, the IPv4 data information of the data packet, the IPv6 address of the next node, and the node number of other nodes are obtained and combined to generate a new data packet, which is then forwarded directly through the XDP program.
[0085] In this embodiment, upon receiving a forwarding request for a data packet at the first target node, the IPv6 address, IPv4 data information, IPv6 address of the second target node, and node codes of each node along the transmission path of the data packet are obtained from the forwarding request. If the node code of the second target node is 0, the IPv4 data information is forwarded to the second target node. If the node code of the second target node is not 0, the IPv6 address of the second target node is queried based on the node code, the node code of the IPv6 address of the second target node is modified to 0, and the IPv4 data information is forwarded to the second target node. By utilizing a combination of IPv6 address encoding format and XDP program forwarding mechanism, instead of introducing Srv6 header data in segmented transmission, the purpose of effectively avoiding the increase of invalid payload in data packets due to the added transmission path node information in segmented transmission is achieved.
[0086] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0087] Example 2
[0088] Figure 6 This is a structural block diagram of a data transmission device provided in Embodiment 2 of the present invention. The device may specifically include the following modules:
[0089] The request receiving module 201 is used by the first target node to receive a forwarding request for the data packet;
[0090] The transmission configuration information acquisition module 202 is used to acquire the transmission configuration information of the data packet in the forwarding request if the data packet belongs to an IPv6 data packet; the transmission configuration information includes the IPv6 address of the data packet, IPv4 data information, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet; the second target node is the next target node after the first target node on the transmission path;
[0091] The first forwarding module 203 is used to forward the IPv4 data information to the second target node if the node code of the second target node is 0.
[0092] The query module 204 is used to query the IPv6 address of the second target node based on the node code if the node code of the second target node is not 0.
[0093] The second forwarding module 205 is used to modify the node code of the IPv6 address of the second target node to 0, and forward the IPv4 data information to the second target node.
[0094] Preferably, in another embodiment of the present invention, it further includes;
[0095] The IPv6 packet determination module is used to determine whether the traffic forwarding rule of the packet is a preset traffic rule if the packet does not belong to IPv6 packets.
[0096] Preferably, in another embodiment of the present invention, the IPv6 packet determination module can also be used for:
[0097] Obtain the routing path information table of the data packet;
[0098] If the routing path information table contains the source IP address and destination IP address of the data packet, as well as the forwarding path node information, then the data packet conforms to the pre-configured rules or the dynamic distribution rules.
[0099] The traffic forwarding information acquisition module is used to acquire the IPv4 data information of the data packet, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet if the traffic forwarding rule of the data packet is a preset traffic rule.
[0100] The forwarding address modification module is used to merge the IPv6 address of the second target node and the node codes of each node on the transmission path of the data packet into the IPv6 header of the data packet.
[0101] The packet to be forwarded generation module is used to combine the IPv6 header with the IPv4 data information to generate a packet to be forwarded.
[0102] The third forwarding module is used to send the data packet to be forwarded to the second target node.
[0103] Preferably, in another embodiment of the present invention, it further includes:
[0104] A fast data path segmented transmission verification code acquisition module is used to acquire the fast data path segmented transmission verification code of the data packet if the data packet belongs to IPv6 data packet.
[0105] The segmentation module is used to proceed to the transmission configuration information acquisition module if the fast data path segmentation transmission verification code of the data packet is successfully obtained.
[0106] Preferably, in another embodiment of the present invention, it further includes:
[0107] The data packet return module is used to return the data packet to the sender if obtaining the fast data path segmented transmission verification code of the data packet fails.
[0108] The data transmission device provided in the embodiments of the present invention can execute the data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0109] Example 3
[0110] Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment 3 of the present invention. Figure 7 A block diagram of an exemplary computer device 12 suitable for implementing embodiments of the present invention is shown. Figure 6The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0111] like Figure 7 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0112] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0113] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0114] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0115] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0116] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with computer device 12, and / or with any device that enables computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with computer device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0117] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the data transmission method provided in the embodiments of the present invention.
[0118] Example 4
[0119] Embodiment 4 of the present invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the various processes of the above-described data transmission method and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0120] Computer-readable storage media may include, for example, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0121] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A data transmission method, characterized in that, The method includes: The first target node receives a request to forward the data packet; If the data packet is an IPv6 data packet, then the transmission configuration information of the data packet in the forwarding request is obtained; the transmission configuration information includes the data packet IPv6 address, IPv4 data information, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet; the second target node is the next target node after the first target node on the transmission path; If the node code of the second target node is 0, then the IPv4 data information is forwarded to the second target node; If the node code of the second target node is not 0, then query the IPv6 address of the second target node based on the node code; Modify the node code of the IPv6 address of the second target node to 0, and forward the IPv4 data information to the second target node; Before obtaining the transmission configuration information of the data packet in the forwarding request, the method further includes: If the data packet is an IPv6 data packet, then obtain the Fast Data Path Segmentation Transmission Verification Code for the data packet; If the fast data path segmentation transmission verification code of the data packet is successfully obtained, the process proceeds to the step of obtaining the transmission configuration information of the data packet in the forwarding request.
2. The method according to claim 1, characterized in that, Before obtaining the transmission configuration information of the data packet in the forwarding request, the method further includes: If the data packet does not belong to an IPv6 data packet, then determine whether the traffic forwarding rule of the data packet is a preset traffic rule; If the traffic forwarding rule of the data packet is a preset traffic rule, then obtain the IPv4 data information of the data packet, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet. The IPv6 address of the second target node and the node codes of each node on the transmission path of the data packet are combined into the IPv6 header of the data packet. The IPv6 header is combined with the IPv4 data information to generate a data packet to be forwarded. The data packet to be forwarded is sent to the second target node.
3. The method according to claim 2, characterized in that, The preset traffic rules include at least pre-configured rules or dynamically issued rules, and the step of determining whether the traffic forwarding rule of the data packet is a preset traffic rule includes: Obtain the routing path information table of the data packet; If the routing path information table contains the source IP address and destination IP address of the data packet, as well as the forwarding path node information, then the data packet conforms to the pre-configured rules or the dynamic distribution rules.
4. The method according to claim 1, characterized in that, Also includes: If obtaining the fast data path segmented transmission verification code of the data packet fails, the data packet will be returned to the sender.
5. A data transmission device, characterized in that, The device includes: The request receiving module is used by the first target node to receive a forwarding request for a data packet; The transmission configuration information acquisition module is used to acquire the transmission configuration information of the data packet in the forwarding request if the data packet belongs to an IPv6 data packet; the transmission configuration information includes the IPv6 address of the data packet, IPv4 data information, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet; the second target node is the next target node after the first target node on the transmission path; The first forwarding module is configured to forward the IPv4 data information to the second target node if the node code of the second target node is 0. The query module is used to query the IPv6 address of the second target node based on the node code if the node code of the second target node is not 0. The second forwarding module is used to modify the node code of the IPv6 address of the second target node to 0, and forward the IPv4 data information to the second target node; A fast data path segmented transmission verification code acquisition module is used to acquire the fast data path segmented transmission verification code of the data packet if the data packet belongs to IPv6 data packet. The segmentation module is used to proceed to the transmission configuration information acquisition module if the fast data path segmentation transmission verification code of the data packet is successfully obtained.
6. The apparatus according to claim 5, characterized in that, Also includes: The IPv6 packet determination module is used to determine whether the traffic forwarding rule of the packet is a preset traffic rule if the packet does not belong to IPv6 packets. The traffic forwarding information acquisition module is used to acquire the IPv4 data information of the data packet, the IPv6 address of the second target node, and the node code of each node on the transmission path of the data packet if the traffic forwarding rule of the data packet is a preset traffic rule. The forwarding address modification module is used to merge the IPv6 address of the second target node and the node codes of each node on the transmission path of the data packet into the IPv6 header of the data packet. The packet to be forwarded generation module is used to combine the IPv6 header with the IPv4 data information to generate a packet to be forwarded. The third forwarding module is used to send the data packet to be forwarded to the second target node.
7. The apparatus according to claim 6, characterized in that, The IPv6 packet determination module is also used for: Obtain the routing path information table of the data packet; If the routing path information table contains the source IP address and destination IP address of the data packet, as well as the forwarding path node information, then the data packet conforms to the pre-configured rules or the dynamic distribution rules.
8. A computer device, characterized in that, The computer device includes: One or more processors; Memory, used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the data transmission method as described in any one of claims 1-4.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, it implements the data transmission method as described in any one of claims 1-4.