Data packet sending method and device, equipment and storage medium
By redundantly sending packets that occur in audio and video conferencing and other applications based on redundancy strategies, the packet loss and delay problems in network transmission are solved, and the data transmission quality and stability are significantly improved.
Patent Information
- Application Number
- CN202311655831.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-30
- Publication Date
- 2025-05-30
AI Technical Summary
In real-time interactive applications such as audio and video conferencing, packet loss or delay may occur during network transmission, resulting in voice hysteresis and out-synchronization of audio and video. How to ensure the quality of data transmission has become an urgent problem.
Through a method based on redundancy policy, redundant transmission of packets in which packets occur is performed. The specific steps include: during the packet transmission process, determining the redundancy strategy based on the packet loss rate of packet loss; copying the data packets that need to be sent redundantly; after sending the original data packet, it is delayed to send redundant data packets for a period of time, which is related to the service type or the number of consecutive packets lost.
It significantly reduces the probability of continuous packet loss in data packets, dynamically adjusts the redundancy strategy according to the packet loss rate, adapts to the actual packet loss situation, avoids the timeliness of redundant packets, and reduces the complexity of method implementation.
Smart Images

Figure CN120075173A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technologies, and particularly to a method, apparatus, device, and storage medium for sending data packets. Background Art
[0002] With the development of communication technologies, real-time interactive applications have put forward high requirements for indicators such as network transmission delay and packet loss. Taking real-time interactive applications such as audio and video conferences as an example, if packets are lost or there is a delay during the network transmission of the audio and video conference traffic, problems such as voice lag and out-of-sync audio and video may occur during the audio and video conference. Therefore, the traffic transmission of the audio and video conference needs to ensure a low packet loss rate and low latency. However, due to reasons such as poor network link quality or network congestion, consecutive packet losses may occur in the network. In this scenario, how to ensure the quality of data transmission is an urgent problem to be solved. Summary of the Invention
[0003] This application provides a method, apparatus, device, and storage medium for sending data packets, which are used to redundantly send data packets of a first service with packet loss based on a redundancy policy.
[0004] In a first aspect, a method for sending data packets is provided. When a data packet of a first service being transmitted is lost, a redundancy policy for the first service is determined based on the packet loss rate of the packet loss. The redundancy policy is used to determine the data packets that need to be redundantly sent among the subsequent data packets of the first service; when a first data packet of the first service is received and it is determined based on the redundancy policy that the first data packet is a data packet that needs to be redundantly sent, a redundant data packet of the first data packet is obtained by copying the first data packet; the first data packet is sent; and when a first duration after sending the first data packet is reached, the redundant data packet is sent. Among them, the first duration is related to at least one of the service type of the first service or the number of consecutive packet losses of the packet loss.
[0005] This method redundantly sends data packets of the first service with packet loss based on the redundancy policy, which can significantly reduce the probability of consecutive packet losses of the data packets of the first service; and since the redundancy policy is determined according to the packet loss rate of the first service packet loss, the number of data packets that need to be redundantly sent determined according to the redundancy policy is adapted to the actual number of packet losses. Also, since the redundant data packet is sent when the first duration after sending the first data packet is reached, if the first duration is related to the service type of the first service, it can avoid the lack of timeliness of the redundant data packet caused by the long time between the redundant data packet and the first data packet; if the first duration is related to the number of consecutive packet losses, it can avoid simultaneous packet losses caused by the short time between the redundant data packet and the first data packet. In addition, this method can be implemented with a single-point deployment, without the need for wide-area network dual-end deployment, reducing the complexity of method implementation.
[0006] In a possible implementation manner, the way to send redundant data packets can be to directly send the redundant data packets through the sending port of the first data packet. The redundant data packets have the same sending port as the first data packet, and there is no need to re - route, so that the sending efficiency of the redundant data packets is relatively high.
[0007] In a possible implementation manner, if this method is applied to a network device with routing capabilities, the way to send redundant data packets can be to determine the first forwarding path of the redundant data packets based on the routing capabilities, where the transmission quality of the first forwarding path is higher than that of the second forwarding path of the first data packet; and send the redundant data packets through the port corresponding to the first forwarding path. By selecting a forwarding path with higher transmission quality to send the redundant data packets, the success rate of the redundant data packets reaching the receiving end is improved.
[0008] In a possible implementation manner, the redundancy policy can be to sample m video frames out of every n video frames, where both n and m are positive integers and m is less than or equal to n, and one video frame includes multiple data packets. In this case, the process of determining the first data packet as a data packet that needs to be redundantly sent based on the redundancy policy can include determining whether the first data packet belongs to the m video frames sampled out of every n video frames. If the first data packet belongs to the data packets in the m video frames sampled out of every n video frames, then it is determined that the first data packet is a data packet that needs to be redundantly sent. Determining the data packets that need to be redundantly sent at the granularity of video frames enables multiple data packets that need to be redundantly sent to be determined in one sampling, improving the redundancy sending efficiency, and the data packets of the same video frame that are sampled are all redundantly sent, ensuring the integrity of the transmission of the data packets of the same video frame.
[0009] In a possible implementation manner, the redundancy policy can be to sample m data packets out of every n data packets, where both n and m are positive integers and m is less than or equal to n. In this case, the process of determining the first data packet as a data packet that needs to be redundantly sent based on the redundancy policy can include determining whether the first data packet belongs to the m data packets sampled out of every n data packets. If the first data packet belongs to the data packets in the m data packets sampled out of every n data packets, then it is determined that the first data packet is a data packet that needs to be redundantly sent. Determining the data packets that need to be redundantly sent at the granularity of data packets makes the sampling granularity finer, improving the redundancy sending accuracy. Since there is no need to identify whether the data packets are of the same video frame, the implementation complexity is also reduced.
[0010] In a possible implementation, the ratio of m to n and the packet loss rate satisfy a certain corresponding relationship. For example, the ratio of m to n is equal to the packet loss rate, or the ratio of m to n is equal to any multiple of the packet loss rate. Thus, the number of redundant packets sent is comparable to the number of packets that may be lost. Compared with redundant sending of all packets of the first service, on the basis of reducing the packet loss rate, the bandwidth overhead introduced by redundant sending is effectively reduced, and a certain amount of bandwidth resources are saved.
[0011] In a possible implementation, before determining the redundancy strategy of the first service based on the packet loss rate of packet loss, it is also necessary to determine whether the packets transmitted by the first service are lost. The methods for determining whether the packets transmitted by the first service are lost include but are not limited to at least one of the following: one is to measure the transmission quality of the packets transmitted by the first service to obtain a first measurement result, and determine that the packets transmitted by the first service are lost according to the first measurement result; the second is to measure the transmission quality of the forwarding path of the first service based on the sent probing packets to obtain a second measurement result, and determine that the packets transmitted by the first service are lost according to the second measurement result; the third is to receive the notification message sent by the controller, and the notification message indicates that the packets transmitted by the first service are lost. Thus, it is possible to flexibly determine whether the packets transmitted by the first service are lost through different methods.
[0012] In a possible implementation, after replicating the first packet to obtain the redundant packet of the first packet, the redundant packet can be cached, for example, locally cached or remotely cached. Then, when sending the redundant packet, the cached redundant packet can be sent. Thus, through the caching method, it can be ensured that the redundant packet can be obtained when sending the redundant packet.
[0013] In a possible implementation, when the second packet of the first service is received and it is determined based on the redundancy strategy that the second packet is not a packet that needs to be redundantly sent, the second packet is directly sent, that is, the second packet is not redundantly sent. This ensures that the packets that need to be redundantly sent based on the redundancy strategy are redundantly sent, and the accuracy of the redundantly sent packets is guaranteed.
[0014] In a second aspect, a packet sending device is provided, and the device includes:
[0015] A transceiver module, configured to perform operations related to receiving and / or sending performed in the first aspect or any possible implementation manner of the first aspect;
[0016] A processing module, configured to perform other operations other than the operations related to receiving and / or sending performed in the first aspect or any possible implementation manner of the first aspect.
[0017] In a possible implementation, the transceiver module includes a receiving module and / or a sending module. The receiving module is used to perform operations related to receiving, and the sending module is used to perform operations related to sending.
[0018] In a possible implementation, the processing module is used to determine a redundancy policy for a first service based on the packet loss rate of the packets in the first service transmission when a packet loss occurs in the packets of the first service transmission. The redundancy policy is used to determine the packets that need to be redundantly sent among the subsequent packets of the first service; when receiving a first packet of the first service and determining that the first packet is a packet that needs to be redundantly sent based on the redundancy policy, copy the first packet to obtain a redundant packet of the first packet.
[0019] The transceiver module is used to send the first packet; when reaching the first duration after sending the first packet, send the redundant packet, and the first duration is related to at least one of the service type of the first service or the continuous packet loss count of the packet loss.
[0020] In a possible implementation, the transceiver module is used to send the redundant packet through the sending port of the first packet.
[0021] In a possible implementation, the device is applied to a network device with routing capabilities; the processing module is used to determine a first forwarding path for the redundant packet based on the routing capabilities, and the transmission quality of the first forwarding path is higher than the transmission quality of the second forwarding path of the first packet; the transceiver module is used to send the redundant packet through the port corresponding to the first forwarding path.
[0022] In a possible implementation, the redundancy policy is to sample m video frames out of every n video frames, where both n and m are positive integers and m is less than or equal to n, and one video frame includes multiple packets; the processing module is used to determine that the first packet is a packet that needs to be redundantly sent if the first packet belongs to the m video frames sampled out of the n video frames.
[0023] In a possible implementation, the redundancy policy is to sample m packets out of every n packets, where both n and m are positive integers and m is less than or equal to n; the processing module is used to determine that the first packet is a packet that needs to be redundantly sent if the first packet belongs to the m packets sampled out of the n packets.
[0024] In a possible implementation, the processing module is further configured to measure the transmission quality of the data packets transmitted by the first service, obtain a first measurement result, and determine that a data packet transmitted by the first service is lost according to the first measurement result; or measure the transmission quality of the forwarding path of the first service based on the sent probing data packets, obtain a second measurement result, and determine that a data packet transmitted by the first service is lost according to the second measurement result; or receive a notification message sent by the controller, where the notification message indicates that a data packet transmitted by the first service is lost.
[0025] In a possible implementation, the processing module is further configured to cache redundant data packets; the transceiver module is configured to send the cached redundant data packets.
[0026] In a possible implementation, the transceiver module is further configured to send a second data packet of the first service when the second data packet of the first service is received and it is determined based on the redundancy policy that the second data packet is not a data packet that needs to be redundantly sent.
[0027] In a third aspect, a network device is provided. The network device includes: a processor, the processor is coupled to a memory, and at least one program instruction or code is stored in the memory. The at least one program instruction or code is loaded and executed by the processor so that the network device implements the data packet sending method as described in the first aspect or any one of the first aspects above.
[0028] Optionally, the processor is one or more, and the memory is one or more.
[0029] Optionally, the memory may be integrated with the processor, or the memory is separately provided from the processor.
[0030] In a specific implementation process, the memory may be a non-transitory memory, such as a read only memory (ROM). It may be integrated with the processor on the same chip or separately provided on different chips. The present application does not limit the type of the memory and the setting manner of the memory and the processor.
[0031] In a fourth aspect, a communication device is provided. The device includes: a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. When the processor executes the instructions stored in the memory, the communication device executes the method in the first aspect or any one of the possible implementations of the first aspect.
[0032] Fifth aspect, a computer-readable storage medium is provided, in which at least one instruction is stored, and the instruction is loaded and executed by a processor to enable a computer to implement the method in the first aspect or any possible implementation manner of the first aspect as described above.
[0033] Sixth aspect, a computer program (product) is provided, and the computer program (product) includes: computer program code, when the computer program code is run by a computer, the computer is enabled to execute the method in the first aspect or any possible implementation manner of the first aspect as described above.
[0034] Seventh aspect, a chip is provided, including a processor for calling and running an instruction stored in a memory, so that a communication device equipped with the chip executes the method in the first aspect or any possible implementation manner of the first aspect as described above.
[0035] Eighth aspect, another chip is provided, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is configured to execute code in the memory, and when the code is executed, the processor is configured to execute the method in the first aspect or any possible implementation manner of the first aspect as described above.
[0036] It should be understood that for the beneficial effects achieved by the technical solutions and corresponding possible implementation manners of the second to eighth aspects of this application, reference can be made to the technical effects of the first aspect and its corresponding possible implementation manners as described above, and details are not elaborated herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A schematic diagram of an implementation environment provided by an embodiment of this application;
[0038] Figure 2 A schematic diagram of another implementation environment provided by an embodiment of this application;
[0039] Figure 3 A flowchart of a method for sending a data packet provided by an embodiment of this application;
[0040] Figure 4 A schematic diagram of the format of an IFIT message header provided by an embodiment of this application;
[0041] Figure 5 A schematic diagram of caching redundant data packets provided by an embodiment of this application;
[0042] Figure 6 A schematic diagram of transmitting redundant data packets provided by an embodiment of this application;
[0043] Figure 7 Another transmission schematic diagram of redundant data packets provided by an embodiment of the present application;
[0044] Figure 8 A schematic diagram of sending data packets provided by an embodiment of the present application;
[0045] Figure 9 An interaction schematic diagram of a data packet sending method provided by an embodiment of the present application;
[0046] Figure 10 Another interaction schematic diagram of a data packet sending method provided by an embodiment of the present application;
[0047] Figure 11 Another interaction schematic diagram of a data packet sending method provided by an embodiment of the present application;
[0048] Figure 12 Another interaction schematic diagram of a data packet sending method provided by an embodiment of the present application;
[0049] Figure 13 A structural schematic diagram of a data packet sending device provided by an embodiment of the present application;
[0050] Figure 14 A structural schematic diagram of a network device provided by an embodiment of the present application;
[0051] Figure 15 Another structural schematic diagram of a network device provided by an embodiment of the present application. Detailed implementation manners
[0052] To make the objectives, technical solutions, and advantages of the present application clearer, the following will further describe the embodiments of the present application in detail with reference to the accompanying drawings.
[0053] In the context of the global information age, with the rapid development of network construction, basic communication networks have been popularized. Furthermore, it has become common to use audio and video conferencing systems for work. The audio and video conferencing system can transfer activities with a large number of participants, such as traditional offline meetings and exhibitions, to the online environment to meet the needs of remote communication. Audio and video conferencing belongs to typical real-time interactive applications. For example, functions such as shared desktops and voice communication mainly involved in audio and video conferencing have high requirements for network transmission delay, packet loss, and other indicators. Once problems such as network congestion cause packet loss or delay problems in the traffic of audio and video conferencing, it will lead to experience problems such as voice lag and out-of-sync audio and video during the audio and video conferencing process. As the frequency of using audio and video conferencing becomes higher and higher, how to effectively guarantee the service experience of audio and video conferencing has become the key.
[0054] In the end-to-end transmission process of audio and video conference traffic, most common network problems occur in the wireless air interface and the wide area network (WAN) egress. The wireless air interface is the air interface in wireless communication, and the air interface defines the technical specifications of the radio wave link between the terminal device and the network device. The WAN egress is the egress of the wide area network (WAN). The WAN is also known as the external network or public network, and it is a remote network that connects local area networks or metropolitan area networks in different regions. Among them, the problems that occur on the wireless air interface side are mainly caused by problems such as high-density access or co-channel interference, and the problems that occur on the WAN egress side are mainly caused by link quality problems. The embodiments of the present application mainly optimize the data transmission quality of the audio and video conference service of the WAN.
[0055] In the related art, taking the wide area forward error correction (FEC) technology as an example, the wide area FEC technology is realized through the cooperation of the egress devices at both ends of the wide area network. Among the egress devices at both ends of the wide area network, one egress device is the sending end, and the other egress device is the receiving end. The sending end encodes the data traffic to generate and send redundant packets. If packet loss occurs, the receiving end can calculate the original content of the lost packets through matrix operations based on the received redundant packets, which can avoid the increase in latency caused by data retransmission, and thus optimize the data transmission quality.
[0056] However, the wide area FEC technology requires dual-end deployment, that is, the egress devices at both ends of the wide area network need to be devices from the same manufacturer, which limits the implementation and deployment of the wide area FEC technology. For the audio and video conference system, since the application side of the audio and video conference usually already has an FEC function, the two FEC mechanisms are easily separated from each other, which may cause compatibility problems.
[0057] The embodiments of the present application provide a method for sending data packets, which can significantly reduce the deterioration of data transmission quality caused by consecutive packet losses, and this method can be implemented with single-point deployment without dual-end deployment of the wide area network. See Figure 1 , Figure 1 which is a schematic diagram of an implementation environment provided by the embodiments of the present application. As Figure 1 shown, this implementation environment includes at least two end-side devices 101, and each end-side device 101 is connected to the wide area network 103 through at least one network device 102. The data packets sent by any end-side device 101 are forwarded by the network device 102 connected to any end-side device 101 to the wide area network, and are forwarded by the wide area network 103 to the network device 102 connected to the other end-side device 101, and then forwarded to the other end-side device 101. Among them, the end-side device 101 can be a terminal or a server, etc. For example, it can be a user terminal of an audio and video conference, and the network device 102 can be a switch or a router, etc.
[0058] Optionally, seeFigure 2 , Figure 2 is a schematic diagram of another implementation environment provided by an embodiment of this application. As Figure 2 shown, based on the implementation environment shown in Figure 1 , the network device 102 may include an access node 1021, an aggregation node 1022, a core node 1023, etc., and the wide area network 103 may include an edge node 1031 and a central node 1032. Among them, the access node 1021 may be an access point (AP) or an access switch for wirelessly accessing the end-side device 101; the aggregation node 1022 may be an aggregation switch for providing services such as firewalls, intrusion detection, and network analysis; the core node 1023 may be a core switch for providing high-speed forwarding for data entering and leaving the data center. The edge node 1031 is a node located at the edge of the wide area network, for example, a selective forwarding unit (SFU); the central node 1032 is a node located at the center of the wide area network, for example, a central SFU. Exemplarily, in an audio and video conferencing scenario, the wide area network 103 may be a real-time network (RTN).
[0059] Refer to Figure 3 , Figure 3 is a flowchart of a method for sending a data packet provided by an embodiment of this application. This sending method may be applied to a network device, and the network device may be Figure 1 any of the network devices 102 shown in Figure 2 , or Figure 2 any of the access node 1021, aggregation node 1022, or core node 1023 shown in Figure 3 , or
[0060] Step 301, in the case where a packet loss occurs in the data packet of the first service transmission, determine a redundancy policy for the first service based on the packet loss rate of the packet loss, and the redundancy policy is used to determine the data packets that need to be redundantly sent in the subsequent data packets of the first service.
[0061] Before performing step 301, that is, before determining the redundancy strategy of the first service based on the packet loss rate of packet loss, it is necessary to determine whether the data packets transmitted by the first service are lost. The method for sending data packets provided in the embodiments of the present application is called a redundancy compensation mechanism. In the case where it is determined that the data packets transmitted by the first service are lost, the execution of the redundancy compensation mechanism is triggered, that is, the sending method of the current data packet is switched to this redundancy compensation mechanism; in the case where it is determined that the data packets transmitted by the first service are not lost, the redundancy compensation mechanism is not executed, that is, the sending method of the current data packet remains unchanged. The loss of data packets transmitted by the first service indicates that the quality of the network carrying the transmitted data packets deteriorates, so that the method provided in the embodiments of the present application is executed only in the scenario where the network quality deteriorates, avoiding bandwidth waste caused by executing the method provided in the embodiments of the present application in the scenario where the network quality does not deteriorate.
[0062] Optionally, the method for determining whether the data packets transmitted by the first service are lost includes but is not limited to at least one of the following several methods.
[0063] Method 1: Measure the transmission quality of the data packets transmitted by the first service, obtain the first measurement result, and determine that the data packets transmitted by the first service are lost according to the first measurement result.
[0064] In this Method 1, a service measurement method based on in-band traffic is used to determine that the data packets transmitted by the first service are lost. The service measurement method of in-band traffic refers to a method for evaluating service quality in which a network device directly uses the real service traffic of the service. For example, the in-situ flow information telemetry (IFIT) technology belongs to a typical service measurement method based on in-band traffic. The IFIT technology inserts an IFIT packet header into the real service traffic for feature marking, so as to directly detect performance indicators such as network delay, packet loss, and jitter based on the information recorded in the IFIT packet header.
[0065] Optionally, measure the transmission quality of the data packets for the first service transmission to obtain a first measurement result, including: adding an IFIT header to the data packets for the first service transmission to obtain data packets after adding the IFIT header, where the IFIT header is used to instruct a network device that receives the data packets after adding the IFIT header to perform service quality detection; sending the data packets after adding the IFIT header; obtaining the first measurement result, which is obtained based on the service quality detection results of each network device that receives the data packets after adding the IFIT header. That is, after the nodes along the service flow of the first service identify the IFIT header added to the data packets, they perform corresponding detections and report the detection data to the network device or the control device, and the network device performs unified aggregation to obtain the first measurement result, or the control device performs unified aggregation to obtain the first measurement result, and the control device sends the first measurement result to the network device.
[0066] Exemplarily, Figure 4 Figure 5 is a schematic diagram of an IFIT header provided in an embodiment of the present application. As Figure 4 shown, the IFIT header includes three fields, namely a flow instruction indicator (FII) field, a flow instruction header (FIH) field, and an optional flow instruction extension header (FIEH) field. Among them, the FII field indicates that service quality detection needs to be performed on the current service flow. The FII field includes a type field and a length field. The value of the type field is 130, which is used to identify that the IFIT header follows immediately, and the length field indicates the overall length of the IFIT header.
[0067] The FIH field includes the following fields. flow ID is used to record the service flow identifier of the first service; L field: packet loss coloring flag. If this field is set, it indicates that the current service quality detection is packet loss detection. D field: delay coloring flag. If this field is set, it indicates that the current service quality detection is delay detection. Thus, the L field and D field in the FIH can respectively provide the ability to perform packet loss and delay statistics on the data packets based on alternating coloring. Coloring is to perform feature marking on the data packets. The IFIT header realizes the marking of the feature fields by setting the packet loss coloring bit L to 0 or 1 and setting the delay coloring bit D to 0 or 1. Furthermore, through the direct coloring of the real service traffic, the IFIT technology can actively perceive the subtle changes in the network quality and truly reflect the packet loss and delay conditions of the network.
[0068] The FIEH field includes the following fields. Flow ID Ext (Extended Flow ID): Used to extend the bit width. This field, together with the flow ID field in the FIH, records the flow ID. E: Used to identify the end-to-end (E2E) or hop-by-hop (Trace) detection mode. If this field is set, it indicates that the current service quality detection is E2E detection. Trace type (TT): Identifies the type of extended header field, such as carrying a timestamp (Timestamp), etc. The E2E detection mode is applicable to detection scenarios that require end-to-end overall quality monitoring of services. The Trace detection mode is applicable to detection scenarios that require hop-by-hop demarcation of low-quality services or on-demand hop-by-hop monitoring of VIP services. The difference between the two lies in whether to enable the IFIT capability for all node network devices supporting IFIT along the service flow path.
[0069] In the second method, measure the transmission quality of the forwarding path of the first service based on the sent probing data packet, obtain a second measurement result, and determine that a packet loss occurs in the data packet transmitted by the first service according to the second measurement result.
[0070] In this second method, determine that a packet loss occurs in the data packet transmitted by the first service based on the probing method of out-of-band messages. The probing method of out-of-band messages refers to a method of measuring the link quality through data packets outside the real service traffic of the service. For example, the Internet Control Message Protocol (ICMP) Packet Internet Groper (PING) technology is a typical probing method based on out-of-band messages.
[0071] Optionally, measuring the transmission quality of the forwarding path of the first service based on the sent probing data packet and obtaining a second measurement result includes: The sending end of the forwarding path of the first service constructs a probing request data packet and sends the probing request data packet to the receiving end of the forwarding path of the first service; after receiving the probing request data packet, the receiving end returns a probing response data packet to the sending end; based on information such as the numbers and timestamps of the probing request data packet and the probing response data packet, obtain the second measurement result on the forwarding path of the first service. The second measurement result includes packet loss, latency, or jitter, etc.
[0072] In the third method, receive the notification message sent by the controller, and the notification message indicates that a packet loss occurs in the data packet transmitted by the first service.
[0073] In the third method, the controller determines whether packets of the first service transmission are lost. When it is determined that packets of the first service transmission are lost, a notification message is sent to the network device to inform the network device that packets of the first service transmission are lost, thereby triggering the network device to execute the redundancy compensation mechanism provided in the embodiments of the present application. Among them, the method by which the controller determines whether packets of the first service transmission are lost is not limited in the embodiments of the present application, and it can be the above-mentioned service measurement method based on in-band traffic or the probing method based on out-of-band messages, etc.
[0074] Thus, through the above methods 1 to 3, the network device can flexibly determine whether packets of the first service transmission are lost in different ways, thereby improving the accuracy of determining whether packets of the first service transmission are lost. Furthermore, it can accurately trigger the redundancy compensation mechanism and reduce the bandwidth problems and device performance consumption caused by unnecessary redundancy compensation.
[0075] In the embodiments of the present application, the first service may refer to a service with high requirements for data transmission quality. For example, it may be a very important person (VIP) service. When packets of the first service transmission are lost, the impact of consecutive packet losses on the service is alleviated by means of redundant transmission. Among them, the redundancy strategy for the first service can be 1:1 replication, that is, each packet transmitted for the first service is redundantly sent. Thus, the transmission quality of the first service transmission is ensured to be relatively high.
[0076] Since 1:1 replication may excessively consume limited bandwidth resources, and in addition, the transmission quality of most wide area networks is relatively stable, and the packet loss rate will not be higher than the packet loss rate threshold. For example, the packet loss rate threshold is 20%. Therefore, the redundancy strategy can be flexibly determined based on the packet loss rate of the lost packets to reduce the resource overhead caused by the redundancy strategy. Optionally, flexibly determining the redundancy strategy based on the packet loss rate of the lost packets includes: determining the redundancy rate based on the packet loss rate of the lost packets; determining the redundancy strategy based on the redundancy rate. The packet loss rate refers to the proportion of the data packets with packet loss in the original data packets. Assuming the packet loss rate is p% (0 < p < 100), it means that p packets out of every 100 packets will be discarded during transmission. The redundancy rate refers to the proportion of the redundantly sent data packets in the original data packets.
[0077] Taking the first service as an example of a video service, since video data is transmitted and rendered frame by frame during the transmission process, the redundancy strategy determined based on the packet loss rate can be implemented at the frame granularity. Optionally, the redundancy strategy can be to sample m video frames out of every n video frames, where both n and m are positive integers and m is less than or equal to n, and a video frame includes multiple data packets. In this case, the process of determining the first data packet as a data packet that needs to be redundantly sent based on the redundancy strategy can include determining whether the first data packet belongs to the m video frames sampled out of every n video frames. If the first data packet belongs to the data packets in the m video frames sampled out of n video frames, then the first data packet is determined as a data packet that needs to be redundantly sent. Determining the data packets that need to be redundantly sent at the video frame granularity enables multiple data packets that need to be redundantly sent to be determined in one sampling, improving the efficiency of redundant sending, and the data packets of the same video frame that are sampled are all redundantly sent, ensuring the integrity of the transmission of the data packets of the same video frame.
[0078] Exemplarily, the method for determining the redundancy rate based on the packet loss rate of packet loss can be, taking the packet loss rate as p%, dividing p by 10 and rounding up to get n, where n is the number of video frames to be redundantly sent out of every 10 video frames, that is, the redundancy strategy is to redundantly send n video frames out of every 10 video frames. Then, the larger p is, the larger the number of video frames n to be redundantly sent is. When p is 20, n = 20 / / 10 = 2, where / / represents rounding up after division; when p is 23, n = 23 / / 10 = 2; when p is 28, n = 28 / / 10 = 3; when p reaches 100, n = 10, that is, it becomes a redundancy strategy of 1:1 replication.
[0079] Among them, the values of the timestamp fields of the data packets within the same video frame of the video data are the same, and the 8th bit of the packet header of the last data packet within the same video frame is set to 1, while the 8th bit of the packet header of the non-last data packet within the same video frame is set to 0. Therefore, for the data packets of the first service received, the data packets within the same video frame are summarized and cached according to the timestamp field and the 8th bit of the packet header in the data packets. Furthermore, based on the redundancy strategy, it can be determined whether any video frame is a video frame that needs to be redundantly sent. If the any video frame is a video frame that needs to be redundantly sent, then the data packets belonging to the any video frame are all video frames that need to be redundantly sent.
[0080] In a possible implementation, the redundancy policy determined based on the packet loss rate can be implemented based on the data packet granularity, so that this method can be applied to any service, for example, a service without a frame concept. Optionally, the redundancy policy can sample m data packets from every n data packets, where both n and m are positive integers, and m is less than or equal to n. In this case, the process of determining the first data packet as a data packet that needs to be redundantly sent based on the redundancy policy may include determining whether the first data packet belongs to the m data packets sampled from every n data packets. If the first data packet belongs to the data packets among the m data packets sampled from n data packets, then it is determined that the first data packet is a data packet that needs to be redundantly sent. Determining the data packets that need to be redundantly sent at the data packet granularity makes the sampling granularity finer and improves the accuracy of redundant transmission. Since there is no need to identify whether the data packets are from the same video frame, the implementation complexity is also reduced.
[0081] In the embodiments of the present application, whether based on the video frame granularity or the data packet granularity, the ratio of m to n, that is, the redundancy rate, has a certain corresponding relationship with the packet loss rate. For example, the ratio of m to n is equal to the packet loss rate, or the ratio of m to n is equal to any multiple of the packet loss rate. Thus, the number of data packets sent redundantly is equivalent to the number of data packets that may experience packet loss. Compared with redundantly sending all the data packets of the first service, while reducing the packet loss rate, the bandwidth overhead introduced by redundant transmission is effectively reduced, saving a certain amount of bandwidth resources. In addition, whether based on the video frame granularity or the data packet granularity, the embodiments of the present application do not limit the sampling method, including but not limited to random sampling, uniform sampling, or the sampling method can be determined based on the packet loss interval where packet loss occurs. For example, if the packet loss interval where packet loss occurs is continuous packet loss of x, then the sampling method can be continuous sampling of y, where y is greater than or equal to x and less than m.
[0082] Step 302, when receiving the first data packet of the first service and determining that the first data packet is a data packet that needs to be redundantly sent based on the redundancy policy, copy the first data packet to obtain a redundant data packet of the first data packet, and send the first data packet.
[0083] In the embodiments of the present application, after receiving the first data packet of the first service, since the data packets transmitted by the first service experience packet loss, it is necessary to execute the redundancy compensation mechanism provided by the embodiments of the present application. Also, since the embodiments of the present application determine the redundancy policy of the first service based on the packet loss rate of the packet loss, it is necessary to determine whether the received first data packet is a data packet that needs to be redundantly sent as indicated by the redundancy policy of the first service. Furthermore, when determining that the first data packet is a data packet that needs to be redundantly sent based on the redundancy policy, copy the first data packet to obtain a redundant data packet of the first data packet, and send the first data packet.
[0084] In a possible implementation, when the second data packet of the first service is received and it is determined based on the redundancy policy that the second data packet is not a data packet that needs to be redundantly sent, the second data packet is directly sent, that is, the second data packet is not redundantly sent. Only the data packets that need to be redundantly sent as determined based on the redundancy policy are redundantly sent, ensuring the accuracy of the redundantly sent data packets.
[0085] In the embodiments of the present application, after the redundant data packet of the first data packet is obtained by copying the first data packet, the redundant data packet can be cached, for example, locally cached or remotely cached. When the network device caches the redundant data packet, the cached redundant data packet can be sent when sending the redundant data packet. Thus, the cached method can ensure that the redundant data packet can be obtained when sending the redundant data packet. Exemplarily, referring to Figure 5 the schematic diagram of caching the redundant data packet shown, for the data packets of the first service received, each data packet is transmitted to the next-hop device, where the data packets determined to need to be redundantly sent based on the redundancy policy are copied and cached into the cache space.
[0086] Step 303, when the first duration after sending the first data packet is reached, send the redundant data packet, where the first duration is related to at least one of the service type of the first service or the continuous packet loss count of packet loss.
[0087] Among them, if the first duration is related to the service type of the first service, the lack of timeliness of the redundant data packet caused by the far sending time of the redundant data packet from the first data packet can be avoided; if the first duration is related to the continuous packet loss count, the simultaneous packet loss caused by the close sending time of the redundant data packet from the first data packet can be avoided. Based on the fact that the first duration is related to at least one of the service type of the first service or the continuous packet loss count of packet loss, the first duration can be set according to experience or flexibly adjusted according to the application scenario. For example, the first duration is in the range of 10 milliseconds (ms) to 20 ms.
[0088] In a possible implementation, the way to send the redundant data packet can be to directly send the redundant data packet through the sending port of the first data packet. The sending port of the redundant data packet is the same as that of the first data packet, and there is no need to re - route, making the sending method of the redundant data packet simple and direct. Thus, this method can be applied to network devices without routing capabilities, for example, applied to campus switches. Exemplarily, referring to Figure 6 the schematic diagram of transmitting the redundant data packet shown, taking the second forwarding path as forwarding path 2 as an example, the redundant data packet is sent out again from the port where the original data packet was sent before, so that the original data packet and the redundant data packet sent after a lag of the first duration are both transmitted on the same forwarding path before reaching the receiving end.
[0089] If this method is applied to a network device with routing capabilities, for example, a wide area network egress router. Then the way to send redundant data packets can be to determine the first forwarding path of the redundant data packets based on the routing capabilities, where the transmission quality of the first forwarding path is higher than that of the second forwarding path of the first data packet; and send the redundant data packets through the port corresponding to the first forwarding path. By selecting a forwarding path with higher transmission quality to send redundant data packets, the success rate of the redundant data packets reaching the receiving end is improved. Exemplarily, referring to Figure 7 the schematic diagram of the transmission of redundant data packets shown. Taking the second forwarding path as forwarding path 2 and the transmission quality of forwarding path 1 being higher than that of forwarding path 2 as an example, the redundant data packets are sent out again from the port where the original data packets were sent before, so that the original data packets are transmitted on forwarding path 2, and the redundant data packets sent after a first time lag are transmitted on forwarding path 1.
[0090] Optionally, determining the first forwarding path of the redundant data packets based on the routing capabilities includes: obtaining the transmission quality corresponding to each of multiple forwarding paths, for example, regularly obtaining the transmission quality corresponding to each of multiple forwarding paths through the above ICMP PING technology, and all the multiple forwarding paths correspond to the first service; and selecting the forwarding path with the highest transmission quality among the multiple forwarding paths as the first forwarding path.
[0091] Referring to Figure 8 , Figure 8 is a schematic diagram of sending data packets provided by an embodiment of the present application. The network device performs traffic filtering on the received data packets, copies and caches the data packets belonging to the first service through a cache module, sets a timer to the first time length and starts timing, sends the original data packets through a forwarding module, and sends the redundant data packets cached by replication through the forwarding module after the timer times out; and directly sends the data packets that do not belong to the first service through the forwarding module.
[0092] The method for sending data packets provided by the embodiment of the present application redundantly sends the data packets of the first service with packet loss based on a redundancy strategy, which can significantly reduce the probability of consecutive packet loss of the data packets of the first service; and since the redundancy strategy is determined according to the packet loss rate of the first service packet loss, the number of data packets that need to be redundantly sent determined according to the redundancy strategy is adapted to the actual number of packet losses. Also, since the redundant data packets are sent after the first time length after the first data packet is sent, where if the first time length is related to the service type of the first service, it is possible to avoid the lack of timeliness of the redundant data packets caused by the long time difference between the redundant data packets and the first data packet; if the first time length is related to the number of consecutive packet losses, it is possible to avoid simultaneous packet loss caused by the short time difference between the redundant data packets and the first data packet. In addition, this method can be implemented with single-point deployment, without the need for dual-end deployment of the wide area network, reducing the complexity of method implementation.
[0093] Taking the interaction among the controller, the local area network device, the wide area network device, and the end-side device to execute the method provided in the embodiment of the present application as an example, refer to Figure 9 the interaction schematic diagram of the data packet sending method shown in. Among them, the local area network device does not have routing capabilities, and the local area network device can be Figure 2 any one of the access nodes 1021, aggregation nodes 1022, or core nodes 1023 shown in, the wide area network device has routing capabilities, and the wide area network device can be Figure 2 any one of the edge nodes 1031 and central nodes 1032 shown in. Exemplarily, the redundancy policy takes 1:1 replication as an example.
[0094] As Figure 9 shown, when the controller senses that the transmission quality of the forwarding path of the first service has deteriorated, it sends a notice message of deteriorated transmission quality to the local area network device; based on the notice message, the local area network device triggers the execution of the redundancy compensation mechanism, redundantly copies and caches the data packets received for the first service; sends the original data packet to the wide area network device, and the wide area network device then sends the original data packet to the end-side device; after sending the original data packet, the local area network device delays for a first duration and sends the redundant data packet to the wide area network device, and the wide area network device then sends the redundant data packet to the end-side device; the end-side device decodes at least one of the received original data packet or redundant data packet.
[0095] Taking the interaction among the local area network device, the wide area network device, and the end-side device to execute the method provided in the embodiment of the present application as an example, refer to Figure 10 the interaction schematic diagram of the data packet sending method shown in. Among them, the local area network device does not have routing capabilities, and the local area network device can be Figure 2 any one of the access nodes 1021, aggregation nodes 1022, or core nodes 1023 shown in, the wide area network device has routing capabilities, and the wide area network device can be Figure 2 any one of the edge nodes 1031 and central nodes 1032 shown in. Exemplarily, the redundancy policy takes 1:1 replication as an example.
[0096] As Figure 10 shown, when the local area network device senses that the transmission quality of the forwarding path of the first service has deteriorated, it triggers the execution of the redundancy compensation mechanism, redundantly copies and caches the data packets received for the first service; sends the original data packet to the wide area network device, and the wide area network device then sends the original data packet to the end-side device; after sending the original data packet, the local area network device delays for a first duration and sends the redundant data packet to the wide area network device, and the wide area network device then sends the redundant data packet to the end-side device; the end-side device decodes at least one of the received original data packet or redundant data packet.
[0097] Taking the interaction between the controller, the wide area network device, and the edge device to execute the method provided in the embodiments of the present application as an example, refer to Figure 11 the interaction schematic diagram of the data packet sending method shown in. Among them, the wide area network device has routing capabilities, and the wide area network device can be Figure 2 any of the edge nodes 1031 and the central node 1032 shown in. Exemplarily, the redundancy policy is taken as 1:1 replication.
[0098] As Figure 11 shown, when the controller senses that the transmission quality of the forwarding path of the first service has decreased, it sends a notice message of the decreased transmission quality to the wide area network device; based on the notice message, the wide area network device triggers the execution of the redundancy compensation mechanism, redundantly copies and caches the data packets received for the first service; the wide area network device sends the original data packets to the edge device based on the original path, and the original path is the forwarding path of the first service; after sending the original data packets, the local area network device delays for the first duration, selects the optimal path based on its routing capabilities, and the optimal path is the path with the highest transmission quality among the paths between the wide area network device and the edge device; the wide area network device sends the redundant data packets to the edge device based on the optimal path; the edge device decodes at least one of the received original data packets or redundant data packets.
[0099] Taking the interaction between the wide area network device and the edge device to execute the method provided in the embodiments of the present application as an example, refer to Figure 12 the interaction schematic diagram of the data packet sending method shown in. Among them, the wide area network device has routing capabilities, and the wide area network device can be Figure 2 any of the edge nodes 1031 and the central node 1032 shown in. Exemplarily, the redundancy policy is taken as 1:1 replication.
[0100] As Figure 12 shown, when the wide area network device senses that the transmission quality of the forwarding path of the first service has decreased, it triggers the execution of the redundancy compensation mechanism, redundantly copies and caches the data packets received for the first service; the wide area network device sends the original data packets to the edge device based on the original path, and the original path is the forwarding path of the first service; after sending the original data packets, the local area network device delays for the first duration, selects the optimal path based on its routing capabilities, and the optimal path is the path with the highest transmission quality among the paths between the wide area network device and the edge device; the wide area network device sends the redundant data packets to the edge device based on the optimal path; the edge device decodes at least one of the received original data packets or redundant data packets.
[0101] In the embodiments of the present application, Figures 9 - 12 the implementation manner of the data packet sending method shown in can be referred to Figure 3 the implementation manner of the data packet sending method shown in, which will not be elaborated here.
[0102] The method for sending data packets according to the embodiments of the present application is introduced above. Corresponding to the above method, the embodiments of the present application also provide a device for sending data packets. Figure 13 It is a schematic structural diagram of a device for sending data packets provided by an embodiment of the present application. This device is applied to a network device, and the network device can be Figure 1 any one of the network devices 102 shown in the figure, or Figure 2 any one of the access nodes 1021, aggregation nodes 1022, or core nodes 1023 shown in the figure, or Figure 2 any one of the edge nodes 1031 and central nodes 1032 shown in the figure. Based on Figure 13 the following multiple modules shown in the figure, the Figure 13 device for sending data packets shown in the figure can perform all or part of the operations performed by the network device. It should be understood that the device may include more additional modules than those shown or omit some of the modules shown. The embodiments of the present application do not limit this. As Figure 13 shown in the figure, the device includes:
[0103] A transceiver module 1301, configured to perform operations related to receiving and / or sending in the method for sending data packets shown in Figure 3 the figure;
[0104] A processing module 1302, configured to perform other operations other than the operations related to receiving and / or sending in the method for sending data packets shown in Figure 3 the figure.
[0105] In a possible implementation manner, the transceiver module includes a receiving module and / or a sending module. The receiving module is configured to perform operations related to receiving, and the sending module is configured to perform operations related to sending.
[0106] In a possible implementation manner, the processing module 1302 is configured to determine a redundancy policy for the first service based on the packet loss rate of the packets in the first service transmission when packet loss occurs in the packets of the first service transmission. The redundancy policy is used to determine the packets that need to be redundantly sent in the subsequent packets of the first service; when the first packet of the first service is received and it is determined based on the redundancy policy that the first packet is a packet that needs to be redundantly sent, copy the first packet to obtain a redundant packet of the first packet;
[0107] The transceiver module 1301 is configured to send the first packet; when the first time period after sending the first packet arrives, send the redundant packet, and the first time period is related to at least one of the service type of the first service or the continuous packet loss count of the packet loss.
[0108] In a possible implementation manner, the transceiver module 1301 is configured to send the redundant packet through the sending port of the first packet.
[0109] In a possible implementation, the device is applied to a network device with routing capabilities; a processing module 1302, configured to determine a first forwarding path for redundant data packets based on the routing capabilities, where the transmission quality of the first forwarding path is higher than that of a second forwarding path for the first data packet; a transceiver module 1301, configured to send the redundant data packets through a port corresponding to the first forwarding path.
[0110] In a possible implementation, the redundancy policy is to sample m video frames out of every n video frames, where both n and m are positive integers and m is less than or equal to n, and a video frame includes multiple data packets; a processing module 1302, configured to determine that the first data packet is a data packet that needs to be redundantly sent if the first data packet belongs to the m data packets sampled from the n video frames.
[0111] In a possible implementation, the redundancy policy is to sample m data packets out of every n data packets, where both n and m are positive integers and m is less than or equal to n; a processing module 1302, configured to determine that the first data packet is a data packet that needs to be redundantly sent if the first data packet belongs to the m data packets sampled from the n data packets.
[0112] In a possible implementation, the processing module 1302 is further configured to measure the transmission quality of the data packets for the first service transmission, obtain a first measurement result, and determine that a data packet for the first service transmission is lost according to the first measurement result; or measure the transmission quality of the forwarding path for the first service based on the sent probing data packets, obtain a second measurement result, and determine that a data packet for the first service transmission is lost according to the second measurement result; or receive a notification message sent by the controller, where the notification message indicates that a data packet for the first service transmission is lost.
[0113] In a possible implementation, the processing module 1302 is further configured to cache the redundant data packets; the transceiver module 1301 is configured to send the cached redundant data packets.
[0114] In a possible implementation, the transceiver module 1301 is further configured to send a second data packet for the first service when the second data packet for the first service is received and it is determined based on the redundancy policy that the second data packet is not a data packet that needs to be redundantly sent.
[0115] The data packet sending device provided by the embodiment of the present application redundantly sends the data packets of the first service with packet loss based on a redundancy policy, which can significantly reduce the probability of consecutive packet losses of the data packets of the first service; and since the redundancy policy is determined according to the packet loss rate of the first service packet loss, the number of data packets that need to be redundantly sent determined according to the redundancy policy is adapted to the actual number of packet losses. Also, since the redundant data packets are sent after the first time period after the first data packet is sent, if the first time period is related to the service type of the first service, the timeliness of the redundant data packets caused by the long time distance between the redundant data packets and the first data packet can be avoided; if the first time period is related to the number of consecutive packet losses, the simultaneous packet loss caused by the short time distance between the redundant data packets and the first data packet can be avoided. In addition, this method can be implemented with a single-point deployment, without the need for dual-end deployment in a wide area network, reducing the complexity of method implementation.
[0116] It should be understood that when the above Figure 13 provided device realizes its functions, only the above division of each functional module is used for illustration. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device provided in the above embodiment and the method embodiment belong to the same concept, and the specific implementation process can be seen in the method embodiment, which will not be elaborated here. Figure 13 The beneficial effects of the provided device can be seen in Figure 3 the beneficial effects of the provided method, which will not be elaborated here.
[0117] See Figure 14 , Figure 14 shows a schematic structural diagram of a network device 2000 provided by an exemplary embodiment of the present application. Figure 14 The network device 2000 shown is used to execute the operations involved in the above Figure 3 shown data packet sending method. The network device 2000 is, for example, a switch, a router, etc., and the network device 2000 can be implemented by a general bus architecture.
[0118] As Figure 14 shown, the network device 2000 includes at least one processor 2001, a memory 2003, and at least one communication interface 2004.
[0119] The processor 2001 is, for example, a general-purpose central processing unit (CPU), a digital signal processor (DSP), a network processor (NP), a Graphics Processing Unit (GPU), a neural-network processing unit (NPU), a Data Processing Unit (DPU), a microprocessor, or one or more integrated circuits for implementing the solution of this application. For example, the processor 2001 includes an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The PLD is, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. It can implement or execute various logic blocks, modules, and circuits described in connection with the disclosed content of the embodiments of the present invention. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
[0120] Optionally, the network device 2000 further includes a bus. The bus is used to transfer information between the components of the network device 2000. The bus can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 14 only one line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0121] The memory 2003 is, for example, a read-only memory (ROM) or other type of static storage device that can store static information and instructions, such as a random access memory (RAM) or other type of dynamic storage device that can store information and instructions, such as 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 compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 2003 is, for example, independent and connected to the processor 2001 through a bus. The memory 2003 can also be integrated with the processor 2001.
[0122] The communication interface 2004 uses any device such as a transceiver to communicate with other devices or communication networks, and the communication network can be an Ethernet, a radio access network (RAN) or a wireless local area network (WLAN), etc. The communication interface 2004 can include a wired communication interface and can also include a wireless communication interface. Specifically, the communication interface 2004 can be an Ethernet interface, a Fast Ethernet (FE) interface, a Gigabit Ethernet (GE) interface, an Asynchronous Transfer Mode (ATM) interface, a wireless local area network (WLAN) interface, a cellular network communication interface or a combination thereof. The Ethernet interface can be an optical interface, an electrical interface or a combination thereof. In the embodiments of the present application, the communication interface 2004 can be used for the network device 2000 to communicate with other devices.
[0123] In a specific implementation, as an embodiment, the processor 2001 can include one or more CPUs, such as Figure 14CPU0 and CPU1 shown in []. Each of these processors can be a single-core CPU or a multi-core CPU. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0124] In a specific implementation, as an example, the network device 2000 may include multiple processors, such as Figure 14 the processor 2001 and the processor 2005 shown in []. Each of these processors can be a single-core CPU or a multi-core CPU. Here, the processor can refer to one or more devices, circuits, and / or processing cores for processing data (such as computer program instructions).
[0125] In a specific implementation, as an example, the network device 2000 may further include an output device and an input device. The output device communicates with the processor 2001 and can display information in various ways. For example, the output device can be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector, etc. The input device communicates with the processor 2001 and can receive user input in various ways. For example, the input device can be a mouse, a keyboard, a touch screen device, or a sensing device, etc.
[0126] In some embodiments, the memory 2003 is used to store the program code 2010 for executing the solution of this application, and the processor 2001 can execute the program code 2010 stored in the memory 2003. That is, the network device 2000 can implement the method for sending data packets provided in the method embodiments through the processor 2001 and the program code 2010 in the memory 2003. The program code 2010 may include one or more software modules. Optionally, the processor 2001 itself can also store the program code or instructions for executing the solution of this application.
[0127] In a specific embodiment, the network device 2000 in the embodiment of this application may correspond to the network device in each of the above method embodiments. The processor 2001 in the network device 2000 reads the instructions in the memory 2003, so that Figure 14 the network device 2000 shown in [] can perform all or part of the operations performed by the network device.
[0128] Specifically, the processor 2001 is configured to determine a redundancy policy for the first service based on the packet loss rate of the packet loss that occurs in the packet transmission of the first service. The redundancy policy is used to determine the packets that need to be redundantly sent in the subsequent packets of the first service. When receiving the first packet of the first service and determining that the first packet is a packet that needs to be redundantly sent based on the redundancy policy, the processor 2001 copies the first packet to obtain a redundant packet of the first packet, sends the first packet, and sends the redundant packet when reaching the first duration after sending the first packet. Wherein, the first duration is related to at least one of the service type of the first service or the continuous packet loss number of the packet loss.
[0129] For other optional implementation manners, for the sake of brevity, they are not described herein again.
[0130] The network device 2000 may also correspond to the Figure 13 packet sending device shown above. Each functional module in the packet sending device is implemented by software of the network device 2000. In other words, the functional modules included in the packet sending device are generated after the processor 2001 of the network device 2000 reads the program code 2010 stored in the memory 2003.
[0131] Wherein, Figure 3 each step of the packet sending method shown above is completed by an integrated logic circuit of hardware in the processor of the network device 2000 or an instruction in the form of software. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed and completed by a hardware processor, or executed and completed by a combination of hardware and software modules in the processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory. The processor reads the information in the memory and combines its hardware to complete the steps of the above method. For the sake of avoiding repetition, it is not described in detail here.
[0132] Referring to Figure 15 , Figure 15 FIG. shows a schematic structural diagram of a network device 2100 provided by another exemplary embodiment of the present application. Figure 15 The network device 2100 shown is used to perform all or part of the operations involved in the packet sending method shown above. The network device 2100 is, for example, a switch, a router, etc. The network device 2100 can be implemented by a general bus architecture. Figure 3
[0133] As Figure 15 shown, the network device 2100 includes: a main control board 2110 and an interface board 2130.
[0134] The main control board is also known as the main processing unit (MPU) or the route processor card. The main control board 2110 is used to control and manage each component in the network device 2100, including routing calculation, device management, device maintenance, and protocol processing functions. The main control board 2110 includes: a central processing unit 2111 and a memory 2112.
[0135] The interface board 2130 is also known as the line processing unit (LPU), line card, or service board. The interface board 2130 is used to provide various service interfaces and implement packet forwarding. The service interfaces include, but are not limited to, Ethernet interfaces, POS (Packet over SONET / SDH) interfaces, etc. The Ethernet interface is, for example, a Flexible Ethernet Clients (FlexE Clients) interface. The interface board 2130 includes: a central processing unit 2131, a network processor 2132, a forwarding table entry memory 2134, and a physical interface card (PIC) 2133.
[0136] The central processing unit 2131 on the interface board 2130 is used to control and manage the interface board 2130 and communicate with the central processing unit 2111 on the main control board 2110.
[0137] The network processor 2132 is used to implement the forwarding processing of packets. The form of the network processor 2132 can be a forwarding chip. The forwarding chip can be a network processor (NP). In some embodiments, the forwarding chip can be implemented by an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA). Specifically, the network processor 2132 is used to forward the received packets based on the forwarding table entries stored in the forwarding table entry memory 2134. If the destination address of the packet is the address of the network device 2100, the packet is sent to the CPU (such as the central processor 2131) for processing; if the destination address of the packet is not the address of the network device 2100, the next hop and the outgoing interface corresponding to the destination address are found from the forwarding table according to the destination address, and the packet is forwarded to the outgoing interface corresponding to the destination address. Among them, the processing of the upstream packets can include: the processing of the packet incoming interface and the forwarding table lookup; the processing of the downstream packets can include: the forwarding table lookup, etc. In some embodiments, the central processor can also execute the functions of the forwarding chip, such as implementing software forwarding based on a general-purpose CPU, so that there is no need for a forwarding chip in the interface board.
[0138] The physical interface card 2133 is used to implement the docking function at the physical layer. The original traffic enters the interface board 2130 from here, and the processed packets are sent out from the physical interface card 2133. The physical interface card 2133 is also called a daughter card and can be installed on the interface board 2130. It is responsible for converting optical and electrical signals into packets, performing a legality check on the packets, and then forwarding them to the network processor 2132 for processing. In some embodiments, the central processor 2131 can also execute the functions of the network processor 2132, such as implementing software forwarding based on a general-purpose CPU, so that there is no need for the network processor 2132 in the physical interface card 2133.
[0139] Optionally, the network device 2100 includes multiple interface boards. For example, the network device 2100 further includes an interface board 2140, and the interface board 2140 includes: a central processor 2141, a network processor 2142, a forwarding table entry memory 2144, and a physical interface card 2143. The functions and implementation manners of the components in the interface board 2140 are the same as or similar to those in the interface board 2130, and will not be elaborated here.
[0140] Optionally, the network device 2100 further includes a switching fabric board 2120. The switching fabric board 2120 can also be referred to as a switch fabric unit (SFU). When the network device 2100 has multiple interface boards, the switching fabric board 2120 is used to complete data exchange between the interface boards. For example, the interface board 2130 and the interface board 2140 can communicate through the switching fabric board 2120.
[0141] The main control board 2110 is coupled to the interface board. For example, the main control board 2110, the interface board 2130, the interface board 2140, and the switching fabric board 2120 are interconnected through a system bus and a system backplane. In a possible implementation, an inter-process communication (IPC) channel is established between the main control board 2110 and the interface board 2130 and the interface board 2140, and the main control board 2110 communicates with the interface board 2130 and the interface board 2140 through the IPC channel.
[0142] Logically, the network device 2100 includes a control plane and a forwarding plane. The control plane includes the main control board 2110 and the central processing unit 2111, and the forwarding plane includes various components that perform forwarding, such as the forwarding table entry memory 2134, the physical interface card 2133, and the network processor 2132. The control plane performs functions such as acting as a router, generating a forwarding table, processing signaling and protocol messages, and configuring and maintaining the state of the network device. The control plane sends the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 2132 looks up the table and forwards the packets received by the physical interface card 2133 based on the forwarding table sent by the control plane. The forwarding table sent by the control plane can be stored in the forwarding table entry memory 2134. In some embodiments, the control plane and the forwarding plane can be completely separated and not on the same network device.
[0143] It should be noted that there may be one or more main control boards. When there are multiple main control boards, they may include an active main control board and a standby main control board. There may be one or more interface boards. The stronger the data processing capacity of the network device, the more interface boards are provided. There may also be one or more physical interface cards on the interface board. There may be no switching fabric board, or there may be one or more switching fabric boards. When there are multiple switching fabric boards, they can jointly implement load sharing and redundant backup. In a centralized forwarding architecture, the network device may not require a switching fabric board, and the interface board undertakes the processing function of the service data of the entire system. In a distributed forwarding architecture, the network device may have at least one switching fabric board, and data exchange between multiple interface boards is achieved through the switching fabric board, providing a large-capacity data exchange and processing capacity. Therefore, the data access and processing capabilities of network devices in a distributed architecture are greater than those of network devices in a centralized architecture. Optionally, the form of the network device may also be a single board, that is, without a switching fabric board, and the functions of the interface board and the main control board are integrated on this single board. At this time, the central processing unit on the interface board and the central processing unit on the main control board can be combined into a single central processing unit on this single board to execute the functions after their superposition. The data exchange and processing capabilities of this form of network device are relatively low (for example, network devices such as low-end switches or routers). Which architecture to specifically adopt depends on the specific networking deployment scenario and is not limited here.
[0144] In a specific embodiment, the network device 2100 corresponds to the Figure 13 packet sending device shown above. In some embodiments, Figure 13 the transceiver module 1301 in the packet sending device shown above is equivalent to the physical interface card 2133 in the network device 2100, and the processing module 1302 is equivalent to the central processing unit 2111 or the network processor 2132 in the network device 2100.
[0145] An embodiment of the present application also provides a communication device, which includes: a transceiver, a memory, and a processor. Among them, the transceiver, the memory, and the processor communicate with each other through an internal connection path. The memory is used to store instructions, and the processor is used to execute the instructions stored in the memory to control the transceiver to receive signals and control the transceiver to send signals. And when the processor executes the instructions stored in the memory, the processor executes the Figure 3 method shown for the network device.
[0146] It should be understood that the above-mentioned processor can be a CPU, or other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. It is worth noting that the processor can be a processor that supports the advanced RISC machines (ARM) architecture.
[0147] Further, in an alternative embodiment, the above-mentioned memory may include a read-only memory and a random access memory, and provide instructions and data to the processor. The memory may also include a non-volatile random access memory. For example, the memory may also store information about the device type.
[0148] The memory can be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM).
[0149] An embodiment of this application also provides a computer-readable storage medium, in which at least one instruction is stored. The instruction is loaded and executed by a processor so that a computer implements the method for sending a data packet as described in any one of the above.
[0150] An embodiment of this application also provides a computer program (product). When the computer program is executed by a computer, the processor or the computer can be enabled to execute the corresponding steps and / or processes in the above method embodiments.
[0151] An embodiment of this application also provides a chip, including a processor, which is used to call and run the instruction stored in the memory, so that a communication device equipped with the chip executes the method for sending a data packet as described in any one of the above.
[0152] An embodiment of this application also provides another chip, including: an input interface, an output interface, a processor, and a memory. The input interface, the output interface, the processor, and the memory are connected through an internal connection path. The processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method for sending a data packet as described in any one of the above.
[0153] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions according to this application are generated in whole or in part. The computer can be a general-purpose computer, a dedicated computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center in a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that includes one or more integrated available media. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk).
[0154] Those of ordinary skill in the art can realize that, in combination with the method steps and modules described in the embodiments disclosed herein, they can be implemented in software, hardware, firmware, or any combination thereof. To clearly illustrate the interchangeability of hardware and software, the steps and components of the embodiments have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those of ordinary skill in the art 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 this application.
[0155] Those of ordinary skill in the art can understand that all or part of the steps for implementing the above embodiments can be completed by hardware or can be completed by instructing relevant hardware through a program. This program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a disk, an optical disc, etc.
[0156] When implemented using software, it can be implemented in whole or in part in the form of a computer program product. This computer program product includes one or more computer program instructions. As an example, the method of the embodiments of this application can be described in the context of machine-executable instructions, such as program modules executed in devices on a target real or virtual processor. Generally speaking, program modules include routines, programs, libraries, objects, classes, components, data structures, etc., which perform specific tasks or implement specific abstract data structures. In the embodiments, the functions of the program modules can be merged or split among the described program modules. The machine-executable instructions for the program modules can be executed within local or distributed devices. In a distributed device, the program modules can be located in both local and remote storage media.
[0157] The computer program code for implementing the method of the embodiments of this application can be written in one or more programming languages. These computer program codes can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing devices, such that when the program code is executed by the computer or other programmable data processing devices, the functions / operations specified in the flowchart and / or block diagram are implemented. The program code can be executed entirely on the computer, partially on the computer, as an independent software package, partially on the computer and partially on a remote computer, or entirely on a remote computer or server.
[0158] In the context of the embodiments of this application, the computer program code or relevant data can be carried by any suitable carrier so that the device, apparatus, or processor can execute the various processes and operations described above. Examples of carriers include signals, computer-readable media, etc.
[0159] Examples of signals can include electrical, optical, radio, acoustic, or other forms of propagated signals, such as carrier waves, infrared signals, etc.
[0160] A machine-readable medium can be any tangible medium that contains or stores a program for or relevant to an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any suitable combination thereof. More specific examples of machine-readable storage media include electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAMs), read-only memories (ROMs), erasable programmable read-only memories (EPROMs or flash memories), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0161] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be elaborated herein.
[0162] In several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces, devices, or modules, and can also be in the form of electrical, mechanical, or other connections.
[0163] The modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they can be located in one place or distributed to multiple network modules. Some or all of the modules can be selected according to actual needs to achieve the objectives of the embodiments of this application.
[0164] In addition, the functional modules in each embodiment of this application can be integrated into one processing module, or each module can exist physically alone, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules.
[0165] When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in various embodiments of this application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs.
[0166] In this application, terms such as "first" and "second" are used to distinguish identical or similar items with basically the same functions. It should be understood that there is no logical or temporal dependence between "first", "second", and "nth", nor are the quantity and execution order limited. It should also be understood that although the following description uses terms such as first and second to describe various elements, these elements should not be limited by the terms. These terms are only used to distinguish one element from another. For example, without departing from the scope of various examples, the first image can be referred to as the second image, and similarly, the second image can be referred to as the first image. Both the first image and the second image can be images, and in some cases, they can be separate and different images.
[0167] It should also be understood that in various embodiments of this application, the magnitude of the sequence numbers of each process does not mean the sequence of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of this application.
[0168] In this application, the meaning of the term "at least one" refers to one or more, and the meaning of the term "multiple" refers to two or more. For example, multiple second messages refer to two or more second messages. In this article, the terms "system" and "network" are often used interchangeably.
[0169] It should be understood that in the description of various examples herein, the terms used are only for describing specific examples and are not intended to be limiting. As used in the description of various examples and the appended claims, the singular forms "a", "an", and "the" are also intended to include the plural forms unless the context clearly indicates otherwise.
[0170] It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items. The term "and / or" describes the associative relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, the character " / " in this application generally indicates that the associated objects before and after are in an "or" relationship.
[0171] It should also be understood that the term "comprises" (also known as "includes", "including", "comprises", and / or "comprising") when used in this specification specifies the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groupings.
[0172] It should also be understood that the terms "if" and "when" can be interpreted to mean "when" ("when" or "upon") or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined..." or "if [the stated condition or event] is detected" can be interpreted to mean "when determining..." or "in response to determining..." or "when [the stated condition or event] is detected" or "in response to detecting [the stated condition or event]".
[0173] It should be understood that determining B based on A does not mean determining B solely based on A. B can also be determined based on A and / or other information.
[0174] It should also be understood that the "one embodiment", "an embodiment", "a possible implementation" mentioned throughout the specification means that the specific features, structures, or characteristics related to the embodiment or implementation are included in at least one embodiment of this application. Therefore, the "in one embodiment" or "in an embodiment", "a possible implementation" that appear throughout the specification do not necessarily refer to the same embodiment. Additionally, these specific features, structures, or characteristics can be combined in one or more embodiments in any suitable manner.
[0175] The above description is only an alternative embodiment of this application and is not intended to limit this application. Any modifications, equivalent replacements, improvements, etc. made within the principles of this application should be included in the protection scope of this application.
Claims
1. A method for sending data packets, characterized in that, the method includes: When a data packet of the first service transmission is lost, determining a redundancy policy for the first service based on the packet loss rate of the packet loss, where the redundancy policy is used to determine the data packets that need to be redundantly sent in the subsequent data packets of the first service; When receiving the first data packet of the first service and determining that the first data packet is a data packet that needs to be redundantly sent based on the redundancy policy, copying the first data packet to obtain a redundant data packet of the first data packet; Sending the first data packet; When reaching the first duration after sending the first data packet, sending the redundant data packet, where the first duration is related to at least one of the service type of the first service or the continuous packet loss count of the packet loss.
2. The method according to claim 1, characterized in that, the sending of the redundant data packet includes: Sending the redundant data packet through the sending port of the first data packet.
3. The method according to claim 1, characterized in that, the method is applied to a network device with routing capabilities; the sending of the redundant data packet includes: Determining a first forwarding path for the redundant data packet based on the routing capabilities, where the transmission quality of the first forwarding path is higher than the transmission quality of the second forwarding path of the first data packet; Sending the redundant data packet through the port corresponding to the first forwarding path.
4. The method according to any one of claims 1-3, characterized in that, the redundancy policy is to sample m video frames out of every n video frames, where both n and m are positive integers, m is less than or equal to n, and one video frame includes multiple data packets; the determining that the first data packet is a data packet that needs to be redundantly sent based on the redundancy policy includes: If the first data packet belongs to the data packets in the m video frames sampled from the n video frames, determining that the first data packet is a data packet that needs to be redundantly sent.
5. The method according to any one of claims 1-3, characterized in that, the redundancy policy is to sample m data packets out of every n data packets, where both n and m are positive integers, m is less than or equal to n; the determining that the first data packet is a data packet that needs to be redundantly sent based on the redundancy policy includes: If the first data packet belongs to the data packets in the m data packets sampled from the n data packets, determining that the first data packet is a data packet that needs to be redundantly sent.
6. The method according to any one of claims 1-5, characterized in that, before determining the redundancy policy for the first service based on the packet loss rate of the packet loss, it further includes: Measuring the transmission quality of the data packets transmitted by the first service, obtaining a first measurement result, and determining that the data packets transmitted by the first service are lost according to the first measurement result; Or, measuring the transmission quality of the forwarding path of the first service based on the sent probing data packets, obtaining a second measurement result, and determining that the data packets transmitted by the first service are lost according to the second measurement result; Alternatively, receive the notification message sent by the controller, where the notification message indicates that a packet loss has occurred in the data packets transmitted by the first service.
7. The method according to any one of claims 1-6, characterized in that, after replicating the first data packet to obtain a redundant data packet of the first data packet, it further includes: caching the redundant data packet; sending the redundant data packet, including: sending the cached redundant data packet.
8. The method according to any one of claims 1-7, characterized in that, the method further includes: when receiving a second data packet of the first service and determining that the second data packet is not a data packet that needs to be redundantly sent based on the redundancy policy, sending the second data packet.
9. A data packet sending device, characterized in that, the device includes: a transceiver module, configured to perform operations related to reception and / or transmission performed in any one of the data packet sending methods according to claims 1-8; a processing module, configured to perform other operations except for the operations related to reception and / or transmission performed in any one of the data packet sending methods according to claims 1-8.
10. A network device, characterized in that, the network device includes: a processor, the processor is coupled to a memory, and at least one program instruction or code is stored in the memory, and the at least one program instruction or code is loaded and executed by the processor to enable the network device to implement the data packet sending method according to any one of claims 1-8.
11. A computer-readable storage medium, characterized in that, at least one instruction is stored in the computer storage medium, and the at least one instruction is loaded and executed by a processor to enable a computer to implement the data packet sending method according to any one of claims 1-8.
12. A computer program product, characterized in that, the computer program product includes: computer program code, and the computer program code is loaded and executed by a computer to enable the computer to implement the data packet sending method according to any one of claims 1-8.