CN111682975A - Network state prediction method and device, electronic equipment and storage medium - Google Patents

Network state prediction method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111682975A
CN111682975A CN202010334760.1A CN202010334760A CN111682975A CN 111682975 A CN111682975 A CN 111682975A CN 202010334760 A CN202010334760 A CN 202010334760A CN 111682975 A CN111682975 A CN 111682975A
Authority
CN
China
Prior art keywords
network
value
data packet
current
current data
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.)
Granted
Application number
CN202010334760.1A
Other languages
Chinese (zh)
Other versions
CN111682975B (en
Inventor
吕亚亚
李云鹏
谢文龙
王艳辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Visionvera Information Technology Co Ltd
Original Assignee
Visionvera Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Visionvera Information Technology Co Ltd filed Critical Visionvera Information Technology Co Ltd
Priority to CN202010334760.1A priority Critical patent/CN111682975B/en
Publication of CN111682975A publication Critical patent/CN111682975A/en
Application granted granted Critical
Publication of CN111682975B publication Critical patent/CN111682975B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/147Network analysis or design for predicting network behaviour
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/25Flow control; Congestion control with rate being modified by the source upon detecting a change of network conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention provides a network state prediction method, a network state prediction device, electronic equipment and a storage medium. The method comprises the following steps: when a current data packet sent by a sending end is received, determining the network time consumption of the current data packet; calculating an average value and a discrete value of network time consumption of the received historical data packet within a preset time length before the current data packet is received, and calculating a weighted value of the average value and the discrete value; and comparing the network consumed time of the current data packet with the weighted value, and determining the current network state according to the comparison result. The invention can more accurately determine the current network state.

Description

Network state prediction method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for predicting a network state, an electronic device, and a storage medium.
Background
With the rapid development of network technology, various network services such as video conference, video monitoring, video telephone, etc. are emerging. In network traffic, a large number of data packets, such as audio data packets, video data packets, etc., are transmitted.
In the transmission process of the data packet, the network state has a large influence on the transmission of the data packet. For example, if the network is in a congested state, the network transmission delay may be increased, the packet loss phenomenon may be serious, and even the network may be broken down. Therefore, how to accurately predict the network state is particularly important for improving the overall network performance.
Disclosure of Invention
In view of the above problems, embodiments of the present invention are proposed to provide a network status prediction method, apparatus, electronic device and storage medium that overcome or at least partially solve the above problems.
In a first aspect, an embodiment of the present invention discloses a method for predicting a network state, where the method includes:
when a current data packet sent by a sending end is received, determining the network time consumption of the current data packet;
calculating an average value and a discrete value of network time consumption of the received historical data packet within a preset time length before the current data packet is received, and calculating a weighted value of the average value and the discrete value;
and comparing the network consumed time of the current data packet with the weighted value, and determining the current network state according to the comparison result.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; comparing the network consumed time of the current data packet with the weighted value, and determining the current network state according to the comparison result, wherein the method comprises the following steps: when the network consumed time of the current data packet is less than the first weighted value, determining that the current network state is a smooth state; when the network consumption time of the current data packet is greater than or equal to the first weighted value and less than or equal to the second weighted value, determining that the current network state is a normal state; and when the network consumed time of the current data packet is greater than the second weighted value, determining that the current network state is a congestion state.
Optionally, the network state comprises a clear state, a normal state and a congested state; after determining the current network state according to the comparison result, the method further comprises the following steps: when the current network state is a smooth state, informing the sending end to improve the sending rate; and when the current network state is the congestion state, the sending end is informed to reduce the sending rate.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the notifying the sending end to increase the sending rate includes: calculating a first lower limit sending rate according to a first difference value obtained by subtracting the network consumed time of the current data packet from the first weighted value, calculating a first upper limit sending rate according to a second difference value obtained by subtracting the network consumed time of the current data packet from the second weighted value, and informing the sending end of increasing the sending rate according to the first lower limit sending rate and the first upper limit sending rate; or, obtaining the packet loss rate within the preset time length, and informing the sending end to improve the sending rate according to the packet loss rate.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the notifying the sending end to reduce the sending rate includes: calculating a second lower limit sending rate according to a third difference obtained by subtracting the first weighted value from the network consumed time of the current data packet, calculating a second upper limit sending rate according to a fourth difference obtained by subtracting the second weighted value from the network consumed time of the current data packet, and informing the sending end to reduce the sending rate according to the second lower limit sending rate and the second upper limit sending rate; or, obtaining the packet loss rate within the preset time length, and informing the sending end to reduce the sending rate according to the packet loss rate.
Optionally, the discrete value is a standard deviation or a variance.
In a second aspect, an embodiment of the present invention discloses a network status prediction apparatus, where the apparatus includes:
the determining module is used for determining the network time consumption of the current data packet when the current data packet sent by the sending end is received;
the calculation module is used for calculating an average value and a discrete value of the network time consumption of the received historical data packet within a preset time length before the current data packet is received, and calculating a weighted value of the average value and the discrete value;
and the comparison module is used for comparing the network consumed time of the current data packet with the weighted value and determining the current network state according to the comparison result.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the comparison module comprises: a first determining unit, configured to determine that a current network status is a clear status when the network consumption of the current data packet is less than the first weighted value; a second determining unit, configured to determine that the current network state is a normal state when the network consumption time of the current data packet is greater than or equal to the first weighted value and less than or equal to the second weighted value; and a third determining unit, configured to determine that the current network status is a congestion status when the network consumption of the current data packet is greater than the second weighted value.
Optionally, the network state comprises a clear state, a normal state and a congested state; the device further comprises: the first notification module is used for notifying the sending end to improve the sending rate when the current network state is a smooth state; and the second notification module is used for notifying the sending end to reduce the sending rate when the current network state is the congestion state.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the first notifying module is specifically configured to calculate a first lower limit sending rate according to a first difference obtained by subtracting the network consumed time of the current data packet from the first weighted value, calculate a first upper limit sending rate according to a second difference obtained by subtracting the network consumed time of the current data packet from the second weighted value, and notify the sending end of increasing the sending rate according to the first lower limit sending rate and the first upper limit sending rate; or, obtaining the packet loss rate within the preset time length, and informing the sending end to improve the sending rate according to the packet loss rate.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the second notification module is specifically configured to calculate a second lower-limit sending rate according to a third difference obtained by subtracting the first weighted value from the network consumed time of the current data packet, calculate a second upper-limit sending rate according to a fourth difference obtained by subtracting the second weighted value from the network consumed time of the current data packet, and notify the sending end to reduce the sending rate according to the second lower-limit sending rate and the second upper-limit sending rate; or, obtaining the packet loss rate within the preset time length, and informing the sending end to reduce the sending rate according to the packet loss rate.
Optionally, the discrete value is a standard deviation or a variance.
In a third aspect, an embodiment of the present invention discloses an electronic device, including: one or more processors; and one or more machine-readable media having instructions stored thereon; the instructions, when executed by the one or more processors, cause the processors to perform a network state prediction method as any one of above.
In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the network state prediction method as described in any one of the above.
In the embodiment of the invention, when a receiving end receives a current data packet sent by a sending end, the network time consumption of the current data packet is determined; calculating an average value and a discrete value of network time consumption of the received historical data packet within a preset time length before the current data packet is received, and calculating a weighted value of the average value and the discrete value; and comparing the network consumed time of the current data packet with the weighted value, and determining the current network state according to the comparison result. Therefore, the average value in the embodiment of the invention represents the average network time consumption of the historical data packets, and the average value takes the interference factors in the respective transmission processes of the historical data packets into consideration. The discrete value represents the discrete degree of the network time consumption of the historical data packet, and the discrete value takes the change situation of the network state into consideration. Therefore, the weighted value of the average value and the discrete value is used as a judgment basis, and the current network state can be more accurately determined. If only the discrete value is used as a judgment basis, on one hand, a threshold value for comparing with the discrete value needs to be preset, and the threshold value is an empirical value, so that the accuracy of judgment depends heavily on the empirical value; on the other hand, the discrete value can only represent the discrete degree of the network time consumption, and does not consider the interference factor in the transmission process, so the accuracy of the judgment is poor.
Drawings
Fig. 1 is a flowchart illustrating steps of a network status prediction method according to a first embodiment of the present invention.
Fig. 2 is a flowchart illustrating steps of a network status prediction method according to a second embodiment of the present invention.
Fig. 3 is a schematic diagram of calculating an average value and a discrete value according to a second embodiment of the present invention.
Fig. 4 is a block diagram of a network status prediction apparatus according to a third embodiment of the present invention.
Fig. 5 is a block diagram of a network status prediction apparatus according to a fourth embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in further detail below.
The network state prediction method in the embodiment of the invention relates to a process of transmitting data packets between a transmitting end and a receiving end. In the process of data packet transmission, any party of communication can be used as a sending end and a receiving end. The sending end and the receiving end can be devices with network communication functions, such as a smart phone, a tablet computer, a notebook computer, a video networking terminal (such as a set top box) and the like. The data packets transmitted between the sending end and the receiving end can be audio data packets, video data packets and the like. Next, the network state prediction method will be described in detail with reference to the following embodiments.
Example one
Referring to fig. 1, a flowchart illustrating steps of a network status prediction method according to a first embodiment of the present invention is shown. The network state prediction method of the embodiment of the invention can be applied to a receiving end.
The network state prediction method of the embodiment of the invention can comprise the following steps:
step 101, when a receiving end receives a current data packet sent by a sending end, determining the network time consumption of the current data packet.
And the sending end packages the data to be sent to the receiving end into a data packet and then sends the data packet to the receiving end. After receiving a data packet, the receiving end can mark the receiving time of the data packet, determine the network time consumption of the data packet, and store the receiving time and the network time consumption of the data packet.
And 102, the receiving end calculates the average value and the discrete value of the network consumed time of the received historical data packet within the preset time before the current data packet is received, and calculates the weighted value of the average value and the discrete value.
After receiving a current data packet sent by a sending end, a receiving end determines historical data packets received within a preset time before the current data packet is received according to the stored receiving time of each data packet, and calculates an average value and a discrete value of network time consumption of each historical data packet according to the stored network time consumption of each historical data packet received within the preset time. The receiving end calculates the weighted value of the average value and the discrete value, and the weighted value is used as the basis for subsequently determining the network state. The discrete value may be a standard deviation or a variance.
Step 103, the receiving end compares the network consumed time of the current data packet with the weighted value, and determines the current network state according to the comparison result.
The receiving end compares the network consumed time of the current data packet with the weighted value obtained by the calculation, and determines the current network state according to the comparison result. For the specific comparison process, it will be explained in detail in the following examples.
The average value in the embodiment of the invention represents the average network time consumption of the historical data packets, and the average value takes the interference factors in the respective transmission process of the historical data packets into consideration. The discrete value represents the discrete degree of the network time consumption of the historical data packet, and the discrete value takes the change situation of the network state into consideration. Therefore, the weighted value of the average value and the discrete value is used as a judgment basis, and the current network state can be more accurately determined. If only the discrete value is used as a judgment basis, on one hand, a threshold value for comparing with the discrete value needs to be preset, and the threshold value is an empirical value, so that the accuracy of judgment depends heavily on the empirical value; on the other hand, the discrete value can only represent the discrete degree of the network time consumption, and does not consider the interference factor in the transmission process, so the accuracy of the judgment is poor.
Example two
Referring to fig. 2, a flowchart illustrating steps of a network status prediction method according to a second embodiment of the present invention is shown. The network state prediction method of the embodiment of the invention can be applied to a receiving end.
The network state prediction method of the embodiment of the invention can comprise the following steps:
in step 201, the receiving end receives a data packet.
In the embodiment of the invention, the sending end has a timing function, and when the sending end sends one data packet, the sending time of the sent data packet can be obtained according to the system clock of the sending end through the timing function, and the sent data packet carries the sending time and is sent to the receiving end.
Step 202, the receiving end parses the data packet.
And after receiving one data packet, the receiving end analyzes the received data packet to obtain the sending time of the received data packet. In the embodiment of the invention, the receiving end has a timing function, and the receiving time of the received data packet can be obtained according to the system clock of the receiving end through the timing function after the receiving end receives one data packet.
In step 203, the receiving end calculates the network time consumption of the data packet.
And after receiving one data packet, the receiving end calculates the network time consumption of the received data packet. For example, the receiving end may calculate the receiving time of the received data packet, subtract the sending time of the received data packet to obtain a time difference value, and use the time difference value as the network time consumption of the received data packet.
Step 204, the receiving end stores the time.
And the receiving end stores the receiving time and the network time consumption of each received data packet.
In step 205, the receiving end determines the network status. When the network status is a clear status, executing step 206; when the network status is the congestion status, step 207 is executed. When the network state is a normal state, the sending speed of the sending end does not need to be adjusted.
After receiving the current data packet sent by the sending end, the receiving end calculates to obtain the network time consumption of the current data packet through the step 203.
The receiving end determines the historical data packets received within the preset time period before receiving the current data packet according to the receiving time of each received data packet stored in the step 204. And according to the network consumed time of each received data packet stored in the step 204, obtaining the network consumed time of each historical data packet received within the preset time before the current data packet is received. And calculating the average value and the discrete value of the network time consumption of each historical data packet received in the preset time length.
For the average value of the network consumed time of each historical data packet received within the preset time length, the sum of the network consumed time of each historical data packet received within the preset time length can be calculated, the total number of the historical data packets received within the preset time length is calculated, then the ratio obtained by dividing the sum by the total number is calculated, and the ratio is used as the average value of the network consumed time of the historical data packets received within the preset time length. For example, the total number of the historical data packets received in the preset time period is N, and the preset time period is inscribed thereinThe network time consumption of each received historical data packet is M1,M2,M3,……,MnIf the average value of the network time consumption of each historical data packet received within the preset time length is a, a is (M)1+M2+M3+……+Mn)/N。
The discrete value may be a standard deviation or a variance.
In probability theory and statistics, the variance of a random variable describes its degree of dispersion, i.e., the distance of the variable from its expected value. Variance is the mean of the sum of squared deviations of the individual data from their arithmetic mean. The variance of the network consumption time of each historical data packet received within the preset time period may be an average of a square value of a difference between the network consumption time of each historical data packet received within the preset time period and the average. For example, the total number of the historical data packets received within the preset time period is N, and the network time consumption of each historical data packet received within the preset time period is M1,M2,M3,……,MnIf the average value of the network time consumption of each historical data packet received within the preset time length is a, and the variance of the network time consumption of each historical data packet received within the preset time length is B, then B ═ M1-a)2+(M2-a)2+(M3-a)2+……+(Mn-a)2]/N。
In probability theory and statistics, the standard deviation is taken as a measure of the degree of statistical distribution. For example, in the physical sciences, when repetitive measurements are made, the standard deviation of a collection of measurement values represents the accuracy of the measurements. When determining whether the measured value meets the predicted value, the standard deviation of the measured value plays a decisive role: if the measured average value is too far from the predicted value (and compared with the standard deviation value), the measured value and the predicted value are considered to be contradictory. The standard deviation definition is the square root of the arithmetic mean of the standard values of the units in the population squared with their mean, i.e., the standard deviation is defined as the square root of the variance. The standard deviation can indicate the degree of dispersion more accurately than the variance. Receive within the preset time lengthThe standard deviation of the network elapsed time of each historical data packet may be a square root of a variance of the network elapsed time of each historical data packet received within the preset time period. For example, if the standard deviation of the network elapsed time of each historical data packet received within the preset time duration is b according to the above variance example, then
Figure BDA0002466187400000081
The receiving end continues to calculate the weighted values of the average value and the discrete value. In an alternative embodiment, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value. Optionally, the weight of the average value in the first weight value is the same as the weight of the average value in the second weight value, and the weight of the discrete value in the first weight value is less than the weight of the discrete value in the second weight value. For example, the average value may be weighted by 1 in the first weight and the average value may be weighted by 1 in the second weight. The weight of the discrete value in the first weight value may be 1, and the weight of the discrete value in the second weight value may be 2; or the weight of a discrete value in the first weight value may be 1, the weight of a discrete value in the second weight value may be 3, and so on. For example, if the average value is a and the discrete value is a standard deviation b, the first weighting value may be a + b, and the second weighting value may be a +2 b; alternatively, the first weighting value may be a + b, the second weighting value may be a +3b, and so on. The related setting may be specifically performed according to an actual situation, and the embodiment of the present invention is not limited to this.
The receiving end compares the network consumed time of the current data packet with the weighted value, and determines the current network state according to the comparison result. In an optional embodiment, when the network consumption time of the current data packet is less than the first weighted value, determining that the current network state is a clear state; when the network consumption time of the current data packet is greater than or equal to the first weighted value and less than or equal to the second weighted value, determining that the current network state is a normal state; and when the network consumed time of the current data packet is greater than the second weighted value, determining that the current network state is a congestion state. For example, if the network consumption of the current data packet is c, the first weighted value is a + b, and the second weighted value is a +2b, when c is less than a + b, the current network state is determined to be a clear state; when a + b is more than or equal to c and less than or equal to a +2b, determining that the current network state is a normal state; when c > a + b, the current network state is determined to be a congestion state.
For example, the network time consumption of the data packets received in the preset time period is 73, 72, 71, 69, 68, and 67 milliseconds, respectively, and the standard deviation of the network time consumption of the group is calculated to be 2.16, and the average value is 70. Fig. 3 is a schematic diagram of calculating an average value and a discrete value according to a second embodiment of the present invention. As shown in fig. 3, the network time consumption of the received data packets within the preset time duration is input, each network time consumption is divided by a comma, and the total group number, the average number, the total standard deviation (i.e., the standard deviation), and the variance of the total standard deviation (i.e., the variance) can be obtained through calculation. If the network time consumption of the current data packet is 65, 65<70+2.16, which indicates that the current network is in a smooth state; if the network time consumption of the current data packet is 75, 75>70+2 x 2.16, which indicates that the current network is in a congestion state; if the network time consumption of the current data packet is 73, 70+2.16<73<70+2 x 2.16, which indicates that the current network is in a normal state.
In step 206, the receiving end notifies the transmitting end to increase the transmission rate.
When the receiving end determines that the current network state is a smooth state, the receiving end can also inform the sending end to improve the sending rate.
In an optional implementation manner, the receiving end may calculate a first lower limit sending rate and a first upper limit sending rate according to the network consumed time of the current data packet, the first weighted value, and the second weighted value, and notify the sending end to increase the sending rate according to the first lower limit sending rate and the first upper limit sending rate. After receiving the notification, the sending end learns the first lower limit sending rate and the first upper limit sending rate, and can increase the current sending rate to any rate between the first lower limit sending rate and the first upper limit sending rate (including the first lower limit sending rate and the first upper limit sending rate) according to the actual situation.
In implementation, the sending end calculates a first difference value obtained by subtracting the network consumption time of the current data packet from the first weighted value, and calculates a first lower limit sending rate according to the first difference value. For example, a fifth difference obtained by subtracting the first difference from the network consumption time of the current data packet may be calculated, and then a first ratio obtained by dividing the data amount of the current data packet by the fifth difference is calculated, and the first ratio is used as the first lower limit sending rate. For example, if the number of current packets is m, the network time consumption of the current packet is c, the first weight value is a + b, and the first lower limit sending rate is v1, then v1 is m/[ c- (a + b-c) ].
And the sending end calculates a second difference value obtained by subtracting the network consumed time of the current data packet from the second weighted value, and calculates a first upper limit sending rate according to the second difference value. For example, a sixth difference value obtained by subtracting the second difference value from the network consumption time of the current data packet may be calculated, and then a second ratio obtained by dividing the data amount of the current data packet by the sixth difference value is calculated, and the second ratio is used as the first upper limit sending rate. For example, if the number of current packets is m, the network time consumption of the current packet is c, the second weight value is a +2b, and the first upper limit sending rate is v2, then v2 is m/[ c- (a +2b-c) ].
In an optional implementation manner, the receiving end may obtain the packet loss rate within the preset time duration, and notify the sending end to increase the sending rate according to the packet loss rate. After receiving the notification, the sending end learns the packet loss rate, and can increase the current sending rate by any percentage within the packet loss rate (including the packet loss rate) according to the actual situation.
In implementation, the sending end may calculate the packet loss rate within the preset time length according to the number of the data packets sent by the sending end within the preset time length and the number of the data packets received by the receiving end within the preset time length. For example, the number of data packets sent by the sending end in the preset time duration is calculated, a number difference obtained by subtracting the number of data packets received by the receiving end in the preset time duration is obtained, then a ratio obtained by dividing the number difference by the number of data packets sent by the sending end in the preset time duration is calculated, and the ratio is used as the packet loss ratio.
In step 207, the receiving end notifies the transmitting end to reduce the transmission rate.
When the receiving end determines that the current network state is the congestion state, the receiving end can also inform the sending end to reduce the sending rate.
In an optional implementation manner, the receiving end may calculate a second lower limit sending rate and a second upper limit sending rate according to the network consumed time of the current data packet, the first weighted value, and the second weighted value, and notify the sending end to reduce the sending rate according to the second lower limit sending rate and the second upper limit sending rate. After receiving the notification, the sending end learns a second lower sending rate and the second upper sending rate, and can reduce the current sending rate to any rate between the second lower sending rate and the second upper sending rate (including the second lower sending rate and the second upper sending rate) according to the actual situation.
In the implementation, the sending end calculates a third difference value obtained by subtracting the first weighted value from the network consumption time of the current data packet, and calculates a second lower limit sending rate according to the third difference value. For example, a first sum obtained by adding the third difference to the network consumption time of the current packet may be calculated, a third ratio obtained by dividing the data amount of the current packet by the first sum may be calculated, and the third ratio may be used as the second lower limit sending rate. For example, if the number of current packets is m, the network time consumption of the current packet is c, the first weight value is a + b, and the second lower-limit sending rate is v3, then v3 is m/[ c + c- (a + b) ].
And the sending end calculates a fourth difference value obtained by subtracting the second weighted value from the network consumed time of the current data packet, and calculates a second upper limit sending rate according to the fourth difference value. For example, a second sum obtained by adding the fourth difference to the network consumption time of the current data packet may be calculated, a fourth ratio obtained by dividing the data amount of the current data packet by the second sum may be calculated, and the fourth ratio may be used as the second upper limit sending rate. For example, if the number of current packets is m, the network time consumption of the current packet is c, the second weight value is a +2b, and the second upper limit sending rate is v4, then v4 is m/[ c + c- (a +2b) ].
In an optional implementation manner, the receiving end may obtain the packet loss rate within the preset time duration, and notify the sending end to reduce the sending rate according to the packet loss rate. After receiving the notification, the sending end learns the packet loss rate, and can reduce the current sending rate by any percentage within the packet loss rate (including the packet loss rate) according to the actual situation.
In the embodiment of the invention, the weighted value of the average value and the discrete value is used as the judgment basis of the network state, the network state can be accurately predicted, the calculation process is simpler and more convenient, and the receiving end can inform the sending end of correspondingly adjusting the sending rate according to the network state.
EXAMPLE III
Referring to fig. 4, a block diagram of a network state prediction apparatus according to a third embodiment of the present invention is shown.
The network state prediction device of the embodiment of the invention can comprise the following modules:
the determining module 401 is configured to determine, when receiving a current data packet sent by a sending end, network time consumption of the current data packet.
A calculating module 402, configured to calculate an average value and a discrete value of network time consumption of the received historical data packet within a preset time period before the current data packet is received, and calculate a weighted value of the average value and the discrete value.
A comparing module 403, configured to compare the network consumption time of the current data packet with the weighted value, and determine a current network status according to a comparison result.
The average value in the embodiment of the invention represents the average network time consumption of the historical data packets, and the average value takes the interference factors in the respective transmission process of the historical data packets into consideration. The discrete value represents the discrete degree of the network time consumption of the historical data packet, and the discrete value takes the change situation of the network state into consideration. Therefore, the weighted value of the average value and the discrete value is used as a judgment basis, and the current network state can be more accurately determined.
Example four
Referring to fig. 5, a block diagram of a network state prediction apparatus according to a fourth embodiment of the present invention is shown.
The network state prediction device of the embodiment of the invention can comprise the following modules:
a determining module 501, configured to determine network time consumption of a current data packet when the current data packet sent by a sending end is received.
The calculating module 502 is configured to calculate an average value and a discrete value of network time consumption of the received historical data packet within a preset time period before the current data packet is received, and calculate a weighted value of the average value and the discrete value.
A comparing module 503, configured to compare the network consumption time of the current data packet with the weighted value, and determine a current network status according to a comparison result.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the comparing module 503 includes: a first determining unit, configured to determine that a current network status is a clear status when the network consumption of the current data packet is less than the first weighted value; a second determining unit, configured to determine that the current network state is a normal state when the network consumption time of the current data packet is greater than or equal to the first weighted value and less than or equal to the second weighted value; and a third determining unit, configured to determine that the current network status is a congestion status when the network consumption of the current data packet is greater than the second weighted value.
Optionally, the network state comprises a clear state, a normal state and a congested state; the device further comprises: a first notification module 504, configured to notify the sending end to increase a sending rate when a current network state is a smooth state; a second notifying module 505, configured to notify the sending end to reduce the sending rate when the current network state is the congestion state.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the first notifying module 504 is specifically configured to calculate a first lower limit sending rate according to a first difference obtained by subtracting the network consumed time of the current data packet from the first weighted value, calculate a first upper limit sending rate according to a second difference obtained by subtracting the network consumed time of the current data packet from the second weighted value, and notify the sending end of increasing the sending rate according to the first lower limit sending rate and the first upper limit sending rate; or, obtaining the packet loss rate within the preset time length, and informing the sending end to improve the sending rate according to the packet loss rate.
Optionally, the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the second notifying module 505 is specifically configured to calculate a second lower limit sending rate according to a third difference obtained by subtracting the first weighted value from the network consumed time of the current data packet, calculate a second upper limit sending rate according to a fourth difference obtained by subtracting the second weighted value from the network consumed time of the current data packet, and notify the sending end to reduce the sending rate according to the second lower limit sending rate and the second upper limit sending rate; or, obtaining the packet loss rate within the preset time length, and informing the sending end to reduce the sending rate according to the packet loss rate.
Optionally, the discrete value is a standard deviation or a variance.
In the embodiment of the invention, the network state can be accurately predicted, the calculation process is simpler and more convenient, and the receiving end can inform the sending end of correspondingly adjusting the sending rate according to the network state.
For the device embodiment, since it is basically similar to the method embodiment, the description is simple, and for the relevant points, refer to the partial description of the method embodiment.
In an embodiment of the invention, an electronic device is also provided. The electronic device may include one or more processors and one or more machine-readable media having instructions, such as an application program, stored thereon. The instructions, when executed by the one or more processors, cause the processors to perform the network state prediction method described above.
In an embodiment of the present invention, there is also provided a non-transitory computer-readable storage medium having a computer program stored thereon, the program being executable by a processor of an electronic device to perform the network status prediction method described above. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
The network state prediction method, the network state prediction device, the electronic device and the storage medium provided by the invention are described in detail, a specific example is applied in the text to explain the principle and the implementation of the invention, and the description of the embodiment is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (10)

1. A method for predicting network conditions, the method comprising:
when a current data packet sent by a sending end is received, determining the network time consumption of the current data packet;
calculating an average value and a discrete value of network time consumption of the received historical data packet within a preset time length before the current data packet is received, and calculating a weighted value of the average value and the discrete value;
and comparing the network consumed time of the current data packet with the weighted value, and determining the current network state according to the comparison result.
2. The method of claim 1, wherein the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; comparing the network consumed time of the current data packet with the weighted value, and determining the current network state according to the comparison result, wherein the method comprises the following steps:
when the network consumed time of the current data packet is less than the first weighted value, determining that the current network state is a smooth state;
when the network consumption time of the current data packet is greater than or equal to the first weighted value and less than or equal to the second weighted value, determining that the current network state is a normal state;
and when the network consumed time of the current data packet is greater than the second weighted value, determining that the current network state is a congestion state.
3. The method of claim 1, wherein the network state comprises a clear state, a normal state, and a congested state; after determining the current network state according to the comparison result, the method further comprises the following steps:
when the current network state is a smooth state, informing the sending end to improve the sending rate;
and when the current network state is the congestion state, the sending end is informed to reduce the sending rate.
4. The method of claim 3, wherein the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the notifying the sending end to increase the sending rate includes:
calculating a first lower limit sending rate according to a first difference value obtained by subtracting the network consumed time of the current data packet from the first weighted value, calculating a first upper limit sending rate according to a second difference value obtained by subtracting the network consumed time of the current data packet from the second weighted value, and informing the sending end of increasing the sending rate according to the first lower limit sending rate and the first upper limit sending rate;
alternatively, the first and second electrodes may be,
and acquiring the packet loss rate within the preset time length, and informing the sending end of improving the sending rate according to the packet loss rate.
5. The method of claim 3, wherein the weighting values include a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the notifying the sending end to reduce the sending rate includes:
calculating a second lower limit sending rate according to a third difference obtained by subtracting the first weighted value from the network consumed time of the current data packet, calculating a second upper limit sending rate according to a fourth difference obtained by subtracting the second weighted value from the network consumed time of the current data packet, and informing the sending end to reduce the sending rate according to the second lower limit sending rate and the second upper limit sending rate;
alternatively, the first and second electrodes may be,
and acquiring the packet loss rate within the preset time length, and informing the sending end of reducing the sending rate according to the packet loss rate.
6. The method of claim 1, wherein the discrete value is a standard deviation or a variance.
7. A network condition prediction apparatus, the apparatus comprising:
the determining module is used for determining the network time consumption of the current data packet when the current data packet sent by the sending end is received;
the calculation module is used for calculating an average value and a discrete value of the network time consumption of the received historical data packet within a preset time length before the current data packet is received, and calculating a weighted value of the average value and the discrete value;
and the comparison module is used for comparing the network consumed time of the current data packet with the weighted value and determining the current network state according to the comparison result.
8. The apparatus of claim 7, wherein the weighting values comprise a first weighting value and a second weighting value, the first weighting value being less than the second weighting value; the comparison module comprises:
a first determining unit, configured to determine that a current network status is a clear status when the network consumption of the current data packet is less than the first weighted value;
a second determining unit, configured to determine that the current network state is a normal state when the network consumption time of the current data packet is greater than or equal to the first weighted value and less than or equal to the second weighted value;
and a third determining unit, configured to determine that the current network status is a congestion status when the network consumption of the current data packet is greater than the second weighted value.
9. An electronic device, comprising:
one or more processors; and
one or more machine-readable media having instructions stored thereon;
the instructions, when executed by the one or more processors, cause the processors to perform the network state prediction method of any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a network state prediction method according to any one of claims 1 to 6.
CN202010334760.1A 2020-04-24 2020-04-24 Network state prediction method, device, electronic equipment and storage medium Active CN111682975B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010334760.1A CN111682975B (en) 2020-04-24 2020-04-24 Network state prediction method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010334760.1A CN111682975B (en) 2020-04-24 2020-04-24 Network state prediction method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111682975A true CN111682975A (en) 2020-09-18
CN111682975B CN111682975B (en) 2023-05-16

