CN113691882B - Method, device, equipment and storage medium for judging network condition - Google Patents
Method, device, equipment and storage medium for judging network condition Download PDFInfo
- Publication number
- CN113691882B CN113691882B CN202111028684.2A CN202111028684A CN113691882B CN 113691882 B CN113691882 B CN 113691882B CN 202111028684 A CN202111028684 A CN 202111028684A CN 113691882 B CN113691882 B CN 113691882B
- Authority
- CN
- China
- Prior art keywords
- time delay
- current
- minimum
- unidirectional
- unidirectional time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 56
- 230000005540 biological transmission Effects 0.000 claims description 51
- 230000004044 response Effects 0.000 claims description 37
- 238000005070 sampling Methods 0.000 claims description 14
- 238000004364 calculation method Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 6
- 230000008569 process Effects 0.000 claims description 2
- 238000004891 communication Methods 0.000 abstract description 8
- 230000008859 change Effects 0.000 description 12
- 230000001934 delay Effects 0.000 description 5
- 238000001514 detection method Methods 0.000 description 5
- 230000007246 mechanism Effects 0.000 description 4
- 238000012937 correction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 239000000463 material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 230000001627 detrimental effect Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000007774 longterm Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000011897 real-time detection Methods 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/647—Control signaling between network components and server or clients; Network processes for video distribution between server and clients, e.g. controlling the quality of the video stream, by dropping packets, protecting content from unauthorised alteration within the network, monitoring of network load, bridging between two different networks, e.g. between IP and wireless
- H04N21/64723—Monitoring of network processes or resources, e.g. monitoring of network load
- H04N21/64738—Monitoring network characteristics, e.g. bandwidth, congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8547—Content authoring involving timestamps for synchronizing content
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a method, a device, equipment and a storage medium for judging network conditions. Wherein the method comprises the steps of: acquiring the current unidirectional time delay and the minimum unidirectional time delay from the home terminal to the opposite terminal in the sending direction; calculating the difference between the current unidirectional time delay and the minimum unidirectional time delay; and obtaining the network condition in the sending direction from the home terminal to the opposite terminal according to the difference between the current unidirectional time delay and the minimum unidirectional time delay. According to the principle that the physical links through which data of two communication parties pass cannot be changed too much in a certain limited time, the present relative variable quantity of one-way time delay is used as one-way time delay jitter of the network, the obtained result is very sensitive, the network condition can be reflected rapidly, and the method has a reference value.
Description
Technical Field
The present invention relates to the field of network data transmission technologies, and in particular, to a method, an apparatus, a device, and a storage medium for determining a network condition.
Background
With the development of internet technology, the real-time or low-delay demands are continuously increased, and in order to ensure the transmission quality required by the demands, real-time detection is required to be performed on the network congestion condition of the forwarding link, so that the network congestion condition of the forwarding link can be found out in time, and corresponding processing is performed in time to reduce the service influence caused by poor transmission quality.
At present, for unidirectional delay jitter of a link, a special detection packet is generally sent, and the unidirectional delay value of the detection packet is used for judging, but in different networks, the unidirectional delay value is different based on physical reasons such as transmission materials, distance and the like, for example, optical fiber transmission is faster than coaxial cable, the unidirectional delay of satellite-to-ground transmission can reach 300ms and the like, and the jitter condition of the network cannot be accurately reflected by simply relying on the unidirectional delay value; in addition, the use of special probe packets consumes additional resources and latency, which are detrimental to network transmission.
Disclosure of Invention
The present invention is directed to a method, apparatus, device and storage medium for determining network conditions, which overcome at least one of the above-mentioned drawbacks of the prior art. The technical scheme adopted by the invention is as follows.
In a first aspect, the present invention provides a method for determining a network condition, comprising the steps of:
acquiring the current unidirectional time delay and the minimum unidirectional time delay from the home terminal to the opposite terminal in the sending direction;
calculating the difference between the current unidirectional time delay and the minimum unidirectional time delay;
And obtaining the network condition in the sending direction from the home terminal to the opposite terminal according to the difference between the current unidirectional time delay and the minimum unidirectional time delay.
In one embodiment, obtaining the current one-way delay comprises the steps of:
Transmitting a data packet to an opposite terminal, wherein the data packet comprises a local terminal transmitting time stamp T1;
receiving a response packet sent by the opposite terminal;
Wherein, the response packet includes: current one-way delay in the transmission direction;
the current one-way time delay is obtained according to the difference value between the sending time stamp T1 of the local terminal and the time stamp T2 of the opposite terminal receiving the data packet.
In one embodiment, the method for determining a network condition is used for determining an audio/video transmission network condition;
The data packet is an audio/video data packet;
the response packet is a response packet of the opposite terminal periodically or when a plurality of audio/video data packets are continuously received, the opposite terminal returns to the copy terminal.
In one embodiment, the current one-way delay is derived from the latest received audio/video data packet.
In one embodiment, obtaining the minimum one-way delay comprises the steps of:
Acquiring current one-way time delay and current minimum one-way time delay;
Comparing the current unidirectional time delay with the current minimum unidirectional time delay to obtain the minimum unidirectional time delay;
When the current unidirectional time delay is smaller than the current minimum unidirectional time delay, the current unidirectional time delay is used for replacing the current minimum unidirectional time delay to serve as the minimum unidirectional time delay.
In one embodiment, the method for determining a network condition is used for determining an audio/video transmission network condition;
The data packet is a video data packet;
The minimum one-way delay is the minimum current one-way delay in the last GOP period.
In one embodiment, when the duration of the transmission code rate reaching the set minimum transmission value exceeds a preset duration and the difference between the current unidirectional delay and the minimum unidirectional delay exceeds a preset threshold, the current unidirectional delay is used for replacing the current minimum unidirectional delay as the minimum unidirectional delay.
In a second aspect, the present invention provides a method for determining the condition of an audio/video transmission network, comprising the steps of:
the method comprises the steps that a sending end sends an audio/video data packet, wherein the audio/video data packet comprises a sending end sending time stamp T1;
The receiving end receives the audio/video data packet, takes out the timestamp T1, acquires the receiving timestamp T2 of the receiving end, and obtains the current one-way time delay in the transmitting direction according to the difference value of the timestamp T2 and the timestamp T1;
The receiving end replies a response packet of the transmitting end periodically or when continuously receiving a plurality of audio/video data packets, wherein the response packet comprises the current unidirectional time delay;
And the sending end receives the response packet sent by the receiving end, takes out the current one-way time delay, and judges the network condition in the sending direction according to the current one-way time delay.
In a third aspect, the present invention provides an apparatus for determining a network condition, comprising:
the acquisition module is used for acquiring the current unidirectional time delay from the home terminal to the opposite terminal in the sending direction and the minimum unidirectional time delay;
the calculation module is used for calculating the difference between the current unidirectional time delay and the minimum unidirectional time delay;
and the judging module is used for judging the network condition in the sending direction from the home terminal to the opposite terminal according to the difference between the current unidirectional time delay and the minimum unidirectional time delay.
In a fourth aspect, the present invention provides a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any of the above embodiments when executing the program.
In a fifth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program, characterized in that the program when executed by a processor implements the method of any of the above embodiments.
According to the principle that the physical links through which data of two communication parties pass cannot be changed too much within a certain limited time, and the main reason of network jitter time delay is the change generated by the crowding degree of network bandwidth, the present relative change amount of unidirectional time delay is used as the unidirectional time delay jitter of the network, so that the network condition is judged, the obtained result is very sensitive, the network condition can be reflected rapidly, and the method has a reference value.
Drawings
Fig. 1 is a schematic overall flow chart of the method of the first embodiment.
Fig. 2 is a schematic flow chart of one implementation of the first embodiment.
Fig. 3 is a schematic flow chart of another implementation of the first embodiment.
Fig. 4 is a flow chart of a method of the second embodiment.
Fig. 5 is a schematic structural view of the apparatus of the third embodiment.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that, the term "first\second\ … …" related to the embodiment of the present invention is merely to distinguish similar objects, and does not represent a specific order for the objects, it is to be understood that "first\second\ … …" may interchange a specific order or sequence where allowed. It is to be understood that the objects identified by the "first\second\ … …" are interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or otherwise described herein.
Example 1
Referring to fig. 1, fig. 1 is a flowchart of a method for determining a network condition according to an embodiment of the invention, where the method includes step S110, step S120 and step S130. It should be noted that, step S110, step S120 and step S130 are merely reference numerals for clearly explaining the correspondence between the embodiments and fig. 1, and do not represent the sequential limitation of the steps of the method for determining the network status in the present embodiment.
Step S110, the current unidirectional time delay and the minimum unidirectional time delay from the home terminal to the opposite terminal in the sending direction are obtained.
In general, the local end periodically transmits a data packet of a back display request message including self transmission time and a packet sequence number to the opposite end; and receiving a response packet of a reply message which is replied by the opposite terminal and comprises the content of the reply request message, and receiving the time of the reply message according to the content of the reply message. And calculating the difference between the time of periodically receiving the echo reply message and the time of sending the echo reply message in the content of the echo reply message to obtain a sending time slot difference SentTimeSlot. The current one-way delay can be obtained according to the transmission time slot difference SentTimeSlot. For example, the difference value of the sending time slot is used as the current unidirectional time delay, or is corrected according to a preset model, so as to obtain the final current unidirectional time delay in the sending direction.
Since the link is built, each sampling period (including the present sampling period) has a current unidirectional delay obtained by the respective sampling period, and the minimum value of all the current unidirectional delays is the minimum unidirectional delay. Of course, a certain period of time or a minimum value of the current unidirectional delay with the smallest period of time can be adopted as the minimum unidirectional delay.
Because in different networks, the values of the unidirectional delay are different based on physical reasons such as materials and distances of transmission, and the minimum unidirectional delay can be considered as the delay caused by the influence of the physical reasons only on the current link.
Step S120, the difference between the current one-way delay and the minimum one-way delay is calculated.
The difference between the current unidirectional delay and the minimum unidirectional delay is obtained through calculation, the difference can be regarded as the delay caused by skimming physical reasons in the current unidirectional delay, and the difference is used as a basic value for calculating the unidirectional delay jitter of the link in the sending direction from the home terminal to the opposite terminal.
Step S130, according to the difference between the current unidirectional time delay and the minimum unidirectional time delay, the network condition in the sending direction from the home terminal to the opposite terminal is obtained.
On the basis of the basic value obtained in step S120, the basic value is corrected by a test or an empirical value, for example, by multiplying the basic value by a correction coefficient, and then the unidirectional delay jitter of the link in the local end-to-peer transmission direction is obtained. Of course, the base value may be used directly as the unidirectional delay jitter of the link in the local-end-to-end transmission direction without correction. For example, the one-way delay jitter value of the link in the home-to-peer transmission direction is denoted by SentTimeSlot _jitter, sentTimeSlot _jitter= SentTimeSlot-SentTimeSlot _good, i.e., the difference between the current one-way delay and the minimum one-way delay is taken as the current jitter value. After obtaining the jitter value, the network status of the transmitting direction can be determined according to the SentTimeSlot _jitter.
It is known that the physical link through which the data of both communication parties pass is not changed too much within a certain finite time, so the propagation delay is constant. In this case, the main cause of network jitter is a change in the congestion level of the network bandwidth. Therefore, the unidirectional delay when the link is unobstructed and free of congestion can be taken as a reference, and the current unidirectional delay is considered to take more time than the reference unidirectional delay to be caused by network jitter. Therefore, the current one-way delay is compared with the reference one-way delay, and the difference value between the current one-way delay and the reference one-way delay is used as a base value of one-way delay jitter. However, in practice, the reference unidirectional delay is only an ideal state value, so that it is difficult to obtain the reference unidirectional delay, the minimum unidirectional delay in all sampling periods is used as the reference unidirectional delay, the reference unidirectional delay is approximately obtained, then the current unidirectional delay is compared with the minimum unidirectional delay, and then correction is performed, so that unidirectional delay jitter is obtained, and then the network condition is judged.
It should be noted here that the local end of the present invention refers generally to the sender and the opposite end refers generally to the receiver, in which case the method of the present invention is used on the sender. However, in a full duplex communication link, the receiver will also send data to the sender, so in this case, the method of the present invention may be used on both the sender and the receiver, where the sender is the sender and the receiver is the receiver.
According to the method, according to the principle that the physical links through which data of two communication parties pass cannot be changed too much within a certain limited time, the main reason of network jitter is the change generated by the crowding degree of network bandwidth, the current relative change amount of one-way time delay is used as the one-way time delay jitter of the network, so that the network condition is judged, the obtained result is very sensitive, the network condition can be reflected rapidly, and the method has a reference value.
In one embodiment, as shown in fig. 2, obtaining the current one-way delay includes: step S210 and step S220.
Step S210, a data packet is sent to the peer, where the data packet includes a local sending timestamp T1.
The home terminal sends data packets to the opposite terminal, and each time a data packet is sent, the packet carries a home terminal sending time stamp T1. The data packet with the local end sending time stamp T1 can identify the uniqueness of the data packet so as to avoid misjudgment of a response party on the data packet which arrives late continuously under the condition of network congestion.
Step S220, receiving a response packet sent by the opposite terminal;
Wherein, the response packet includes: current one-way delay in the transmission direction;
the current one-way time delay is obtained according to the difference value between the sending time stamp T1 of the local terminal and the time stamp T2 of the opposite terminal receiving the data packet.
After the opposite terminal receives the data packet, the timestamp T1 in the data packet is taken out, the timestamp T2 of the data packet received by the receiving terminal is obtained, and the transmission time slot difference SentTimeSlot in the transmission direction is obtained according to the difference between the timestamp T2 and the timestamp T1, namely SentTimeSlot =t2-T1. And obtaining the current one-way time delay according to the sending time slot difference SentTimeSlot. For example, the difference value of the sending time slot is used as the current unidirectional time delay, or is corrected according to a preset model, so as to obtain the final current unidirectional time delay in the sending direction.
It should be noted that, since the home terminal and the peer terminal do not use the same time stamp system, there is a possibility that the time stamp T2 is earlier than the time stamp T1, resulting in a negative value of the transmission time slot difference, but the transmission time slot difference is still smaller when the transmission time slot difference is shorter in size.
In one embodiment, the method for determining a network condition is used for determining an audio/video transmission network condition;
The data packet is an audio/video data packet;
the response packet is a response packet of the opposite terminal periodically or when a plurality of audio/video data packets are continuously received, the opposite terminal returns to the copy terminal.
In an audio/video transmission network, network congestion and packet loss often occur when the amount of audio/video data packets transmitted in a unit time is large, and the more the amount of audio/video data packets transmitted in the unit time is, the more frequent the detection of network congestion conditions is, and the more real-time the network congestion conditions can be detected. In addition, the audio/video data transmission itself has a response mechanism, so that the response mechanism can be fully utilized, a special detection packet is not needed, and additional resources and waiting time are not needed to be consumed.
At this time, the receiving end may set two types of opportunities for transmitting the response packet, one sends the response packet according to the set time period TimePeriod, and the other sends the response packet after continuously receiving N audio/video data packets, and one of the ways for transmitting the response packet may be selected by a person skilled in the art according to the actual situation. In addition, the receiving end can set the period duration TimePeriod or the value of N according to the actual situation to adjust the time for sending the response packet.
It should be noted that, in any of the above-described methods of transmitting the acknowledgement packet, since there is more than one received audio/video data packet, a plurality of transmission slot differences SentTimeSlot are actually generated in one acknowledgement period. In this case, the appropriate transmission time slot difference SentTimeSlot may be selected according to the actual situation, and the current one-way delay is obtained by processing, for example, sentTimeSlot obtained by the latest received audio/video data packet may be selected, or an average value of SentTimeSlot in a response period, or a highest/lowest SentTimeSlot value in a response period.
In one embodiment, the current one-way delay is derived from the latest received audio/video data packet.
As described above, a plurality of transmission time slot differences SentTimeSlot are generated in one response period, and since the SentTimeSlot value obtained by the latest received audio/video data packet has the strongest real-time property, the comparison can reflect the current minimum one-way delay, the previous one-way delay in the current response period is obtained according to the SentTimeSlot.
In one embodiment, as shown in fig. 3, the minimum one-way delay is obtained by the steps of: step S310 and step S320.
Step S310, obtaining the current unidirectional time delay and the current minimum unidirectional time delay.
The current one-way delay is obtained by the method described in the previous embodiment, or by other methods. The current minimum one-way time delay is obtained, and the current minimum one-way time delay refers to the minimum one-way time delay before the sampling period.
Step S320, comparing the current unidirectional time delay with the current minimum unidirectional time delay to obtain the minimum unidirectional time delay; when the current unidirectional time delay is smaller than the current minimum unidirectional time delay, the current unidirectional time delay is used for replacing the current minimum unidirectional time delay to serve as the minimum unidirectional time delay.
Since the current minimum unidirectional delay (SentTimeSlot _good) refers to the minimum unidirectional delay before the sampling period, it may happen that the current unidirectional delay of the sampling period is smaller than the current minimum unidirectional delay, so that the two are compared, and the smaller value of the two is used as the final minimum unidirectional delay, namely SentTimeSlot _good= SentTimeSlot _good > SentTimeSlotSentTimeSlot: sentTimeSlot _good, so as to obtain the minimum value of all unidirectional delays including the sampling period. The minimum unidirectional time delay obtained in the sampling period can be used for the next sampling period, and the next sampling period can continue to adopt the method of the embodiment to obtain the minimum unidirectional time delay of the sampling period.
In one embodiment, the method for determining a network condition is used for determining an audio/video transmission network condition;
The data packet is a video data packet;
The minimum one-way delay is the minimum current one-way delay in the last GOP period.
As described above, in the audio/video transmission network, the use of the audio/video data packet is simpler and has better effect. In this embodiment, a video packet is preferably used, and when the video packet is used, the smallest one of the current unidirectional delays received in the previous GOP period may be used as the smallest unidirectional delay in the current GOP period. Since the link state may change in each period of time in the same physical link, the current link state cannot be reflected by the historical minimum value, so that the update is necessary according to the recent minimum unidirectional delay, and the GOP is adopted as an update unit, and the minimum unidirectional delay of the GOP is updated by the minimum value in all the current unidirectional delays of the GOP.
Of course, for this use of the minimum unidirectional delay, the minimum unidirectional delay may be used throughout the GOP period, or as in the previous embodiment, the smaller of the current unidirectional delay and the minimum unidirectional delay may be used as the minimum unidirectional delay.
In one embodiment, when the duration of the transmission code rate reaching the set minimum transmission value exceeds a preset duration and the difference between the current unidirectional delay and the minimum unidirectional delay exceeds a preset threshold, the current unidirectional delay is used for replacing the current minimum unidirectional delay as the minimum unidirectional delay.
If the minimum one-way delay after the transmission code rate reaches the set minimum transmission threshold value for a period of time is still relatively large and the link is likely to be switched, the minimum one-way delay is updated to be the current one-way delay, so that long-term accumulation of data volume caused by low transmission code rate is avoided.
Example two
The method of the second embodiment corresponds to the method of the first embodiment, and specifically further includes a transmitting end and a receiving end. Referring to fig. 4, fig. 4 is a flowchart of a method for determining an audio/video transmission network status according to a second embodiment of the present invention, where the method includes steps S410, S420, S430 and S440. It should be noted that, step S410, step S420, step S430 and step S440 are only reference numerals for clearly explaining the correspondence between the embodiment and fig. 4, and do not represent the sequential limitation of the steps of the method for determining the audio/video transmission network status in the present embodiment.
Step S410, a transmitting end transmits an audio/video data packet, wherein the audio/video data packet comprises a transmitting end transmitting time stamp T1;
Step S420, the receiving end receives the audio/video data packet, takes out the timestamp T1, obtains the receiving timestamp T2 of the receiving end, and obtains the unidirectional time delay in the transmitting direction according to the difference value between the timestamp T2 and the timestamp T1;
Step S430, the receiving end replies a response packet of the sending end periodically or when continuously receiving a plurality of audio/video data packets, wherein the response packet comprises the unidirectional time delay;
step S440, the sender receives the response packet sent by the receiver, takes out the unidirectional time delay, and judges the network condition in the sender according to the unidirectional time delay.
According to the method, according to the principle that the physical links through which data of two communication parties pass cannot be changed too much within a certain limited time, the main reason of network jitter time delay is the change generated by the crowding degree of network bandwidth, the current relative change amount of unidirectional time delay is used as the unidirectional time delay of the network, so that the network condition is judged, the obtained result is very sensitive, the network condition can be reflected rapidly, and the method has a reference value. In addition, the audio/video data transmission itself has a response mechanism, so that the response mechanism can be fully utilized, a special detection packet is not needed, and additional resources and waiting time are not needed to be consumed.
Example III
Corresponding to the method of the first embodiment, as shown in fig. 5, the present invention further provides an apparatus 5 for determining a network condition, including: an acquisition module 510, a calculation module 520, and a determination module 530.
An obtaining module 510, configured to obtain a current unidirectional delay from a home terminal to an opposite terminal in a sending direction, and a minimum unidirectional delay;
a calculation module 520, configured to calculate a difference between the current one-way delay and the minimum one-way delay;
and the judging module 530 is configured to judge the network condition in the sending direction from the home terminal to the peer terminal according to the difference between the current unidirectional delay and the minimum unidirectional delay.
According to the principle that the physical links through which data of two communication parties pass cannot be changed too much within a certain limited time, the main reason of network jitter time delay is the change generated by the crowding degree of network bandwidth, the device takes the current relative change quantity of unidirectional time delay as the unidirectional time delay of the network, so that the network condition is judged, the obtained result is very sensitive, the network condition can be reflected rapidly, and the device has a reference value.
In one embodiment, the apparatus for determining a network condition further includes: a transmitting module and a receiving module.
The sending module is used for sending a data packet to the opposite terminal, wherein the data packet comprises a local terminal sending time stamp T1;
the receiving module is used for receiving the response packet sent by the opposite terminal;
Wherein, the response packet includes: current one-way delay in the transmission direction;
the current one-way time delay is obtained according to the difference value between the sending time stamp T1 of the local terminal and the time stamp T2 of the opposite terminal receiving the data packet.
In one embodiment, the device for judging network conditions is used for judging audio/video transmission network conditions;
The data packet is an audio/video data packet;
the response packet is a response packet of the opposite terminal periodically or when a plurality of audio/video data packets are continuously received, the opposite terminal returns to the copy terminal.
In one embodiment, the current one-way delay is derived from the latest received audio/video data packet.
In one embodiment, the apparatus for determining a network condition further includes: and a minimum time delay calculation module.
The minimum time delay calculation module is used for obtaining the minimum one-way time delay, wherein the process for obtaining the minimum one-way time delay comprises the following steps:
Acquiring current one-way time delay and current minimum one-way time delay;
Comparing the current unidirectional time delay with the current minimum unidirectional time delay to obtain the minimum unidirectional time delay;
When the current unidirectional time delay is smaller than the current minimum unidirectional time delay, the current unidirectional time delay is used for replacing the current minimum unidirectional time delay to serve as the minimum unidirectional time delay.
In one embodiment, the device for judging network conditions is used for judging audio/video transmission network conditions;
The data packet is a video data packet;
The minimum unidirectional delay is the minimum value in all current unidirectional delays acquired in the previous GOP period.
In one embodiment, when the duration of the transmission code rate reaching the set minimum transmission value exceeds a preset duration and the difference between the current unidirectional delay and the minimum unidirectional delay exceeds a preset threshold, the current unidirectional delay is used for replacing the current minimum unidirectional delay as the minimum unidirectional delay.
Example IV
The embodiment of the invention also provides a storage medium, on which computer instructions are stored, which when executed by a processor, implement the method for determining a network condition or the method for determining an audio/video transmission network condition of any of the above embodiments.
Those skilled in the art will appreciate that: all or part of the steps for implementing the above method embodiments may be implemented by hardware associated with program instructions, where the foregoing program may be stored in a computer readable storage medium, and when executed, the program performs steps including the above method embodiments; and the aforementioned storage medium includes: a mobile storage device, a random access Memory (RAM, random Access Memory), a Read-Only Memory (ROM), a magnetic disk or an optical disk, or the like, which can store program codes.
Or the above-described integrated units of the invention may be stored in a computer-readable storage medium if implemented in the form of software functional modules and sold or used as separate products. Based on such understanding, the technical solution of the embodiments of the present invention may be essentially or part contributing to the related art, and the computer software product may be stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device) to execute all or part of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program code, such as a removable storage device, RAM, ROM, magnetic or optical disk.
Corresponding to the above computer storage medium, in one embodiment, there is further provided a computer device, where the computer device includes a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor implements the method for determining a network condition or the method for determining an audio/video transmission network condition according to any one of the above embodiments when the processor executes the program.
According to the computer equipment, through the computer program running on the processor, according to the principle that the physical links through which data of two communication parties pass cannot be changed too much in a certain limited time, the main reason of network jitter time delay is the change generated by the congestion degree of network bandwidth, the current relative change amount of one-way time delay is used as the network one-way time delay jitter, so that the network condition is judged, the obtained result is very sensitive, the network condition can be reflected rapidly, and the computer equipment has a reference value.
The technical features of the above-described embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above-described embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
It is to be understood that the above examples of the present invention are provided by way of illustration only and not by way of limitation of the embodiments of the present invention. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. Any modification, equivalent replacement, improvement, etc. which come within the spirit and principles of the invention are desired to be protected by the following claims.
Claims (8)
1. A method for determining network conditions, comprising the steps of:
acquiring the current unidirectional time delay and the minimum unidirectional time delay from the home terminal to the opposite terminal in the sending direction;
calculating the difference between the current unidirectional time delay and the minimum unidirectional time delay;
obtaining the network condition in the sending direction from the home terminal to the opposite terminal according to the difference between the current unidirectional time delay and the minimum unidirectional time delay;
wherein obtaining the minimum one-way delay comprises the steps of:
acquiring current one-way time delay and current minimum one-way time delay; wherein, the current minimum unidirectional time delay refers to the minimum unidirectional time delay before the current sampling period;
Comparing the current unidirectional time delay with the current minimum unidirectional time delay to obtain the minimum unidirectional time delay;
When the current unidirectional time delay is smaller than the current minimum unidirectional time delay, the current unidirectional time delay is used for replacing the current minimum unidirectional time delay to serve as the minimum unidirectional time delay.
2. The method of determining network conditions of claim 1, wherein obtaining the current one-way delay comprises the steps of:
Transmitting a data packet to an opposite terminal, wherein the data packet comprises a local terminal transmitting time stamp T1;
receiving a response packet sent by the opposite terminal;
Wherein, the response packet includes: current one-way delay in the transmission direction;
the current one-way time delay is obtained according to the difference value between the sending time stamp T1 of the local terminal and the time stamp T2 of the opposite terminal receiving the data packet.
3. The method of determining network conditions according to claim 2, wherein,
The method for judging the network condition is used for judging the audio/video transmission network condition;
The data packet is an audio/video data packet;
the response packet is a response packet of the opposite terminal periodically or when a plurality of audio/video data packets are continuously received, the opposite terminal returns to the copy terminal.
4. A method of determining network conditions according to claim 3 wherein the current one-way delay is derived from the latest received audio/video data packets.
5. A method for determining network conditions, comprising the steps of:
acquiring the current unidirectional time delay and the minimum unidirectional time delay from the home terminal to the opposite terminal in the sending direction;
calculating the difference between the current unidirectional time delay and the minimum unidirectional time delay;
obtaining the network condition in the sending direction from the home terminal to the opposite terminal according to the difference between the current unidirectional time delay and the minimum unidirectional time delay;
The method for judging the network condition is used for judging the video transmission network condition;
The minimum unidirectional time delay is the minimum current unidirectional time delay in the previous GOP period;
When the time length of the sending code rate reaching the set minimum sending value exceeds the preset time length and the difference between the current unidirectional time delay and the minimum unidirectional time delay exceeds the preset threshold value, the current unidirectional time delay is used for replacing the current minimum unidirectional time delay to serve as the minimum unidirectional time delay.
6. An apparatus for determining a network condition, comprising:
the acquisition module is used for acquiring the current unidirectional time delay from the home terminal to the opposite terminal in the sending direction and the minimum unidirectional time delay;
the calculation module is used for calculating the difference between the current unidirectional time delay and the minimum unidirectional time delay;
The judging module is used for judging the network condition in the sending direction from the home terminal to the opposite terminal according to the difference between the current unidirectional time delay and the minimum unidirectional time delay;
The minimum time delay calculation module is used for obtaining the minimum one-way time delay, wherein the process for obtaining the minimum one-way time delay comprises the following steps:
acquiring current one-way time delay and current minimum one-way time delay; wherein, the current minimum unidirectional time delay refers to the minimum unidirectional time delay before the current sampling period;
Comparing the current unidirectional time delay with the current minimum unidirectional time delay to obtain the minimum unidirectional time delay;
When the current unidirectional time delay is smaller than the current minimum unidirectional time delay, the current unidirectional time delay is used for replacing the current minimum unidirectional time delay to serve as the minimum unidirectional time delay.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1-5 when the program is executed by the processor.
8. A computer readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the method according to any of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111028684.2A CN113691882B (en) | 2021-09-02 | 2021-09-02 | Method, device, equipment and storage medium for judging network condition |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111028684.2A CN113691882B (en) | 2021-09-02 | 2021-09-02 | Method, device, equipment and storage medium for judging network condition |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113691882A CN113691882A (en) | 2021-11-23 |
CN113691882B true CN113691882B (en) | 2024-04-26 |
Family
ID=78585140
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111028684.2A Active CN113691882B (en) | 2021-09-02 | 2021-09-02 | Method, device, equipment and storage medium for judging network condition |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113691882B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005268979A (en) * | 2004-03-17 | 2005-09-29 | Nippon Telegr & Teleph Corp <Ntt> | Convergence control method based on one-way delay time, system, device and method for communication program, and recording medium |
CN101272290A (en) * | 2008-05-12 | 2008-09-24 | 中国电信股份有限公司 | Measuring method, measuring apparatus and forwarding device for route congestion state in IP network |
CN102231898A (en) * | 2011-07-05 | 2011-11-02 | 深圳市融创天下科技股份有限公司 | Network bandwidth self-adaptive QOS (quality of service) transmission method and system and terminal device |
KR20150142350A (en) * | 2014-06-11 | 2015-12-22 | (주)티아이스퀘어 | Method for Measuring Variation of Transmission Delay Time of Network for Rate Adaptation and Realtime Video Service System Using the Same |
CN105230067A (en) * | 2013-05-20 | 2016-01-06 | 瑞典爱立信有限公司 | Congestion control in communication network |
CN105407411A (en) * | 2015-10-21 | 2016-03-16 | 广州市百果园网络科技有限公司 | Data sending method and data sending device |
WO2017000719A1 (en) * | 2015-06-30 | 2017-01-05 | 中兴通讯股份有限公司 | Congestion control method and device based on queue delay |
CN108234224A (en) * | 2016-12-13 | 2018-06-29 | 腾讯科技(深圳)有限公司 | The detection method and device of available bandwidth |
CN110191060A (en) * | 2018-02-22 | 2019-08-30 | 中兴通讯股份有限公司 | A kind of adjustment data packet sends method, apparatus, equipment and the system of code rate |
WO2020134559A1 (en) * | 2018-12-29 | 2020-07-02 | 北京达佳互联信息技术有限公司 | Data transmission method and apparatus, terminal device, and storage medium |
CN111683393A (en) * | 2020-05-25 | 2020-09-18 | 华中科技大学 | Adaptive congestion control method for dynamically adjusting gain coefficient |
CN111935441A (en) * | 2020-07-30 | 2020-11-13 | 北京佳讯飞鸿电气股份有限公司 | Network state detection method and device |
CN112702230A (en) * | 2020-12-21 | 2021-04-23 | 厦门亿联网络技术股份有限公司 | Network congestion detection method, system, terminal device and readable storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP3769544B2 (en) * | 2003-01-31 | 2006-04-26 | 富士通株式会社 | Transmission band control device |
US8553540B2 (en) * | 2010-03-05 | 2013-10-08 | Microsoft Corporation | Congestion control for delay sensitive applications |
-
2021
- 2021-09-02 CN CN202111028684.2A patent/CN113691882B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2005268979A (en) * | 2004-03-17 | 2005-09-29 | Nippon Telegr & Teleph Corp <Ntt> | Convergence control method based on one-way delay time, system, device and method for communication program, and recording medium |
CN101272290A (en) * | 2008-05-12 | 2008-09-24 | 中国电信股份有限公司 | Measuring method, measuring apparatus and forwarding device for route congestion state in IP network |
CN102231898A (en) * | 2011-07-05 | 2011-11-02 | 深圳市融创天下科技股份有限公司 | Network bandwidth self-adaptive QOS (quality of service) transmission method and system and terminal device |
CN105230067A (en) * | 2013-05-20 | 2016-01-06 | 瑞典爱立信有限公司 | Congestion control in communication network |
KR20150142350A (en) * | 2014-06-11 | 2015-12-22 | (주)티아이스퀘어 | Method for Measuring Variation of Transmission Delay Time of Network for Rate Adaptation and Realtime Video Service System Using the Same |
WO2017000719A1 (en) * | 2015-06-30 | 2017-01-05 | 中兴通讯股份有限公司 | Congestion control method and device based on queue delay |
CN105407411A (en) * | 2015-10-21 | 2016-03-16 | 广州市百果园网络科技有限公司 | Data sending method and data sending device |
CN108234224A (en) * | 2016-12-13 | 2018-06-29 | 腾讯科技(深圳)有限公司 | The detection method and device of available bandwidth |
CN110191060A (en) * | 2018-02-22 | 2019-08-30 | 中兴通讯股份有限公司 | A kind of adjustment data packet sends method, apparatus, equipment and the system of code rate |
WO2020134559A1 (en) * | 2018-12-29 | 2020-07-02 | 北京达佳互联信息技术有限公司 | Data transmission method and apparatus, terminal device, and storage medium |
CN111683393A (en) * | 2020-05-25 | 2020-09-18 | 华中科技大学 | Adaptive congestion control method for dynamically adjusting gain coefficient |
CN111935441A (en) * | 2020-07-30 | 2020-11-13 | 北京佳讯飞鸿电气股份有限公司 | Network state detection method and device |
CN112702230A (en) * | 2020-12-21 | 2021-04-23 | 厦门亿联网络技术股份有限公司 | Network congestion detection method, system, terminal device and readable storage medium |
Non-Patent Citations (1)
Title |
---|
3G网络下视频传输自适应控制的研究;李盼;李月强;汪卫章;;电子设计工程(20);全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN113691882A (en) | 2021-11-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113472606B (en) | Heartbeat overtime detection method, server and electronic equipment | |
CN109787868B (en) | Method, system and server for selecting routing path | |
CN107171969B (en) | Data transmission method, device and system | |
CN102932278B (en) | Estimate the method and apparatus of wireless handheld devices queue length in the wireless network | |
US9781474B2 (en) | Content playback information estimation apparatus and method and program | |
CN109309934A (en) | A kind of jamming control method and relevant device | |
US7516238B2 (en) | Background transport service | |
CN112671718B (en) | Switching method of return source link, server and storage medium | |
CN110312150B (en) | Video frame transmission method, system and server | |
CN102035692A (en) | Method and device for detecting quality of link | |
CN112737897B (en) | Link monitoring and scheduling method, device, equipment and storage medium | |
CN103428037A (en) | User online detecting method, device and system | |
CN103312469B (en) | Confirmation in multicast retransmission represents system of selection and device | |
CN113783660B (en) | Transmission method, transmitting terminal and receiving terminal | |
WO2008078218A2 (en) | Methods for providing feedback in messaging systems | |
CN113691882B (en) | Method, device, equipment and storage medium for judging network condition | |
US20140200041A1 (en) | Evaluation of overall performance of interactive application service | |
CN112087349A (en) | Method, device and system for acquiring retransmission timeout value | |
CN114422079B (en) | Data transmission method and device, computer equipment and storage medium | |
CN107547620B (en) | Response time obtaining method and device | |
US10003470B2 (en) | Method and terminal for transmitting and receiving data | |
JP2010206608A (en) | Transmission apparatus, transmission rate calculation method and transmission rate calculation program | |
CN109905327B (en) | Wireless network data transmission method, sending end and receiving end | |
CN116366499B (en) | Data transmission method, device, electronic equipment and medium | |
US20160323167A1 (en) | Minimum delay value calculating device, information transmitting device, minimum delay value calculating method, and program storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |