Unilateral network optimization method and device for conditionally repeating data packet transmission
By adopting the method of conditionally sending data packets repeatedly in SD-WAN, the problem of network degradation and packet loss under unilateral equipment is solved, the optimization of network quality and the effective utilization of bandwidth are achieved, and the existing FEC solution cannot be unilaterally solved. Deployment issues.
Patent Information
- Application Number
- CN202410095105.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-23
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-01-23
AI Technical Summary
SD-WAN is prone to network degradation and packet loss problems based on unreliable Internet. The existing FEC optimization solution requires bilateral deployment and cannot be implemented when one end is closed source or unmanaged equipment.
Adopt a unilateral network optimization method that conditionally resends data packets. By sending test data packets by preset, it determines that business data packets are resent when the loss rate exceeds the threshold, and adjusts the retransmission timing based on the maximum packet loss duration to optimize network quality. .
Without any changes on the receiving end, the sending end actively resends data packets to improve network stability and bandwidth utilization, avoid bandwidth waste caused by blind retransmission, and achieve the optimization effect of a single-sided network.
Smart Images

Figure CN117914452B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a unilateral network optimization method, device and electronic device for conditionally repeating the transmission of data packets. Background Art
[0002] Since SD-WAN is based on the unreliable Internet as underlay, random network degradation may occur, resulting in packet loss. Currently, FEC is a better solution, a stable anti-packet loss optimization solution that sacrifices bandwidth in exchange for network quality.
[0003] FEC is a bilateral optimization solution that requires FEC modules to be deployed on both ends of the connection or tunnel, otherwise the optimization function cannot be enabled. It is very common for one end of the SD-WAN to be a closed-source device or an unmanaged device, in which case the optimization solution cannot be implemented. Summary of the invention
[0004] In view of this, the present application proposes a unilateral network optimization method for conditionally repeating the sending of data packets to solve the problems embodied in the above-mentioned background technology.
[0005] According to one aspect of the present application, a unilateral network optimization method for conditionally repeating sending of data packets is provided, comprising:
[0006] Preset the frequency of sending test packets;
[0007] Sending a test data packet according to the frequency;
[0008] If no response information is received after the preset waiting time, it is determined that the test data packet is lost;
[0009] In a preset test period, when the test data packet loss rate is greater than or equal to a preset threshold for repeatedly sending service data packets, the service data packets are repeatedly sent.
[0010] As an optional implementation scheme of the present application, when the test data packet loss rate exceeds a preset threshold value within a preset test period, repeatedly sending the service data packet includes:
[0011] The test data packet loss rate is the ratio of the number of test data packet losses to the total number of test data packets sent within a preset test period.
[0012] As an optional implementation scheme of the present application, when the test data packet loss rate exceeds a preset threshold within a preset test period, the service data packet is repeatedly sent, further comprising:
[0013] Within a preset test period, calculating the number of test data packets lost within a continuous time;
[0014] According to a preset processing rule, analyzing the number of test data packets lost within the maximum continuous time to obtain an analysis result;
[0015] The analysis result is used as the maximum packet loss duration.
[0016] As an optional implementation scheme of the present application, it also includes:
[0017] In the new test cycle, after the service data packet is sent, the service data packet is repeatedly sent according to the maximum packet loss duration.
[0018] As an optional implementation scheme of the present application, the repeatedly sent service data packets do not include test data packets.
[0019] As an optional implementation scheme of the present application, sending a test data packet according to the frequency includes:
[0020] Preset the number of test data packets to be sent according to the frequency;
[0021] According to the number, test data packets are sent within the test period.
[0022] As an optional implementation scheme of the present application, it also includes:
[0023] Preset the threshold for closing repeated sending of service data packets;
[0024] If the service data packet is already in the state of repeated transmission, in a new test cycle, when the packet loss rate of the test data packet is less than the threshold for closing the repeated transmission of the service data packet, the repeated transmission of the service data packet is closed in the new test cycle.
[0025] As an optional implementation scheme of the present application, it also includes:
[0026] If the service data packet is not in the state of repeated transmission, and the test data packet loss rate is less than the preset threshold value for repeated transmission of service data packets, the service data packets are normally transmitted in the new test cycle.
[0027] The present application also provides a unilateral network optimization device for conditionally repeating data packets, comprising:
[0028] A frequency setting module is used to preset the frequency of sending test data packets;
[0029] A data packet sending module, used for sending a test data packet according to the frequency;
[0030] A waiting response module is used to determine that the test data packet is lost if no response information is received after a preset waiting time;
[0031] The retransmission module is used to retransmit the service data packet when the test data packet loss rate is greater than or equal to a preset retransmission service data packet threshold within a preset test period.
[0032] The present application also provides an electronic device, including:
[0033] processor;
[0034] a memory for storing processor-executable instructions;
[0035] Wherein, the processor is configured to implement the above-mentioned unilateral network optimization method for conditionally repeating the sending of data packets when executing the executable instructions.
[0036] Beneficial effects of this application:
[0037] The present invention determines that the test data packet is lost by setting that if the response information is not received after the preset waiting time, the service data packet is repeatedly sent when the test data packet loss rate is greater than or equal to the preset threshold for repeatedly sending the service data packet within the preset test period. The sending end adjusts the timing of resending the service data packet according to the maximum packet loss duration. When the network packet loss rate is higher than a certain threshold, the sending end will send double data packets in time to exchange bandwidth for network stability. After the network quality returns to normal, the sending of double data packets will be cancelled in time. In this process, the receiving end does not need to make any changes, nor does it need to know that the sending end has been optimized.
[0038] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the present application and, together with the description, serve to explain the principles of the present application.
[0040] Figure 1 A flow chart showing a unilateral network optimization method for conditionally repeating data packets according to an embodiment of the present application;
[0041] Figure 2 A continuous packet loss model diagram of an embodiment of the present application is shown;
[0042] Figure 3 A diagram showing an intermittent packet loss model of an embodiment of the present application is shown;
[0043] Figure 4 A model diagram of repeatedly sending data packets according to an embodiment of the present application is shown;
[0044] Figure 5 A block diagram of a unilateral network optimization device for conditionally repeating the sending of data packets according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0045] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0046] Among them, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present application or simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as a limitation on the present application.
[0047] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0048] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0049] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.
[0050] Network degradation is a common network environment problem, which can easily lead to network traffic problems. Network traffic refers to the amount of data transmitted in a computer network, usually the number or size of data packets passing through the network within a period of time. It can be an indicator used to measure the usage and load of the network.
[0051] In this application, the solution for network optimization is determined based on the following two key technologies.
[0052] The first key technology is to force repeated sending of data packets. This is an optimization based on the characteristics of the TCP / UDP protocol. Before the receiving end detects packet loss and requests retransmission, the sending end actively adds an identical data packet, thereby achieving an optimization effect.
[0053] Repeatedly sending the same data packet will not affect the network quality. Redundantly sent information will be automatically ignored by the receiving end, and there is no need to add any special logic on the receiving end.
[0054] The second key technology: conditional retransmission of data packets based on packet loss rate detection; the sender (managed device) periodically sends ICMP data packets to the receiver (unmanaged device) to test the packet loss rate of the network. It also decides whether to forcibly retransmit data packets based on the threshold.
[0055] Example 1
[0056] Figure 1 The flowchart of the unilateral network optimization method for conditionally repeating the sending of data packets according to an embodiment of the present application is shown. Through this method, the network usage can be optimized under certain conditions to ensure the normal network traffic. Figure 1 As shown, the flow chart includes:
[0057] S100, presetting the frequency of sending test data packets;
[0058] In this embodiment, the frequency of sending the test data packet is set to once per second; wherein the test data packet is an ICMP data packet.
[0059] S200, sending a test data packet according to the frequency;
[0060] Send ICMP packets according to the set frequency.
[0061] S300, if no response information is received after a preset waiting time, it is determined that the test data packet is lost;
[0062] In this embodiment, the preset waiting time is 3 seconds. If no response information is received from the receiving end after 3 seconds, it is considered that the receiving end has not received the test data packet and the test data packet is determined to be lost.
[0063] S400, repeatedly sending the service data packet when the test data packet loss rate is greater than or equal to the preset threshold for repeatedly sending the service data packet within the preset test period.
[0064] In this embodiment, the preset test cycle is 16 seconds per cycle, and the preset threshold for repeated sending of business data packets is 10%. When the calculated test data packet loss rate exceeds 10%, the repeated sending of business data packets mode is turned on; in order to distinguish test data packets, the data packets that the sender wants to send to the receiver are called business data packets.
[0065] Furthermore, it can be set that when the test data packet loss rate reaches 10% in two consecutive test cycles, the link sending the service data packet in the next test cycle is converted to the state of repeatedly sending the service data packet. The relationship between the threshold and the repeated sending of service data can be determined according to user needs and is not limited here.
[0066] As an optional implementation scheme of the present application, when the test data packet loss rate exceeds a preset threshold value within a preset test period, repeatedly sending the service data packet includes:
[0067] The test data packet loss rate is the ratio of the number of test data packet losses to the total number of test data packets sent within a preset test period.
[0068] Exemplarily, 16 test data packets are sent in a 16-second period, and 4 data packets are lost. The test data packet loss rate can be obtained as 25% through ratio conversion.
[0069] As an optional implementation scheme of the present application, in step S400, when the test data packet loss rate exceeds a preset threshold within a preset test period, the service data packet is repeatedly sent, and further includes:
[0070] S401, calculating the number of test data packets lost in a continuous time within a preset test period;
[0071] In this embodiment, within a 16-second test cycle, the number of test data packets lost within a continuous time is counted. When the test data packets are lost continuously, the number is incremented by 1 each time, and is cleared when the next test data packet is received normally, until the number is incremented by 1 each time from the point where the test data packet is lost again.
[0072] S402, analyzing the number of test data packets lost within the maximum continuous time according to a preset processing rule to obtain an analysis result;
[0073] In this embodiment, the processing rules are as follows: divide the maximum number of test data packets lost within the continuous time by the number of test data packets sent at one time to obtain the number of times the sender sends test data packets within the continuous time; multiply the number by the set frequency to obtain the duration of the number of test data packets lost within the continuous time.
[0074] Exemplarily, the sending frequency is set to once per second, the number of test data packets sent each time is 1, and the maximum number of test data packets lost obtained by counting is 4, 4 / 1=4; 4*1=4, and the packet loss duration in this continuous time is 4 seconds.
[0075] Exemplarily, the sending frequency is set to once per second, the number of test data packets sent each time is 2, the maximum number of test data packets lost obtained by counting is 8, 8 / 2=4; 4*1=4, and the packet loss duration in this continuous time is 4 seconds.
[0076] Exemplarily, the sending frequency is set to once every 0.1 seconds, the number of test data packets sent each time is 1, and the maximum number of test data packets lost obtained by counting is 4, 4 / 1=4; 4*0.1=0.4, and the packet loss duration in this continuous time is 0.4 seconds.
[0077] Exemplarily, the sending frequency is set to once every 0.1 seconds, the number of test data packets sent each time is 3, and the maximum number of test data packets lost is counted to be 9, 9 / 3=3; 3*0.1=0.3, and the packet loss duration in this continuous time is 0.3 seconds.
[0078] S403: The analysis result is used as the maximum packet loss duration.
[0079] The process of testing network quality requires testing the following two values: packet loss rate and maximum packet loss duration.
[0080] See also Figure 2 and Figure 3 ,For the continuous packet loss model, the packet loss time is continuous and long, while the other extreme is the intermittent packet loss model, the packet loss time is short but occurs frequently.,More cases are in between the two cases, or a mixture of the two.
[0081] The key to repeatedly sending data packets is to avoid the packet loss period as much as possible. Therefore, when measuring the packet loss rate, it is also necessary to measure the maximum packet loss duration and arrange the repeated sending of data packets after the maximum packet loss duration.
[0082] In this embodiment, the sending frequency is set to once per second, and a test data packet is sent each time; the test period is 16 seconds. If the maximum number of consecutive packet losses is 4, the maximum packet loss duration is 4 seconds, which exceeds the preset 10% threshold.
[0083] As an optional implementation scheme of the present application, it also includes:
[0084] In the new test cycle, after the service data packet is sent, the service data packet is repeatedly sent according to the maximum packet loss duration.
[0085] See also Figure 4Taking the maximum packet loss duration of 4 seconds as an example, in the next 16-second test cycle, all business data packets sent to the receiving end will be sent repeatedly once, with an interval of the maximum packet loss duration, that is, the business data packet with sequence number 1 will be sent repeatedly after an interval of 4 seconds.
[0086] As an optional implementation scheme of the present application, the repeatedly sent service data packets do not include test data packets.
[0087] After the repeated sending of business data packets is started, in the new test cycle, all business data packets sent to the receiving end will be sent repeatedly once, excluding ICMP data packets used for testing. The interval for repeatedly sending business data packets is the maximum packet loss duration.
[0088] As an optional implementation scheme of the present application, sending a test data packet according to the frequency includes:
[0089] Preset the number of test data packets to be sent according to the frequency;
[0090] The number of test data packets to be sent according to the frequency is set. For example, the frequency is once per second, and one test data packet is sent at a time.
[0091] According to the number, test data packets are sent within the test period.
[0092] Exemplarily, one test data packet is sent at a time until the end of a test cycle.
[0093] It should be noted that the number of test data packets can be determined according to user needs and is not limited here.
[0094] As an optional implementation scheme of the present application, it also includes:
[0095] Preset the threshold for closing repeated sending of service data packets;
[0096] In this embodiment, the preset threshold for closing repeated sending of business data packets is 8%; it should be noted that the threshold for closing repeated sending of business data packets may be equal to the threshold for repeatedly sending business data packets, or may not be equal to the threshold for repeatedly sending business data packets. Users can determine it according to their needs and it is not limited here.
[0097] If the service data packet is already in the state of repeated transmission, in a new test cycle, when the packet loss rate of the test data packet is less than the threshold for closing the repeated transmission of the service data packet, the repeated transmission of the service data packet is closed in the new test cycle.
[0098] There are two states for a link that sends a service data packet: a normal service data packet sending state and a repeated service data packet sending state.
[0099] If the link currently sending the business data packet is already in the state of repeatedly sending business data packets, and in the current new test cycle, when the test data packet loss rate is less than 8%, at the beginning of the next test cycle, the link sending the business data packet returns to the normal state of sending business data packets.
[0100] If the test data packet loss rate is greater than 8%, at the beginning of the next test cycle, the link that sends the business data packet will continue to send the business data packet repeatedly, and the retransmission interval will be the maximum packet loss duration in the previous test cycle.
[0101] As an optional implementation scheme of the present application, it also includes:
[0102] If the service data packet is not in the state of repeated transmission, and the test data packet loss rate is less than the preset threshold value for repeated transmission of service data packets, the service data packets are normally transmitted in the new test cycle.
[0103] In this embodiment, if the link currently sending the service data packet is in a normal state of sending service data packets, when the test data packet loss rate is less than 10%, at the beginning of the next test cycle, the state of sending service data packets is still maintained normally.
[0104] In this method, the implementation of network optimization is always at the sending end. The receiving end does not need to make any changes, nor does it need to know that the sending end has been optimized. The sending end can send ICMP test data packets to the receiving end at a high frequency and regularly to test the network quality. When the network packet loss rate is higher than a certain threshold, the sending end will send double data packets in time to exchange bandwidth for network stability. After the network quality returns to normal, the sending of double data packets will be cancelled in time, and the sending end will adjust the timing of data packet retransmission according to the maximum packet loss duration. The purpose of unilateral network optimization of conditional repeated sending of data packets is achieved, and the sacrifice of bandwidth caused by blindly sending double business data packets is avoided.
[0105] Example 2
[0106] Based on the same principle as the above method, a unilateral network optimization device for conditionally repeating data packets is also proposed, see Figure 5 , a unilateral network optimization device 100 for conditionally repeating data packets according to an embodiment of the present disclosure includes:
[0107] 110, a frequency setting module, used to preset the frequency of sending a test data packet;
[0108] 120, a data packet sending module, configured to send a test data packet according to the frequency;
[0109] 130, a response waiting module, configured to determine that the test data packet is lost if no response information is received after a preset waiting time;
[0110] 140, a retransmission module, configured to retransmit a service data packet when a test data packet loss rate is greater than or equal to a preset retransmission threshold of a service data packet within a preset test period.
[0111] Obviously, those skilled in the art should understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned control methods. The modules or steps of the present invention can be implemented by a general-purpose computing device. They can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented by program codes executable by computing devices, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules respectively, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. In this way, the present invention is not limited to any specific combination of hardware and software.
[0112] Those skilled in the art can understand that the implementation of all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned control methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above-mentioned types of memory.
[0113] Example 3
[0114] Furthermore, an electronic device is proposed, comprising:
[0115] processor;
[0116] a memory for storing processor-executable instructions;
[0117] Wherein, the processor is configured to implement the unilateral network optimization method for conditionally repeating the sending of data packets as described in Example 1 when executing the executable instructions.
[0118] The electronic device of the embodiment of the present disclosure includes a processor and a memory for storing processor executable instructions, wherein the processor is configured to implement any of the above-mentioned unilateral network optimization methods for conditionally repeating the transmission of data packets when executing the executable instructions.
[0119] It should be noted that the number of processors may be one or more. At the same time, the electronic device of the embodiment of the present disclosure may also include an input device and an output device. The processor, memory, input device, and output device may be connected via a bus or in other ways, which are not specifically limited here.
[0120] The memory is a computer-readable storage medium for the method for conditionally repeating the transmission of data packets, and can be used to store software programs, computer executable programs, and various modules, such as the program or module corresponding to the method for conditionally repeating the transmission of data packets in the embodiment of the present disclosure. The processor executes various functional applications and data processing of the electronic device by running the software program or module stored in the memory.
[0121] The input device can be used to receive input numbers or signals. The signal can be a key signal related to user settings and function control of the device / terminal / server. The output device can include a display device such as a display screen.
[0122] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A unilateral network optimization method for conditionally repeating data packets. It is characterized in that include: Preset the frequency of sending test packets; Sending a test data packet according to the frequency; If no response information is received after the preset waiting time, it is determined that the test data packet is lost; When the test data packet loss rate is greater than or equal to the preset threshold for repeatedly sending the service data packet within the preset test period, the service data packet is repeatedly sent; In a preset test period, when the test data packet loss rate exceeds a preset threshold, the service data packet is sent repeatedly, and the following steps are also included: Within a preset test period, calculating the number of test data packets lost within a continuous time; According to a preset processing rule, analyzing the number of test data packets lost within the maximum continuous time to obtain an analysis result; The analysis result is used as the maximum packet loss duration; In the new test cycle, after the service data packet is sent, the service data packet is repeatedly sent according to the maximum packet loss duration.
2. The unilateral network optimization method for conditionally repeating data packets according to claim 1, It is characterized in that In the preset test period, when the test data packet loss rate exceeds the preset threshold, the service data packet is sent repeatedly, including: The test data packet loss rate is the ratio of the number of test data packet losses to the total number of test data packets sent within a preset test period.
3. The unilateral network optimization method for conditionally repeating data packets according to claim 1, It is characterized in that The repeatedly sent service data packets do not include test data packets.
4. The unilateral network optimization method for conditionally repeating data packets according to claim 1, It is characterized in that Sending a test data packet according to the frequency includes: Preset the number of test data packets to be sent according to the frequency; According to the number, test data packets are sent within the test period.
5. The unilateral network optimization method for conditionally repeating data packets according to claim 1, It is characterized in that Also includes: Preset the threshold for closing repeated sending of service data packets; If the service data packet is already in the state of repeated transmission, in a new test cycle, when the packet loss rate of the test data packet is less than the threshold for closing the repeated transmission of the service data packet, the repeated transmission of the service data packet is closed in the new test cycle.
6. The unilateral network optimization method for conditionally repeating data packets according to claim 1, It is characterized in that Also includes: If the service data packet is not in the state of repeated transmission, and the test data packet loss rate is less than the preset threshold value for repeated transmission of service data packets, the service data packets are normally transmitted in the new test cycle.
7. A unilateral network optimization device for conditionally repeating data packets, It is characterized in that include: A frequency setting module is used to preset the frequency of sending test data packets; A data packet sending module, used for sending a test data packet according to the frequency; A waiting response module is used to determine that the test data packet is lost if no response information is received after a preset waiting time; A retransmission module, used to retransmit service data packets when the test data packet loss rate is greater than or equal to a preset retransmission service data packet threshold within a preset test period; In a preset test period, when the test data packet loss rate exceeds a preset threshold, the service data packet is sent repeatedly, and the following steps are also included: Within a preset test period, calculating the number of test data packets lost within a continuous time; According to a preset processing rule, analyzing the number of test data packets lost within the maximum continuous time to obtain an analysis result; The analysis result is used as the maximum packet loss duration; In the new test cycle, after the service data packet is sent, the service data packet is repeatedly sent according to the maximum packet loss duration.
8. An electronic device, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the unilateral network optimization method for conditionally repeating the sending of data packets as described in any one of claims 1 to 6 when executing the executable instructions.
Citation Information
Patent Citations
Method and device for transmitting message
CN104038845A
Method and device for optimizing user plane time delay
CN105722122A