Family

ID=72452221

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010334760.1A Active CN111682975B (en) 2020-04-24 2020-04-24 Network state prediction method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111682975B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206726A (en) * 2021-04-30 2021-08-03 深圳华跃云鹏科技有限公司 Wireless communication equipment rate modulation method
CN113596550A (en) * 2021-08-31 2021-11-02 安徽创变信息科技有限公司 Audio and video synchronization control method and device
CN115102669A (en) * 2022-06-24 2022-09-23 珠海格力电器股份有限公司 Network communication method and device for multi-split air conditioning system and multi-split air conditioning system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106385374A (en) * 2016-08-17 2017-02-08 武汉精伦电气有限公司 Transmission control method and system of local area network transmitting terminal for relieving network congestion
CN107949770A (en) * 2014-02-27 2018-04-20 丰田自动车株式会社 Path searching apparatus, method for searching path and program
CN108650218A (en) * 2018-03-22 2018-10-12 平安科技(深圳)有限公司 Network Traffic Monitoring method, apparatus, computer equipment and storage medium
CN109787859A (en) * 2019-01-11 2019-05-21 深圳市网心科技有限公司 Intelligent speed-limiting method, apparatus and storage medium based on network congestion detection
US20200336426A1 (en) * 2017-08-31 2020-10-22 Pensando Systems Inc. Methods and systems for network congestion management

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107949770A (en) * 2014-02-27 2018-04-20 丰田自动车株式会社 Path searching apparatus, method for searching path and program
CN106385374A (en) * 2016-08-17 2017-02-08 武汉精伦电气有限公司 Transmission control method and system of local area network transmitting terminal for relieving network congestion
US20200336426A1 (en) * 2017-08-31 2020-10-22 Pensando Systems Inc. Methods and systems for network congestion management
CN108650218A (en) * 2018-03-22 2018-10-12 平安科技(深圳)有限公司 Network Traffic Monitoring method, apparatus, computer equipment and storage medium
CN109787859A (en) * 2019-01-11 2019-05-21 深圳市网心科技有限公司 Intelligent speed-limiting method, apparatus and storage medium based on network congestion detection

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孙延涛等: "基于统计的网络性能异常快速检测方法", 《计算机工程》 *

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113206726A (en) * 2021-04-30 2021-08-03 深圳华跃云鹏科技有限公司 Wireless communication equipment rate modulation method
CN113206726B (en) * 2021-04-30 2022-05-24 深圳华跃云鹏科技有限公司 Wireless communication equipment rate modulation method
CN113596550A (en) * 2021-08-31 2021-11-02 安徽创变信息科技有限公司 Audio and video synchronization control method and device
CN113596550B (en) * 2021-08-31 2024-05-24 小帧科技(深圳)有限公司 Audio and video synchronous control method and device
CN115102669A (en) * 2022-06-24 2022-09-23 珠海格力电器股份有限公司 Network communication method and device for multi-split air conditioning system and multi-split air conditioning system
CN115102669B (en) * 2022-06-24 2024-04-26 珠海格力电器股份有限公司 Multi-split air conditioning system network communication method and device and multi-split air conditioning system

