Transmission method and device and storage medium
By sequentially arranging and retransmitting the received data packets in the first device, the problem of inconsistent data sequence under the polling method is solved, and the efficiency and reliability of data transmission are improved.
Patent Information
- Application Number
- CN202510096903.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-04-29
AI Technical Summary
When large amounts of data transmission are carried out in polling, the data sequence may be inconsistent at the receiving end, especially in reliable communication service scenarios such as real-time video calls, which will lead to data discarding and retransmission, resulting in waste of transmission resources.
By arranging the data packets based on the sequence number of the received data packets in the first device, the arranged data packets are obtained and transmitted to the second device in the rearranged order, ensuring the order of the data packets.
It effectively reduces the possibility that data packets with disorderly order during transmission are discarded, improves the efficiency of data transmission, and ensures that the receiver can parse and process data normally.
Smart Images

Figure CN119906689A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a transmission method, device and storage medium. Background Art
[0002] In the process of transmitting large amounts of data using round robin (RR) mode, the network side can disperse the data transmitted to the same receiving end onto different transmission paths to improve the utilization of each of the multiple transmission paths and optimize the bandwidth utilization of the entire communication network.
[0003] However, since different transmission paths may have different transmission delays, the receiving end may receive data out of order. In business scenarios that require reliable communication (for example, real-time video calls), this data out of order situation will cause the receiving end to be unable to correctly parse and process the data, thereby increasing the risk of data being discarded, causing the sending end to retransmit the data, resulting in a waste of transmission resources. Summary of the invention
[0004] The present application provides a transmission method, device and storage medium, which can minimize the possibility of out-of-order data packets being discarded during the transmission process, thereby maximizing the efficiency of data transmission.
[0005] In order to achieve the above objectives, this application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a transmission method, applied to a first device, the method comprising: arranging at least one data packet based on the sequence number of each data packet in at least one received data packet (also referred to as a transmission packet) to obtain at least one arranged data packet; and transmitting the at least one arranged data packet to a second device in sequence.
[0007] In one possible implementation, at least one data packet is arranged based on the sequence number of each data packet in at least one received data packet to obtain at least one arranged data packet, including: when the sequence number of the received first data packet is the first sequence number, or the sequence number of the first data packet located in the second database is the first sequence number, the first data packet is stored in the first database until at least one data packet is stored in the first database, and the first sequence number is determined based on the sequence number of the data packet received before the first data packet; based on the sequence number of each data packet in the at least one received data packet, at least one data packet in the first database is sequentially arranged to obtain at least one arranged data packet.
[0008] In a possible implementation, the method further includes: when the number of data packets in the second database is greater than a preset number, sending first indication information to a third device, the first indication information being used to instruct the third device to reduce a rate of sending data packets.
[0009] In a possible implementation, the method further includes: when a growth rate of data packets in the second database is greater than a preset growth rate, sending second indication information to a fourth device, the second indication information being used to instruct the fourth device to reduce the number of paths for transmitting data packets.
[0010] In a second aspect, the present application provides a transmission method applied to a second device, the method comprising: receiving at least one arranged data packet from a first device, wherein the arrangement order of the at least one arranged data packet is determined based on the sequence number of each data packet in the at least one data packet.
[0011] In a third aspect, the present application provides a transmission device, comprising: a communication unit and a processing unit; the processing unit is used to arrange at least one data packet based on the sequence number of each data packet in at least one received data packet to obtain at least one arranged data packet; the communication unit is used to transmit the at least one arranged data packet to a second device in sequence.
[0012] In one possible implementation, the processing unit is specifically used to store the first data packet in the first database when the sequence number of the received first data packet is the first sequence number, or the sequence number of the first data packet located in the second database is the first sequence number, until at least one data packet is stored in the first database, and the first sequence number is determined based on the sequence number of the data packet received before the first data packet; the processing unit is also specifically used to sequentially arrange at least one data packet in the first database based on the sequence number of each data packet in the at least one received data packet to obtain at least one arranged data packet.
[0013] In a possible implementation, the processing unit is further used to send first indication information to the third device when the number of data packets in the second database is greater than a preset number, and the first indication information is used to instruct the third device to reduce the rate of sending data packets.
[0014] In one possible implementation, the processing unit is further used to send second indication information to the fourth device when the growth rate of the data packets in the second database is greater than a preset growth rate, and the second indication information is used to instruct the fourth device to reduce the number of paths for transmitting data packets.
[0015] In a fourth aspect, the present application provides a transmission device, comprising: a processor and a communication interface; the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the transmission method described in the first aspect and any possible implementation method of the first aspect.
[0016] In a fifth aspect, the present application provides a computer-readable storage medium, which stores instructions. When the instructions are executed on a terminal, the terminal executes the transmission method described in the first aspect and any possible implementation of the first aspect.
[0017] In a sixth aspect, the present application provides a computer program product comprising instructions, which, when the computer program product runs on a transmission device, enables the transmission device to execute the transmission method described in the first aspect and any possible implementation of the first aspect.
[0018] In a seventh aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface and the processor are coupled, and the processor is used to run a computer program or instructions to implement the transmission method described in the first aspect and any possible implementation method of the first aspect.
[0019] Specifically, the chip provided in the present application also includes a memory for storing computer programs or instructions.
[0020] The above technical solution brings at least the following beneficial effects: the first device rearranges the transmission order of at least one data packet with disordered transmission order based on the sequence number of each data packet in at least one data packet. And the first device transmits at least one data packet to the second device according to the arrangement order of at least one data packet after rearrangement. Since the first device sequentially transmits at least one data packet after arrangement to the second device, the second device can sequentially receive at least one data packet, and then the second device can normally parse and process at least one data packet after arrangement, so as to reduce the possibility of disordered data packets being discarded during transmission as much as possible, and then improve the efficiency of data transmission as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 An example diagram of a single-path transmission provided in an embodiment of the present application;
[0022] Figure 2 An example diagram of multipath transmission provided in an embodiment of the present application;
[0023] Figure 3 A schematic diagram of the structure of a transmission system provided in an embodiment of the present application;
[0024] Figure 4A schematic diagram of the composition of a transmission device provided in an embodiment of the present application;
[0025] Figure 5 A flow chart of a transmission method provided in an embodiment of the present application;
[0026] Figure 6 A flowchart of another transmission method provided in an embodiment of the present application;
[0027] Figure 7 A flowchart of another transmission method provided in an embodiment of the present application;
[0028] Figure 8 A flowchart of another transmission method provided in an embodiment of the present application;
[0029] Fig. 9 A schematic diagram of the structure of a transmission device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0030] The transmission method, device and storage medium provided in the embodiments of the present application are described in detail below in conjunction with the accompanying drawings.
[0031] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0032] The terms "first" and "second" and the like in the specification and drawings of this application are used to distinguish different objects, or to distinguish different processing of the same object, rather than to describe a specific order of objects.
[0033] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of the present application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.
[0034] It should be noted that, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.
[0035] In the description of the present application, unless otherwise specified, “plurality” means two or more.
[0036] The networking architecture of data center networks usually adopts Clos architecture and multi-path redundant networking to improve the bandwidth between adjacent switches and the reliability of data transmission between network node devices. Among them, multi-path redundancy is achieved through the three-layer routing technology equal-cost multi-path routing (ECMP) or the two-layer technology link aggregation control protocol (LACP), both of which have been widely used in current data center networking.
[0037] In the networking architecture of data center networks, in order to maintain the order of transmitted data, traditional load algorithms focus on load balancing of multiple transmission links. In other words, the traditional load method loads the same traffic to the same transmission link for transmission, which can avoid multiple transmission links transmitting different messages of the same traffic at the same time, and enable the receiving end of the traffic to receive data arranged in normal order.
[0038] For example, Figure 1 An example diagram of a single-path transmission provided by the present application is shown. Figure 1 As shown, the network topology of the data center network is a three-layer leaf-spine architecture, which includes two leaf switches, denoted as LF1 and LF2. LF1 and LF2 are responsible for transmitting data that needs to be transmitted between any two servers among server 1, server 2, server 3, and server 4. In addition, there is at least one data transmission link between any two servers among server 1, server 2, server 3, and server 4. The data processing unit (DPU) in server 1 is denoted as DPU1, the DPU in server 2 is denoted as DPU2, the DPU in server 3 is denoted as DPU3, and the DPU in server 4 is denoted as DPU4. The switch at the top of the rack storing server 1 is denoted as TOR1, the switch at the top of the rack storing server 2 is denoted as TOR2, the switch at the top of the rack storing server 3 is denoted as TOR3, and the switch at the top of the rack storing server 4 is denoted as TOR4.
[0039] When server 1 sends data to server 3, DPU1 can send the data to be transmitted to TOR1, and then TOR1 can transmit the data to LF1. After LF1 transmits data to TOR3, TOR3 transmits the data to DPU3.
[0040] However, in business scenarios involving artificial intelligence (AI), although the traffic that needs to be transmitted most of the time is relatively small, multiple concurrent elephant traffic transmissions may occur during the training of AI models, where elephant traffic refers to network traffic with long duration and large data volume.
[0041] Furthermore, if multiple concurrent elephant flows are transmitted based on the traditional load balancing method, the hash of the transmission link will be uneven, which will reduce the utilization efficiency of the transmission link, and some links will be congested while other links will be idle, which will lead to limited overall network performance. In the case of multi-path transmission, the transmission of multiple concurrent elephant flows based on the traditional load balancing method may cause congestion and packet loss at a certain node. If the remote direct memory access (RDMA) function is enabled in the data transmission environment, the traffic may not be evenly distributed to each node, further reducing the bandwidth utilization of the link.
[0042] To address the above problems, currently, the bandwidth utilization of the entire network is increased by increasing the bandwidth of a single link, or by using message spraying technology, adaptive routing technology, and end-side reordering technology to increase the bandwidth utilization of the entire network. However, since the implementation of the above technologies relies on a powerful software-defined networking (SDN) controller for global load tuning, the implementation is difficult. In addition, there are few chips from manufacturers in the industry that support technologies such as message spraying and adaptive routing. Furthermore, the application of the above technologies will significantly increase the cost and technical complexity of network construction, and its promotion is limited.
[0043] In order to ensure the flexibility of switching paths during data transmission and promote network load balancing, the network side can use polling to transmit data to the same receiving end. The network side evenly sends the data received by the same receiving end to different paths for transmission to increase the load entropy value of multi-path transmission and improve the utilization of the link.
[0044] For example, in Figure 1 In the network topology of the data center network shown in Figure 2 An example diagram of a multi-path transmission provided by the present application is shown. Figure 2 As described above, the network side transmits data using a polling method.
[0045] When server 1 needs to send data to server 3, DPU1 can send the data to be transmitted to TOR1, and then TOR1 can transmit the data to LF1. After LF1 transmits the data to TOR3, TOR3 transmits the data to DPU3.
[0046] When server 1 needs to send data to server 3, DPU1 can also send the data to be transmitted to TOR1, and then TOR1 can transmit the data to LF2. After LF2 transmits the data to TOR3, TOR3 transmits the data to DPU3.
[0047] However, combined with Figure 2 ,Since network nodes LF1 and LF2 may be congested or delayed when transmitting data, the data received by DPU3 may be out of order when using polling mode to transmit data, that is, the order of some data in the same flow is changed. This disorder has a significant impact on the performance of applications that require reliable communication, such as transmission control protocol (TCP) and remote direct memory access (RDMA).
[0048] Moreover, when the amount of out-of-order data exceeds a certain level, if DPU3 is unable to reorder the received messages, the disordered data order will cause DPU3 to be unable to correctly parse and process the data. DPU3 will have to discard the out-of-order data and instruct DPU1 to retransmit the data, thereby wasting transmission resources and reducing the data transmission rate.
[0049] At present, it is possible to determine whether to reroute during the transmission process based on the transmission time interval of multiple data packets split from the same flow, as well as the delay difference of parallel equivalent paths, to ensure that the receiving end receives data in normal order. In data transmission scenarios with the RDMA function enabled, this technology can also reduce the possibility of receiving out-of-order data, thereby improving data transmission efficiency. However, the introduction of rerouting technology increases the cost and technical complexity of network construction.
[0050] In view of this, an embodiment of the present application provides a transmission method, in which a first device rearranges the transmission order of at least one data packet with disordered transmission order based on the sequence number of each data packet in at least one data packet. In addition, the first device transmits at least one data packet to the second device according to the arrangement order of the at least one data packet after rearrangement. Since the first device sequentially transmits the at least one data packet after arrangement to the second device, the second device can sequentially receive the at least one data packet, and then the second device can normally parse and process the at least one data packet after arrangement, so as to reduce the possibility of the disordered data packets being discarded during the transmission process as much as possible, thereby improving the efficiency of data transmission as much as possible.
[0051] For example, Figure 3 A schematic diagram of the structure of a transmission system 30 provided in an embodiment of the present application is shown in FIG. The transmission system 30 may include at least one first device 301 and at least one second device 302, and the first device 301 may be connected to the second device 302 for communication. Figure 3 Only one first device 301 and one second device 302 are shown. The embodiment of the present application does not limit the number of the first device 301 and the second device 302.
[0052] In a possible implementation, the first device 301 is used to arrange at least one data packet based on the sequence number of each data packet in at least one received data packet to obtain at least one arranged data packet; and transmit the at least one arranged data packet to the second device in sequence.
[0053] Optionally, the first device 301 may be a cloud computing server, a high-performance computing cluster, an edge computing device, or an internal computing device of an autonomous vehicle. The first device 301 may also be a network security device deployed at a key node of a data center network. The first device 301 may be any device including a DPU. The first device 301 may be deployed indoors (e.g., a data center, an office, a laboratory), outdoors (e.g., a base station edge, a data center network edge), or in a vehicle (e.g., an autonomous vehicle), and this application does not limit this. Figure 3 In the figure, the first device 301 is taken as an example of a cloud computing server.
[0054] Exemplarily, the second device 302 may be a network switch, a router, a storage system (e.g., a non-volatile memory express solid state drive (NVMe SSD)), or a virtualization platform (e.g., hyper-V). The second device 302 may also be a terminal device, such as a sensor, a camera, a smart phone, a computer, or a tablet computer, which may be deployed on land, including indoors or outdoors, handheld or vehicle-mounted. It may also be deployed on the water (such as a ship, etc.). It may also be deployed in the air (e.g., on an airplane, a balloon, and a satellite, etc.). Figure 3 In the figure, the second device 302 is taken as a computer as an example.
[0055] It should be noted that Figure 3 This is just an exemplary framework diagram. Figure 3 The number of nodes included in the Figure 1 In addition to the functional nodes shown, the transmission system 30 may also include other nodes, which is not limited in this application.
[0056] The application scenarios of the embodiments of the present application are not limited. The system architecture and business scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided by the embodiments of the present application. It is known to those skilled in the art that with the evolution of the network architecture and the emergence of new business scenarios, the technical solutions provided by the embodiments of the present application are also applicable to similar technical problems.
[0057] When implementing it specifically, Figure 3 The equipment in Figure 4 The structure shown, or including Figure 4 Parts shown. Figure 4 Schematic diagram of the composition of a transmission device 40 provided in an embodiment of the present application, the transmission device 40 may be a first device 301 or a chip or a system on chip in the first device 301. Alternatively, the transmission device 40 may be a second device 302 or a chip or a system on chip in the second device 302. Figure 4 As shown, the transmission device 40 may include a processor 401 and a communication line 402 .
[0058] Furthermore, the transmission device 40 may also include a communication interface 403 and a memory 404. The processor 401, the memory 404 and the communication interface 403 may be connected via a communication line 402.
[0059] The processor 401 is a central processing unit (CPU), a general processor, a network processor (NP), a digital signal processor (DSP), a microprocessor, a microcontroller, a programmable logic device (PLD), or any combination thereof. The processor 401 may also be other devices with processing functions, such as circuits, devices, or software modules, without limitation.
[0060] The communication line 402 is used to transmit information between the components included in the transmission device 40.
[0061] The communication interface 403 is used to communicate with other devices or other communication networks. The other communication networks may be Ethernet, radio access network (RAN), wireless local area network (WLAN), etc. The communication interface 403 may be a module, a circuit, a communication interface or any device capable of achieving communication.
[0062] The memory 404 is used to store instructions, where the instructions may be computer programs.
[0063] Among them, the memory 404 can be a read-only memory (ROM) or other types of static storage devices that can store static information and / or instructions, or a random access memory (RAM) or other types of dynamic storage devices that can store information and / or instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed optical disc, laser disc, optical disc, digital versatile disc, Blu-ray disc, etc.), magnetic disk storage medium or other magnetic storage devices, etc., without limitation.
[0064] It should be noted that the memory 404 can exist independently of the processor 401, or can be integrated with the processor 401. The memory 404 can be used to store instructions or program codes or some data, etc. The memory 404 can be located in the transmission device 40, or can be located outside the transmission device 40, without limitation. The processor 401 is used to execute the instructions stored in the memory 404 to implement the transmission method provided in the following embodiments of the present application.
[0065] In an example, the processor 401 may include one or more CPUs, for example, CPU0 and CPU1 (not shown in the figure).
[0066] As an optional implementation, the transmission device 40 includes multiple processors.
[0067] As an optional implementation, the transmission device 40 further includes an output device and an input device. For example, the input device is a keyboard, a mouse, a microphone, a joystick, and the like, and the output device is a display screen, a speaker, and the like.
[0068] It should be noted that the transmission device 40 can be a desktop computer, a portable computer, a network server, a mobile phone, a tablet computer, a wireless terminal, an embedded device, a chip system or a Figure 4 In addition, Figure 4 The composition shown in the Figure 1 as well as Figure 4 The limitations of each device in Figure 4 In addition to the parts shown, Figure 3 as well as Figure 4 The various devices in the drawings may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0069] In the embodiment of the present application, the chip system may be composed of a chip, or may include a chip and other discrete devices.
[0070] In addition, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiments of the present application is only an example, and other names can also be used in the specific implementation without limitation.
[0071] The transmission method provided by the embodiment of the present application is described below in conjunction with the accompanying drawings. Among them, the actions, terms, etc. involved in the various embodiments of the present application can refer to each other without limitation. The message name or parameter name in the message exchanged between the various devices in the embodiment of the present application is only an example, and other names can also be used in the specific implementation without limitation. The actions involved in the various embodiments of the present application are only an example, and other names can also be used in the specific implementation, such as: "included in" in the embodiment of the present application can also be replaced by "carried on" or "carried on", etc.
[0072] In order to solve the problems existing in the above-mentioned prior art, the embodiment of the present application proposes a transmission method, which can reduce the possibility of out-of-order data being discarded during the transmission process as much as possible, thereby improving the efficiency of data transmission as much as possible. Figure 5 As shown, the method includes:
[0073] S501. A first device arranges at least one data packet based on a sequence number of each data packet in at least one received data packet to obtain at least one arranged data packet.
[0074] Exemplarily, the data packet recorded in the embodiment of the present application may be a message. The above is an exemplary description of a data packet. In future communication networks, the data packet recorded in the embodiment of the present application may be information in any other format transmitted by the communication network, and the embodiment of the present application does not limit this.
[0075] Optionally, the above data packet may also be referred to as a transmission packet.
[0076] In a possible implementation, taking the example that at least one data packet received by the first device includes data packet A, data packet B, and data packet C, the sequence number of data packet A is 1, the sequence number of data packet B is 2, the sequence number of data packet C is 3, and the first device receives data packet A, data packet B, and data packet C in the order of data packet B, data packet C, and data packet A, the implementation process of the above S501 may be: the first device stores data packet A, data packet B, and data packet C, and identifies the sequence number of data packet A, the sequence number of data packet B, and the sequence number of data packet C. Based on the arrangement order of sequence number 1, sequence number 2, and sequence number 3, the three data packets arranged in the order of data packet B, data packet C, and data packet A are rearranged to obtain three data packets arranged in the order of data packet A, data packet B, and data packet C.
[0077] In addition, as can be seen from the above description of S501, the first device receives at least one data packet, and each data packet in the at least one data packet has a corresponding transmission sequence number. That is, the third device needs to record the sequence number corresponding to the data packet in each data packet in the at least one data packet, and send at least one data packet to the first device. Among them, the third device includes a device that transmits at least one data packet to the first device.
[0078] Exemplarily, the third device may be a cloud computing server. The above is an exemplary description of the third device, and the third device may also be any device including a DPU, which is not limited in this application.
[0079] In a possible implementation, in a business scenario requiring reliable communication, the network side may transmit the data packets sent by the third device to the first device in a polling manner. The network side may also transmit the data packets sent by the third device to the first device in a stream-by-stream manner.
[0080] Optionally, the third device records the sequence number corresponding to each data packet in each data packet by: the third device determines the sequence number corresponding to each data packet based on the transmission order of each data packet, and records the sequence number corresponding to each data packet in the tag information of each data packet.
[0081] Exemplarily, the marking information may also include the transmission priority information of the data packet. The above is an exemplary description of the marking information, and the marking information recorded in the embodiment of the present application may also include other information, such as the five-tuple information of the data packet and the session identification information of the data packet, which is not limited in the embodiment of the present application.
[0082] As a possible implementation manner, when the data packet is a message, the marking information of the message can be carried on the tail mark of the message.
[0083] S502: The first device sequentially transmits at least one arranged data packet to the second device. Correspondingly, the second device receives at least one arranged data packet from the first device.
[0084] It is understandable that in critical business scenarios (e.g., database synchronization scenarios) where the order of transmitted data needs to be ensured, the implementation process of the second device receiving at least one data packet after being arranged in sequence provides a processing basis for the subsequent second device to parse and process at least one data packet. In other words, the first device rearranges the transmission order of at least one data packet that is out of order, thereby ensuring the accuracy and integrity of the transmitted data as much as possible.
[0085] In the transmission method provided in the embodiment of the present application, the first device rearranges the transmission order of at least one data packet that has a disordered transmission order based on the sequence number of each data packet in the at least one data packet. In addition, the first device transmits at least one data packet to the second device according to the arrangement order of the at least one data packet after rearrangement. Since the first device sequentially transmits the at least one data packet after arrangement to the second device, the second device can sequentially receive the at least one data packet, and then the second device can normally parse and process the at least one data packet after arrangement, which can reduce the possibility of the disordered data packets being discarded during the transmission process as much as possible, thereby improving the efficiency of data transmission as much as possible.
[0086] As can be seen from the above description of S501, the first device needs to rearrange the transmission order of at least one received data packet. That is, after receiving at least one data packet, the first device needs to store at least one data packet, and then the first device can arrange the at least one data packet in sequence to obtain at least one arranged data packet.
[0087] Optionally, taking at least one data packet including M data packets as an example, the implementation process of the first device storing at least one received data packet may be: the first device stores the first received data packet in the first database (also referred to as the formal cache area), and determines the initial value of the first sequence number based on the first received data packet. The first device compares the second received data packet with the initial value of the first sequence number. In the case where the second received data packet is equal to the initial value of the first sequence number, the first device stores the second received data packet in the first database, and adjusts the value of the first sequence number based on the second received data packet to obtain the first adjusted value of the first sequence number. In the case where the second received data packet is not equal to the initial value of the first sequence number, the first device stores the second received data packet in the second database (also referred to as the temporary cache area), and keeps the value of the first sequence number unchanged, that is, the value of the first sequence number is the initial value of the first sequence number.
[0088] Further, optionally, the process of the first device storing the third received data packet, the process of the first device storing the fourth received data packet,…, and the process of the first device storing the Mth received data packet can be understood with reference to the process of the first device storing the first received data packet, and will not be repeated here.
[0089] As can be seen from the above description of S501, the first device needs to rearrange the transmission order of the disordered data packets based on the sequence number of each data packet in at least one data packet to obtain at least one data packet after arrangement. In other words, the first device needs to determine whether the transmission order of the data packet is disordered based on the sequence number of the received data packet, and reorder the transmission order of the disordered data packets. In view of this, if Figure 6 As shown, S501 provided in the embodiment of the present application can be implemented through the following S601 to S602.
[0090] S601. When the sequence number of the received first data packet is the first sequence number, or the sequence number of the first data packet in the second database is the first sequence number, the first device stores the first data packet in the first database until at least one data packet is stored in the first database.
[0091] The first device determines the first sequence number based on the sequence number of a data packet received before the first data packet.
[0092] Taking the example that at least one data packet includes M data packets, the implementation process of the first device determining the first sequence number based on the sequence number of the data packet received before the first data packet is described in detail below.
[0093] In the process of receiving at least one data packet, the first device stores the first received data packet and records the sequence number of the data packet. The first device adds the value of the sequence number of the data packet to the preset difference value to obtain the value of the first sequence number determined based on the sequence number of the first received data packet (hereinafter referred to as the initial value of the first sequence number).
[0094] The first device stores the second received data packet and records the sequence number of the second received data packet. The first device compares the sequence number of the second received data packet with the initial value of the first sequence number.
[0095] When the value of the sequence number of the second received data packet is equal to the initial value of the first sequence number, that is, when the second received data packet is the first data packet, the first device adds the initial value of the first sequence number and the preset difference to obtain the first adjustment value 1 (denoted as Z1) of the first sequence number.
[0096] When the value of the sequence number of the second received data packet is not equal to the initial value of the first sequence number, the first device does not adjust the value of the first sequence number, that is, the value of the first sequence number is the initial value of the first sequence number.
[0097] The first device stores the third received data packet and records the sequence number of the third received data packet. The first device compares the sequence number of the third received data packet with the initial value of the first sequence number.
[0098] In the case where the value of the sequence number of the second received data packet is not equal to the initial value of the first sequence number, and the value of the sequence number of the third received data packet is equal to the initial value of the first sequence number, that is, in the case where the second received data packet is not the first data packet, and the third received data packet is the first data packet, the first device adds the initial value of the first sequence number to the preset difference value to obtain the first adjustment value 2 (recorded as Z2) of the first sequence number. In the case where the difference between the value of the sequence number of the second received data packet and the value of the sequence number of the third received data packet is the preset difference value, and the value of the sequence number of the second received data packet is greater than the value of the sequence number of the third received data packet, the first device detects that the value of the stored sequence number of the second received data packet is equal to Z2. The first device adds Z2 to the preset difference value to obtain the second adjustment value 1 (recorded as Y1) of the first sequence number.
[0099] When the value of the sequence number of the second received data packet is not equal to the initial value of the first sequence number, and the value of the sequence number of the third received data packet is not equal to the initial value of the first sequence number, that is, when the second received data packet is not the first data packet, and the third received data packet is not the first data packet, the first device does not adjust the value of the first sequence number, that is, the value of the first sequence number is the initial value of the first sequence number.
[0100] In the case where the value of the sequence number of the second received data packet is not equal to the initial value of the first sequence number, and the value of the sequence number of the third received data packet is equal to the initial value of the first sequence number, that is, in the case where the second received data packet is not the first data packet, and the third received data packet is the first data packet, if the difference between the value of the sequence number of the second received data packet and the value of the sequence number of the third received data packet is not the preset difference, the first device adds the initial value of the first sequence number to the preset difference to obtain a first adjustment value 3 (denoted as Z3) of the first sequence number. The first device stores the fourth received data packet and compares the sequence number of the fourth received data packet with Z3.
[0101] When the value of the sequence number of the second received data packet is equal to the initial value of the first sequence number, and the value of the sequence number of the third received data packet is equal to Z1, that is, when the second received data packet is the first data packet and the third received data packet is also the first data packet, the first device adds Z1 of the first sequence number to the preset difference to obtain the second adjustment value 2 (denoted as Y2) of the first sequence number.
[0102] Further, optionally, the process of the first device determining the value of the first sequence number based on the sequence number of the fourth received data packet, the process of the first device determining the value of the first sequence number based on the sequence number of the fifth received data packet,…, and the process of the first device determining the value of the first sequence number based on the sequence number of the Mth received data packet can be understood by referring to the above-mentioned process of the first device determining the first sequence number based on the sequence number of the second received data packet, and the process of the first device determining the first sequence number based on the sequence number of the third received data packet, and will not be repeated here.
[0103] Exemplarily, the value of the preset difference can be any positive integer, and the value of the preset difference can also be any negative integer. The above is an exemplary description of the preset difference, and the preset difference recorded in the embodiment of the present application can be set according to specific needs, and the embodiment of the present application does not limit this.
[0104] As a possible implementation, combined with the relevant description of the implementation process of the first device storing at least one data packet and the relevant description of the implementation process of the first device determining the first sequence number, the implementation process of S601 can be: when the first device determines the value of the first sequence number based on the sequence number of the data packet previously received before the currently received data packet, the first device compares the sequence number of the currently received data packet with the value of the first sequence number. If the value of the sequence number of the currently received data packet is equal to the value of the first sequence number, the first device determines the currently received data packet as the first data packet and stores the first data packet in the first database. If the value of the sequence number of the currently received data packet is not equal to the value of the first sequence number, the first device stores the currently received data packet in the first database.
[0105] In the case where the first device determines the adjustment value of the first sequence number based on the sequence number of the currently received data packet, the first device detects that at least one data packet stored in the second database includes a valid data packet, wherein the value of the sequence number of the valid data packet is equal to the adjustment value of the first sequence number. The first device determines the valid data packet as the first data packet, and reads the first data packet from the second database to the first database. That is, in the process of the first device receiving at least one data packet, the first device continuously determines the first sequence number based on the sequence number of the received data packet, and continuously determines the storage area of the received data packet based on the first sequence number, until the first device stores at least one data packet in the first database.
[0106] As a possible implementation, the first device may use multiple fields in a buffer description (BD) to describe information such as the cache status of the data packet, the cache location of the data packet, and the size of the data packet. Then, the first device may determine the cache location of the data packet based on the cache descriptor corresponding to the data packet stored in the second database, so that the first device reads the data packet stored in the second database to the first database.
[0107] S602: The first device sequentially arranges at least one data packet in the first database based on the sequence number of each data packet in at least one received data packet to obtain at least one arranged data packet.
[0108] As a possible implementation method, the implementation process of the above S602 can be: when the first device reads the valid data packet in the second database into the first database, and the first device adds the first sequence number to the preset difference to obtain the adjustment value of the first sequence number, the first device detects the second database, and when there is no new valid data packet in the second database, the first device sequentially arranges at least one data packet in the first database to obtain at least one arranged data packet.
[0109] Taking as an example that at least one data packet includes data packet A, data packet B, and data packet C, the sequence number of data packet A is 1, the sequence number of data packet B is 2, the sequence number of data packet C is 3, the first received data packet is data packet A, the second received data packet is data packet C, the first received data packet is data packet B, and the preset difference is 1, the implementation process of the above-mentioned S601 and the implementation process of S602 are exemplified.
[0110] Exemplarily, the implementation process of S601 may be as follows: the first device receives data packet A. The first device stores data packet A in the first database, and determines that the initial value of the first sequence number is 2. The first device receives data packet C. The first device detects that the sequence number of data packet C is not equal to the initial value 2 of the first sequence number. The first device stores data packet C in the second database.
[0111] The first device receives data packet B. The first device detects that the sequence number of data packet B is equal to the initial value 2 of the first sequence number. The first device stores data packet B in the first database, and determines that the value of the first sequence number is Z2, where Z2 is equal to 3. The first device detects that the sequence number of data packet C in the second database is 3, that is, the sequence number of data packet C is equal to Z2. The first device reads data packet C from the second database into the first database, and determines that the value of the first sequence number is Y1, where Y1 is equal to 4.
[0112] In an example, further, the implementation process of the above S602 may be: when the first device reads the data packet C from the second database to the first database, and the first device determines that the value of the first sequence number is Y1, the first device detects the second database. At this time, since there is no data packet stored in the second database, there is no new valid data packet in the second database. The first device arranges the three data packets in the first database into the order of data packet A, data packet B, and data packet C based on the order of sequence number 1, sequence number 2, and sequence number 3.
[0113] As can be seen from the above description of S601, the first device stores the received out-of-order data packets in the second database. In order to minimize the delay of the second device receiving at least one data packet, the first device needs to monitor the number of out-of-order data packets stored in the second database. Figure 7 As shown, the transmission method described in the embodiment of the present application may further include the following steps S701.
[0114] S701: When the number of data packets in the second database is greater than a preset number, the first device sends first indication information to the third device.
[0115] The first indication information is used to instruct the third device to reduce the rate of sending data packets.
[0116] Optionally, the implementation process of the above S701 may be: the first device monitors the number of data packets stored in the second database. If the first device monitors that the number of data packets stored in the second database is greater than a preset number, or the first device monitors that the number of data packets stored in the second database is greater than or equal to a preset number (denoted as M) and less than or equal to 2M, the first device sends a first indication message to the third device.
[0117] Exemplarily, the value of the preset number may be the difference between the sequence number of the currently received message and the current first sequence number. The above is an exemplary description of the preset number, and the value of the preset number may be set according to specific needs, and this application does not limit this.
[0118] As described above with respect to S701, when the first device detects that the number of data packets stored in the second database is large, the first device will instruct the third device to dynamically adjust the rate of sending data packets. However, when the third device reduces the rate of sending data packets, if the number of data packets stored in the second database is still large, the first device needs to further adjust the number of paths for transmitting data packets. In view of this, Figure 8 As shown, the transmission method described in the embodiment of the present application may further include the following steps S801.
[0119] S801: When a growth rate of data packets in a second database is greater than a preset growth rate, the first device sends second indication information to the fourth device.
[0120] The second indication information is used to instruct the fourth device to reduce the number of paths for transmitting data packets.
[0121] As a possible implementation, the implementation process of the first device sending the second indication information to the fourth device may be: when the third device reduces the rate of sending data packets, the first device monitors the growth rate of the data packets stored in the second database within the preset time, and compares the growth rate of the data packets stored in the second database within the preset time with the preset growth rate. When the growth rate of the data packets in the second database is greater than the preset growth rate, the first device sends the second indication information to the fourth device.
[0122] In addition, optionally, when the third device reduces the rate of sending data packets, if the first device monitors that the number of data packets stored in the second database within the preset time is greater than a preset number, or the first device monitors that the number of data packets stored in the second database within the preset time is greater than or equal to M and less than or equal to 2M, the first device may also send a second indication message to the fourth device.
[0123] Optionally, the implementation process of the first device setting the preset time value may be: the first device determines the preset time value based on information such as the performance of the first device, the transmission distance of the data packet, the size of the data packet, and the processing rate of the router adjacent to the first device. This application does not impose any restrictions on this.
[0124] In one example, the preset growth rate may be 20%. The above is an exemplary description of the preset growth rate. In the embodiment of the present application, the first device may determine the preset growth rate based on specific needs, and the present application does not impose any limitation on this.
[0125] Exemplarily, the fourth device may be an edge device in a data center networking architecture. The above is an exemplary description of the fourth device. In future communication systems, the fourth device described in the embodiments of the present application may also be any other device that can control the number of multipaths for transmitting data, and the present application does not limit this.
[0126] In an example, the second indication information may also be used to instruct the fourth device to cancel the route. The second indication information may also be used to instruct the fourth device to limit the bandwidth ratio of some links in the multipath. This application does not impose any limitation on this.
[0127] In addition, optionally, the structure of the second indication information can be a type / length / value (TLV) field in a link layer discovery protocol (LLDP) information encapsulation. The present application does not impose any restrictions on the structure of the second indication information.
[0128] It is understandable that the above transmission method can be implemented by a transmission device. In order to implement the above functions, the transmission device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the modules and algorithm steps of each example described in the embodiments disclosed herein, the embodiments disclosed in this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments disclosed in this application.
[0129] The embodiments disclosed in the present application can divide the functional modules of the transmission device generated by the above method example. For example, each functional module can be divided according to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiments disclosed in the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.
[0130] Fig. 9 This is a schematic diagram of the structure of a transmission device provided in an embodiment of the present application. Fig. 9 As shown, the transmission device 90 can be used to perform Figure 5-Figure 8 The transmission method shown. The transmission device 90 includes: a communication unit 901 and a processing unit 902.
[0131] The processing unit 902 is used to arrange at least one data packet based on the sequence number of each data packet in the at least one received data packet to obtain at least one arranged data packet; the communication unit 901 is used to transmit the at least one arranged data packet to the second device in sequence.
[0132] In one possible implementation, the processing unit 902 is further used to store the first data packet in the first database when the sequence number of the received first data packet is the first sequence number or the sequence number of the first data packet located in the second database is the first sequence number, until at least one data packet is stored in the first database, and the first sequence number is determined based on the sequence number of the data packet received before the first data packet; the processing unit 902 is further used to sequentially arrange at least one data packet in the first database based on the sequence number of each data packet in the at least one received data packet to obtain at least one arranged data packet.
[0133] In a possible implementation, the processing unit 902 is further used to send first indication information to the third device when the number of data packets in the second database is greater than a preset number, and the first indication information is used to instruct the third device to reduce the rate of sending data packets.
[0134] In one possible implementation, the processing unit 902 is further used to send second indication information to the fourth device when the growth rate of the data packets in the second database is greater than a preset growth rate, and the second indication information is used to instruct the fourth device to reduce the number of paths for transmitting data packets.
[0135] Through the description of the above implementation methods, technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. The specific working process of the system, device and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0136] The present disclosure also provides a computer-readable storage medium having instructions stored thereon. When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the transmission method provided by the above-mentioned embodiment of the present disclosure.
[0137] The embodiments of the present disclosure also provide a computer program product including instructions, which, when executed on an electronic device, enables the electronic device to execute the transmission method provided by the embodiments of the present disclosure.
[0138] Among them, the computer readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a register, a hard disk, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application-specific integrated circuit (ASIC). In the embodiments of the present application, a computer-readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0139] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A transmission method, characterized in that: Applied to a first device, the method includes: Arrange the at least one data packet based on the sequence number of each data packet in the at least one received data packet to obtain at least one arranged data packet; The at least one arranged data packet is transmitted to the second device in sequence.
2. The method according to claim 1, characterized in that: The step of arranging the at least one data packet based on the sequence number of each data packet in the at least one data packet received to obtain the at least one arranged data packet comprises: When the sequence number of the received first data packet is the first sequence number or the sequence number of the first data packet in the second database is the first sequence number, storing the first data packet in the first database until the at least one data packet is stored in the first database, the first sequence number being determined based on the sequence number of a data packet received before the first data packet; Based on the sequence number of each data packet in the at least one received data packet, at least one data packet in the first database is sequentially arranged to obtain the at least one arranged data packet.
3. The method according to claim 1 or 2, characterized in that: The method further comprises: When the number of data packets in the second database is greater than a preset number, first indication information is sent to a third device, where the first indication information is used to instruct the third device to reduce a rate of sending the at least one data packet.
4. The method according to claim 3, characterized in that The method further comprises: When the growth rate of the data packets in the second database is greater than a preset growth rate, second indication information is sent to the fourth device, where the second indication information is used to instruct the fourth device to reduce the number of paths for transmitting the at least one data packet.
5. A transmission method, characterized in that: Applied to the second device, the method includes: At least one arranged data packet is received from the first device, wherein an arrangement order of the at least one arranged data packet is determined based on a sequence number of each data packet in the at least one data packet.
6. A transmission device, characterized in that: The device comprises: a communication unit and a processing unit; The processing unit is used to arrange the at least one data packet based on the sequence number of each data packet in the at least one received data packet to obtain at least one arranged data packet; The communication unit is used to transmit the arranged at least one data packet to the second device in sequence.
7. The device according to claim 6, characterized in that The processing unit is specifically configured to store the first data packet in the first database when the sequence number of the received first data packet is the first sequence number or the sequence number of the first data packet in the second database is the first sequence number until the at least one data packet is stored in the first database, and the first sequence number is determined based on the sequence number of the data packet received before the first data packet; The processing unit is further specifically configured to sequentially arrange at least one data packet in the first database based on the sequence number of each data packet in the at least one received data packet to obtain the at least one arranged data packet.
8. A transmission device, characterized in that: include: Memory and processor; The memory is coupled to the processor; The memory is used to store instructions executable by the processor; When the processor executes the instructions, the transmission method according to any one of claims 1 to 4 and / or claim 5 is performed.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is enabled to execute the transmission method according to any one of claims 1 to 4 and / or claim 5.
10. A computer program product, characterized in that The computer program product comprises computer program instructions, and when the computer program instructions are executed by a processor, the transmission method according to any one of claims 1 to 4 and / or claim 5 is implemented.