Network data detection method and device, computer equipment and storage medium

By sending detection data and receiving response data when the sending end is in the application-limited stage, the bandwidth contention problem between detection data and service data is solved, and the accuracy and efficiency of network detection are improved.

CN120263699APending Publication Date: 2025-07-04RENMIN UNIVERSITY OF CHINA +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410009334.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The prior art detects the delay during round trip, and the sharing of the same link between the detection data and the service data leads to bandwidth contention, causing network congestion, and affecting data transmission efficiency.

Method used

When the transmitter is in the application restricted stage and meets the preset detection conditions, the detection data is sent and the response data is received, and the network detection data is determined by the transmission and reception time of the detection data.

Benefits of technology

Reduce the impact on service data transmission, improve the accuracy and efficiency of network detection, timely grasp the network transmission status, and optimize network transmission efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120263699A_ABST
    Figure CN120263699A_ABST
Patent Text Reader

Abstract

The invention relates to a network data detection method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: monitoring whether a sending end is in an application limited stage or not; when the sending end is in the application limited stage, detecting whether the current state of the sending end meets a preset detection condition or not; under the condition that the current state meets a preset detection condition, detection data are determined; sending the detection data, and receiving response data fed back for the detection data; and determining network detection data according to the sending time for sending the detection data and the receiving time for receiving the response data. By adopting the method, the network detection data can be timely and accurately determined, so that the network transmission efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technologies, and in particular, to a network data detection method, apparatus, computer device, storage medium, and computer program product. Background Art

[0002] With the development of audio and video technologies, various types of information such as audio and video, images, etc. can be continuously uploaded to the network after compression to form real-time audio and video for users. It can be understood that the development of real-time audio and video places higher requirements on network conditions. Taking audio and video live streaming as an example, users have high demands for audio and video with low latency, high definition, and low frame loss rate, which requires the sender to be able to more accurately grasp the real-time network transmission status. Among them, the network transmission status can be measured by various performance indicators, such as rate, bandwidth, throughput, round-trip delay, and so on. Among them, the round-trip delay, as a key performance indicator, can be used to guide network transmission and thus improve network transmission efficiency.

[0003] Currently, when detecting the round-trip delay, it is generally detected based on various transmission protocols. In the process of detecting the round-trip delay using transmission protocols, the probe data used for round-trip delay detection and the actual service data occupy the same link, which is prone to bandwidth contention, resulting in network congestion, and further causing phenomena such as stuttering and frame dropping, affecting normal data transmission. Summary of the Invention

[0004] Based on this, in view of the above technical problems, it is necessary to provide a network data detection method, apparatus, computer device, computer-readable storage medium, and computer program product that can avoid affecting the transmission of service data and can accurately and timely determine network detection data to improve network transmission efficiency.

[0005] In a first aspect, the present application provides a network data detection method. The method includes:

[0006] Monitoring whether the sender is in an application-limited stage;

[0007] When the sender is in an application-limited stage, detecting whether the current state of the sender meets a preset probing condition;

[0008] When the current state meets the preset probing condition, determining probe data;

[0009] Sending the probe data and receiving response data feedback for the probe data;

[0010] Determining network detection data based on the sending time of the sent probe data and the receiving time of the received response data.

[0011] Second aspect, the present application also provides a network data detection device. The device includes:

[0012] A monitoring module, configured to monitor whether the sending end is in an application restricted stage;

[0013] The monitoring module is further configured to, when the sending end is in the application restricted stage, detect whether the current state of the sending end meets a preset detection condition;

[0014] A detection module, configured to determine detection data when the current state meets the preset detection condition;

[0015] The detection module is further configured to send the detection data and receive response data feedback for the detection data;

[0016] An evaluation module, configured to determine network detection data according to the sending time of the sent detection data and the receiving time of the received response data.

[0017] Third aspect, the present application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, the steps of the above network data detection method are implemented.

[0018] Fourth aspect, the present application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above network data detection method are implemented.

[0019] Fifth aspect, the present application also provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the above network data detection method are implemented.

[0020] The above-mentioned network data detection method, device, computer equipment, storage medium and computer program product monitor whether the sending end is in the application restricted stage; when the sending end is in the application restricted stage, further detect whether the current state of the sending end meets the preset detection conditions; when the current state meets the preset detection conditions, determine the detection data; send the detection data and receive the response data feedback for the detection data; that is to say, in this application, the detection data is sent when the sending end is in the application restricted stage and meets the preset detection conditions. On the one hand, the application restricted stage is a stage that can make full use of network resources and reduce the impact on the transmission of normal service data. On the other hand, sending the detection data only when the preset detection conditions are met can further improve the rationality of sending the detection data and the accuracy of network data detection. In this way, by receiving the response data feedback for the detection data, the network detection data can be determined based on the sending time of the detection data and the receiving time of the response data, which is beneficial to more real-time and accurately grasping the network transmission state, thereby optimizing the network transmission efficiency and improving the client service experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 FIG. is an application environment diagram of the network data detection method in an embodiment;

[0022] Figure 2 FIG. is a flowchart of the network data detection method in an embodiment;

[0023] Figure 3 FIG. is a state diagram of the sending end in the application restricted stage in an embodiment;

[0024] Figure 4 FIG. is a state diagram of the sending end in the non-application restricted stage;

[0025] Figure 5 FIG. is a block diagram of the overall structure of the network data detection method in an embodiment;

[0026] Figure 6 FIG. is a timing diagram in an embodiment;

[0027] Figure 7 FIG. is a flowchart of determining whether it is in the application restricted stage in an embodiment;

[0028] Figure 8 FIG. is a flowchart of determining whether it is in the application restricted stage in another embodiment;

[0029] Figure 9 FIG. is a schematic diagram of probe message selection in an embodiment;

[0030] Figure 10Schematic diagram for selecting detection messages in another embodiment;

[0031] Figure 11 Schematic diagram of the process for sending detection messages in one embodiment;

[0032] Figure 12 Overall structural block diagram of the network data detection method in another embodiment;

[0033] Figure 13 Schematic diagram of the process of the network data detection method in another embodiment;

[0034] Figure 14 Schematic diagram of the process of the network data detection method in yet another embodiment;

[0035] Figure 15 Structural block diagram of the network data detection device in one embodiment;

[0036] Figure 16 Internal structural diagram of a computer device in one embodiment. Detailed implementation manners

[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0038] Before elaborating on the network data detection method provided by the present application in detail, some professional terms involved in the present application will be explained first:

[0039] RTT: Round-Trip Time, referring to the round-trip delay;

[0040] min_RTT: The minimum value of the round-trip delay, that is, the minimum round-trip delay;

[0041] TCP: Transmission Control Protocol, referring to the Transmission Control Protocol;

[0042] UDP: User Datagram Protocol, referring to the Datagram Protocol;

[0043] QUIC: Quick UDP Internet Connections, referring to Quick UDP Internet Connections;

[0044] ACK: Acknowledgement, referring to the message confirmation information;

[0045] BBR: Bottleneck Bandwidth and RTT, which refers to bottleneck bandwidth and round-trip transmission time;

[0046] BDP: Bandwidth-Delay Product, which refers to bandwidth-delay product;

[0047] RTP: Real-time Transport Protocol, which refers to real-time transport protocol;

[0048] RTCP: Real-time Control Protocol, which refers to real-time transport control protocol;

[0049] MSS: Maximum Segment Size, which refers to maximum segment length;

[0050] inflight: refers to the packets in the process of transmission, that is, the flight data; it can be used to characterize the length of the flight data;

[0051] RTprop: refers to round-trip transmission time;

[0052] BtlBw: refers to bottleneck bandwidth;

[0053] STARTUP: refers to startup;

[0054] DRAIN: refers to drain;

[0055] PROBE_BW: refers to bottleneck bandwidth detection;

[0056] PROBE_RTT: delay detection.

[0057] The network data detection method provided by the embodiments of this application can be applied to the application environment as Figure 1 shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or can be placed in the cloud or on other servers. Among them, the server 104 can be a dedicated computer device that can provide multimedia services in a network environment. The server 104 can be used as the sender, and the terminal 102 as the receiver. Through the information interaction between the server 104 and the terminal 102, network services are carried out. For example, the server 104 can transmit the service data requested by the terminal 102, such as various types of multimedia data such as audio data, image data, video data or media files, to the terminal 102 to complete the corresponding network services.

[0058] To more accurately and in real-time grasp the network transmission status during the business data transmission process, facilitate optimizing the network transmission efficiency in fields such as real-time audio and video, and improve the user experience, the server 104 can monitor whether the sending end is in the application-limited stage; when in the application-limited stage, the server 104 detects whether the current state of the sending end meets the preset detection conditions; when the current state meets the preset detection conditions, the server 104 determines the detection data; the server 104 sends the detection data and receives the response data feedback for the detection data; the server 104 determines the network detection data based on the sending time of the sent detection data and the receiving time of the received response data.

[0059] Among them, the terminal 102 can be but is not limited to various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, portable wearable devices, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, intelligent vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication methods.

[0060] Among them, the terminal 102 can be but is not limited to various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices, portable wearable devices, intelligent voice interaction devices, smart home appliances, vehicle-mounted terminals, aircraft, etc. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, intelligent vehicle-mounted devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal 102 and the server 104 can be directly or indirectly connected through wired or wireless communication methods.

[0061] The embodiments of the present application can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, intelligent transportation, assisted driving, etc.

[0062] The cloud technology involved herein refers to a hosting technology that unifies a series of resources such as hardware, software, and networks within a wide area network or a local area network to achieve data computing, storage, processing, and sharing. Cloud technology is the general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The back-end services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites, and more portal websites. With the high development and application of the Internet industry, in the future, each item may have its own identification mark and needs to be transmitted to the back-end system for logical processing. Data at different levels will be processed separately, and various industry data requires a powerful system back-end support, which can only be achieved through cloud computing.

[0063] In one embodiment, as Figure 2 shown, a network data detection method is provided. This method is executed by a computer device, specifically, it can be executed alone by a computer device such as a terminal or a server, or jointly executed by a terminal and a server. In the embodiments of the present application, taking this method applied to Figure 1 server 104 in

[0064] Step 202, monitor whether the sending end is in the application-limited stage.

[0065] Among them, the application-limited stage is the stage when an application-limited phenomenon occurs during data transmission. During data transmission, the application-limited phenomenon occurs when the transmission rate is limited by the application layer rather than the sending window. In the application-limited stage, the network link is in a light-load state, and the overall network performance shows that the network bandwidth is not fully utilized and the network transmission efficiency is low, etc.

[0066] The stage different from the application-limited stage includes the non-application-limited stage. In the non-application-limited stage, the network transmission efficiency mainly depends on the network congestion situation, the receiving ability of the receiving end, etc.

[0067] Specifically, the server can obtain network parameters that can characterize the network transmission situation, such as the application layer parameters of the sending end, the transport layer parameters of the sending end, the network congestion situation, the packet loss rate, the receiving end parameters of the receiving end, etc. Then, based on the obtained network parameters, monitor whether the sending end is in the application-limited stage or the non-application-limited stage.

[0068] In some embodiments, the server may refer to the sending end, that is, the execution subject of the present application is the sending end, and the server can monitor whether it is in the application-limited stage.

[0069] In some embodiments, the server can also obtain identification information that can characterize whether the sending end is currently in an application restricted phase, and then directly determine whether the sending end is in the application restricted phase according to the obtained identification information. Among them, the identification information can be represented by any identifier such as letters, numbers, and feature codes in terms of presentation. For example, when the identification information is represented by letters, if the identification information obtained by the server is a, it means that the sending end is in the application restricted phase, and if the identification information obtained by the server is b, it means that the sending end is in the non-application restricted phase.

[0070] In some embodiments, the occurrence of the application restricted phase can be related to specific application layer transport protocols, service data types, application layer data volumes, network bandwidth sizes, service demand situations of the receiving end, etc.

[0071] In some embodiments, the application restricted phase can be an application restricted phenomenon that occurs when the sending end is restricted by the application layer, that is, the application layer resource restriction causes the application restricted phase to occur. For example: when the maximum data length written by the application layer of the sending end is less than the sending window length of the transport layer of the sending end, the data volume transmitted by the transport layer depends on the data volume written by the application layer, and then an application restricted phenomenon occurs.

[0072] In some embodiments, referring to Figure 3 As shown, it is a state schematic diagram when the sending end is in the application restricted phase: the application layer of the sending end writes service data into the send buffer. In the send buffer, the service data written by the application layer can be identified by byte numbers. When the sending end receives the acknowledgment information of any sent byte, the send window can slide in the direction of increasing sequence number, where the sequence number can be used to sort each byte number. In Figure 3 , the maximum byte number written by the application layer is less than the byte number of the send window. At this time, the data volume transmitted by the transport layer depends on the data volume written by the application layer. At this time, the network bandwidth is not fully utilized, resulting in low network efficiency.

[0073] Further, referring to Figure 4 As shown, it is a state schematic diagram when the sending end is in the non-application restricted phase: the application layer of the sending end writes data into the send buffer. When the sending end receives the acknowledgment information of any sent byte, the send window can also slide in the direction of increasing sequence number. When the maximum byte number written by the application layer is greater than or equal to the byte number of the send window, the data transmission volume is restricted by the send window. At this time, the sending rate mainly depends on the network congestion situation, the receiving ability of the receiving party, etc., and it is in the non-application restricted phase.

[0074] Step 204, when the sending end is in the application restricted phase, detect whether the current state of the sending end meets a preset detection condition.

[0075] Among them, the preset detection condition is a condition set for determining whether the current state of the sending end can perform network data detection. When setting the preset detection condition, it can be adaptively set in combination with the requirements for network data detection efficiency, the requirements for network data detection accuracy, the network state, the network transmission efficiency, etc.

[0076] The current state refers to the real-time sending state of the sending end, which can include, for example, the sending frequency and sending resources of the sending end. The sending frequency is a parameter used to characterize the frequency of the sending end sending detection data, and the sending resources are the resources used by the sending end itself to send detection data, such as the length of the sending window, network resources, etc.

[0077] Specifically, in the case where the sending end is in the application-limited stage, the server can detect the sending frequency, sending resources, etc. of the sending end, compare the sending frequency with the set sending frequency condition, compare the sending resources with the set sending resource condition, obtain the comparison result corresponding to the sending frequency and the comparison result corresponding to the sending resources, and then determine whether the preset detection condition is met according to each comparison result.

[0078] In some embodiments, when both the sending frequency and sending resources of the sending end meet their respective corresponding conditions, it is determined that the preset detection condition is met. Of course, it can also be that when the server determines that any one of the sending frequency and sending resources meets the corresponding condition, it is determined that the preset detection condition is met. When the server specifically selects the method for detecting whether the preset detection condition is met, it can be adaptively selected in combination with the actual service data transmission scenario, network data detection accuracy, etc.

[0079] In some embodiments, the frequency of sending detection data can be reflected from the duration between two adjacent detections sent by the sending end, the number of detection data sent within a certain duration range, etc. For example, the sending frequency can be the number of times the sending end sends within a certain duration range, and the sending frequency condition can be a set threshold for the number of sending times. When the number of sending times does not reach the threshold for the number of sending times, the sending frequency condition is met and detection data is sent; when the number of sending times reaches the threshold for the number of sending times, the sending frequency condition is not met and detection data is no longer sent, thus avoiding the frequent sending of detection data and affecting the transmission of service data.

[0080] In some embodiments, the sending resources can be the network resources of the sending end, and the corresponding sending resource condition can be a set network speed threshold. For example, when the network speed obtained by the server reaches the network speed threshold, it is determined that the sending resource condition is met and detection data can be sent. By sending detection data when the network state is good, the efficiency of network data detection can be improved.

[0081] Step 206, when the current state meets the preset detection condition, determine the detection data.

[0082] Among them, the detection data is the data sent by the sending end for detecting network data.

[0083] Specifically, when the current state meets the preset detection conditions, the server can determine the detection data based on the service data, and the service data can be the data generated by the sending end during normal service processing. Of course, the server can also generate new data as the detection data. Specifically, how to select the detection data can be adaptively adjusted in combination with the current service data confirmation situation of the sending end, the network congestion situation, etc.

[0084] In some embodiments, when the current state does not meet the preset detection conditions, the server can temporarily not determine the detection data and wait for the sending end to meet the preset detection conditions. When the sending end meets the preset detection conditions and the sending end is still in the application restricted stage at this time, the server can determine the detection data.

[0085] In some embodiments, the detection data can be a detection message. The detection message can be determined based on the service message for transmitting service data or a newly generated message. Among them, when the server determines the detection message based on the service message, it can use the sending time of the service message as the basis and take the one with a later sending time as the detection message.

[0086] Step 208, send the detection data and receive the response data feedback for the detection data;

[0087] Among them, the response data is obtained by the sending end and is the data feedback by the receiving end for the received detection data.

[0088] Specifically, the server can send the detection data based on the set transmission protocol. The detection data can carry a detection identifier, so that when the server receives the feedback data from the receiving end, it can identify whether the feedback data is the response data for the detection data based on the detection data information.

[0089] In some embodiments, the detection identifier can be represented by any identifier such as letters, numbers, and feature codes in terms of presentation.

[0090] In some embodiments, the identifier can be set according to the transmission protocol adopted by the server. As the transmission protocol is different, the identifier will also change. Among them, the server can use various transmission protocols such as TCP, QUIC, UDP, etc. to send the detection data.

[0091] In some embodiments, when the transmission protocol is the TCP protocol, the server may use the timestamp mechanism of the TCP protocol to use the timestamp as the identifier of the probe data. Exemplarily, the server may record the timestamp when the probe data is sent. When the timestamp of the feedback data fed back by the receiving end received by the server is the same as the recorded timestamp, it is determined that the feedback data is response data. Otherwise, the server may determine that the feedback data is the feedback of the receiving end for the service data.

[0092] In some other embodiments, when the transmission protocol is the QUIC protocol, the server may use the packet number of the probe packet in the probe data as the identifier based on the special feature of the packet number increment of the QUIC protocol to identify the response data.

[0093] Step 210, determine network detection data according to the sending time of the sent probe data and the receiving time of the received response data.

[0094] Among them, the network detection data is data used to reflect the network state. The network detection data may specifically include various performance indicators such as rate, bandwidth, throughput, and delay that can reflect the network transmission state.

[0095] Specifically, the server may calculate the delay based on the sending time of the probe data and the receiving time of the received response data, and thus determine the network detection data according to the calculated delay.

[0096] In some embodiments, the network detection data is the round-trip delay. The round-trip delay is the time required for the probe data to be transmitted from the sending end to the receiving end and then receive the confirmation from the receiving end. The server may directly calculate based on the current obtained sending time of the sent probe data and the receiving time of the received response data. For example, the time difference between the sending time and the receiving time is determined as the round-trip delay, and the calculated round-trip delay is directly determined as the network detection data.

[0097] In some embodiments, the server may also obtain multiple round-trip delays obtained by sending multiple probe data and determine the network detection data from the multiple round-trip delays. Among them, the server may perform mean processing, minimum value calculation, median calculation, etc. on the multiple round-trip delays to determine the network detection data. For example, the server may determine the round-trip delay with the smallest value from the multiple round-trip delays as the minimum round-trip delay and use the minimum round-trip delay as the network detection data. By determining the minimum round-trip delay as the network detection data, it can be used as an important reference index in aspects such as packet loss detection and congestion control to improve network transmission efficiency.

[0098] Exemplarily, in congestion control, such as when performing congestion control based on the BBR algorithm, by obtaining the minimum round-trip delay, the adaptability of BBR in network transmission can be increased.

[0099] In a specific application, such as Figure 5 shown in the overall structural block diagram of the network data detection method, the network data detection method is described as follows:

[0100] Among them, the server may include a monitoring module, a detection module, and an evaluation module, and communication between the modules is achieved through a protocol stack. The monitoring module in the server can run continuously to monitor whether the sending end is in the application restricted stage, and when in the application restricted stage, monitor whether the sending end meets the preset detection conditions. The monitoring module will further transfer the information on whether it is in the application restricted stage and whether it meets the preset detection conditions to the detection module.

[0101] When the detection module receives the information from the monitoring module, determines that the sending end is in the application restricted stage and meets the preset detection conditions, it will determine the detection data and send the detection data to the receiving end through the network to obtain the response data for the detection data. Thus, the round-trip delay can be calculated based on the sending time of the detection data and the receiving time of the received response data.

[0102] Finally, the detection module will send the calculated round-trip delay to the evaluation module of the server. The evaluation module of the server receives the round-trip delay from the detection module, tests and analyzes the round-trip delay to obtain the final minimum round-trip delay.

[0103] In the above network data detection method, it is monitored whether the sending end is in the application restricted stage; in the case where the sending end is in the application restricted stage, it is further detected whether the current state of the sending end meets the preset detection conditions; in the case where the current state meets the preset detection conditions, the detection data is determined; the detection data is sent and the response data feedback for the detection data is received; that is to say, in this application, the detection data is sent when the sending end is in the application restricted stage and meets the preset detection conditions. On the one hand, the application restricted stage is a stage that makes full use of network resources and can reduce the impact on the transmission of normal service data. On the other hand, sending the detection data only when the preset detection conditions are met can further improve the rationality of sending the detection data and enhance the accuracy of network data detection. In this way, by receiving the response data feedback for the detection data, the network detection data can be determined based on the sending time of the detection data and the receiving time of the received response data, which is beneficial to more real-time and accurately grasping the network transmission state, thereby optimizing the network transmission efficiency and improving the client service experience.

[0104] In some embodiments, network detection data is determined based on the sending time of sending the detection data and the receiving time of receiving the response data, including: determining the first network delay based on the sending time of sending the detection data and the receiving time of receiving the response data; obtaining the second network delay obtained by draining; and determining the target network delay based on the first network delay and the second network delay.

[0105] Among them, network delay is a performance indicator that describes the network status. Network delay includes various types of delays such as sending delay, transmission delay, processing delay, queuing delay, and round-trip delay.

[0106] The first network delay and the second network delay are network delays obtained by using different network delay detection methods. The first network delay can specifically be a network delay determined in an application-restricted phase and under preset detection conditions. The second network delay can specifically be a network delay determined by an emptying method.

[0107] The emptying mode refers to a mode of clearing the communication link between the sending end and the receiving end so as to send the detection data when the data in the communication link is empty.

[0108] Specifically, the server may set a voting mechanism for the first network delay and the second network delay obtained, select one of the first network delay and the second network delay, and determine it as the target network delay. The server may also perform a comprehensive calculation based on the first network delay and the second network delay, and determine the comprehensive calculation result as the target network delay.

[0109] In some embodiments, the first network delay and the second network delay may be a round trip delay, i.e., RTT. The round trip delay may be used to calculate the delay-bandwidth product, the congestion control window value, and the time threshold for updating the identification of packet loss, thereby assisting in solving the congestion problem in the network and improving the network transmission efficiency.

[0110] In the above embodiment, when the computer device determines the target network delay, it is determined by jointly determining the network delays measured by the two detection results, thereby improving the determination accuracy of the target network delay and improving the accuracy of network data detection.

[0111] In some embodiments, obtaining the second network delay obtained by draining includes: when the time duration during which the sending end is not in the application restricted stage reaches a first preset threshold, sending detection data in a draining manner to obtain the second network delay; or, when the time duration since the last network detection by draining reaches a second preset threshold, sending detection data in a draining manner to obtain the second network delay.

[0112] The preset threshold is a set time threshold.

[0113] The first preset threshold is a time threshold set for the situation where the application restricted phase has never occurred. When the situation without the application restricted phase reaches the first preset threshold, the probing data is sent in the emptying mode, thereby avoiding the situation that the application restricted phase does not occur for a long time, resulting in the inability to perform network data detection. When setting the first preset threshold, it can be set in combination with the actual network transmission efficiency, transmission scenario, etc.

[0114] The second preset threshold is a time threshold set for whether to send the probing data in the emptying mode. By setting the second threshold, the frequency of sending the probing data in the emptying mode can be determined. Whether the sending end is in the application restricted phase or not, when the duration since the last network detection in the emptying mode reaches the second preset threshold, a network data detection in the emptying mode is performed once. Thus, by setting multiple network data detection methods, the accuracy of the network detection data can be improved. When setting the second preset threshold, it can also be set in combination with the actual network transmission efficiency, transmission scenario, etc.

[0115] The first preset threshold and the second preset threshold can be the same or different, and the actual settings of the first preset threshold and the second preset threshold can be adaptively adjusted in combination with the network congestion situation, the sender's capabilities, the network transmission efficiency, etc.

[0116] Specifically, the server can obtain the duration when the sending end is not in the application restricted phase, or obtain the duration since the last network detection in the emptying mode, and compare the duration when the sending end is not in the application restricted phase with the first preset threshold; or compare the duration since the last network detection in the emptying mode with the second preset threshold. When the duration when the sending end is not in the application restricted phase reaches the first preset threshold, the probing data is sent in the emptying mode to obtain the second network delay; or when the duration since the last network detection in the emptying mode reaches the second preset threshold, the probing data is sent in the emptying mode to obtain the second network delay.

[0117] In some embodiments, when setting the first time threshold, it can be set based on various time units such as minutes and seconds. For example, the first time threshold can be set to 2 Min (minutes). For the situation where the application restricted phase has never occurred, when the duration when the sending end is not in the application restricted phase reaches 2 Min, the probing data is sent in the emptying mode.

[0118] In some embodiments, when setting the second time threshold, it can also be set based on various time units such as minutes and seconds. If the application restricted phase occurs frequently and no probing data is sent through the emptying method for a long time, when the second time threshold is reached, a network data detection based on the emptying method can be performed to ensure accuracy. For example, the second time threshold can be set to 1Min. When the duration since the last network detection through the emptying method reaches 1Min, probing data is sent using the emptying method.

[0119] It can be understood that when the application restricted phase occurs frequently, especially in the real-time audio and video scenario where data is transmitted in frames, and the application restricted phase occurs frequently, the server can also choose not to send probing data through the emptying method to avoid interfering with the normal business data transmission.

[0120] In the above embodiments, the server sets the first preset threshold and the second preset threshold respectively for the duration when the sending end is not in the application restricted phase and the duration since the last network detection through the emptying method, so as to determine whether to perform network data detection according to the emptying method. Network data detection through the emptying method has high accuracy, and in the case of setting time thresholds, it also avoids the situation of frequently performing network data detection through the emptying method. On the basis of improving the accuracy of network detection data, it will not affect the normal transmission of business data.

[0121] In some embodiments, determining the target network delay according to the first network delay and the second network delay includes: determining the first weight and the second weight; determining the target network delay according to the first network delay, the first weight, the second network delay, and the second weight.

[0122] Among them, the first weight is the weight for the first network delay and can be used to represent the relative importance of the first network delay. The second weight is the weight for the second network delay and can be used to represent the relative importance of the second network delay.

[0123] The first weight and the second weight can be dynamically changed. For example, they can be dynamically changed according to network transmission efficiency, network data detection method, network congestion situation, business scenario, etc. Of course, the first weight and the second weight can be set fixed values, which are not limited here.

[0124] Specifically, the server can calculate the first intermediate network delay based on the obtained first weight and the first network delay, and calculate the second intermediate network delay based on the obtained second weight and the second network delay. Then, according to the sum of the first intermediate network delay and the second intermediate network delay, the target network delay is obtained.

[0125] In some embodiments, when the first weight and the second weight are fixed values, the first weight and the second weight can be set to be the same. For example, both are set to 0.5, indicating that the first network delay and the second network delay have the same importance in calculating the target network delay. Of course, the first weight and the second weight can also be different. It can be understood that the first weight can be greater than the second weight. For example, the first weight is 0.85 and the second weight is 0.15; the first weight can also be less than the second weight. For example, the first weight is 0.3 and the second weight is 0.7, which is not limited herein.

[0126] In some embodiments, the target network delay can be calculated using the following formula:

[0127]

[0128] Wherein, is the target network delay, is the first weight, is the second weight, is the first network delay, is the second network delay.

[0129] In the above embodiments, the computer device determines the corresponding weights based on the network delays obtained by two different methods, and then combines the weights to determine the target network delay, which can improve the accuracy of the target network delay.

[0130] In some embodiments, determining the first weight and the second weight includes: determining the first transmission frequency of sending probe data during the application restricted phase within a preset period; determining the second transmission frequency of sending probe data in the emptying manner within a preset period; determining the first weight and the second weight based on the first transmission frequency and the second transmission frequency.

[0131] Wherein, the preset period is a set time period for counting the frequencies of different ways of sending probe data within the set time period. The preset period can be a fixed period or a variable period, and the setting of the preset period can be adaptively adjusted in combination with the actual service scenario, network transmission efficiency, etc.

[0132] The transmission frequency is the number of times of sending probe data counted.

[0133] The first transmission frequency is the number of times of sending probe data during the application restricted phase within the preset period counted;

[0134] The second transmission frequency is the number of times of sending probe data in the emptying manner within the preset period counted.

[0135] In some embodiments, the computer device may determine a first transmission frequency and a second transmission frequency, determine the total transmission frequency within a preset period, and determine a first weight and a second weight according to the proportions of the first transmission frequency and the second transmission frequency in the total transmission frequency respectively.

[0136] In some embodiments, the server may set a frequency threshold. For the transmission frequency that reaches the frequency threshold, the server may assign a higher weight, and for the transmission frequency that does not reach the frequency threshold, the server may assign a lower transmission frequency. For example, when the first transmission frequency among the first transmission frequency and the second transmission frequency reaches the frequency threshold, the first weight corresponding to the first transmission frequency is higher.

[0137] In some embodiments, the server may also set multiple frequency thresholds, such as n0, n1, n2…n n , n n …>n2>n1>n0. For the transmission frequencies falling within different ranges, different weights are assigned, so that the first weight and the second weight can be determined in a gradient manner. It can be understood that the larger the transmission frequency, the higher the corresponding weight. For example, when the first transmission frequency is between n0 and n1 and the second transmission frequency is between n1 and n2, the first weight is less than the second weight.

[0138] In the above embodiments, the server may determine the first weight and the second weight based on the determined first transmission frequency and second transmission frequency, so that the accuracy of the determined target network delay is higher.

[0139] In some embodiments, monitoring whether the sending end is in the application-limited stage includes: obtaining at least one of the transport layer parameters or application layer parameters of the sending end; determining that the sending end is in the application-limited stage when it is determined based on the obtained parameters that the sending queue of the sending end is empty and there is no new data written to the application layer.

[0140] Among them, the transport layer parameter is a parameter used to reflect the data transmission situation of the transport layer. For example, the transport layer parameter may include various parameters such as the amount of data already sent by the transport layer, the length of the sending window of the transport layer, and the status of the sending queue of the transport layer.

[0141] The application layer parameter is a parameter used to reflect the data transmission situation of the application layer. For example, the application layer parameter may include various parameters such as the amount of data already written by the application layer to the transport layer and whether there is new data that needs to be written to the transport layer currently in the application layer.

[0142] The sending queue is a queue for storing data to be sent. All the data to be sent by the transport layer can be sent to the sending end based on the sending queue.

[0143] Specifically, the server can determine whether the sending queue of the sending queue is empty based on transport layer parameters and / or application layer parameters. If it is empty, and it is determined that there is no new data written in the application layer, it is determined that the sending end is in the application-limited phase.

[0144] It can be understood that during network transmission, the switch between the application-limited phase and the non-application-limited phase can be related to whether there is new data written in the application layer, network congestion, the receiving ability of the receiving end, etc. Therefore, when the sending queue is empty, the server further determines that there is no new data written in the application layer before determining that the sending end is in the application-limited phase, thereby improving the judgment accuracy of the application-limited phase and further improving the network data detection accuracy.

[0145] In some embodiments, as Figure 6 shown, it is a timing diagram of the switch between the application-limited phase and the non-application-limited phase:

[0146] In the stage from t0 to t1, the sending queue of the sending end contains service packets that have not been sent yet. At this time, the sending queue is not empty, and the sending end does not belong to the application-limited phase, and the existing service packets within the sending window can be transmitted; after the t1 moment, at this time the server detects that the sending queue is empty, and there is no new service packet written from the application layer to the transport layer of the sending end, indicating that the current sending end is in the application-limited phase, then a probe packet can be sent at the t12 moment. In the stage from t2 to t3, the sending end returns to the non-application-limited phase again.

[0147] In the above embodiments, the server determines whether the queue of the sending end is empty by obtaining at least one of the application layer parameters and the transport layer parameters. When the sending queue of the sending end is empty and there is no new data written in the application layer, it is determined that the sending end is in the application-limited phase, and it can accurately determine whether the sending end is currently in the application-limited phase.

[0148] In some embodiments, the obtained parameters include transport layer parameters and application layer parameters. The application layer parameters include the first data length of the data written in the application layer, and the transport layer parameters include the second data length of the data already sent in the transport layer; the network data detection method further includes: when the first data length is equal to the second data length, determining that the sending queue of the sending end is empty.

[0149] Among them, the first data length refers to the length of the data written from the application layer to the transport layer, and the second data length refers to the length of the data already sent in the transport layer.

[0150] Specifically, the server can compare the first data length and the second data length. When the first data length is equal to the second data length, it means that the transport layer has sent all the data written in the application layer, and then the server can determine that the sending queue of the sending end is empty.

[0151] In some embodiments, when the first data length is greater than the second data length, it indicates that the transport layer has not sent all the service data written by the application layer, and there is still service data that can be sent stored in the send queue. At this time, it is in the non-application-limited phase.

[0152] In some embodiments, the first data length can be the maximum length of the service data written by the application layer, and the second data length can be the maximum length of the service data sent by the transport layer. Among them, the maximum length of the service data written by the application layer is the maximum data offset Offset_l7, and the maximum length of the service data sent by the transport layer is Offset_l4.

[0153] Reference Figure 7 As shown, it is a schematic flowchart for determining whether it is in the application-limited phase:

[0154] Among them, in S702, the computer device can directly compare the maximum data offset sent by the transport layer with the maximum data offset written by the application layer to the transport layer. Among them, the maximum data offset sent by the transport layer can be Offset_l4, and the maximum data offset written by the application layer to the transport layer can be Offset_l7. When Offset_l4 = Offset_l7, all the service data written by the application layer to the transport layer has been sent out. At this time, there is no service data that can be sent in the send queue, and the application layer has not written new service data to the transport layer either. At this time, it enters S706, that is, it is determined to be in the application-limited phase; when Offset_l4 < Offset_l7, it means that the data written by the application layer to the transport layer has not been completely sent out. At this time, there is still service data that can be sent stored in the send queue. At this time, it enters S704, that is, it is determined to be in the non-application-limited phase.

[0155] In some embodiments, the server can also directly read the status of the send queue, and determine whether the send queue is empty based on the read status of the send queue. Reference Figure 8 As shown, it is a schematic flowchart for directly reading the status of the send queue to determine whether it is in the application-limited phase: In S802, the server can read the status of the send queue; in S804, the server determines whether the send queue is empty based on the status of the send queue, and when it is determined that the application layer has not written new service data to the transport layer, it enters S806, that is, it is determined that the sending end is in the application-limited phase, otherwise, it enters S808 to determine that the sending end is in the non-application-limited phase.

[0156] In the above embodiments, the server obtains the first data length and the second data length, compares the first data length and the second data length, and thus accurately determines whether the sending end is currently in the application-limited phase according to the comparison result.

[0157] In some embodiments, the obtained parameters include transport layer parameters, and the transport layer parameters include the third data length of the flight data; the network data detection method further includes: when the third data length is less than the length of the sending window of the transport layer, determining that the sending queue of the sending end is empty.

[0158] Wherein, the flight data is data in the process of transmission, that is, data that has been sent by the sending end but has not received an acknowledgment message.

[0159] Specifically, the server can compare the third data length of the flight data with the length of the sending window of the transport layer. When the third data length is less than the length of the sending window, it means that there is still a remaining window in the sending window. At this time, there is no data to be sent in the sending queue for the time being, and the server can determine that the sending queue is empty.

[0160] In some embodiments, the flight data may be a packet that has been sent by the sending end but has not received an acknowledgment, and the third data length is the length of the packet. In the above embodiments, by comparing the third data length with the length of the sending window, the server can determine whether the sending end is in the application-limited stage, thereby improving the detection efficiency of network data. By quickly detecting network detection data, the network can be adjusted in time, thus also improving the network transmission efficiency to a certain extent.

[0161] In some embodiments, monitoring whether the sending end is in the application-limited stage includes: reading the application-limited flag bit of the transport layer, and determining whether the sending end is in the application-limited stage according to the application-limited flag bit.

[0162] Wherein, the application-limited flag bit is used to characterize the stage of the sending end, specifically used to characterize whether the sending end is in the application-limited stage or in the non-application-limited stage.

[0163] In some embodiments, the application-limited flag bit may be related to various transport protocols. For example, it may exist in QUIC (Quick UDP Internet Connections), so that the server can directly read the application-limited flag bit to detect the status of the current sending end.

[0164] In some embodiments, the application-limited flag bit can be identified by any identifier such as numbers, letters, and feature codes. For example, numbers can be used as the application-limited flag bit. The number 1 represents that the sending end is in the application-limited stage, and the number 0 represents that the sending end is in the non-application-limited stage. When the application-limited flag bit read by the server is 0, it is determined that the sending end is in the non-application-limited stage; when the application-limited flag bit read by the server is 1, it is determined that the sending end is in the application-limited stage.

[0165] In the above embodiments, the server can determine whether the sending end is in the application restriction stage by reading the application restriction flag bit, thereby improving the detection efficiency of network data. By quickly detecting network detection data, the network can be adjusted in a timely manner, thus improving the network transmission efficiency to a certain extent.

[0166] In some embodiments, when the sending end is in the application restriction stage, it is detected whether the current state of the sending end meets the preset detection conditions, including: when the sending end is in the application restriction stage, if at least one of the following conditions is met, it is determined that the current state of the sending end meets the preset detection conditions: the length of the available window of the sending end reaches the preset length; the number of packets sent by the sending end does not reach the preset packet number threshold; during the application restriction stage, the time duration since the last sending of detection data reaches the third preset threshold; the delay change rate within the application restriction stage reaches the delay change rate threshold.

[0167] Among them, the available window is the remaining window of the sending window, and the remaining window is a part of the sending window, which can specifically be the part not occupied by the data to be confirmed. The data to be confirmed refers to the data that has been sent by the sending end but has not received the confirmation information feedback from the receiving end.

[0168] The preset length is the length set for determining whether the length of the available window has the ability to send detection data. Generally, the length of the available window should be at least more than one MSS to have the ability to send detection data. When actually setting the preset length, various information such as the type of service data transmitted and the type of transmission protocol can be comprehensively considered for setting.

[0169] The packet number threshold is the set threshold for determining whether the number of packets sent within a period of time reaches the set number threshold, and can be used to control the number of times the sending end sends detection data. By setting the packet number threshold, on the one hand, it can avoid the frequent sending of detection data from affecting the transmission of service data, and on the other hand, it can save the resources of the sending end. When setting the packet number threshold, it can be adaptively set in combination with the actual resources of the sending end, network bandwidth, network transmission efficiency, etc.

[0170] The third preset threshold is the set time threshold, which can be used to judge whether the time duration between the last sending of detection data and the current sending of detection data is sufficient during the application restriction stage. By setting the third preset threshold, it can be used to control the sending frequency of detection data and avoid excessive sending of detection data, wasting bandwidth and network resources.

[0171] The rate of change of delay is a parameter used to reflect whether the network state has changed. Through the rate of change of delay, changes in the network state can be captured. The rate-of-change-of-delay threshold is a set threshold used to determine whether the current network state has changed significantly. When the rate of change of delay reaches the rate-of-change-of-delay threshold, it indicates that the current network state has changed significantly.

[0172] When it is detected that the network state has changed significantly, the limit of the third preset threshold can be considered to be relaxed. Even if the time duration between the last sending of probe data and the current sending of probe data has not reached the third preset threshold, as long as it is still in the application-limited phase, sending probe data can be allowed to quickly adapt to the new transmission path or network conditions. This strategy of relaxing the third preset threshold can more flexibly cope with the changing network environment.

[0173] Specifically, when the server determines that any one of the length of the available window, the number of packets already sent by the sender, the time duration of the last sending of probe data, and the rate of change of delay reaches the corresponding preset value, it can be determined that the preset probe condition is met. The server can also make a judgment. The server can also determine that the preset probe condition is met when any two or more of the length of the available window, the number of packets already sent by the sender, the time duration of the last sending of probe data, and the rate of change of delay meet the preset probe condition. The specific basis for the server to determine whether the preset probe condition is met can be adjusted according to the actual network data detection accuracy, network data detection efficiency, etc.

[0174] In some embodiments, when setting the packet number threshold, it can be set in combination with actual network resources, network transmission efficiency, etc., such as 2, 5, and 8, etc. For example, the packet number threshold can be set to 5. Then, in the application-limited phase, when the number of packets already sent by the sender has not reached 5, it is determined that the preset probe condition is met.

[0175] In some embodiments, when setting the third preset threshold, it can be set in combination with actual network resources, network bandwidth, etc., such as 20ms, 50ms, 100ms, etc. For example, the third preset threshold can be set to 50ms. Then, in the application-limited phase, when the time duration between the last sending of probe data and the current sending of probe data reaches 50ms, it is determined that the preset probe condition is met.