Also Published As

Publication number Publication date
CN111682975B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
CN111682975A (en) Network state prediction method and device, electronic equipment and storage medium
CN109688589B (en) Method and device for planning wireless network capacity
CN108282501B (en) Cloud server resource information synchronization method, device and system
CN109617868B (en) DDOS attack detection method and device and detection server
CN114039918B (en) Information age optimization method and device, computer equipment and storage medium
CN109257304A (en) A kind of bandwidth adjusting method, device, storage medium and the network equipment
CN106210129B (en) A kind of current-limiting method and system based on Web server configuration
US20220053373A1 (en) Communication apparatus, communication method, and program
CN111901134B (en) Method and device for predicting network quality based on recurrent neural network model (RNN)
CN108600147B (en) Downloading speed prediction method and device
CN112596985B (en) IT asset detection method, device, equipment and medium
CN109800079B (en) Node adjusting method in medical insurance system and related device
CN109462510B (en) CDN node quality evaluation method and device
KR101888693B1 (en) Method and apparatus for controlling push notification message transmit cycle in push notification services by communication system
CN112838957B (en) Flow prediction system with intelligent scheduling function
CN109120480B (en) Link optimization method and device based on data center
CN103023795A (en) Method and system for controlling packet switching rate based on cell condition
CN113127333B (en) Data processing method and device, electronic equipment and storage medium
CN112532459A (en) Bandwidth resource adjusting method, device and equipment
KR102116244B1 (en) Method and Apparatus for efficient auto-scaling on container based on network traffic estimation
CN113542215A (en) Method for improving streaming media transmission performance and related device
CN113760637A (en) Method and apparatus for determining a threshold value for threshold class monitoring data
CN112580908A (en) Wireless performance index evaluation method and device
CN112988417A (en) Message processing method and device, electronic equipment and computer readable medium
EP2355422B1 (en) A method and apparatus to provide minimum resource sharing without buffering requests

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