CN111682975B - Network state prediction method, device, electronic equipment and storage medium - Google Patents
Network state prediction method, device, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN111682975B CN111682975B CN202010334760.1A CN202010334760A CN111682975B CN 111682975 B CN111682975 B CN 111682975B CN 202010334760 A CN202010334760 A CN 202010334760A CN 111682975 B CN111682975 B CN 111682975B
- Authority
- CN
- China
- Prior art keywords
- data packet
- value
- network
- time consumption
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 55
- 238000003860 storage Methods 0.000 title claims abstract description 12
- 238000004590 computer program Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 6
- 238000010586 diagram Methods 0.000 description 12
- 230000005540 biological transmission Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000008569 process Effects 0.000 description 8
- 238000012545 processing Methods 0.000 description 5
- 230000008859 change Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 239000006185 dispersion Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000005259 measurement Methods 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
- 206010033799 Paralysis Diseases 0.000 description 1
- 230000008094 contradictory effect Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0823—Errors, e.g. transmission errors
- H04L43/0829—Packet loss
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/147—Network analysis or design for predicting network behaviour
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/25—Flow 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)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Computer And Data Communications (AREA)
Abstract
本发明提供了一种网络状态预测方法、装置、电子设备及存储介质。其中方法包括:接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时;计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值;将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。本发明能够更加准确地确定当前的网络状态。
The invention provides a network state prediction method, device, electronic equipment and storage medium. The method includes: when receiving the current data packet sent by the sending end, determining the network time consumption of the current data packet; calculating the network time of the historical data packet received within the preset time period before receiving the current data packet Time-consuming average value and discrete value, and calculating the weighted value of the average value and the discrete value; comparing the network time consumption of the current data packet with the weighted value, and determining the current network state according to the comparison result . The present invention can determine the current network state more accurately.
Description
技术领域technical field
本发明涉及网络技术领域,特别是涉及一种网络状态预测方法、装置、电子设备及存储介质。The present invention relates to the field of network technology, in particular to a network state prediction method, device, electronic equipment and storage medium.
背景技术Background technique
随着网络技术的快速发展,各种网络业务大量出现,比如视频会议、视频监控、可视电话,等等。在网络业务中会传输大量的数据包,比如音频数据包、视频数据包等。With the rapid development of network technology, various network services appear in large numbers, such as video conferencing, video surveillance, videophone, and so on. A large number of data packets, such as audio data packets and video data packets, are transmitted in network services.
在数据包的传输过程中,网络状态对数据包的传输影响较大。比如,如果网络处于拥塞状态,则会导致网络传输延迟增大、丢包现象严重,甚至网络瘫痪。因此,如何准确地预测网络状态,对提升整体网络性能尤为重要。During the transmission of data packets, the network status has a great influence on the transmission of data packets. For example, if the network is in a congested state, it will lead to increased network transmission delay, serious packet loss, and even network paralysis. Therefore, how to accurately predict the network state is particularly important to improve the overall network performance.
发明内容Contents of the invention
鉴于上述问题,提出了本发明实施例以便提供一种克服上述问题或者至少部分地解决上述问题的一种网络状态预测方法、装置、电子设备及存储介质。In view of the above problems, embodiments of the present invention are proposed to provide a network state prediction method, device, electronic device, and storage medium that overcome the above problems or at least partially solve the above problems.
第一方面,本发明实施例公开了一种网络状态预测方法,所述方法包括:In the first aspect, the embodiment of the present invention discloses a network state prediction method, the method comprising:
接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时;When receiving the current data packet sent by the sending end, determine the network time consumption of the current data packet;
计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值;Calculating the average value and discrete value of the network time consumption of the historical data packets received within the preset time period before receiving the current data packet, and calculating the weighted value of the average value and the discrete value;
将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。The network time consumption of the current data packet is compared with the weighted value, and the current network state is determined according to the comparison result.
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态,包括:当所述当前数据包的网络耗时小于所述第一加权值时,确定当前的网络状态为畅通状态;当所述当前数据包的网络耗时大于等于所述第一加权值,且小于等于所述第二加权值时,确定当前的网络状态为正常状态;当所述当前数据包的网络耗时大于所述第二加权值时,确定当前的网络状态为拥塞状态。Optionally, the weighted value includes a first weighted value and a second weighted value, the first weighted value is smaller than the second weighted value; the network time consumption of the current data packet and the weighted value Comparing, determining the current network state according to the comparison result, including: when the network time consumption 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 of the current data packet When the time-consuming is greater than or equal to the first weighted value and less than or equal to the second weighted value, it is determined that the current network state is a normal state; when the network time-consuming of the current data packet is greater than the second weighted value, Determine that the current network status is congested.
可选地,所述网络状态包括畅通状态、正常状态和拥塞状态;在依据比较结果确定当前的网络状态之后,还包括:在当前的网络状态为畅通状态时,通知所述发送端提高发送速率;在当前的网络状态为拥塞状态时,通知所述发送端降低发送速率。Optionally, the network state includes a smooth state, a normal state and a congestion state; after determining the current network state according to the comparison result, it also includes: when the current network state is a smooth state, notify the sending end to increase the sending rate ; When the current network state is congested, notify the sending end to reduce the sending rate.
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述通知所述发送端提高发送速率,包括:根据所述第一加权值减去所述当前数据包的网络耗时后得到的第一差值,计算第一下限发送速率,以及根据所述第二加权值减去所述当前数据包的网络耗时后得到的第二差值,计算第一上限发送速率,通知所述发送端按照所述第一下限发送速率和所述第一上限发送速率提高发送速率;或者,获取所述预设时长内的丢包率,通知所述发送端按照所述丢包率提高发送速率。Optionally, the weighted value includes a first weighted value and a second weighted value, and the first weighted value is smaller than the second weighted value; the notifying the sending end to increase the sending rate includes: according to the first weighted value A first difference obtained after subtracting the network time consumption of the current data packet from a weighted value, calculating the first lower limit sending rate, and subtracting the network time consumption of the current data packet according to the second weighted value to obtain The second difference, calculate the first upper limit sending rate, notify the sending end to increase the sending rate according to the first lower limit sending rate and the first upper limit sending rate; or obtain the packet loss within the preset time length rate, and notify the sending end to increase the sending rate according to the packet loss rate.
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述通知所述发送端降低发送速率,包括:根据所述当前数据包的网络耗时减去所述第一加权值后得到的第三差值,计算第二下限发送速率,以及根据所述当前数据包的网络耗时减去所述第二加权值后得到的第四差值,计算第二上限发送速率,通知所述发送端按照所述第二下限发送速率和所述第二上限发送速率降低发送速率;或者,获取所述预设时长内的丢包率,通知所述发送端按照所述丢包率降低发送速率。Optionally, the weighted value includes a first weighted value and a second weighted value, and the first weighted value is smaller than the second weighted value; the notifying the sending end to reduce the sending rate includes: according to the current The third difference obtained after subtracting the first weighted value from the network time consumption of the data packet, calculating the second lower limit sending rate, and subtracting the second weighted value from the network time consumption of the current data packet to obtain Calculate the second upper limit sending rate, 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 obtain the packet loss within the preset time length rate, and notify the sending end to reduce the sending rate according to the packet loss rate.
可选地,所述离散值为标准差或者方差。Optionally, the discrete values are standard deviation or variance.
第二方面,本发明实施例公开了一种网络状态预测装置,所述装置包括:In the second aspect, the embodiment of the present invention discloses a network state prediction device, the device comprising:
确定模块,用于接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时;A determining module, configured to determine the network time consumption of the current data packet when receiving the current data packet sent by the sending end;
计算模块,用于计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值;A calculation module, configured to calculate the average value and discrete value of the network time consumption of the historical data packets received within the preset time period before receiving the current data packet, and calculate the average value and the discrete value weighted value;
比较模块,用于将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。A comparing module, configured to compare the network time consumption of the current data packet with the weighted value, and determine the current network state according to the comparison result.
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述比较模块包括:第一确定单元,用于当所述当前数据包的网络耗时小于所述第一加权值时,确定当前的网络状态为畅通状态;第二确定单元,用于当所述当前数据包的网络耗时大于等于所述第一加权值,且小于等于所述第二加权值时,确定当前的网络状态为正常状态;第三确定单元,用于当所述当前数据包的网络耗时大于所述第二加权值时,确定当前的网络状态为拥塞状态。Optionally, the weighted value includes a first weighted value and a second weighted value, and the first weighted value is smaller than the second weighted value; the comparison module includes: a first determining unit, configured to when the current When the network time consumption of the data packet is less than the first weighted value, it is determined that the current network state is a smooth state; the second determining unit is configured to when the network time consumption of the current data packet is greater than or equal to the first weighted value, And when it is less than or equal to the second weighted value, determine that the current network state is a normal state; a third determination unit is configured to determine the current network state when the network time consumption of the current data packet is greater than the second weighted value The state is congested.
可选地,所述网络状态包括畅通状态、正常状态和拥塞状态;所述装置还包括:第一通知模块,用于在当前的网络状态为畅通状态时,通知所述发送端提高发送速率;第二通知模块,用于在当前的网络状态为拥塞状态时,通知所述发送端降低发送速率。Optionally, the network state includes a smooth state, a normal state, and a congestion state; the device further includes: a first notification module, configured to notify the sending end to increase the sending rate when the current network state is a smooth state; The second notification module is configured to notify the sending end to reduce the sending rate when the current network state is a congested state.
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述第一通知模块,具体用于根据所述第一加权值减去所述当前数据包的网络耗时后得到的第一差值,计算第一下限发送速率,以及根据所述第二加权值减去所述当前数据包的网络耗时后得到的第二差值,计算第一上限发送速率,通知所述发送端按照所述第一下限发送速率和所述第一上限发送速率提高发送速率;或者,获取所述预设时长内的丢包率,通知所述发送端按照所述丢包率提高发送速率。Optionally, the weighted value includes a first weighted value and a second weighted value, the first weighted value is smaller than the second weighted value; the first notification module is specifically configured to The first difference obtained after subtracting the network time consumption of the current data packet, calculating the first lower limit sending rate, and the second difference obtained after subtracting the network time consumption of the current data packet according to the second weighted value difference, calculate the first upper limit sending rate, notify the sending end to increase the sending rate according to the first lower limit sending rate and the first upper limit sending rate; or obtain the packet loss rate within the preset time length, and notify The sending end increases the sending rate according to the packet loss rate.
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述第二通知模块,具体用于根据所述当前数据包的网络耗时减去所述第一加权值后得到的第三差值,计算第二下限发送速率,以及根据所述当前数据包的网络耗时减去所述第二加权值后得到的第四差值,计算第二上限发送速率,通知所述发送端按照所述第二下限发送速率和所述第二上限发送速率降低发送速率;或者,获取所述预设时长内的丢包率,通知所述发送端按照所述丢包率降低发送速率。Optionally, the weighted value includes a first weighted value and a second weighted value, the first weighted value is smaller than the second weighted value; the second notification module is specifically configured to The third difference obtained after subtracting the first weighted value from the network time consumption, calculating the second lower limit sending rate, and the fourth difference obtained after subtracting the second weighted value from the network time consumption of the current data packet difference, calculate the second upper limit sending rate, 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 obtain the packet loss rate within the preset time length, and notify The sending end reduces the sending rate according to the packet loss rate.
可选地,所述离散值为标准差或者方差。Optionally, the discrete values are standard deviation or variance.
第三方面,本发明实施例公开了一种电子设备,包括:一个或多个处理器;和其上存储有指令的一个或多个机器可读介质;当所述指令由所述一个或多个处理器执行时,使得所述处理器执行如上任一项所述的网络状态预测方法。In a third aspect, the embodiment of the present invention discloses an electronic device, including: one or more processors; and one or more machine-readable media with instructions stored thereon; when the instructions are executed by the one or more When a processor is executed, the processor is made to execute the network state prediction method described in any one of the above.
第四方面,本发明实施例公开了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如上任一项所述的网络状态预测方法。In a fourth aspect, the embodiment of the present invention discloses a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the network state prediction method described in any one of the preceding items is implemented.
本发明实施例中,接收端在接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时;计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值;将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。由此可知,本发明实施例中平均值表示历史数据包的平均网络耗时,平均值考虑到了历史数据包各自传输过程中的干扰因素。离散值表示历史数据包的网络耗时的离散程度,离散值考虑到了网络状态的变化情况。因此将平均值与离散值的加权值作为判断依据,能够更加准确地确定当前的网络状态。而如果仅采用离散值作为判断依据,一方面需要预设一个用于与离散值进行比较的阈值,该阈值是一个经验值,因此判断的准确性严重依赖该经验值;另一方面,离散值只能表示网络耗时的离散程度,并未考虑到传输过程中的干扰因素,因此判断的准确性较差。In the embodiment of the present invention, when the receiving end receives the current data packet sent by the sending end, it determines the network time consumption of the current data packet; The average value and discrete value of the network time consumption of the historical data packet, and calculate the weighted value of the average value and the discrete value; compare the network time consumption of the current data packet with the weighted value, according to the comparison result Determine the current network status. It can be seen that, in the embodiment of the present invention, the average value represents the average network time consumption of the historical data packets, and the average value takes into account the interference factors in the respective transmission processes of the historical data packets. The discrete value represents the discrete degree of the network time consumption of the historical data packets, and the discrete value takes into account the change of the network state. Therefore, the current network state can be more accurately determined by using the weighted value of the average value and the discrete value as a judgment basis. However, if only discrete values are used as the basis for judgment, on the one hand, it is necessary to preset a threshold for comparison with the discrete value, which is an empirical value, so the accuracy of the judgment depends heavily on the empirical value; on the other hand, the discrete value It can only indicate the discrete degree of network time consumption, and does not take into account the interference factors in the transmission process, so the accuracy of judgment is poor.
附图说明Description of drawings
图1是本发明实施例一的一种网络状态预测方法的步骤流程图。FIG. 1 is a flow chart of steps of a network state prediction method according to Embodiment 1 of the present invention.
图2是本发明实施例二的一种网络状态预测方法的步骤流程图。FIG. 2 is a flowchart of steps of a network state prediction method according to Embodiment 2 of the present invention.
图3是本发明实施例二的一种计算平均值和离散值的示意图。FIG. 3 is a schematic diagram of calculating average values and discrete values in Embodiment 2 of the present invention.
图4是本发明实施例三的一种网络状态预测装置的结构框图。Fig. 4 is a structural block diagram of a network state prediction device according to Embodiment 3 of the present invention.
图5是本发明实施例四的一种网络状态预测装置的结构框图。FIG. 5 is a structural block diagram of a network state prediction device according to Embodiment 4 of the present invention.
具体实施方式Detailed ways
为使本发明的上述目的、特征和优点能够更加明显易懂,下面结合附图和具体实施方式对本发明作进一步详细的说明。In order to make the above objects, features and advantages of the present invention more comprehensible, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments.
本发明实施例中的网络状态预测方法涉及到发送端与接收端之间传输数据包的过程。在数据包传输过程中,通信的任何一方均可作为发送端,也可作为接收端。其中,发送端和接收端可以为智能手机、平板电脑、笔记本电脑、视联网终端(比如机顶盒)等具有网络通信功能的设备。发送端和接收端之间传输的数据包可以为音频数据包、视频数据包等。下面,通过以下各实施例对网络状态预测方法进行详细说明。The network state prediction method in the embodiment of the present invention involves the process of transmitting data packets between the sending end and the receiving end. In the process of data packet transmission, any party in the communication can be the sender or the receiver. Wherein, the sending end and the receiving end may be devices with network communication functions such as smart phones, tablet computers, notebook computers, and Internet-of-Vision terminals (such as set-top boxes). The data packets transmitted between the sending end and the receiving end may be audio data packets, video data packets, and the like. Next, the network state prediction method will be described in detail through the following embodiments.
实施例一Embodiment one
参照图1,示出了本发明实施例一的一种网络状态预测方法的步骤流程图。本发明实施例的网络状态预测方法可以应用于接收端。Referring to FIG. 1 , it shows a flow chart of steps of a network state prediction method according to Embodiment 1 of the present invention. The network state prediction method in the embodiment of the present invention can be applied to the receiving end.
本发明实施例的网络状态预测方法可以包括以下步骤:The network state prediction method in the embodiment of the present invention may include the following steps:
步骤101,接收端接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时。
发送端将待发送给接收端的数据封装成数据包后,向接收端发送数据包。接收端每接收到一个数据包后,可以标记该数据包的接收时间,确定该数据包的网络耗时,并存储该数据包的接收时间和网络耗时。After the sending end encapsulates the data to be sent to the receiving end into a data packet, it sends the data packet to the receiving end. Each time the receiving end receives a data packet, it can mark the receiving time of the data packet, determine the network time consumption of the data packet, and store the receiving time and network time consumption of the data packet.
步骤102,接收端计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值。
接收端接收到发送端发送的当前数据包后,根据存储的各数据包的接收时间确定在接收到当前数据包之前的预设时长内接收到的历史数据包,并根据存储的在该预设时长内接收到的各历史数据包的网络耗时,计算各历史数据包的网络耗时的平均值和离散值。接收端计算该平均值和离散值的加权值,该加权值作为后续确定网络状态的依据。其中,离散值可以为标准差或者方差。After receiving the current data packet sent by the sending end, the receiving end determines the historical data packets received within the preset time period before receiving the current data packet according to the stored receiving time of each data packet, and according to the stored The network time consumption of each historical data packet received within the duration, and the average value and discrete value of the network time consumption of each historical data packet are calculated. The receiving end calculates the weighted value of the average value and the discrete value, and the weighted value serves as a basis for subsequent determination of the network state. Wherein, the discrete value can be standard deviation or variance.
步骤103,接收端将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。
接收端将当前数据包的网络耗时与上述计算得到的加权值进行比较,依据比较结果确定当前的网络状态。对于具体的比较过程,将在下面的实施例中详细说明。The receiving end compares the network time consumption of the current data packet with the weighted value calculated above, and determines the current network state according to the comparison result. The specific comparison process will be described in detail in the following examples.
本发明实施例中平均值表示历史数据包的平均网络耗时,平均值考虑到了历史数据包各自传输过程中的干扰因素。离散值表示历史数据包的网络耗时的离散程度,离散值考虑到了网络状态的变化情况。因此将平均值与离散值的加权值作为判断依据,能够更加准确地确定当前的网络状态。而如果仅采用离散值作为判断依据,一方面需要预设一个用于与离散值进行比较的阈值,该阈值是一个经验值,因此判断的准确性严重依赖该经验值;另一方面,离散值只能表示网络耗时的离散程度,并未考虑到传输过程中的干扰因素,因此判断的准确性较差。In the embodiment of the present invention, the average value represents the average network time consumption of the historical data packets, and the average value takes into account the interference factors in the respective transmission processes of the historical data packets. The discrete value represents the discrete degree of the network time consumption of the historical data packets, and the discrete value takes into account the change of the network state. Therefore, the current network state can be more accurately determined by using the weighted value of the average value and the discrete value as a judgment basis. However, if only discrete values are used as the basis for judgment, on the one hand, it is necessary to preset a threshold for comparison with the discrete value, which is an empirical value, so the accuracy of the judgment depends heavily on the empirical value; on the other hand, the discrete value It can only indicate the discrete degree of network time consumption, and does not take into account the interference factors in the transmission process, so the accuracy of judgment is poor.
实施例二Embodiment two
参照图2,示出了本发明实施例二的一种网络状态预测方法的步骤流程图。本发明实施例的网络状态预测方法可以应用于接收端。Referring to FIG. 2 , it shows a flowchart of steps of a network state prediction method according to Embodiment 2 of the present invention. The network state prediction method in the embodiment of the present invention can be applied to the receiving end.
本发明实施例的网络状态预测方法可以包括以下步骤:The network state prediction method in the embodiment of the present invention may include the following steps:
步骤201,接收端接收数据包。In
本发明实施例中,发送端具有计时功能,发送端每发送一个数据包时,都可以通过计时功能,根据发送端的系统时钟获取该发送的数据包的发送时间,并在该发送的数据包中携带该发送时间发送到接收端。In the embodiment of the present invention, the sending end has a timing function. When the sending end sends a data packet, the sending end can use the timing function to obtain the sending time of the sent data packet according to the system clock of the sending end, and record the time in the sent data packet. Carry the sending time and send it to the receiving end.
步骤202,接收端解析数据包。
接收端每接收到一个数据包后,都对该接收到的数据包进行解析,得到该接收到的数据包的发送时间。本发明实施例中,接收端具有计时功能,接收端每接收到一个数据包后,都可以通过计时功能,根据接收端的系统时钟获取该接收到的数据包的接收时间。Each time the receiving end receives a data packet, it parses the received data packet to obtain the sending time of the received data packet. In the embodiment of the present invention, the receiving end has a timing function, and each time the receiving end receives a data packet, it can use the timing function to obtain the receiving time of the received data packet according to the system clock of the receiving end.
步骤203,接收端计算数据包的网络耗时。
接收端每接收到一个数据包后,计算接收到的该数据包的网络耗时。比如,接收端可以计算该接收到的数据包的接收时间,减去该接收到的数据包的发送时间后得到的时间差值,将该时间差值作为该接收到的数据包的网络耗时。Each time the receiving end receives a data packet, it calculates the network time consumption of the received data packet. For example, the receiving end can calculate the receiving time of the received data packet, subtract the time difference obtained after subtracting the sending time of the received data packet, and use the time difference as the network time consumption of the received data packet .
步骤204,接收端存储时间。
接收端针对每个接收到的数据包,存储该接收到的数据包的接收时间和网络耗时。For each received data packet, the receiving end stores the receiving time and network time consumption of the received data packet.
步骤205,接收端判断网络状态。在网络状态为畅通状态时,执行步骤206;在网络状态为拥塞状态时,执行步骤207。在网络状态为正常状态时,无需调整发送端的发送速度。
接收端在接收到发送端发送的当前数据包后,通过上述步骤203计算得到当前数据包的网络耗时。After receiving the current data packet sent by the sending end, the receiving end calculates the network time consumption of the current data packet through the
接收端通过上述步骤204中存储的各接收到的数据包的接收时间,确定在接收到当前数据包之前的预设时长内接收到的历史数据包。并根据上述步骤204中存储的各接收到的数据包的网络耗时,获取在接收到当前数据包之前的预设时长内接收到的各历史数据包的网络耗时。并计算所述预设时长内接收到的各历史数据包的网络耗时的平均值和离散值。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
对于所述预设时长内接收到的各历史数据包的网络耗时的平均值,可以计算所述预设时长内接收到的各历史数据包的网络耗时的总和,并计算所述预设时长内接收到的历史数据包的总数量,然后计算该总和除以该总数量后得到的比值,将该比值作为所述预设时长内接收到的历史数据包的网络耗时的平均值。比如,所述预设时长内接收到的历史数据包的总数量为N,所述预设时长内接收到的各历史数据包的网络耗时分别为M1,M2,M3,……,Mn,所述预设时长内接收到的各历史数据包的网络耗时的平均值为a,则a=(M1+M2+M3+……+Mn)/N。For the average value of the network time consumption of each historical data packet received within the preset time length, the sum of the network time consumption of each historical data packet received within the preset time length can be calculated, and the preset The total number of historical data packets received within the time period, and then calculate the ratio obtained by dividing the sum by the total number, and use the ratio as the average network time consumption of the historical data packets received within the preset time period. For example, the total number of historical data packets received within the preset duration is N, and the network time consumption of each historical data packet received within the preset duration is M 1 , M 2 , M 3 , … , M n , the average network time consumption of each historical data packet received within the preset time length is a, then a=(M 1 +M 2 +M 3 +...+M n )/N.
离散值可以为标准差或者方差。Discrete values can be standard deviation or variance.
在概率论和统计学中,一个随机变量的方差描述的是它的离散程度,也就是该变量离其期望值的距离。方差是各个数据与其算术平均数的离差平方和的平均数。所述预设时长内接收到的各历史数据包的网络耗时的方差,可以为所述预设时长内接收到的各历史数据包的网络耗时与上述平均值之差的平方值的平均数。比如,所述预设时长内接收到的历史数据包的总数量为N,所述预设时长内接收到的各历史数据包的网络耗时分别为M1,M2,M3,……,Mn,所述预设时长内接收到的各历史数据包的网络耗时的平均值为a,所述预设时长内接收到的各历史数据包的网络耗时的方差为B,则B=[(M1-a)2+(M2-a)2+(M3-a)2+……+(Mn-a)2]/N。In probability theory and statistics, the variance of a random variable describes its degree of dispersion, that is, the distance of the variable from its expected value. The variance is the average of the sum of squares of the deviations of each data from its arithmetic mean. The variance of the network time consumption of each historical data packet received within the preset time length may be the average of the square value of the difference between the network time consumption of each historical data packet received within the preset time length and the above average value number. For example, the total number of historical data packets received within the preset duration is N, and the network time consumption of each historical data packet received within the preset duration is M 1 , M 2 , M 3 , … , M n , 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=[(M 1 -a) 2 +(M 2 -a) 2 +(M 3 -a) 2 +...+(M n -a) 2 ]/N.
在概率论和统计学中,标准差作为统计分布程度上的测量。例如在物理科学中,做重复性测量时,测量数值集合的标准差代表这些测量的精确度。当要决定测量值是否符合预测值,测量值的标准差占有决定性重要角色:如果测量平均值与预测值相差太远(同时与标准差数值做比较),则认为测量值与预测值互相矛盾。标准差定义是总体各单位标准值与其平均数离差平方的算术平均数的平方根,也即标准差定义为方差的平方根。标准差相对于方差来说,能够更加准确地表明离散程度。所述预设时长内接收到的各历史数据包的网络耗时的标准差,可以为所述预设时长内接收到的各历史数据包的网络耗时的方差的平方根。比如,如果按照上述方差的举例,所述预设时长内接收到的各历史数据包的网络耗时的标准差为b,则 In probability theory and statistics, standard deviation is used as a measure of the extent of a statistical distribution. In the physical sciences, for example, when making repeated measurements, the standard deviation of a set of measured values represents the precision of those measurements. The standard deviation of the measured value plays a decisive role when deciding whether the measured value corresponds to the predicted value: If the measured mean is too far from the predicted value (compared with the standard deviation value at the same time), the measured value and the predicted value are considered to be contradictory. The standard deviation is defined as the square root of the arithmetic mean of the square of the deviation between the standard value of each unit of the population and its mean, that is, the standard deviation is defined as the square root of the variance. Compared with the variance, the standard deviation can more accurately indicate the degree of dispersion. The standard deviation of the network time consumption of each historical data packet received within the preset time period may be the square root of the variance of the network time consumption of each historical data packet received within the preset time period. For example, if according to the above example of variance, the standard deviation of the network time consumption of each historical data packet received within the preset duration is b, then
接收端继续计算上述平均值和离散值的加权值。在一种可选实施方式中,加权值包括第一加权值和第二加权值,第一加权值小于第二加权值。可选地,平均值在第一加权值中的权重与平均值在第二加权值中的权重相同,离散值在第一加权值中的权重小于离散值在第二加权值中的权重。比如,平均值在第一加权值中的权重与平均值在第二加权值中的权重可以均为1。离散值在第一加权值中的权重可以为1,离散值在第二加权值中的权重可以为2;或者离散值在第一加权值中的权重可以为1,离散值在第二加权值中的权重可以为3,等等。比如,上述平均值为a,离散值为标准差b,则第一加权值可以为a+b,第二加权值可以为a+2b;或者第一加权值可以为a+b,第二加权值可以为a+3b,等等。具体可以根据实际情况进行相关设置,本发明实施例对此不做限制。The receiving end continues to calculate the weighted value of the above average and discrete values. In an optional implementation manner, the weighted value includes a first weighted value and a second weighted value, and the first weighted value is smaller than the second weighted value. Optionally, the weight of the average value in the first weighted value is the same as the weight of the average value in the second weighted value, and the weight of the discrete value in the first weighted value is smaller than the weight of the discrete value in the second weighted value. For example, the weight of the average value in the first weighted value and the weight of the average value in the second weighted value may both be 1. The weight of the discrete value in the first weighted value may be 1, and the weight of the discrete value in the second weighted value may be 2; or the weight of the discrete value in the first weighted value may be 1, and the weight of the discrete value in the second weighted value The weights in can be 3, and so on. For example, if the above-mentioned average value is a, and the discrete value is standard deviation b, then the first weighted value can be a+b, and the second weighted value can be a+2b; or the first weighted value can be a+b, and the second weighted value can be Values can be a+3b, etc. Specifically, related settings may be performed according to actual conditions, which is not limited in this embodiment of the present invention.
接收端将当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。在一种可选实施方式中,当所述当前数据包的网络耗时小于所述第一加权值时,确定当前的网络状态为畅通状态;当所述当前数据包的网络耗时大于等于所述第一加权值,且小于等于所述第二加权值时,确定当前的网络状态为正常状态;当所述当前数据包的网络耗时大于所述第二加权值时,确定当前的网络状态为拥塞状态。比如,当前数据包的网络耗时为c,第一加权值为a+b,第二加权值为a+2b,则当c<a+b时,确定当前的网络状态为畅通状态;当a+b≤c≤a+2b时,确定当前的网络状态为正常状态;当c>a+b时,确定当前的网络状态为拥塞状态。The receiving end compares the network time consumption of the current data packet with the weighted value, and determines the current network state according to the comparison result. In an optional implementation manner, when the network time consumption of the current data packet is less than the first weighted value, it is determined that the current network state is a smooth state; when the network time consumption of the current data packet is greater than or equal to the When the first weighted value is less than or equal to the second weighted value, it is determined that the current network state is a normal state; when the network time consumption of the current data packet is greater than the second weighted value, the current network state is determined is in a congested state. For example, the network time consumption of the current data packet is c, the first weighted value is a+b, and the second weighted value is a+2b, then when c<a+b, it is determined that the current network state is a smooth state; when a When +b≤c≤a+2b, it is determined that the current network state is a normal state; when c>a+b, it is determined that the current network state is a congested state.
举例说明,所述预设时长内接收到的数据包的网络耗时分别是73、72、71、69、68、67毫秒,计算出这组网络耗时的标准差是2.16,平均值是70。图3为本发明实施例二的一种计算平均值和离散值的示意图。如图3所示,输入所述预设时长内接收到的数据包的网络耗时,各网络耗时之间用逗号分割,经过计算即可得到总组数、平均数、总体标准偏差(也即上述标准差)、总体标准偏差的方差(也即上述方差)。如果当前数据包的网络耗时是65,则65<70+2.16,说明当前网络处于畅通状态;如果当前数据包的网络耗时是75,则75>70+2×2.16,说明当前网络处于拥塞状态;如果当前数据包的网络耗时是73,则70+2.16<73<70+2×2.16,说明当前网络处于正常状态。For example, the network time consumption of the data packets received within the preset duration is 73, 72, 71, 69, 68, and 67 milliseconds respectively, and the calculated standard deviation of this group of network time consumption is 2.16, and the average value is 70 . FIG. 3 is a schematic diagram of calculating average values and discrete values in Embodiment 2 of the present invention. As shown in Figure 3, input the network time consumption of the data packets received in the preset duration, each network time consumption is separated by a comma, and the total number of groups, the average number, and the overall standard deviation (also That is, the above-mentioned standard deviation), the variance of the population standard deviation (that is, the above-mentioned variance). If the network time consumption of the current data packet is 65, then 65<70+2.16, indicating that the current network is in a smooth state; if the network time consumption of the current data packet is 75, then 75>70+2×2.16, indicating that the current network is congested Status; if the network time consumption of the current data packet is 73, then 70+2.16<73<70+2×2.16, indicating that the current network is in a normal state.
步骤206,接收端通知发送端提高发送速率。
接收端在确定出当前的网络状态为畅通状态时,还可以通知发送端提高发送速率。When the receiving end determines that the current network status is unblocked, it may also notify the sending end to increase 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 time consumption 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 knows the first lower limit sending rate and the first upper limit sending rate, and can increase the current sending rate to the first lower limit sending rate and the first upper limit sending rate according to the actual situation. Any rate between rates (including the first lower limit sending rate and the first upper limit sending rate).
在实现中,发送端计算所述第一加权值减去所述当前数据包的网络耗时的第一差值,根据所述第一差值计算第一下限发送速率。比如,可以计算所述当前数据包的网络耗时减去所述第一差值后得到的第五差值,然后计算所述当前数据包的数据量除以所述第五差值后得到的第一比值,将该第一比值作为第一下限发送速率。比如,当前数据包的数量为m,当前数据包的网络耗时为c,第一加权值为a+b,第一下限发送速率为v1,则v1=m/[c-(a+b-c)]。In an implementation, the sending end calculates a first difference obtained by subtracting the network time consumption of the current data packet from the first weighted value, and calculates a first lower limit sending rate according to the first difference. For example, the fifth difference obtained by subtracting the first difference from the network time consumption of the current data packet may be calculated, and then calculated by dividing the data amount of the current data packet by the fifth difference The first ratio is used as the first lower limit sending rate. For example, the number of current data packets is m, the network time consumption of the current data packets is c, the first weighted value is a+b, and the first lower limit sending rate is v1, then v1=m/[c-(a+b-c) ].
发送端计算所述第二加权值减去所述当前数据包的网络耗时的第二差值,根据所述第二差值计算第一上限发送速率。比如,可以计算所述当前数据包的网络耗时减去所述第二差值后得到的第六差值,然后计算所述当前数据包的数据量除以所述第六差值后得到的第二比值,将该第二比值作为第一上限发送速率。比如,当前数据包的数量为m,当前数据包的网络耗时为c,第二加权值为a+2b,第一上限发送速率为v2,则v2=m/[c-(a+2b-c)]。The sending end calculates a second difference obtained by subtracting the network time consumption of the current data packet from the second weighted value, and calculates a first upper limit sending rate according to the second difference. For example, it is possible to calculate the sixth difference obtained by subtracting the second difference from the network time consumption of the current data packet, and then calculate the data amount of the current data packet divided by the sixth difference The second ratio, using the second ratio as the first upper limit sending rate. For example, the number of current data packets is m, the network time consumption of the current data packets is c, the second weighted value is a+2b, and the first upper limit sending rate is v2, then v2=m/[c-(a+2b- c)].
在一种可选实施方式中,接收端可以获取所述预设时长内的丢包率,并通知发送端按照所述丢包率提高发送速率。发送端在接收到通知后,得知丢包率,可以根据实际情况,将当前的发送速率提高该丢包率以内(包含该丢包率)的任意百分比。In an optional implementation manner, the receiving end may obtain the packet loss rate within the preset time period, and notify the sending end to increase the sending rate according to the packet loss rate. After receiving the notification, the sending end knows the packet loss rate, and can increase the current sending rate by any percentage within (including the packet loss rate) according to the actual situation.
在实现中,发送端可以根据所述预设时长内发送端发送的数据包的数量,和所述预设时长内接收端接收到的数据包的数量,计算所述预设时长内的丢包率。比如,计算所述预设时长内发送端发送的数据包的数量,减去所述预设时长内接收端接收到的数据包的数量后得到的数量差值,然后计算该数量差值除以所述预设时长内发送端发送的数据包的数量后得到的比值,将该比值作为丢包率。In implementation, the sending end can calculate the packet loss within the preset time length according to the number of data packets sent by the sending end within the preset time length and the number of data packets received by the receiving end within the preset time length Rate. For example, calculate the number of data packets sent by the sending end within the preset time period, subtract the number difference obtained after subtracting the number of data packets received by the receiving end within the preset time length, and then calculate the number difference divided by The ratio obtained after the number of data packets sent by the sending end within the preset time period is used as the packet loss rate.
步骤207,接收端通知发送端降低发送速率。
接收端在确定出当前的网络状态为拥塞状态时,还可以通知发送端降低发送速率。When the receiving end determines that the current network state is congested, it can also notify 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 time consumption 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 knows the second lower limit sending rate and the second upper limit sending rate, and may reduce the current sending rate to the second lower limit sending rate and the second upper limit sending rate according to the actual situation. Any rate between rates (including the second lower limit sending rate and the second upper limit sending rate).
在实现中,发送端计算所述当前数据包的网络耗时减去所述第一加权值后得到的第三差值,根据所述第三差值计算第二下限发送速率。比如,可以计算所述当前数据包的网络耗时加上所述第三差值后得到的第一和值,然后计算所述当前数据包的数据量除以所述第一和值后得到的第三比值,将该第三比值作为第二下限发送速率。比如,当前数据包的数量为m,当前数据包的网络耗时为c,第一加权值为a+b,第二下限发送速率为v3,则v3=m/[c+c-(a+b)]。In an implementation, the sending end calculates a third difference obtained by subtracting the first weighted value from the network time consumption of the current data packet, and calculates the second lower limit sending rate according to the third difference. For example, it is possible to calculate the first sum obtained by adding the network time consumption of the current data packet to the third difference, and then calculate the data volume of the current data packet divided by the first sum. A third ratio, using the third ratio as the second lower limit sending rate. For example, the number of current data packets is m, the network time consumption of the current data packets is c, the first weighted value is a+b, and the second lower limit sending rate is v3, then v3=m/[c+c-(a+ b)].
发送端计算所述当前数据包的网络耗时减去所述第二加权值后得到的第四差值,根据所述第四差值计算第二上限发送速率。比如,可以计算所述当前数据包的网络耗时加上所述第四差值后得到的第二和值,然后计算所述当前数据包的数据量除以所述第二和值后得到的第四比值,将该第四比值作为第二上限发送速率。比如,当前数据包的数量为m,当前数据包的网络耗时为c,第二加权值为a+2b,第二上限发送速率为v4,则v4=m/[c+c-(a+2b)]。The sending end calculates a fourth difference obtained by subtracting the second weighted value from the network time consumption of the current data packet, and calculates a second upper limit sending rate according to the fourth difference. For example, it is possible to calculate the second sum obtained by adding the network time consumption of the current data packet to the fourth difference, and then calculate the data volume of the current data packet divided by the second sum. A fourth ratio, using the fourth ratio as the second upper limit sending rate. For example, the number of current data packets is m, the network time consumption of the current data packets is c, the second weighted value is a+2b, and the second upper limit sending rate is v4, then v4=m/[c+c-(a+ 2b)].
在一种可选实施方式中,接收端可以获取所述预设时长内的丢包率,并通知发送端按照所述丢包率降低发送速率。发送端在接收到通知后,得知丢包率,可以根据实际情况,将当前的发送速率降低该丢包率以内(包含该丢包率)的任意百分比。In an optional implementation manner, the receiving end may obtain the packet loss rate within the preset time period, and notify the sending end to reduce the sending rate according to the packet loss rate. After receiving the notification, the sending end knows the packet loss rate, and can reduce the current sending rate by any percentage within (including the packet loss rate) according to the actual situation.
本发明实施例中,以平均值与离散值的加权值作为网络状态的判断依据,能够准确地预测网络状态,计算过程更加简便,并且接收端还可以根据网络状态通知发送端相应调整发送速率。In the embodiment of the present invention, the weighted value of the average value and the discrete value is used as the basis for judging the network state, the network state can be accurately predicted, the calculation process is more convenient, and the receiving end can also notify the sending end to adjust the sending rate accordingly according to the network state.
实施例三Embodiment three
参照图4,示出了本发明实施例三的一种网络状态预测装置的结构框图。Referring to FIG. 4 , it shows a structural block diagram of a device for network state prediction according to Embodiment 3 of the present invention.
本发明实施例的网络状态预测装置可以包括以下模块:The network state prediction device of the embodiment of the present invention may include the following modules:
确定模块401,用于接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时。The
计算模块402,用于计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值。
比较模块403,用于将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。The
本发明实施例中平均值表示历史数据包的平均网络耗时,平均值考虑到了历史数据包各自传输过程中的干扰因素。离散值表示历史数据包的网络耗时的离散程度,离散值考虑到了网络状态的变化情况。因此将平均值与离散值的加权值作为判断依据,能够更加准确地确定当前的网络状态。In the embodiment of the present invention, the average value represents the average network time consumption of the historical data packets, and the average value takes into account the interference factors in the respective transmission processes of the historical data packets. The discrete value represents the discrete degree of the network time consumption of the historical data packets, and the discrete value takes into account the change of the network state. Therefore, the current network state can be more accurately determined by using the weighted value of the average value and the discrete value as a judgment basis.
实施例四Embodiment Four
参照图5,示出了本发明实施例四的一种网络状态预测装置的结构框图。Referring to FIG. 5 , it shows a structural block diagram of an apparatus for network state prediction according to Embodiment 4 of the present invention.
本发明实施例的网络状态预测装置可以包括以下模块:The network state prediction device of the embodiment of the present invention may include the following modules:
确定模块501,用于接收到发送端发送的当前数据包时,确定所述当前数据包的网络耗时。The
计算模块502,用于计算在接收到所述当前数据包之前的预设时长内,接收到的历史数据包的网络耗时的平均值和离散值,并计算所述平均值和所述离散值的加权值。
比较模块503,用于将所述当前数据包的网络耗时与所述加权值进行比较,依据比较结果确定当前的网络状态。The
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述比较模块503包括:第一确定单元,用于当所述当前数据包的网络耗时小于所述第一加权值时,确定当前的网络状态为畅通状态;第二确定单元,用于当所述当前数据包的网络耗时大于等于所述第一加权值,且小于等于所述第二加权值时,确定当前的网络状态为正常状态;第三确定单元,用于当所述当前数据包的网络耗时大于所述第二加权值时,确定当前的网络状态为拥塞状态。Optionally, the weighted value includes a first weighted value and a second weighted value, and the first weighted value is smaller than the second weighted value; the
可选地,所述网络状态包括畅通状态、正常状态和拥塞状态;所述装置还包括:第一通知模块504,用于在当前的网络状态为畅通状态时,通知所述发送端提高发送速率;第二通知模块505,用于在当前的网络状态为拥塞状态时,通知所述发送端降低发送速率。Optionally, the network state includes a smooth state, a normal state, and a congestion state; the device further includes: a
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述第一通知模块504,具体用于根据所述第一加权值减去所述当前数据包的网络耗时后得到的第一差值,计算第一下限发送速率,以及根据所述第二加权值减去所述当前数据包的网络耗时后得到的第二差值,计算第一上限发送速率,通知所述发送端按照所述第一下限发送速率和所述第一上限发送速率提高发送速率;或者,获取所述预设时长内的丢包率,通知所述发送端按照所述丢包率提高发送速率。Optionally, the weighted value includes a first weighted value and a second weighted value, the first weighted value is smaller than the second weighted value; the
可选地,所述加权值包括第一加权值和第二加权值,所述第一加权值小于所述第二加权值;所述第二通知模块505,具体用于根据所述当前数据包的网络耗时减去所述第一加权值后得到的第三差值,计算第二下限发送速率,以及根据所述当前数据包的网络耗时减去所述第二加权值后得到的第四差值,计算第二上限发送速率,通知所述发送端按照所述第二下限发送速率和所述第二上限发送速率降低发送速率;或者,获取所述预设时长内的丢包率,通知所述发送端按照所述丢包率降低发送速率。Optionally, the weighted value includes a first weighted value and a second weighted value, the first weighted value is smaller than the second weighted value; the
可选地,所述离散值为标准差或者方差。Optionally, the discrete values are standard deviation or variance.
本发明实施例中,能够准确地预测网络状态,计算过程更加简便,并且接收端还可以根据网络状态通知发送端相应调整发送速率。In the embodiment of the present invention, the network state can be accurately predicted, the calculation process is simpler, and the receiving end can also notify the sending end to adjust the sending rate accordingly according to the network state.
对于装置实施例而言,由于其与方法实施例基本相似,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for related parts, please refer to the part of the description of the method embodiment.
在本发明的实施例中,还提供了一种电子设备。该电子设备可以包括一个或多个处理器,以及其上存储有指令的一个或多个机器可读介质,指令例如应用程序。当所述指令由所述一个或多个处理器执行时,使得所述处理器执行上述的网络状态预测方法。In an embodiment of the present 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 application programs, stored thereon. When the instructions are executed by the one or more processors, the processors are made to execute the above network state prediction method.
在本发明的实施例中,还提供了一种非临时性计算机可读存储介质,其上存储有计算机程序,该程序可由电子设备的处理器执行,以完成上述的网络状态预测方法。例如,所述非临时性计算机可读存储介质可以是ROM、随机存取存储器(RAM)、CD-ROM、磁带、软盘和光数据存储设备等。In an embodiment of the present invention, there is also provided a non-transitory computer-readable storage medium, on which a computer program is stored, and the program can be executed by a processor of an electronic device to complete the above-mentioned network state prediction method. For example, the non-transitory computer readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, optical data storage device, and the like.
本说明书中的各个实施例均采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似的部分互相参见即可。Each embodiment in this specification is described in a progressive manner, each embodiment focuses on the difference from other embodiments, and the same and similar parts of each embodiment can be referred to each other.
本领域内的技术人员应明白,本发明实施例的实施例可提供为方法、装置、或计算机程序产品。因此,本发明实施例可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present invention may be provided as methods, devices, or computer program products. Accordingly, embodiments of the 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 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, etc.) having computer-usable program code embodied therein.
本发明实施例是参照根据本发明实施例的方法、终端设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理终端设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理终端设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。Embodiments of the present invention are described with reference to flowcharts and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each procedure and/or block in the flowchart and/or block diagram, and a combination of procedures and/or blocks in the flowchart and/or block diagram can be realized by computer program instructions. These computer program instructions may be provided to a general purpose computer, special purpose computer, embedded processor or processor of other programmable data processing terminal equipment to produce a machine such that instructions executed by the computer or processor of other programmable data processing terminal equipment Produce means for realizing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理终端设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing terminal to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the The instruction means implements the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理终端设备上,使得在计算机或其他可编程终端设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程终端设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded into a computer or other programmable data processing terminal equipment, so that a series of operational steps are performed on the computer or other programmable terminal equipment to produce computer-implemented processing, thereby The instructions executed above provide steps for implementing the functions specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.
尽管已描述了本发明实施例的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例做出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明实施例范围的所有变更和修改。Having described preferred embodiments of embodiments of the present invention, additional changes and modifications to these embodiments can be made by those skilled in the art once the basic inventive concept is appreciated. Therefore, the appended claims are intended to be interpreted to cover the preferred embodiment and all changes and modifications which fall within the scope of the embodiments of the present invention.
最后,还需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者终端设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者终端设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者终端设备中还存在另外的相同要素。Finally, it should also be noted that in this text, relational terms such as first and second etc. are only used to distinguish one entity or operation from another, and do not necessarily require or imply that these entities or operations, any such actual relationship or order exists. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or terminal equipment comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements identified, or also include elements inherent in such a process, method, article, or end-equipment. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or terminal device comprising said element.
以上对本发明所提供的一种网络状态预测方法、装置、电子设备及存储介质,进行了详细介绍,本文中应用了具体个例对本发明的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本发明的方法及其核心思想;同时,对于本领域的一般技术人员,依据本发明的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本发明的限制。A network state prediction method, device, electronic equipment, and storage medium provided by the present invention have been introduced above in detail. In this paper, specific examples are used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only It is used to help understand the method of the present invention and its core idea; at the same time, for those of ordinary skill in the art, according to the idea of the present invention, there will be changes in the specific implementation and scope of application. In summary, this The content of the description should not be construed as limiting the present invention.
Claims (10)
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 CN111682975A (en) | 2020-09-18 |
CN111682975B true 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) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113206726B (en) * | 2021-04-30 | 2022-05-24 | 深圳华跃云鹏科技有限公司 | Wireless communication equipment rate modulation method |
CN113596550B (en) * | 2021-08-31 | 2024-05-24 | 小帧科技(深圳)有限公司 | Audio and video synchronous control method and device |
CN115102669B (en) * | 2022-06-24 | 2024-04-26 | 珠海格力电器股份有限公司 | Multi-split air conditioning system network communication method and device and multi-split air conditioning system |
Citations (4)
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 |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3677003B1 (en) * | 2017-08-31 | 2025-01-15 | Pensando Systems Inc. | Methods and systems for network congestion management |
-
2020
- 2020-04-24 CN CN202010334760.1A patent/CN111682975B/en active Active
Patent Citations (4)
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 |
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)
Title |
---|
基于统计的网络性能异常快速检测方法;孙延涛等;《计算机工程》;20090605(第11期);第166-180页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111682975A (en) | 2020-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111682975B (en) | Network state prediction method, device, electronic equipment and storage medium | |
KR102385762B1 (en) | Speed-optimized congestion management | |
CN106330757B (en) | Flow control method and device | |
CN102804714A (en) | Controlling packet transmission | |
CN104618195A (en) | Bandwidth estimation method and device | |
US10128987B2 (en) | Scalable receive window auto-tuning | |
CN104734985A (en) | Data receiving flow control method and system | |
CN107624232A (en) | Apparatus and method for controlling downlink throughput in a communication system | |
CN109995818A (en) | A kind of method and device of server load balancing | |
CN112367490A (en) | Hybrid learning method, device and equipment for improving interactive video transmission quality | |
CN110620939B (en) | Network state determination method and device, electronic equipment and storage medium | |
CN115278846B (en) | Bluetooth power control method, device and equipment | |
WO2021057068A1 (en) | Rdma data flow control method and system, electronic device and readable storage medium | |
CN116566919A (en) | Bandwidth detection method, device, electronic equipment and storage medium | |
CN105340318B (en) | Method and device for determining transmission congestion | |
KR101888693B1 (en) | Method and apparatus for controlling push notification message transmit cycle in push notification services by communication system | |
CN115801639B (en) | Bandwidth detection method, device, electronic device and storage medium | |
CN113542215A (en) | Method for improving streaming media transmission performance and related device | |
CN109120480B (en) | Link optimization method and device based on data center | |
CN104754636A (en) | Cell loading state detecting method and communication device | |
JP4601657B2 (en) | Traffic shaping apparatus and method | |
CN119402435B (en) | Data congestion processing method, device, equipment, storage medium and program product | |
EP3327996A1 (en) | Method and circuit for congestion detection | |
CN118869600B (en) | Congestion control method, congestion control device, electronic equipment and medium | |
CN113439416B (en) | Continuously calibrated network system |
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 | ||
CP03 | Change of name, title or address |
Address after: 33rd Floor, No.1 Huasheng Road, Yuzhong District, Chongqing 400013 Patentee after: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd. Country or region after: China Address before: 100000 Beijing Dongcheng District Qinglong Hutong 1 Song Hua Building A1103-1113 Patentee before: VISIONVERA INFORMATION TECHNOLOGY Co.,Ltd. Country or region before: China |
|
CP03 | Change of name, title or address |