[0176] In some embodiments, when setting the rate-of-change-of-delay threshold, it can be set to multiple different percentages in combination with the actual network transmission scenario, such as 30%, 50%, 60%, etc. For example, when the rate-of-change-of-delay threshold is set to 50%, when the rate of change of delay reaches 50%, it can be regarded as a drastic change in the network.

[0177] In some embodiments, when determining whether the current state of the sender meets the preset detection condition, the server may select some parameters from various types of parameters as the basis for judgment. For example, the server may determine that the preset detection condition is met when it determines that the length of the available window of the sender reaches the preset length and the number of packets already sent by the sender does not reach the preset packet number threshold.

[0178] For another example, the server may determine that the preset detection condition is met when it determines that the length of the available window of the sender reaches the preset length and, in the application-limited phase, the time duration since the last sending of detection data reaches the third preset threshold.

[0179] For yet another example, the server may determine that the preset detection condition is met when it determines that the length of the available window of the sender reaches the preset length and the delay change rate within the application-limited phase reaches the delay change rate threshold.

[0180] In the above embodiments, the server can obtain various types of parameters to determine whether the preset detection condition is met, thereby increasing the flexibility of judgment. And during the judgment process, it can select only one of the parameters for judgment, or combine two or more types of parameters for judgment, effectively improving the efficiency and accuracy of network data detection.

[0181] In some embodiments, the steps for determining the delay change rate include: when the sender is in the application-limited phase, obtaining the network delay at the current moment and the network delay at the previous moment; and determining the delay change rate based on the network delay at the current moment and the network delay at the previous moment.

[0182] Among them, the network delay at the current moment is the real-time network delay. The network delay at the previous moment is the historically measured network delay.

[0183] Specifically, the server may obtain the network delay at the current moment and obtain the network delays at a preset number of previous moments. The preset number may be 1 or multiple. Further, the server may determine the delay change rate based on the obtained network delay at the current moment and the network delays at a preset number of previous moments.

[0184] In some embodiments, the preset number is multiple. During the calculation of the delay change rate, the mean or median of multiple historical network delays may be used as the target historical network delay, which can help reduce the uncertainty of the calculation result caused by network noise or instantaneous problems. For example, if the preset number is 3, the server may use the mean of 3 measurements as the target network delay, and the average value can smooth the fluctuations of the network delay and make it more stable.

[0185] In some embodiments, the preset quantity is 1. During the calculation of the time delay change rate, 1 historical network time delay can be used for the calculation, so as to reduce the calculation amount and save computing resources.

[0186] In some embodiments, the following formula can be used to calculate the time delay change rate:

[0187]

[0188] Wherein, is the network time delay at the current moment, is the network time delay at the current moment. This change rate can keenly capture sudden changes in network conditions.

[0189] Wherein, is the network time delay at the current moment, is the network time delay at the current moment. This change rate can keenly capture sudden changes in network conditions.

[0190] In the above embodiments, the server can calculate the time delay change rate, and then compare it with the time delay change rate threshold to determine whether the preset detection condition is met, which is beneficial to improving the flexibility and adaptability of the judgment of the preset detection condition and improving the efficiency of network data detection.

[0191] In some embodiments, when the current state meets the preset detection condition, the detection data is determined, including: when the current state meets the preset detection condition, detecting the message state of the service message sent by the sending end; if it is determined based on the message state that there are unconfirmed service messages in the sending end, then based on the unconfirmed service messages, the detection data is determined.

[0192] Wherein, the message state refers to the state of the sent service message, and the state of the sent service message can include the confirmed state and the unconfirmed state

[0193] For any sent service message, the confirmed state means that the sending end has received the confirmation information matching the targeted service message, and the unconfirmed state means that the sending end has not received the confirmation information matching the targeted service message.

[0194] Specifically, the server can detect the message state of the service message sent by the sending end, and when there are multiple unconfirmed service messages, it can combine the sending times of each service message and select at least one service message from each service message as the detection message. By selecting a message from the service messages as the detection message, the function of resending the service message is achieved, thereby increasing the success rate of service message transmission.

[0195] In some embodiments, for any service message, when the server determines that it has received an ACK that matches the service message, it determines that the service message is a confirmed service message. If, for any service message, the server determines that it has not received an ACK that matches the service message, it determines that the service message is an unconfirmed service message.

[0196] Exemplarily, when the server selects a probe message from each service message, it can use the message with a relatively later sending time as the probe message. Since the later the sending time of a service message, the greater the risk of packet loss, by selecting the service message with a relatively later sending time as the probe message, it can play a role in retransmission to a certain extent. For example, the server can select the service message with the latest sending time from each service message as the probe message.

[0197] In some embodiments, when the server determines that there are no unconfirmed service messages in the sending end, it can generate a new probe message and send the new probe message to start detecting network data.

[0198] In some embodiments, for the probe message, a timeout retransmission mechanism can be set up to ensure that even if the probe message is lost or does not arrive in time, accurate network detection data can still be obtained. For example: The server can be based on a preset timeout threshold. When the duration of sending the probe message by the sending end reaches the timeout threshold and it still has not received the ACK for the probe message, and the sending end is still in the application restricted stage, the server can control the retransmission of the probe message.

[0199] In one embodiment, as shown in Figure 9 the schematic diagram of selecting a probe message in the case where there are unconfirmed service messages in the sending end:

[0200] Among them, as can be seen from Figure 9 there is no new data written in the application layer, and in the server side, that is, the sending end, there are still sent but unconfirmed service messages, namely service message 1, service message 2, and service message 3. The server can select any one of service message 1, service message 2, and service message 3 as the probe message. In this embodiment, the server selects service message 1 as the probe message and sends the probe message, and the terminal can feedback the confirmation information 1 corresponding to the probe message, that is, ACK1 to the server side.

[0201] In some embodiments, as shown in Figure 10 the schematic diagram of selecting a probe message in the case where there are no unconfirmed service messages in the sending end:

[0202] Among them, as can be seen from Figure 10As can be seen, there is no new data written to the application layer, and on the server side, i.e., the sending side, there are no sent but unacknowledged service messages. The server can send a specific probe message to the receiving side.

[0203] In some embodiments, such as Figure 11 shown, is a schematic flow diagram of sending a probe message:

[0204] Among them, when the server determines that it is in the application-limited phase, in S1102, the server can determine whether the current preset probe condition is met, that is, whether the available window is sufficient. When determining whether the available window is sufficient, the server can determine the length of the available window at the sending end and compare the length of the available window with the preset length. When the length of the available window reaches the preset length, it means that the available window is sufficient. When the available window is insufficient, it enters S1112, and the server determines not to send a probe message.

[0205] When the available window is sufficient, it enters S1104, and the server determines whether the number of messages sent by the sending end has reached the preset message quantity threshold. If the number of messages sent by the sending end has reached the preset message quantity threshold, it enters S1112, and the server determines not to send a probe message. If the number of messages sent by the sending end has not reached the preset message quantity threshold, it enters S1106, and the server can determine whether there are sent but unacknowledged, that is, un-ACKed, service messages in the sending window.

[0206] When there are un-ACKed service messages in the sending window, in S1110, the server can use the un-ACKed service messages as probe messages.

[0207] When there are no un-ACKed messages in the sending window, in S1108, the server can send a specific message as a probe message, that is, a specific probe message needs to be sent to ensure that the receiving end can receive it normally.

[0208] In the above embodiments, the server determines the probe data based on the sent but unacknowledged service messages at the sending end, making full use of the feature that retransmission does not occupy new available window resources, so that the sending of probe data does not need to additionally occupy the available window resources of the sending end, improving the network transmission efficiency.

[0209] Currently, in the process of performing minimum round-trip delay detection, the BBR algorithm can be used. The BBR algorithm is a network congestion control algorithm. BBR measures RTprop and BtlBw and then calculates BDP, and controls the link capacity through BDP.

[0210] The congestion control of BBR is divided into four stages: the STARTUP stage, the DRAIN stage, the PROBE_BW stage, and the PROBE_RTT stage. In the PROBE_RTT stage, the BBR algorithm requires emptying the link and measuring the minimum round-trip delay. This process generally occurs periodically with a period of 10 seconds.

[0211] Although the BBR algorithm has minimized the impact of delay detection on data transmission as much as possible, making the duration of the detection stage only account for 2%, in the scenario of real-time audio and video, it is impossible to maintain no data transmission for 200 ms, which will have a great impact on the video transmission effect, resulting in phenomena such as stuttering and frame dropping.

[0212] In some embodiments, as Figure 12 shown, is the overall structural block diagram of the network data detection method provided by this application:

[0213] Among them, Figure 12 In, the sending process is the process in the sending end used to transmit service packets or probe packets. The sending window consists of two parts. One part is used to store the sent packets that have not been acknowledged, and the other part is the remaining window, that is, the available window for unsent packets. Sending a new packet occupies the available window. When the available window is not zero, a new packet can be sent. At this time, the number of available windows decreases, and the number of sent packets that have not been acknowledged increases. It can be understood that the packets here can refer to service packets or probe packets.

[0214] When the sending end is in the application-limited stage and meets the preset probing conditions, probe packets can be sent to obtain the first network delay. Among them, the first network delay can specifically be the minimum value of the round-trip delays obtained through multiple measurements, that is, the minimum round-trip delay min_rtt1. min_rtt1 is updated every time interval T, making the measurement result of min_rtt1 more real-time; in terms of measurement accuracy, the result can be made closer to the true value by taking the minimum value of multiple measurements.

[0215] The second network delay in the empty link state can be measured by the emptying method. The second network delay can also specifically be the minimum value of the round-trip delays obtained through multiple measurements, that is, the minimum round-trip delay min_rtt2. When the time duration since the last network detection by the emptying method reaches the second preset threshold, probe data can be sent according to the emptying method.

[0216] The server can perform comprehensive calculations based on the first network delay and the second network delay to obtain the final target network delay, improving the accuracy of network detection data.

[0217] In some embodiments, as Figure 13As shown in the figure, it is a schematic flowchart of the network data detection method provided by this application:

[0218] Among them, in S1302, the server can, through its own monitoring module, monitor the sending end during the traffic transmission process of a certain connection, that is, whether it is in the application-limited stage itself.

[0219] If the current sending end is not in the application-limited stage, it enters S1308, indicating that there are still service packets to be sent at the sending end. At this time, the sending end will continue to send these service packets. If the sending end determines that it is already in the application-limited stage, then in S1304, the monitoring module can determine whether the current preset detection condition is met. If the preset detection condition is met, an acknowledgment message is sent to the detection module of the server. If the current preset detection condition is not met, it enters S1306, and no additional detection packets are sent. At this time, the sending end continues to judge whether it is in the application-limited stage, that is, returns to judge in S1302.

[0220] When the detection module receives the information sent by the monitoring module, it determines that it is currently in the application-limited stage and the preset detection condition is met, and can perform the minimum round-trip delay detection, that is, enter S1310, and the sending end sends a detection packet.

[0221] In S1312, after the receiving end receives the packet sent by the sending end, the packet may be a detection packet or a service packet. In S1314, the receiving end records the acknowledgment delay, and in S1316, it replies with an acknowledgment message, that is, an ACK packet.

[0222] In S1318, after the sending end receives the ACK packet sent by the receiving end, it calculates the measurement result from the sending end to the receiving end, that is, the minimum round-trip delay, and enters S1320 to evaluate and correct the final data of the measurement result.

[0223] The following takes an actual application scenario as an example to elaborate on the network data detection method of this application in detail:

[0224] The network data detection method provided by this application can be applied in BBR. Refer to Figure 14 As shown in the figure, it is a schematic flowchart of implementing the network data detection method provided by this application in BBR:

[0225] During the audio and video service transmission process, BBR can be used for congestion control. For the minimum round-trip delay detection in BBR, on the basis of the original periodic detection stage, a new detection method is adopted, that is, the detection packet is sent in the application-limited stage.

[0226] For audio and video services, there is no data to transmit during the frame gap phase, and it is in the application-limited phase at this time. Therefore, the probe packets of audio and video services are actually sent during the frame gap phase. During the frame gap phase, no service packets are sent, and sending probe packets makes full use of the network bandwidth resources in the application-limited phase. According to the characteristics of each video frame in audio and video, a probe packet can be sent every 50 ms, which can also ensure that 4 probe packets are sent every 200 ms. In this way, the long drain time of BBR is avoided.

[0227] In BBR, two conditions need to be met to determine that it is in the application-limited phase. The first condition is that the length of the inflight data in S1402 is less than the sending window length, that is, inflight (length of inflight data) < cwnd_gain * bdp (sending window length); the second condition is that there is no new data written in the application layer in S1404, and then enter S1406 to determine that it is in the application-limited phase. If the length of the inflight data is greater than or equal to the sending window length or there is still data written in the application layer, it is impossible to be in the application-limited phase, that is, it is determined to be in the non-application-limited phase in S1408.

[0228] In terms of the sending frequency, specifically in BBR, in S1410, a probe packet can be sent every 50 ms. If a probe packet has already been sent within 50 ms, then enter S1412 and no more probe packets will be sent, appropriately controlling the sending frequency. Among them, when no probe packet is sent within 50 ms, then in S1414, it is determined whether the number of inflight data is greater than 0. The type of the probe packet depends on inflight. When inflight > 0, there are still packets that have not received ACKs. At this time, enter S1416 and choose to directly retransmit the packets in inflight. If inflight = 0, then enter S1418 and send a separate probe packet. By sending probe packets, a new round-trip delay can be obtained, and then enter S1420 to update the round-trip delay. Finally, in S1422, the round-trip delay is corrected according to the network conditions.

[0229] By using the network data detection method provided in the embodiments of the present application, the sending method and frequency of probe packets can be adjusted more flexibly. If the duration of not sending probe packets exceeds the threshold of 50 ms and the monitoring module detects the occurrence of the application-limited phase, then a probe packet is sent and the duration of not sending probe packets is reset to zero. On the contrary, if the duration of not sending data packets does not exceed the threshold of 50 ms, even if the application-limited phase is detected, no probe packet is sent.

[0230] The network data detection method provided by the embodiments of the present application proposes a method for detecting the minimum round-trip delay from the perspective of optimizing network transmission efficiency. By sending probe packets during the application-limited phase, it does not affect the transmission of normal data packets and can measure the minimum round-trip delay more timely and accurately. Secondly, considering the actual situation of the network, the network data detection method provided by the embodiments of the present application can evaluate the detection effect, and thus obtain the optimal detection result, which is more capable of coping with the current complex and dynamic network environment. Finally, this solution can combine the network delay detections obtained by the two detection methods, give full play to their respective advantages, further improve the accuracy of network data detection, and is conducive to improving network transmission efficiency.

[0231] The network data detection method provided by the embodiments of the present application selects to send probe packets during the application-limited phase, which solves the problem of the sending timing for detecting the minimum round-trip delay. It has the following technical effects:

[0232] First, by sending probe packets during the application-limited phase, there is no need for an emptying phase, which will not affect the normal transmission of service packets. Second, the probe packets and service packets are staggered in time. During the application-limited phase, there are not enough service packets to be sent, reducing the contention for bandwidth by the probe packets. The frame gap is fully utilized during the real-time audio and video transmission process, improving network efficiency. Third, using service packets as probe packets, since unacknowledged packets may not have been received by the receiving end, retransmission increases the transmission success rate. Fourth, the probe packets and service packets share the same connection, eliminating the need for a dedicated control flow and resulting in a simple design. Fifth, it expands the applicable range of congestion control algorithms such as BBR and increases the adaptability between BBR and real-time audio and video transmission. Sixth, the detection results during the application-limited phase and the detection results during the emptying phase complement each other, enabling adaptation to different network environments and possessing both accuracy and real-time performance. Compared with the BBR algorithm, the present application sends probe packets during the application-limited phase, increasing the detection frequency and thus being more accurate. By taking the minimum value through multiple detections, the minimum round-trip delay can still be calculated relatively accurately. Compared with the measurement of round-trip delay in the RTP / RTCP protocol, the present application can stagger the service packets and probe packets in time, reducing the contention for network bandwidth and eliminating the need for a separate control channel, resulting in a simple implementation.

[0233] It should be noted that the above scenarios are only used to illustrate the network data detection method provided by the embodiments of the present application and are not used to limit the application scenarios of the present application. It can be understood that the network data detection method provided by the present application can also be applied to other scenarios, such as on-demand video, file transfer, etc. The embodiments of the present application do not make any limitations in this regard.

[0234] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.

[0235] Based on the same inventive concept, an embodiment of the present application further provides a network data detection device for implementing the above-mentioned network data detection method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the network data detection device provided below can refer to the limitations on the network data detection method in the above text, and will not be repeated here.

[0236] In one embodiment, as Figure 15 shown, a network data detection device 1500 is provided, including: a monitoring module 1502, a detection module 1504, and an evaluation module 1506, where:

[0237] The monitoring module 1502 is used to monitor whether the sending end is in the application restricted stage.

[0238] The monitoring module 1502 is further configured to detect whether the current state of the sending end meets a preset detection condition when the sending end is in the application restricted stage;

[0239] The detection module 1504 is used to determine detection data when the current state meets the preset detection condition;

[0240] The detection module 1504 is further configured to send the detection data and receive the response data feedback for the detection data;

[0241] The evaluation module 1506 is used to determine network detection data according to the sending time of the sent detection data and the receiving time of the received response data. In some embodiments, the evaluation module 1506 is further configured to determine the first network delay according to the sending time of the sent detection data and the receiving time of the received response data; obtain the second network delay obtained by the evacuation method; and determine the target network delay according to the first network delay and the second network delay.

[0242] In some embodiments, the detection module 1504 is further configured to, when the duration for which the sending end is not in the application restricted phase reaches a first preset threshold, send detection data in an emptying manner to obtain a second network latency.

[0243] In some embodiments, the detection module 1504 is further configured to, when the duration since the last network detection in the emptying manner reaches a second preset threshold, send detection data in an emptying manner to obtain a second network latency.

[0244] In some embodiments, the evaluation module 1506 is further configured to determine a first weight and a second weight; and determine a target network latency according to the first network latency, the first weight, the second network latency, and the second weight.

[0245] In some embodiments, the evaluation module 1506 is further configured to determine a first sending frequency of sending detection data in the application restricted phase within a preset period; determine a second sending frequency of sending detection data in the emptying manner within the preset period; and determine the first weight and the second weight based on the first sending frequency and the second sending frequency.

[0246] In some embodiments, the monitoring module 1502 is further configured to obtain at least one of the transport layer parameters or the application layer parameters of the sending end; and determine that the sending end is in the application restricted phase when it is determined based on the obtained parameters that the sending queue of the sending end is empty and no new data is written to the application layer.

[0247] In some embodiments, the obtained parameters include transport layer parameters and application layer parameters, the application layer parameters include a first data length of the data written to the application layer, and the transport layer parameters include a second data length of the data already sent by the transport layer; the monitoring module 1502 is further configured to determine that the sending queue of the sending end is empty when the first data length is equal to the second data length.

[0248] In some embodiments, the monitoring module 1502 is further configured to determine that the sending queue of the sending end is empty when a third data length is less than the length of the sending window of the transport layer.

[0249] In some embodiments, the monitoring module 1502 is further configured to read the application restricted flag bit of the transport layer and determine whether the sending end is in the application restricted phase according to the application restricted flag bit.

[0250] In some embodiments, the detection module 1504 is further configured to, when the sending end is in the application-limited phase, determine that the current state of the sending end meets the preset detection condition if at least one of the following conditions is satisfied: the length of the available window at the sending end reaches a preset length; the number of packets sent by the sending end does not reach a preset packet number threshold; during the application-limited phase, the time duration since the last sending of detection data reaches a third preset threshold; the delay change rate within the application-limited phase reaches a delay change rate threshold.

[0251] In some embodiments, the detection module 1504 is further configured to, when the sending end is in the application-limited phase, obtain the network delay at the current moment and the network delay at the previous moment.

[0252] Based on the network delay at the current moment and the network delay at the previous moment, determine the delay change rate.

[0253] In some embodiments, the detection module 1504 is further configured to, when the current state meets the preset detection condition, detect the packet state of the service packets sent by the sending end; if it is determined based on the packet state that there are unacknowledged service packets in the sending end, determine detection data based on the unacknowledged service packets.

[0254] Each module in the above network data detection device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form, so as to facilitate the processor to call and execute the operations corresponding to the above respective modules.

[0255] In one embodiment, a computer device is provided. The computer device can be a server or a terminal, and its internal structure diagram can be as Figure 16 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store network detection data. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a network data detection method.

[0256] Those skilled in the art can understand that Figure 16 The structure shown in Figure 16 is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0257] In one embodiment, a computer device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0258] In one embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0259] In one embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0260] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.

[0261] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memories. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., without limitation. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., without limitation.

[0262] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope recorded in this specification.

[0263] The above-described embodiments only represent several implementation manners of the present application. Their descriptions are relatively specific and detailed, but they should not be construed as limiting the patent scope of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A method for detecting network data, characterized in that, The method comprises: Monitor whether the sender is in the application restricted stage; When the sending end is in the application restricted stage, detecting whether the current state of the sending end meets the preset detection condition; In the case where the current state satisfies a preset detection condition, determining detection data; Sending the detection data, and receiving response data fed back in response to the detection data; The network detection data is determined according to the sending time of the detection data and the receiving time of the response data.

2. The method according to claim 1, wherein The determining of the network detection data according to the sending time of sending the detection data and the receiving time of receiving the response data includes: Determine a first network delay according to a sending time of sending the detection data and a receiving time of receiving the response data; Obtain the second network delay obtained by draining; A target network delay is determined according to the first network delay and the second network delay.

3. The method according to claim 2, characterized in that The obtaining of the second network delay obtained by draining includes: When the duration during which the transmitting end is not in the application restricted stage reaches a first preset threshold, sending the detection data in a draining manner to obtain a second network delay; or When the time since the last network detection in the draining mode reaches a second preset threshold, detection data is sent in the draining mode to obtain a second network delay.

4. The method according to claim 2, characterized in that, The determining a target network delay according to the first network delay and the second network delay includes: determining a first weight and a second weight; A target network delay is determined according to the first network delay, the first weight, the second network delay, and the second weight.

5. The method according to claim 4, characterized in that The determining of the first weight and the second weight comprises: Determine a first sending frequency for sending detection data during the application restricted phase within a preset period; Determine a second sending frequency for sending detection data in an emptying manner within a preset period; A first weight and a second weight are determined based on the first sending frequency and the second sending frequency.

6. The method according to claim 1, wherein The monitoring of whether the sending end is in the application restricted stage includes: Acquire at least one of a transport layer parameter or an application layer parameter of the sending end; When it is determined based on the acquired parameters that the sending queue of the sending end is empty and no new data is written to the application layer, it is determined that the sending end is in the application restricted stage.

7. The method according to claim 6, wherein The acquired parameters include transport layer parameters and application layer parameters, the application layer parameters include a first data length of data written by the application layer, and the transport layer parameters include a second data length of data sent by the transport layer; The method further comprises: When the first data length is equal to the second data length, it is determined that the sending queue of the sending end is empty.

8. The method according to claim 6, wherein The acquired parameters include transport layer parameters, and the transport layer parameters include a third data length of the flight data; The method further comprises: When the third data length is smaller than the length of the sending window of the transport layer, it is determined that the sending queue of the sending end is empty.

9. The method according to claim 1, characterized in that The monitoring of whether the sending end is in the application restricted stage includes: An application restriction flag bit of the transport layer is read, and whether the sending end is in an application restriction stage is determined according to the application restriction flag bit.

10. The method according to claim 1, characterized in that, When the sending end is in the application-limited stage, detecting whether the current state of the sending end meets a preset detection condition includes: When the sending end is in the application-limited stage, if at least one of the following conditions is met, it is determined that the current state of the sending end meets the preset detection condition: The length of the available window of the sending end reaches a preset length; The number of packets sent by the sending end has not reached a preset packet number threshold; During the application-limited stage, the time duration since the last sending of detection data reaches a third preset threshold; The delay change rate within the application-limited stage reaches a delay change rate threshold.

11. The method according to claim 10, wherein The determining step of the delay change rate includes: When the sending end is in the application-limited stage, obtaining the network delay at the current moment and the network delay at the previous moment; Based on the network delay at the current moment and the network delay at the previous moment, determining the delay change rate.

12. The method according to claim 1, wherein When the current state meets the preset detection condition, determining detection data includes: When the current state meets the preset detection condition, detecting the packet state of the service packets sent by the sending end; If it is determined based on the packet state that there are unacknowledged service packets in the sending end, then based on the unacknowledged service packets, determining the detection data.

13. A network data detection device, characterized in that, The device includes: A monitoring module, configured to monitor whether the sending end is in the application-limited stage; The monitoring module is further configured to, when the sending end is in the application-limited stage, detect whether the current state of the sending end meets the preset detection condition; A detection module, configured to determine detection data when the current state meets the preset detection condition; The detection module is further configured to send the detection data and receive response data in response to the detection data; An evaluation module, configured to determine network detection data according to the sending time of the sent detection data and the receiving time of the received response data.

14. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method according to any one of claims 1 to 12.