Network bandwidth adjustment method and device, storage medium and electronic equipment
By predicting the network state category and determining the bandwidth adjustment step, dynamically adjust the network bandwidth, solve the problem of inaccurate bandwidth adjustment in existing technologies, and improve the stability of the network state and the accuracy of bandwidth adjustment.
Patent Information
- Application Number
- CN202310923825.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-25
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, when adjusting network bandwidth, the bandwidth adjustment is inaccurate due to inaccurate network status determination, which affects the effectiveness of network quality control.
By obtaining the characteristics of the current network state sequence, enter the target category prediction model, predict the current network status category, and determine the bandwidth adjustment steps according to the prediction results to dynamically adjust the network bandwidth.
Improve the stability of the network state, avoid the problem of low accuracy caused by the fixed bandwidth adjustment steps, and achieve more accurate network bandwidth adjustment.
Smart Images

Figure CN119383084A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for adjusting network bandwidth, a storage medium, and an electronic device. Background Art
[0002] Network transmission quality control, as the core competitiveness of real-time audio and video technology, is one of the core links to improve user experience. The core limiting factor of network quality control capability is the accuracy of real-time network bandwidth estimation. Only with accurate network bandwidth estimation can we implement precise sending and regulation strategies and control the overall network situation.
[0003] In the related technology, the real-time bandwidth is mainly obtained through detection. For example, congestion control algorithms such as GCC (Google Congest Control) and BBR (Bottleneck Bandwidth and Round-trip propagation time) are mainly used to determine whether the current network state is in a congested state. If it is determined to be in a congested state, the network bandwidth is adjusted downward according to a preset fixed step size; conversely, if it is determined not to be in a congested state, the network bandwidth is adjusted upward according to a preset fixed step size.
[0004] However, in actual application scenarios, due to the influence of various software and hardware facilities or environments, it is difficult for the network status to be in a stable state. For example, it is in a state of continuous fluctuation with a small amplitude, tends to be stable after a short period of congestion, tends to be stable first and then experience network jitter (short-term congestion or over-issuance), etc. In this case, it is impossible to accurately determine the network status based only on the indicator of whether it is in a congested state. If the network bandwidth continues to be adjusted according to a fixed step size, it is easy to have the problem that the adjusted network bandwidth does not match the actual status due to inaccurate judgment of the network status, thereby causing technical problems of low accuracy in the process of network bandwidth adjustment.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present application provide a method and device for adjusting network bandwidth, a storage medium, and an electronic device, so as to at least solve the technical problem of low accuracy in the process of adjusting network bandwidth.
[0007] According to one aspect of an embodiment of the present application, a method for adjusting network bandwidth is provided, comprising: obtaining a group of network status features corresponding to a current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include the current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each moment in the N moments, and N is a positive integer greater than or equal to 2; inputting a group of network status features into a target category prediction model to obtain a current network status category corresponding to a group of network status features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a historical network status feature set and a corresponding network status category set, the historical network status feature set includes M groups of network status features corresponding to M historical network status sequences, the network status category set includes network status categories obtained by performing a clustering operation on the M groups of network status features, and M is a positive integer greater than or equal to 2; obtaining a current bandwidth adjustment step matching the current network status category, and adjusting the current network bandwidth at the current moment using the current bandwidth adjustment step to obtain a network bandwidth allowed to be used at the next moment of the current moment.
[0008] Optionally, before inputting a group of network status features into the target category prediction model, the method further includes: obtaining M groups of network status features corresponding to M historical network status sequences, wherein each of the M historical network status sequences includes N groups of historical network status information corresponding to N historical moments, the N historical moments include a historical moment before a current moment and N-1 historical moments before a historical moment, the N groups of historical network status information include historical network status information of each of the N historical moments, and M is a positive integer greater than or equal to 2; performing a clustering operation on the M groups of network status features to obtain K clusters and K network status categories having a one-to-one correspondence, wherein each of the K clusters includes at least one group of network status features in the M groups of network status features, the K network status categories include the current network status category, and K is a positive integer greater than or equal to 1.
[0009] Optionally, the performing of a clustering operation on the M groups of network state features to obtain K clusters and K network state categories having a one-to-one correspondence includes: performing the following iterative operation until the network state category corresponding to each group of network state features in the M groups of network state features is determined, wherein the network state features of the remaining undetermined clusters after the 0th iteration are the M groups of network state features, and i is a positive integer greater than or equal to 1: the network state features of the remaining undetermined clusters after the i-1th iteration are P of the M groups of network state features. i-1 In the case of group network status characteristics, i-1 Perform clustering operation on the group network status features to obtain Ki Initial clusters, where P i-1 is a positive integer greater than or equal to 1, K i is a positive integer greater than or equal to 1; i There are Q in the initial clusters that meet the preset business logic. i In the case of initial clusters, i The network status characteristics of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i clusters, among which Q i is greater than or equal to 1 and less than or equal to K i A positive integer; if there is no network status feature of an undetermined cluster after the i-1th iteration, the iteration operation ends.
[0010] Optionally, the method further comprises: determining K by the following steps: i Whether the jth initial cluster among the initial clusters meets the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer: Include S in the jth initial cluster j Group network status characteristics, S j The group network status characteristics correspond to S j In the case of a historical network state sequence, obtain S j The historical network state sequence corresponding to S j curves, among which S j The kth curve in the curves includes N points, and N points represent S j A set of historical network state information corresponding to N historical moments included in the kth historical network state sequence in the historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j A positive integer; S j The j-th curve is fitted into the j-th target curve, and according to the j-th target curve, it is determined whether the j-th initial clustering cluster conforms to the preset business logic.
[0011] Optionally, the above S j The curves are fitted into the jth target curve, including: j The points with the same sequence number in each of the curves are averaged to obtain N average points, and the j-th target curve is determined as a curve including N average points, where S j The point numbered n in the k-th curve in the curves represents the historical network status information at the n-th historical moment in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or for S jThe points with the same sequence number in each of the curves are weighted and summed to obtain N weighted points, and the j-th target curve is determined as a curve including the N weighted points.
[0012] Optionally, the determining whether the jth initial clustering cluster complies with the preset business logic according to the jth target curve includes: in response to a selection instruction for the jth target curve, determining whether the jth initial clustering cluster complies with the preset business logic.
[0013] Optionally, the method further comprises: determining K by the following steps: i Whether the jth initial cluster among the initial clusters meets the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer: Include S in the jth initial cluster j Group network status characteristics, S j The group network status characteristics correspond to S j A historical network state sequence, S j When each of the historical network state sequences includes R subsequences, and each of the R subsequences includes N historical network state information under the same dimension, S is obtained. j ×R subsequences corresponding to S j ×R curves, among which S j The kth group of curves in ×R curves includes R curves, the sth curve in the R curves includes N points, and the N points represent N historical network state information under the sth dimension included in the sth subsequence in the kth historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j is a positive integer, R is a positive integer greater than or equal to 2, s is a positive integer greater than or equal to 1 and less than or equal to R; S j ×R curves are fitted into R target curves, and according to the R target curves, it is determined whether the jth initial cluster meets the preset business logic.
[0014] Optionally, the above S j ×R curves are fitted into R target curves, including: j Each group of curves in the ×R curves performs the following fitting operation to obtain one of the R target curves, where each group of curves includes S j ×1 curve: in S j ×1 curve corresponds to the sth dimension, for S j The points with the same serial number in each of the ×1 curves are averaged to obtain N average points, and a target curve is determined as a curve including N average points, where S jThe point numbered n in the k-th curve among ×1 curves represents the network status information under the s-th dimension at the n-th time in the s-th subsequence in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or for S j The points with the same sequence number in each of the ×1 curves are weighted and summed to obtain N weighted points, and a target curve is determined as a curve including the N weighted points.
[0015] Optionally, the determining whether the j-th initial clustering cluster complies with the preset business logic according to the R target curves includes: in response to a selection instruction for the R target curves, determining whether the j-th initial clustering cluster complies with the preset business logic.
[0016] Optionally, the above pair Q i The network status characteristics of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i The clusters are: i The network status features of each group included in the qth initial cluster in the initial cluster are adjusted to obtain the qth cluster determined by the i-th iteration, where q is greater than or equal to 1 and less than or equal to Q i A positive integer: Use the positive sample set and the negative sample set to train the initial category prediction model to obtain the qth category prediction model, where the qth category prediction model is used to determine the probability that a set of input network state features belongs to the qth cluster. The positive sample set includes each set of network state features included in the qth initial cluster, and the negative sample set includes P i-1 Each group of network state features in the group network state features except the network state features in the qth initial cluster; P i-1 Each group of network state features in the group network state features is input into the qth category prediction model to obtain P i-1 probability, where P i-1 The probability is used to represent P i-1 The probability that each group of network state features in the group network state features belongs to the qth cluster; P i-1 The r groups of network state features in the group network state features are determined as the qth cluster determined in the i-th iteration, where i-1 The probability corresponding to the r group of network status features in the probability is greater than or equal to the preset probability threshold, r is greater than or equal to 1 and less than or equal to P i-1 A positive integer.
[0017] Optionally, the above-mentioned acquisition of a set of network status features corresponding to the current network status sequence includes: acquiring the round-trip delay RTT at the current moment and the RTT of N-1 historical moments before the current moment to obtain an RTT sequence, and performing feature construction on the RTT sequence to obtain a set of RTT features; and / or acquiring the packet loss rate at the current moment and the packet loss rate of N-1 historical moments before the current moment to obtain a packet loss rate sequence, and performing feature construction on the packet loss rate sequence to obtain a set of packet loss rate features.
[0018] Optionally, the above-mentioned feature construction of the RTT sequence obtains a set of RTT features, including at least one of the following: determining the standard deviation of the RTT in the RTT sequence, determining the mean of the RTT in the RTT sequence, determining the sequence tail value in the RTT sequence, and determining the sequence head value in the RTT sequence; the feature construction of the packet loss rate sequence obtains a set of packet loss rate features, including at least one of the following: determining the standard deviation of the packet loss rate in the packet loss rate sequence, determining the mean of the packet loss rate in the packet loss rate sequence, determining the sequence tail value in the packet loss rate sequence, and determining the sequence head value in the packet loss rate sequence.
[0019] Optionally, the above-mentioned obtaining of the current bandwidth adjustment step matching the current network status category includes: obtaining the current bandwidth adjustment step having a corresponding relationship with the current network status category in a preset corresponding relationship table, wherein the corresponding relationship table records multiple groups of network status categories and bandwidth adjustment steps having a corresponding relationship, the multiple groups of network status categories and bandwidth adjustment steps having a corresponding relationship include the current network status category and the current bandwidth adjustment step having a corresponding relationship, and among the multiple groups of network status categories and bandwidth adjustment steps having a corresponding relationship, the network status categories of each group are different, and the bandwidth adjustment step sizes of at least two groups are different.
[0020] According to another aspect of an embodiment of the present application, a network bandwidth adjustment device is also provided, including: a first acquisition unit, used to acquire a group of network state features corresponding to a current network state sequence, wherein the current network state sequence includes N groups of network state information corresponding to N moments, the N moments include the current moment and N-1 historical moments before the current moment, the N groups of network state information include network state information of each moment in the N moments, and N is a positive integer greater than or equal to 2; a first processing unit, used to input a group of network state features into a target category prediction model to obtain a current network state category corresponding to a group of network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a historical network state feature set and a corresponding network state category set, the historical network state feature set includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2; a second acquisition unit, used to acquire a current bandwidth adjustment step matching the current network state category, and use the current bandwidth adjustment step to adjust the current network bandwidth at the current moment to obtain the network bandwidth allowed to be used at the next moment of the current moment.
[0021] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned network bandwidth adjustment method when running.
[0022] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0023] According to another aspect of the embodiments of the present application, there is further provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the network bandwidth adjustment method through the computer program.
[0024] Through the above-mentioned embodiments provided by the present application, a group of network status features of the current network status are input into the target category prediction model to obtain the status category of the current network status, and the bandwidth adjustment step for adjusting the current network bandwidth is determined according to the predicted current network status category. In other words, by predicting the status category of the current network status acquired in real time, the bandwidth adjustment step matching the status category is determined, thereby determining different bandwidth adjustment step according to different categories of network status, avoiding the technical problem of low accuracy caused by the use of a fixed bandwidth adjustment step to adjust the network bandwidth in the related art, and achieving the technical effect of improving the stability of the network status. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0026] Figure 1 is a schematic diagram of an application scenario of an optional network bandwidth adjustment method according to an embodiment of the present application;
[0027] Figure 2 is a flow chart of an optional method for adjusting network bandwidth according to an embodiment of the present application;
[0028] Figure 3 is an overall schematic diagram of an optional method for adjusting network bandwidth according to an embodiment of the present application (I);
[0029] Figure 4 It is an optional network status feature in multiple dimensions according to an embodiment of the present application;
[0030] Figure 5 is an overall schematic diagram of an optional method for adjusting network bandwidth according to an embodiment of the present application (II);
[0031] Figure 6 is a schematic diagram of an optional iterative operation using K-Means clustering and PU-Learning purification according to an embodiment of the present application;
[0032] Figure 7 is a schematic diagram of multiple optional categories of network states according to an embodiment of the present application;
[0033] Figure 8 According to an embodiment of the present application, an optional method of S j A specific example of fitting a curve into the jth target curve;
[0034] Fig. 9 is a schematic diagram of an optional feature-based category correction according to an embodiment of the present application;
[0035] Fig.10 An optional accuracy rate of different network status categories obtained by training the XGBoost classification model according to an embodiment of the present application;
[0036] Fig.11 A schematic diagram of the structure of an optional network bandwidth adjustment device according to an embodiment of the present application;
[0037] Fig.12 It is a schematic diagram of the structure of an optional electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0038] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0039] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0040] The technical solutions in the embodiments of the present application will comply with legal provisions during implementation. When performing operations according to the technical solutions in the embodiments, the data used will not involve user privacy. While ensuring that the operation process is compliant and legal, the security of the data is guaranteed.
[0041] Glossary:
[0042] RTT: Round-Trip Time. It refers to the total delay from the start of sending data to the end of receiving confirmation from the receiver (the receiver sends confirmation immediately after receiving the data). It is one of the important indicators reflecting the real-time status of the network;
[0043] Loss: This refers to the packet loss rate, which indicates the ratio of the number of lost data packets to the total number of data packets sent by the sender. It is one of the important indicators that reflect the real-time status of the network.
[0044] According to one aspect of the embodiments of the present application, a method for adjusting network bandwidth is provided. As an optional implementation, the above-mentioned method for adjusting network bandwidth can be applied to, but is not limited to, Figure 1 The application scenario shown in Figure 1In the application scenario shown, the terminal device 102 may, but is not limited to, communicate with the server 106 via the network 104, and the server 106 may, but is not limited to, perform operations on the database 108, such as write data operations or read data operations. The above-mentioned terminal device 102 may, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The above-mentioned human-computer interaction screen may, but is not limited to, be used to display information on the current network status on the terminal device 102, the adjusted network bandwidth, etc. The above-mentioned processor may, but is not limited to, be used to respond to the above-mentioned human-computer interaction operation, perform corresponding operations, or generate corresponding instructions, and send the generated instructions to the server 106. The above-mentioned memory is used to store relevant processing data, such as a set of network status features, a historical network status feature set, and a current bandwidth adjustment step.
[0045] As an optional method, the following steps in the method for adjusting the network bandwidth can be performed on the server 106: Step S102, obtaining a group of network status features corresponding to the current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include the current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each moment in the N moments, and N is a positive integer greater than or equal to 2; Step S104, inputting a group of network status features into a target category prediction model to obtain a current network status category corresponding to a group of network status features, wherein In step S106, the target category prediction model is a model obtained by training the initial category prediction model using a historical network state feature set and a corresponding network state category set, the historical network state feature set includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2; step S106, obtaining a current bandwidth adjustment step matching the current network state category, and using the current bandwidth adjustment step to adjust the current network bandwidth at the current moment, to obtain the network bandwidth allowed to be used at the next moment of the current moment.
[0046] In the above manner, a set of network status features of the current network status is input into the target category prediction model to obtain the status category of the current network status, and the bandwidth adjustment step for adjusting the current network bandwidth is determined according to the predicted current network status category. In other words, by predicting the status category of the current network status acquired in real time, the bandwidth adjustment step matching the status category is determined, thereby determining different bandwidth adjustment step according to different categories of network status, avoiding the technical problem of low accuracy caused by the use of a fixed bandwidth adjustment step to adjust the network bandwidth in the related art, and achieving the technical effect of improving the stability of the network status.
[0047] In order to solve the problem of low accuracy in the process of adjusting the network bandwidth, a method for adjusting the network bandwidth is proposed in an embodiment of the present application. Figure 2 : is a flow chart of a method for adjusting network bandwidth according to an embodiment of the present application, the process includes the following steps:
[0048] Step S202, obtaining a group of network status features corresponding to the current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include the current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each moment in the N moments, and N is a positive integer greater than or equal to 2;
[0049] In the embodiment of the present application, sample data (network status) is mainly acquired in real time through time series data of two network status indicators, namely round-trip delay RTT and packet loss rate Loss, and features are constructed based on the time series data in the two dimensions of RTT and Loss.
[0050] As an optional implementation, the above-mentioned acquisition of a set of network status features corresponding to the current network status sequence includes:
[0051] Obtain the round-trip time (RTT) at the current moment and the RTT at N-1 historical moments before the current moment to obtain an RTT sequence, and construct features for the RTT sequence to obtain a set of RTT features; and / or
[0052] The packet loss rate at the current moment and the packet loss rates at N-1 historical moments before the current moment are obtained to obtain a packet loss rate sequence, and feature construction is performed on the packet loss rate sequence to obtain a set of packet loss rate features.
[0053] For example, by obtaining the RTT sliding window time series of the past 8 points and the Loss sliding window time series of 8 points in real time, for example, the time series data corresponding to a sample includes: RTT sequence [101, 15, 23, 142, 135, 12, 121, 100] and Loss sequence [0, 1, 1, 0, 5, 5, 1, 30], where each value in the RTT sequence corresponds to the round-trip delay at 8 time points, and each value in the Loss sequence corresponds to the packet loss rate at 8 time points.
[0054] The RTT sequences of the past 8 time points and the Loss sequences of the past 8 time points are obtained according to preset time intervals. For example, each interval of 500 ms is taken as one of the time points.
[0055] As an optional example, the feature construction of the RTT sequence to obtain a set of RTT features includes at least one of the following: determining a standard deviation of the RTT in the RTT sequence, determining a mean value of the RTT in the RTT sequence, determining a sequence tail value in the RTT sequence, and determining a sequence head value in the RTT sequence;
[0056] Performing feature construction on the packet loss rate sequence to obtain a set of packet loss rate features, including at least one of the following: determining a standard deviation of the packet loss rate in the packet loss rate sequence, determining a mean of the packet loss rate in the packet loss rate sequence, determining a sequence tail value in the packet loss rate sequence, and determining a sequence head value in the packet loss rate sequence.
[0057] For example, using the RTT sequence of the past 8 points, a set of RTT features for this sample is constructed: rtt std / rtt mean ,(rtt last -rtt first ) / rtt mean 、|rtt last -rtt first | / rtt mean etc., among which, rtt std Represents the standard deviation of the 8 points in the packet loss rate RTT dimension, rtt mean Represents the mean of 8 points in the RTT dimension, rtt last Indicates the tail value of the sequence, rtt first Indicates the sequence header value.
[0058] Similarly, using the Loss sequence of the past 8 points, a special set of LOSS features for this sample is constructed: loss std / rtt mean 、(loss last -loss first ) / rtt mean 、|loss last -loss first | / loss mean etc., among which, loss std Indicates the standard deviation of the eight points in the round-trip delay LOSS dimension, loss mean represents the average of the eight points in the round-trip delay LOSS dimension, loss last Indicates the tail value of the sequence, loss first Indicates the sequence header value.
[0059] In addition to the above-mentioned set of RTT features and a set of Loss features, other features may also be included, for example, Figure 4 As shown, in actual application scenarios, similar features can be freely increased or decreased according to business characteristics.
[0060] In addition, a group of network status features corresponding to the current network status sequence includes but is not limited to a group of RTT features, or a group of packet loss rate features, or a group of RTT features and a group of packet loss rate features, etc.
[0061] By introducing network status features in multiple dimensions and using these network status features to identify the category of the current network status, core reference indicators are provided for network bandwidth estimation, so that rapid changes in network bandwidth can be quickly perceived and the stability of network bandwidth can be guaranteed when there is a short-term jitter in the network.
[0062] Step S204, inputting a set of network state features into a target category prediction model to obtain a current network state category corresponding to a set of network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a set of historical network state features and a corresponding set of network state categories, the set of historical network state features includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2;
[0063] In an embodiment of the present application, an XGBoost classification model is used to predict the category of the current network status and obtain the corresponding current network status category. For example, when the RTT curve continues to rise and the Loss curve decreases and tends to stabilize, it is determined to be in an over-issued state, and the network bandwidth will be adjusted downward, for example, step1=-0.1; when the RTT curve continues to decline and the Loss curve also continues to decline, it is considered that the network data is in an empty state. At this time, after waiting for a period of time (for example, after the step=0 stage), if the RTT curve and the Loss curve are both at a stable and low level, the network bandwidth will be increased, for example, step=100.
[0064] It should be noted that after a set of network state features are input into the target category prediction model, the predicted probability that the current network state category belongs to each of the preset multiple state categories will be obtained. For example, there are 30 preset state categories, and a total of 30 prediction probabilities are obtained. The target state category corresponding to the probability with the largest value among the 30 prediction probabilities is determined as the current network state category. For example, the predicted probability of category 1 is 0.9, then the current network state category is determined to be category 1.
[0065] Among them, the XGBoost classification model is an efficient gradient boosting decision tree algorithm. It has been improved on the basis of the original GBDT, which greatly improves the model effect. As a forward addition model, its core is to adopt the integration idea (Boosting idea), integrating multiple weak learners into a strong learner through a certain method, that is, using multiple trees to make decisions together, and the result of each tree is the difference between the target value and the prediction results of all previous trees, and then all the results are accumulated to get the final result, so as to improve the overall model effect.
[0066] Obviously, the XGBoost classification model used in the embodiments of the present application is only an example and is not limited to it. For example, it can also be replaced by traditional machine learning models such as GBDT, decision tree, random forest, LightGBM, and deep learning models such as DNN.
[0067] For the training of XGBoost classification model, the historical network state feature set and the corresponding network state category set are used for training, including:
[0068] Each of the M historical network status sequences includes N groups of historical network status information corresponding to N historical moments, the N historical moments include a historical moment before the current moment and N-1 historical moments before the historical moment, the N groups of historical network status information include network status information of each of the N historical moments, M is a positive integer greater than or equal to 2, wherein each historical network status sequence corresponds to a sample data within a historical period.
[0069] The implementation process of performing the clustering operation on the M groups of network status features will be described in detail below in conjunction with specific embodiments.
[0070] Step S206, obtaining a current bandwidth adjustment step length that matches the current network status category, and using the current bandwidth adjustment step length to adjust the current network bandwidth at the current moment, to obtain a network bandwidth that is allowed to be used at the next moment after the current moment.
[0071] In order to facilitate understanding of the above-mentioned network bandwidth adjustment method, in the embodiment of the present application, the time series data of the two network status indicators, round-trip delay RTT and packet loss rate Loss, are mainly used to obtain sample data (network status) in real time, and features are constructed based on the time series data in the two dimensions of RTT and Loss.
[0072] like Figure 3 As shown, the network bandwidth adjustment method of this application includes three parts:
[0073] Part 1: Use the unsupervised K-Means clustering algorithm and the PU-Learning algorithm to classify the sample data and label the samples;
[0074] Part 2: Training the XGBoost classification model using sample data with category labels;
[0075] Assuming that all samples are divided into 30 categories through the first part, the classification model is trained using samples with labeled categories. The final accuracy of each category obtained by training is as follows: Fig.10 As shown, it can be seen intuitively that for more than half of the categories, the XGBoost classification model can achieve a high accuracy rate.
[0076] Part 3: Input a set of network state sequences corresponding to the current network state sequence into the trained XGBoost classification model to obtain the current network state category of the current network state.
[0077] Finally, according to the predicted current network status category, determine whether to increase or decrease the bandwidth, and further determine the current bandwidth adjustment step, for example, step=100, 50, 0, etc. The above three parts will be described in detail below in conjunction with specific embodiments.
[0078] It should be noted that the above-mentioned network bandwidth adjustment method can be but is not limited to being used in real-time audio and video products. Based on this adjustment method, a more accurate network status category can be obtained, thereby assisting in judging the current network status, and knowing the upward and downward adjustments of the network bandwidth estimate, obtaining a more accurate real-time bandwidth estimate, and further controlling and optimizing the network transmission quality.
[0079] By adopting the above technical solution, a set of network status features of the current network status is input into the target category prediction model to obtain the status category of the current network status, and the bandwidth adjustment step for adjusting the current network bandwidth is determined according to the predicted current network status category. In other words, by predicting the status category of the current network status acquired in real time, the bandwidth adjustment step matching the status category is determined, thereby determining different bandwidth adjustment step according to different categories of network status, avoiding the technical problem of low accuracy caused by the use of a fixed bandwidth adjustment step to adjust the network bandwidth in the related technology, and achieving the technical effect of improving the stability of the network status.
[0080] As an optional example, before inputting a set of network state features into the target category prediction model, the method further includes:
[0081] Obtaining M groups of network status features corresponding to M historical network status sequences, wherein each of the M historical network status sequences includes N groups of historical network status information corresponding to N historical moments, the N historical moments include a historical moment before the current moment and N-1 historical moments before the historical moment, the N groups of historical network status information include historical network status information of each historical moment in the N historical moments, and M is a positive integer greater than or equal to 2;
[0082] A clustering operation is performed on the M groups of network status features to obtain K clusters and K network status categories with a one-to-one correspondence, wherein each cluster in the K clusters includes at least one group of network status features in the M groups of network status features, the K network status categories include the current network status category, and K is a positive integer greater than or equal to 1.
[0083] By adopting the same method as that of obtaining the RTT sliding window time series of the past 8 points and the Loss sliding window time series of 8 points in real time in the above embodiment, M historical network state sequences can be obtained, for example, M=100, wherein each historical network state sequence corresponds to a sample and a set of network state features, wherein a set of network state features includes but is not limited to a set of RTT features, or a set of Loss features, or a set of RTT features and a set of Loss features, etc.
[0084] Since the M samples corresponding to the M historical network state sequences obtained in real time are unlabeled samples and cannot be directly labeled, the embodiment of the present application first adopts the following method: Figure 5 The sample K-Means clustering and PU-Learning algorithm shown in the figure classifies the acquired sample data and solves the class labeling problem when classifying network status.
[0085] As an optional implementation, the above-mentioned clustering operation is performed on the M groups of network status features to obtain K clusters and K network status categories having a one-to-one correspondence, including:
[0086] The following iterative operation is performed until the network status category corresponding to each group of network status features in the M groups of network status features is determined, wherein the network status features of the remaining undetermined clusters after the 0th iteration are the M groups of network status features, and i is a positive integer greater than or equal to 1:
[0087] The network state features of the remaining undetermined clusters after the i-1th iteration are P of the M sets of network state features. i -1 set of network status characteristics, for P i -1 group of network status features performs clustering operation and obtains K i Initial clusters, where Pi -1 is a positive integer greater than or equal to 1, K i is a positive integer greater than or equal to 1;
[0088] In K i There are Q in the initial clusters that meet the preset business logic. i In the case of initial clusters, i The network status characteristics of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i clusters, among which Q i is greater than or equal to 1 and less than or equal to K i A positive integer of ;
[0089] When there is no network status feature of an undetermined cluster after the i-1th iteration, the iteration operation is terminated.
[0090] As an optional example, the above Q i The network status characteristics of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i Clusters include:
[0091] Follow the steps below to i The network status features of each group included in the qth initial cluster in the initial cluster are adjusted to obtain the qth cluster determined by the i-th iteration, where q is greater than or equal to 1 and less than or equal to Q i A positive integer:
[0092] The initial category prediction model is trained using the positive sample set and the negative sample set to obtain the qth category prediction model, wherein the qth category prediction model is used to determine the probability that a set of input network state features belongs to the qth cluster. The positive sample set includes each set of network state features included in the qth initial cluster, and the negative sample set includes P i-1 Each group of network state features in the group network state features except each group of network state features in the qth initial cluster;
[0093] P i-1 Each group of network state features in the group network state features is input into the qth category prediction model to obtain P i-1 probability, where P i-1 The probability is used to represent P i-1 The probability that each group of network state features in the group network state features belongs to the qth cluster;
[0094] P i-1 The r groups of network state features in the group network state features are determined as the qth cluster determined in the i-th iteration, where i-1The probability corresponding to the r group of network status features in the probability is greater than or equal to the preset probability threshold, r is greater than or equal to 1 and less than or equal to P i-1 A positive integer.
[0095] The above iterative operations include but are not limited to two types of operations: K-Means clustering and PU-Learning purification. The steps of the iterative operation include:
[0096] (1) Perform unsupervised clustering on all S samples of the data to obtain K0 initial clusters;
[0097] (2) Use the PU-Learning algorithm to screen positive samples for the K0 categories that conform to business logic and have significant network morphology, obtain S0 labeled samples, and re-set the S-S0 samples that do not meet the threshold requirements as a new clustering data set;
[0098] (3) Re-cluster the data set consisting of S-S0 samples, with the cluster category being K1, usually K1≤K0, to obtain new K1 categories;
[0099] (4) Repeat steps b and c until the model converges (the intra-class morphological differences become larger, or the number of samples screened by PU-Learning is small).
[0100] Among them, the steps of K-Means algorithm are as follows:
[0101] 1) Randomly select M samples as the initial cluster centers;
[0102] 2) According to the M groups of network state features corresponding to the M samples, the Euclidean distances of all samples to the M cluster centers are calculated, and each sample is divided into the cluster center with the closest distance as a class;
[0103] 3) Recalculate the cluster center (the centroid of all samples belonging to that class) for each class;
[0104] 4) Repeat steps b and c until the termination condition (maximum number of iterations) is reached.
[0105] The process of PU-Learning sample purification is as follows:
[0106] 1) For a certain type of samples obtained by K-Means clustering, take it as the positive sample, and all other data are sampled as negative samples in a 1:1 ratio of positive and negative samples to train the XGBoost classification model;
[0107] 2) Use the trained model to score all sample data, and select samples with scores higher than 0.95 as the final sample data of this category;
[0108] 3) Repeat steps a and b to purify the categories selected in this round of K-Means one by one to obtain fixed categories and samples corresponding to the categories.
[0109] In order to more clearly understand the implementation process of determining K network status categories and K clusters by combining the K-Means clustering and PU-Learning, it is described below in conjunction with specific embodiments.
[0110] like Figure 6 As shown, assuming that according to the method in the above embodiment, 8 samples are obtained, and each sample corresponds to a set of network status features, then the steps of clustering the 8 samples into 8 clusters using a method combining K-Means and PU-Learning, and determining the category of the network status corresponding to each cluster are as follows:
[0111] S602, performing unsupervised clustering on the 8 samples to obtain 4 initial clustering categories;
[0112] like Figure 6 As shown in (a), sample 1 and sample 2 are clustered into one category (obtaining a cluster), sample 3 and sample 4 are clustered into one category, and so on;
[0113] S604, select Figure 6 The four initial clustering categories shown in (a) are category 1 and category 4 that conform to business logic and have significant network morphology;
[0114] Among them, the categories that conform to business logic and have significant network morphology can be, but are not limited to, based on the RTT sliding window time series of all samples in the specified category at the past N time points and the Loss sliding window time series of N points, to obtain the overall RTT sequence and the overall Loss sequence of the samples in the specified category.
[0115] When the overall RTT sequence is continuously increasing and the overall Loss sequence is continuously increasing, the current network state is determined to be congested, and the bandwidth estimate needs to be lowered, for example, from the current 1000KB to 900KB; or, when the overall RTT sequence is continuous and the overall Loss sequence is continuous, indicating that the current network is in the Normal state, the current network state is determined to be stable, and the bandwidth estimate can be increased, for example, from the current 1000KB to 1050KB.
[0116] S606, purifying category 1 (cluster 1) and category 4 (cluster 4) using the PU-Learning algorithm;
[0117] (I) Purify (adjust) cluster 1
[0118] S606-1, as Figure 6 As shown in (b), assume that samples 1 and 2 are positive samples, and samples 3 to 8 are negative samples;
[0119] S606-2, as Figure 6 As shown in (c), sample 5 and sample 7 are selected from samples 3 to 8 as negative samples in a 1:1 random sampling manner;
[0120] Among them, according to the number of positive samples, the same number of samples are randomly selected from the negative sample set as negative samples.
[0121] S606-3, using a binary classification model to predict whether samples 1 to 8 are positive samples, and when the prediction probability output by the model is greater than a preset probability threshold, the corresponding sample is determined as a positive sample.
[0122] For example, it is determined that sample 1, sample 2, and sample 3 are positive samples, such as Figure 6 As shown in (d).
[0123] (II) Purify cluster 4 (adjust the network status characteristics of each group in each initial cluster)
[0124] Assume that samples 7 and 8 in category 4 are positive samples, and samples 4, 5, and 6 are negative samples. Then, sample 5 and sample 6 are randomly selected from samples 4 to 6 as negative samples in a 1:1 manner.
[0125] A binary classification model is used to predict whether samples 4 to 8 are positive samples, and when the predicted probability output by the model is greater than the preset probability threshold, the corresponding sample is determined as a positive sample. For example, samples 7 and 8 are determined to be positive samples. Figure 6 As shown in (d) and (f).
[0126] So far, the first round of iteration operations has been completed.
[0127] A second round of iterative operation is performed on the remaining samples 4, 5 and 6. The specific steps are as described in the above steps i) to (iv) and will not be repeated here.
[0128] Assume that after the above K-Means clustering and PU-Learning purification, it is determined that sample 1, sample 2, and sample 3 are marked as category 1, sample 7 and sample 8 are marked as category 4, sample 4 is marked as category 2, and so on.
[0129] Obviously, the eight samples in the above embodiment are only examples and are not limited thereto. In actual application scenarios, the number of samples may be hundreds, thousands, or even tens of thousands. Therefore, when all samples are categorized using the same method as in steps S602 to S606, a total of 30 categories may be obtained (the network status of each category can be referred to in Figure 7 shown), or a wider variety of categories.
[0130] In addition, after completing the two types of operations, K-Means clustering and PU-Learning purification, we usually combine expert experience, analyze from the perspective of morphology and subsequent response strategies, merge some categories with similar morphologies, and for categories that need to be specially subdivided for business needs, perform weighted reconstruction of features and perform category corrections to handle individual case categories separately, ultimately obtaining 30 network morphology classifications.
[0131] The specific process of category modification can be referred to Fig. 9 , assuming that after the above iterations, Fig. 9 The samples corresponding to the three network forms shown are divided into one category. For example, they all belong to the rising tail of rtt. Fig. 9 The slope of the last two points in the curve shown in (a) is taken as feature 1. Fig. 9 The slope of the last four points in the curve shown in (b) is used as feature 2. Fig. 9 The slope of the last 8 points in the curve shown in (c) is used as feature 3. By increasing the weight of feature 1, the rise of the tail becomes more important, so that the first and second subclasses in the category of the rise of the tail can be distinguished. Among them, the first subclass is Fig. 9 In (a), sub-category 2 is as follows Fig. 9 (b) and (c).
[0132] Through the above-mentioned category correction, a category with similar network morphology can be refined (one category can be split into multiple subcategories), or multiple categories with similar network morphology can be merged, so that the category division result is more accurate.
[0133] By adopting the above method, the obtained M groups of network state features can be divided into different categories, and the sample data belonging to different categories can be labeled, thereby laying the foundation for training the initial category prediction model.
[0134] As an optional example, the above method further includes:
[0135] Determine K by the following steps i Whether the jth initial cluster among the initial clusters meets the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer:
[0136] Include S in the jth initial cluster j Group network status characteristics, S j The group network status characteristics correspond to S j In the case of a historical network state sequence, obtain S j The historical network state sequence corresponding to S j curves, among which S j The kth curve in the curves includes N points, and N points represent S j A set of historical network state information corresponding to N historical moments included in the kth historical network state sequence in the historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j A positive integer of ;
[0137] S j The j-th curve is fitted into the j-th target curve, and according to the j-th target curve, it is determined whether the j-th initial clustering cluster conforms to the preset business logic.
[0138] For example, suppose the jth cluster includes 5 samples, each sample corresponds to a set of network state features as RTT features, and a total of 5 sets of network state features are obtained. Since the 5 sets of network state features correspond to 5 historical network state sequences, the corresponding Figure 8 There are five rtt curves shown in (a).
[0139] Fitting the five rtt curves yields the following Figure 8 According to the shape of the fitted RTT curve, it is determined whether the jth initial cluster meets the preset business logic. For example, when the shape of the fitted RTT curve is as follows: Figure 8 The continuous rise shown in (c) indicates that the network data is in an over-issuance state at this time, so determining the jth initial cluster is in line with the preset business logic.
[0140] In the case of meeting the preset business logic, the category label of the jth initial cluster is recorded as label=1.
[0141] Similarly, assuming that each sample corresponds to a set of network state features as Loss features, a total of 5 sets of network state features are obtained. Since the 5 sets of network state features correspond to 5 historical network state sequences, the corresponding Figure 8 There are five rtt curves shown in (b).
[0142] Fitting the 5 loss curves yields the following Figure 8According to the shape of the fitted LOSS curve, it is determined whether the jth initial cluster meets the preset business logic. For example, when the shape of the fitted LOSS curve is as follows: Figure 8 The continuous rise shown in (c) indicates that network data begins to become congested and the network bandwidth needs to be reduced. At this time, it will be determined that the jth initial cluster is in line with the preset business logic.
[0143] As an optional implementation, the above-mentioned determining whether the j-th initial cluster meets the preset business logic according to the j-th target curve includes:
[0144] In response to the selection instruction for the j-th target curve, it is determined that j initial clusters conform to the preset business logic.
[0145] That is, for the jth initial cluster after K-Means clustering, by j The historical network state sequence corresponding to S j The jth curve is fitted, and according to the curve shape of the jth target curve after fitting, it is manually determined whether the jth initial clustering cluster conforms to the preset business logic.
[0146] Specifically, the curve shape of the j-th curve is manually judged, and when the j-th target curve is selected, it is determined that the j-th initial cluster cluster conforms to the business logic, and the category label of the j-th initial cluster cluster is recorded as label=1 (or 2, 3, etc.), and the j-th target curve corresponding to the category with the category label label=1 is used as a type of curve for indicating a certain network state.
[0147] It should be noted that, in addition to the above method for determining the j-th target curve, it can also be determined by the following method:
[0148] In S j The j-th target curve is fitted into the j-th target curve by searching for a curve matching the j-th target curve in a preset curve set, wherein the curve set includes multiple preset curves that conform to preset business logic;
[0149] When a curve matching the j-th target curve is found, it is determined that the j-th initial cluster meets the preset business logic.
[0150] For example, suppose that after K-Means clustering, 4 initial clusters are obtained, and the first initial cluster among the 4 initial clusters includes 5 groups of network state features, wherein each group of network features is a historical network state sequence, and according to a historical network state sequence, a corresponding curve is obtained.
[0151] For example, when a set of network status features is RTT features, then 5 sets of network status features correspond to 5 historical network status sequences. According to the 5 historical network status sequences, we can get: Figure 8 There are 5 RTT curves shown in (a), where each RTT curve consists of N groups of network status information corresponding to N time points. When N=8, it is an RTT curve composed of 8 round-trip delay (RTT) data corresponding to 8 time points.
[0152] When a set of network state features is a Loss feature, then the five sets of network state features correspond to five historical network state sequences. According to the five historical network state sequences, we can get: Figure 8 There are five loss curves shown in (b), where each loss curve consists of N sets of network status information corresponding to N moments. When N=8, it is an RTT curve composed of 8 packet loss rates (loss) corresponding to 8 moments.
[0153] Will be like Figure 8 The five RTT curves shown in (a) are fitted into one RTT curve, or Figure 8 The five loss curves shown in (b) are fitted into a LOSS curve, and then according to a fitted RTT curve or a fitted LOSS curve, it is determined whether the first initial clustering cluster meets the preset business logic.
[0154] Among them, the preset business logic can be but is not limited to that the network state represented by the fitted RTT curve or LOSS curve is in line with the business logic, for example, the fitted RTT curve is in a stable state, continuously decreasing or continuously increasing state, etc.; the fitted LOSS curve is converted from a stable state to an upward trend or is always in a stable state, etc.
[0155] After the j-th target curve is determined, a curve matching the j-th target curve may be searched in a preset curve set in the following manner, but is not limited to:
[0156] Searching for a curve matching the j-th target curve in the curve set, wherein the distance between the j-th target curve and the matching curve is less than or equal to a preset distance threshold; or
[0157] A curve matching the j-th target curve is searched in the curve set, wherein the similarity between the j-th target curve and the matching curve is greater than or equal to a preset similarity threshold.
[0158] For example, suppose the preset curve set includes Figure 7 There are 30 RTT curves and 30 LOSS curves shown. Methods for finding a curve matching the j-th target curve from the 30 curves include but are not limited to the following two:
[0159] The first type: Assuming that the jth target curve is the fitted RTT curve, it is determined according to the distance between the jth target curve and the matching curve;
[0160] Specifically, the cumulative value of the difference between the fitted RTT curve and N points on any RTT curve among the 30 standard RTT curves is calculated respectively. When the cumulative value is less than or equal to the preset distance threshold, the corresponding standard RTT curve is determined as the curve matching the j-th target curve.
[0161] Alternatively, when the j-th target curve is a fitted LOSS curve, the cumulative value of the difference between the fitted LOSS curve and N points on any one of the 30 standard LOSS curves is calculated respectively. When the cumulative value is less than or equal to a preset distance threshold, the corresponding standard LOSS curve is determined as the curve matching the j-th target curve.
[0162] The second type: when the j-th target curve is the fitted RTT curve, based on the similarity between the j-th target curve and the curve to be matched (standard RTT curve), for example, the curve change trend of each of the two curves, wherein the curve change trend can be determined according to the change value between N points on the curve; or, when the j-th target curve is the fitted LOSS curve, based on the similarity between the j-th target curve and the curve to be matched (standard LOSS curve), the method for determining the similarity refers to the description in the above embodiment.
[0163] After finding a curve matching the jth target curve from the curve set using the above method, all samples in the jth initial cluster are determined according to the shape of the found curve (for example, Figure 8 The 5 samples shown in the figure are classified into categories and the category labels are marked as 0, 1, 2, etc.
[0164] It should be noted that Figure 7 Each network category shown has significant business significance. For example, cluster_0 network category represents that the network is in a stable state, which means that the network is in good condition. Cluster_1 network category indicates that Loss is on a downward trend and RTT is stable, which means that the network may be a shallow cache network at this time and the network is in a rapid emptying stage. Cluster_2 network indicates that Loss is in an upward stage and tends to be stable, and RTT is stable, which means that the network may be a shallow cache network at this time and is in the over-issuance buffer filling stage. The network will tend to be stable after the over-issuance stabilizes in the later stage. Cluster_3 indicates that the network Loss is at a stable low level and RTT decreases and then tends to be stable, which means that the network is in a rapid emptying stage and the network will recover and stabilize in the later stage.
[0165] Based on the classification of various network forms and after assigning business meanings, different bandwidth upward (upward adjustment) or downward (downward adjustment) strategies can be provided for each type of network in a targeted manner.
[0166] As an optional example, the above S j The curves are fitted into the jth target curve, including:
[0167] For S j The points with the same sequence number in each of the curves are averaged to obtain N average points, and the j-th target curve is determined as a curve including N average points, where S j The point numbered n in the k-th curve in the curves represents the historical network status information at the n-th historical moment in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or
[0168] For S j The points with the same sequence number in each of the curves are weighted and summed to obtain N weighted points, and the j-th target curve is determined as a curve including the N weighted points.
[0169] For example, assuming that j = 1, the first initial cluster includes S1 = 5 groups of network state features, and the 5 groups of network state features correspond to 5 RTT sequences under historical network states. Each RTT sequence under historical network state includes a group of RTT values corresponding to N = 8 historical moments. Then, the mean RTT value of the 5 samples at each time point is calculated respectively, and the RTT mean value of 8 time points is obtained, so as to fit as follows: Figure 8 The first target curve (RTT curve) is shown in (c).
[0170] Specifically, for Figure 8 The RTT mean of the second point A in the RTT curve shown in (c) is Figure 8 The average of the five rtt values corresponding to time t1 shown in (a) is obtained.
[0171] Similarly, assuming that j = 2, the second initial cluster includes S2 = 10 groups of network state features, and the 10 groups of network state features correspond to 10 RTT sequences under historical network states, and each RTT sequence under historical network state includes a group of RTT values corresponding to N = 8 historical moments. Then, the mean (weighted sum) of the RTT values of the 10 samples at each time point is calculated respectively, and the RTT mean values of 8 time points are obtained, thereby fitting into a similar Figure 8 The second target curve is shown in (c).
[0172] In this case, the RTT mean of the second point of the second target curve is obtained by averaging the 10 RTT values corresponding to time t1.
[0173] Using the same principle, assuming that j = 1, the first initial cluster includes S1 = 5 groups of network state features, and the 5 groups of network state features correspond to 5 loss sequences under historical network states. Each loss sequence under historical network state includes a set of loss values corresponding to N = 8 historical moments. Then, the mean of the loss values of the 5 samples at each time point is calculated respectively, and the mean of the LOSS at 8 time points is obtained, so as to fit into the following: Figure 8 The first target curve (LOSS curve) is shown in (c).
[0174] Specifically, for Figure 8 The LOSS mean of the first point B in the LOSS curve shown in (c) is Figure 8 The average of the five loss values corresponding to time t1 shown in (b) is obtained.
[0175] As another optional implementation, whether the j-th initial cluster conforms to the preset business logic may also be determined by the following methods, including:
[0176] Determine K by the following steps i Whether the jth initial cluster among the initial clusters meets the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer:
[0177] Include S in the jth initial cluster j Group network status characteristics, S j The group network status characteristics correspond to S j A historical network state sequence, S j When each of the historical network state sequences includes R subsequences, and each of the R subsequences includes N historical network state information under the same dimension, S is obtained. j ×R subsequences corresponding to S j ×R curves, among which S j The kth group of curves in ×R curves includes R curves, the sth curve in the R curves includes N points, and the N points represent N historical network state information under the sth dimension included in the sth subsequence in the kth historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j , R is a positive integer greater than or equal to 2, s is a positive integer greater than or equal to 1 and less than or equal to R;
[0178] S j ×R curves are fitted into R target curves, and according to the R target curves, it is determined whether the jth initial cluster meets the preset business logic.
[0179] For example, suppose the jth initial cluster includes 5 samples, each sample corresponds to a set of network status features, each set of network status features corresponds to a set of historical network status sequences, and each set of historical network status sequences includes R=2 subsequences, for example, including 1 rtt subsequence and 1 loss subsequence. In other words, each sample in the jth cluster corresponds to 5×2=10 curves, including 5 rtt curves and 5 loss curves.
[0180] Assume that 5 rtt curves are fitted as follows Figure 7 The 1 RTT target curve shown in 11# fits the 5 loss curves into Figure 7 The LOSS target curve shown in 11# determines whether the j-th initial cluster meets the preset business logic based on the curve shapes of the two target curves.
[0181] For another example, suppose that 5 rtt curves are fitted as follows Figure 7 The 1 RTT target curve shown in 24# fits the 5 loss curves into Figure 7 The one LOSS target curve shown in 24# determines whether the jth initial cluster meets the preset business logic based on the curve shapes of these two target curves.
[0182] As an optional example, the above implementation method of determining whether the j-th initial cluster meets the preset business logic according to R target curves includes:
[0183] In response to the selection instruction of the R target curves, it is determined that j initial clusters conform to the preset business logic.
[0184] For example, suppose the two target curves after fitting are as follows Figure 7 As shown in Figure 11, RTT is stable and LOSS continues to rise, indicating that the cache of network data is relatively small, and the LOSS state is dominant. The increase in LOSS means that the network begins to be congested. At this time, if these two target curves are selected, it is determined that the jth initial cluster is in line with the preset business logic.
[0185] For another example, suppose the two target curves after fitting are as follows Figure 7As shown in Figure 24, although the LOSS decreases and tends to stabilize, the RTT continues to increase, indicating that the network data is in an over-issued state and the network bandwidth needs to be reduced. At this time, selecting R target curves and determining the jth initial cluster also conforms to the preset business logic.
[0186] It should be noted that when it is determined that the jth initial cluster conforms to the business logic, the category label of the jth initial cluster is recorded as label=1 (or 2, 3, etc.), and the R target curves corresponding to the category are used as a type of curve for indicating a certain network state.
[0187] It should be noted that, in addition to the above method for determining R target curves, the following methods can also be used to determine:
[0188] S j ×R curves are fitted into R target curves, and curves matching the R target curves are searched in a preset curve set, wherein the curve set includes multiple preset curves that conform to preset business logic;
[0189] When a curve matching the R target curves is found, it is determined that the jth initial cluster meets the preset business logic.
[0190] For example, still assuming that j=1, the first initial cluster includes S1=5 groups of network state features, and the 5 groups of network state features correspond to 5 historical network state sequences, where each historical network state sequence includes 2 subsequences, the first subsequence is an rtt sequence composed of rtt (round trip delay) under N (for example, N=8) historical network states, and the second subsequence is a loss sequence composed of loss (packet loss rate) under N (N=8) historical network states. Then the 5 historical network state sequences include 5×2=10 subsequences, such as Figure 8 (a) and (b).
[0191] It should be noted that each of the above historical network status sequences corresponds to a group of curves, which includes an rtt curve corresponding to an rtt subsequence and a loss curve corresponding to a loss subsequence.
[0192] After the R target curves are determined, a curve matching the R target curves may be searched from a preset curve set in the following manner, but is not limited to:
[0193] Searching for a target curve set matching the R target curves in the curve set, wherein the R distances between the R original curves in the target curve set and the R target curves are less than or equal to a preset distance threshold; or
[0194] A target curve set matching the R target curves is searched in the curve set, wherein R similarities between the R original curves in the target curve set and the R target curves are greater than or equal to a preset similarity threshold.
[0195] Exemplarily, the distance between curves can be determined based on, but not limited to, the cumulative value of the difference between N points on two curves, and the R distances between R original curves and R target curves in the target curve set are determined by the corresponding R cumulative values.
[0196] For example, calculate Figure 8 The two original curves shown in (c) and Figure 7 The two distances between the two curves in the 17# network morphology diagram shown are, when both distances are less than or equal to a preset distance threshold, the two curves in the 17# network morphology diagram are determined to be target curves; otherwise, the two curves in the 17# network morphology diagram are determined not to be target curves.
[0197] It should be noted that Figure 7 The various types of morphology classification centers shown are obtained by classifying the network morphology of real-time audio and video product online data, where each network morphology classification includes two curves corresponding to the network status indicators in two dimensions, for example, the rtt curve indicating the round-trip delay and the loss curve indicating the packet loss rate. In addition, Figure 7 Each network form shown corresponds to a category label, for example, 0 (indicating a stable state), 1 (indicating an over-issuance state), etc.
[0198] In addition to determining the target curve based on the distance between curves, the target curve can also be determined by comparing the similarity between two curves, for example, by comparing the curve change trends of the two curves, where the curve change trend can be determined according to the change value between N points on the curve.
[0199] Through the above method, it can be determined whether the K clusters obtained by the K-Means clustering algorithm conform to the preset business logic. If they conform to the business logic, K network status categories with a one-to-one correspondence with the K clusters are obtained, and all samples in each cluster that conforms to the business logic are marked with corresponding category labels (for example, label = 0, 1, 2, 3, etc.), which improves the accuracy of the clustering results.
[0200] As an optional implementation method, the above S j ×R curves are fitted into R target curves, including:
[0201] For S jEach group of curves in the ×R curves performs the following fitting operation to obtain one of the R target curves, where each group of curves includes S j ×1 curve:
[0202] In S j ×1 curve corresponds to the sth dimension, for S j The points with the same serial number in each of the ×1 curves are averaged to obtain N average points, and a target curve is determined as a curve including N average points, where S j The point numbered n in the k-th curve of ×1 curves represents the network status information in the s-th dimension at the n-th time in the s-th subsequence in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or
[0203] For S j The points with the same sequence number in each of the ×1 curves are weighted and summed to obtain N weighted points, and a target curve is determined as a curve including the N weighted points.
[0204] For example, Figure 8 The five RTT values at the points with the same serial number (e.g., t0, t1, etc.) in the five RTT curves shown in (a) are averaged to obtain eight RTT means. The eight average points corresponding to the eight RTT means are connected to form the following: Figure 8 An RTT curve is shown in (c).
[0205] Specifically, the five rtt values corresponding to time t0 are averaged to obtain Figure 8 The average point C shown in (c) is obtained by averaging the five rtt values corresponding to time t1. Figure 8 The average point A shown in (c) is 1, and so on, 8 average points are obtained.
[0206] Likewise, Figure 8 The five loss values at the points with the same sequence number (e.g., t0, t1, etc.) in the five loss curves shown in (b) are averaged to obtain eight loss means. The eight average points corresponding to the eight loss means are connected to form the following Figure 8 A LOSS curve is shown in (c).
[0207] Specifically, the five loss values corresponding to time t0 are averaged to obtain Figure 8 The average point B shown in (c) is obtained by averaging the five loss values corresponding to time t1. Figure 8 The average point D shown in (c) is 1, and so on, 8 average points are obtained.
[0208] As an optional example, the above-mentioned obtaining the current bandwidth adjustment step size matching the current network status category includes:
[0209] A current bandwidth adjustment step corresponding to a current network status category is obtained in a preset correspondence table, wherein the correspondence table records a plurality of groups of network status categories and bandwidth adjustment steps having a corresponding relationship, the plurality of groups of network status categories and bandwidth adjustment steps having a corresponding relationship include a current network status category and a current bandwidth adjustment step having a corresponding relationship, and among the plurality of groups of network status categories and bandwidth adjustment steps having a corresponding relationship, the network status categories of each group are different, and at least two groups have different bandwidth adjustment steps.
[0210] Specifically, the current bandwidth adjustment step can be directly found from the preset corresponding relationship table according to the network status category. For example, assuming Figure 7 The two curves in the 8# network status diagram shown are two target curves that match the RTT curve and the LOSS curve of the current network status, and their status categories are marked as label=7. Then, according to the category label 7 of the current network status category, it is determined to reduce the network bandwidth, for example, step=-100.
[0211] For example, suppose Figure 7 The two curves in the 29# network status diagram shown are two target curves that match the RTT curve and LOSS curve of the current network status, and their status categories are marked as label=28. Then, according to the category label 28 of the current network status category, it can be determined that the current network data is in an empty state. At this time, the network bandwidth will not be increased immediately, but after waiting for the step=0 stage, if both rtt and loss are at a stable and low level, the network bandwidth will be increased normally, for example, step=100.
[0212] In addition, it is also possible to use the step size formula corresponding to each network status category (for example, step = k1*rtt+k2*loss, k1 and k2 are step size adjustment parameters), where rtt and loss respectively represent the characteristics of all samples belonging to one of the network status categories in multiple dimensions, for example, the characteristics in multiple dimensions such as the standard deviation and mean mentioned in the above embodiments.
[0213] Using the above characteristics in multiple dimensions and multiple step adjustment parameters, determine the current bandwidth adjustment step corresponding to the current network state, for example, step = 0.5*(1.5*rtt last +0.5*loss last )+0.5*(0.5*rtt mean +0.2*loss mean )+0.8*rttdiff , where each feature is preceded by a corresponding step size adjustment parameter.
[0214] It should be noted that the bandwidth adjustment step sizes of the above groups may be different from each other, or there may be at least two groups with different bandwidth adjustment step sizes.
[0215] Through the above method, the category of the network status can be accurately determined based on the network status acquired in real time and the status indicators of the network status in multiple dimensions, and the actual bandwidth adjustment step can be calculated based on the determined network status category, thereby solving the technical problem of low bandwidth estimation accuracy caused by using a fixed step size to adjust the network bandwidth in related technologies.
[0216] The embodiments of the present application can be applied to real-time audio and video products as a bandwidth estimation optimization solution, but is not limited to it. The products can obtain a more accurate network status category based on the algorithm calculation in the present application to assist in judging the current network status, thereby guiding the upward and downward adjustment of the network bandwidth estimation, obtaining a more accurate real-time bandwidth estimation value, and performing further network transmission quality control optimization.
[0217] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0218] According to another aspect of the embodiment of the present application, there is also provided Fig.11 A network bandwidth adjustment device is shown, the device comprising:
[0219] A first acquisition unit 1102 is configured to acquire a group of network status features corresponding to a current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include a current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each of the N moments, and N is a positive integer greater than or equal to 2;
[0220] The first processing unit 1104 is used to input a set of network state features into a target category prediction model to obtain a current network state category corresponding to a set of network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a historical network state feature set and a corresponding network state category set, the historical network state feature set includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2;
[0221] The second acquisition unit 1106 is used to acquire a current bandwidth adjustment step length that matches the current network status category, and use the current bandwidth adjustment step length to adjust the current network bandwidth at the current moment to obtain the network bandwidth allowed to be used at the next moment of the current moment.
[0222] Optionally, the above device further includes:
[0223] A third acquisition unit is used to acquire M groups of network state features corresponding to M historical network state sequences before inputting a group of network state features into the target category prediction model, wherein each of the M historical network state sequences includes N groups of historical network state information corresponding to N historical moments, the N historical moments include a historical moment before the current moment and N-1 historical moments before the historical moment, the N groups of historical network state information include historical network state information of each historical moment in the N historical moments, and M is a positive integer greater than or equal to 2;
[0224] The second processing unit is used to perform a clustering operation on the M groups of network status features to obtain K clusters and K network status categories with a one-to-one correspondence, wherein each cluster in the K clusters includes at least one group of network status features in the M groups of network status features, the K network status categories include the current network status category, and K is a positive integer greater than or equal to 1.
[0225] Optionally, the second processing unit includes:
[0226] The first processing module is used to perform the following iterative operations until the network state category corresponding to each group of network state features in the M groups of network state features is determined, wherein the network state features of the remaining undetermined clusters after the 0th iteration are the M groups of network state features, and i is a positive integer greater than or equal to 1:
[0227] The network state features of the remaining undetermined clusters after the i-1th iteration are P of the M sets of network state features. i-1 In the case of group network status characteristics, i-1 Perform clustering operation on the group network status features to obtain Ki Initial clusters, where P i-1 is a positive integer greater than or equal to 1, K i is a positive integer greater than or equal to 1;
[0228] In K i There are Q in the initial clusters that meet the preset business logic. i In the case of initial clusters, i The network status characteristics of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i clusters, among which Q i is greater than or equal to 1 and less than or equal to K i A positive integer of ;
[0229] When there is no network status feature of an undetermined cluster after the i-1th iteration, the iteration operation is terminated.
[0230] Optionally, the above device further includes:
[0231] The third processing unit is used to determine K through the following steps i Whether the jth initial cluster among the initial clusters meets the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer:
[0232] Include S in the jth initial cluster j Group network status characteristics, S j The group network status characteristics correspond to S j In the case of a historical network state sequence, obtain S j The historical network state sequence corresponding to S j curves, among which S j The kth curve in the curves includes N points, and N points represent S j A set of historical network state information corresponding to N historical moments included in the kth historical network state sequence in the historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j A positive integer of ;
[0233] S j The j-th curve is fitted into the j-th target curve, and according to the j-th target curve, it is determined whether the j-th initial clustering cluster conforms to the preset business logic.
[0234] Optionally, the third processing unit includes:
[0235] The second processing module is used to jThe points with the same sequence number in each of the curves are averaged to obtain N average points, and the j-th target curve is determined as a curve including N average points, where S j The point numbered n in the k-th curve in the curves represents the historical network status information at the n-th historical moment in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or
[0236] The third processing module is used to j The points with the same sequence number in each of the curves are weighted and summed to obtain N weighted points, and the j-th target curve is determined as a curve including the N weighted points.
[0237] Optionally, the third processing unit further includes:
[0238] The fourth processing module is used to determine whether j initial clusters conform to a preset business logic in response to a selection instruction for the j-th target curve.
[0239] Optionally, the above device further includes:
[0240] The fourth processing unit is used to determine K through the following steps i Whether the jth initial cluster among the initial clusters meets the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer:
[0241] Include S in the jth initial cluster j Group network status characteristics, S j The group network status characteristics correspond to S j A historical network state sequence, S j When each of the historical network state sequences includes R subsequences, and each of the R subsequences includes N historical network state information under the same dimension, S is obtained. j ×R subsequences corresponding to S j ×R curves, among which S j The kth group of curves in ×R curves includes R curves, the sth curve in the R curves includes N points, and the N points represent N historical network state information under the sth dimension included in the sth subsequence in the kth historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j , R is a positive integer greater than or equal to 2, s is a positive integer greater than or equal to 1 and less than or equal to R;
[0242] S j×R curves are fitted into R target curves, and according to the R target curves, it is determined whether the jth initial cluster meets the preset business logic.
[0243] Optionally, the fourth processing unit includes:
[0244] The fifth processing module is used to j Each group of curves in the ×R curves performs the following fitting operation to obtain one of the R target curves, where each group of curves includes S j ×1 curve:
[0245] The sixth processing module is used to j ×1 curve corresponds to the sth dimension, for S j The points with the same serial number in each of the ×1 curves are averaged to obtain N average points, and a target curve is determined as a curve including N average points, where S j The point numbered n in the k-th curve of ×1 curves represents the network status information in the s-th dimension at the n-th time in the s-th subsequence in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or
[0246] For S j The points with the same sequence number in each of the ×1 curves are weighted and summed to obtain N weighted points, and a target curve is determined as a curve including the N weighted points.
[0247] Optionally, the fourth processing unit includes:
[0248] The seventh processing module is used to determine whether j initial clusters conform to a preset business logic in response to the selection instruction of the R target curves.
[0249] Optionally, the first processing module includes:
[0250] The first processing submodule is used to process Q through the following steps: i The network status features of each group included in the qth initial cluster in the initial cluster are adjusted to obtain the qth cluster determined by the i-th iteration, where q is greater than or equal to 1 and less than or equal to Q i A positive integer:
[0251] The initial category prediction model is trained using the positive sample set and the negative sample set to obtain the qth category prediction model, wherein the qth category prediction model is used to determine the probability that a set of input network state features belongs to the qth cluster. The positive sample set includes each set of network state features included in the qth initial cluster, and the negative sample set includes P i-1Each group of network state features in the group network state features except each group of network state features in the qth initial cluster;
[0252] P i-1 Each group of network state features in the group network state features is input into the qth category prediction model to obtain P i-1 probability, where P i-1 The probability is used to represent P i-1 The probability that each group of network state features in the group network state features belongs to the qth cluster;
[0253] P i-1 The r groups of network state features in the group network state features are determined as the qth cluster determined in the i-th iteration, where i-1 The probability corresponding to the r group of network status features in the probability is greater than or equal to the preset probability threshold, r is greater than or equal to 1 and less than or equal to P i-1 A positive integer.
[0254] Optionally, the first obtaining unit 1102 includes:
[0255] A first acquisition module is used to obtain the round-trip time RTT of the current moment and the RTT of N-1 historical moments before the current moment, obtain an RTT sequence, and perform feature construction on the RTT sequence to obtain a set of RTT features; and / or
[0256] The packet loss rate at the current moment and the packet loss rates at N-1 historical moments before the current moment are obtained to obtain a packet loss rate sequence, and feature construction is performed on the packet loss rate sequence to obtain a set of packet loss rate features.
[0257] Optionally, the first acquisition module further includes:
[0258] A second processing submodule is used to determine a standard deviation of RTT in the RTT sequence, determine a mean value of RTT in the RTT sequence, determine a sequence tail value in the RTT sequence, and determine a sequence head value in the RTT sequence;
[0259] The third processing submodule is used to determine the standard deviation of the packet loss rate in the packet loss rate sequence, determine the mean of the packet loss rate in the packet loss rate sequence, determine the sequence tail value in the packet loss rate sequence, and determine the sequence head value in the packet loss rate sequence.
[0260] Optionally, the second obtaining unit 1106 includes:
[0261] The second acquisition module is used to obtain a current bandwidth adjustment step corresponding to the current network status category in a preset correspondence table, wherein the correspondence table records multiple groups of network status categories and bandwidth adjustment steps with corresponding relationships, and the multiple groups of network status categories and bandwidth adjustment steps with corresponding relationships include the current network status category and the current bandwidth adjustment step with corresponding relationships. Among the multiple groups of network status categories and bandwidth adjustment steps with corresponding relationships, the network status categories of each group are different, and the bandwidth adjustment steps of at least two groups are different.
[0262] By applying the above device to input a set of network status features of the current network status into the target category prediction model, the status category of the current network status is obtained, and the bandwidth adjustment step for adjusting the current network bandwidth is determined according to the predicted current network status category. In other words, by predicting the status category of the current network status acquired in real time, the bandwidth adjustment step matching the status category is determined, thereby determining different bandwidth adjustment step according to different categories of network status, avoiding the technical problem of low accuracy caused by the use of a fixed bandwidth adjustment step to adjust the network bandwidth in the related art, realizing dynamic adjustment of the network bandwidth, and improving the stability of the network status.
[0263] It should be noted that the embodiments of the network bandwidth adjustment device here can refer to the embodiments of the network bandwidth adjustment method mentioned above, which will not be described in detail here.
[0264] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned network bandwidth adjustment method is also provided. The electronic device may be Fig.12 The terminal device shown in FIG. This embodiment is described by taking the electronic device as a background device as an example. Fig.12 As shown, the electronic device includes a memory 1202 and a processor 1204. The memory 1202 stores a computer program, and the processor 1204 is configured to execute the steps in any of the above method embodiments through the computer program.
[0265] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0266] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0267] S1, obtaining a group of network status features corresponding to the current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include the current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each moment in the N moments, and N is a positive integer greater than or equal to 2;
[0268] S2, inputting a set of network state features into a target category prediction model to obtain a set of current network state categories corresponding to the network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a set of historical network state features and a corresponding set of network state categories, the set of historical network state features includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2;
[0269] S3, obtaining a current bandwidth adjustment step length that matches the current network status category, and using the current bandwidth adjustment step length to adjust the current network bandwidth at the current moment, to obtain a network bandwidth that is allowed to be used at the next moment of the current moment.
[0270] Alternatively, a person skilled in the art may understand that: Fig.12 The structure shown is for illustration only, and the electronic device may also be a target terminal such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (MID), a PAD, etc. Fig.12 The electronic device and the electronic equipment described above are not limited in structure. Fig.12 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.12 Different configurations shown.
[0271] Among them, the memory 1202 can be used to store software programs and modules, such as the program instructions / modules corresponding to the network bandwidth adjustment method and device in the embodiment of the present application. The processor 1204 executes various functional applications and data processing by running the software programs and modules stored in the memory 1202, that is, to implement the above-mentioned network bandwidth adjustment method. The memory 1202 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1202 may further include a memory remotely arranged relative to the processor 1204, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include but are not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1202 can be specifically but not limited to being used to store a group of network status characteristics, N groups of network status information, and the current bandwidth adjustment step, etc. As an example, such as Fig.12 As shown, the memory 1202 may include, but is not limited to, the first acquisition unit 1102, the first processing unit 1104, and the second acquisition unit 1106 in the network bandwidth adjustment device. In addition, other module units in the network bandwidth adjustment device may also be included but are not limited to, which will not be repeated in this example.
[0272] Optionally, the transmission device 1206 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1206 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1206 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0273] In addition, the electronic device further includes: a display 1208 for displaying the direction prompt information of the target sound; and a connection bus 1212 for connecting various module components in the electronic device.
[0274] In other embodiments, the target terminal or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes through network communication. Among them, a peer-to-peer network may be formed between the nodes, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0275] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the network bandwidth adjustment method provided in various optional implementations of the above-mentioned server verification processing and other aspects, wherein the computer program is configured to execute the steps of any of the above-mentioned method embodiments when running.
[0276] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0277] S1, obtaining a group of network status features corresponding to the current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include the current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each moment in the N moments, and N is a positive integer greater than or equal to 2;
[0278] S2, inputting a set of network state features into a target category prediction model to obtain a set of current network state categories corresponding to the network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a set of historical network state features and a corresponding set of network state categories, the set of historical network state features includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2;
[0279] S3, obtaining a current bandwidth adjustment step length that matches the current network status category, and using the current bandwidth adjustment step length to adjust the current network bandwidth at the current moment, to obtain a network bandwidth that is allowed to be used at the next moment of the current moment.
[0280] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the target terminal through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0281] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0282] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to execute all or part of the steps of the methods of each embodiment of the present application.
[0283] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
Claims
1. A method for adjusting network bandwidth, characterized in that: include: Obtaining a group of network status features corresponding to a current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include a current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information at each of the N moments, and N is a positive integer greater than or equal to 2; Inputting the set of network state features into a target category prediction model to obtain a current network state category corresponding to the set of network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a historical network state feature set and a corresponding network state category set, the historical network state feature set includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2; A current bandwidth adjustment step length matching the current network status category is obtained, and the current bandwidth adjustment step length is used to adjust the current network bandwidth at the current moment to obtain a network bandwidth allowed to be used at a next moment after the current moment.
2. The method according to claim 1, characterized in that: Before inputting the set of network state features into the target category prediction model, the method further includes: Obtaining the M groups of network status features corresponding to the M historical network status sequences, wherein each of the M historical network status sequences includes N groups of historical network status information corresponding to N historical moments, the N historical moments include a historical moment before the current moment and N-1 historical moments before the one historical moment, the N groups of historical network status information include historical network status information of each of the N historical moments, and M is a positive integer greater than or equal to 2; A clustering operation is performed on the M groups of network status features to obtain K clusters and K network status categories having a one-to-one correspondence, wherein each cluster in the K clusters includes at least one group of network status features in the M groups of network status features, the K network status categories include the current network status category, and K is a positive integer greater than or equal to 1.
3. The method according to claim 2, characterized in that The performing a clustering operation on the M groups of network status features to obtain K clusters and K network status categories having a one-to-one correspondence includes: Perform the following iterative operation until the network status category corresponding to each group of network status features in the M groups of network status features is determined, wherein the network status features of the remaining undetermined clusters after the 0th iteration are the M groups of network status features, and i is a positive integer greater than or equal to 1: The network state features of the remaining undetermined clusters after the i-1th iteration are P of the M groups of network state features. i-1 In the case of group network status characteristics, the P i-1 Perform clustering operation on the group network status features to obtain K i Initial clusters, where P i-1 is a positive integer greater than or equal to 1, K i is a positive integer greater than or equal to 1; In the K i There are Q in the initial clusters that conform to the preset business logic. i In the case of initial clusters, for the Q i The network status features of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i clusters, among which Q i is greater than or equal to 1 and less than or equal to K i A positive integer of ; If there is no network status feature of an undetermined cluster after the (i-1)th iteration, the iterative operation ends.
4. The method according to claim 3, characterized in that The method further comprises: Determine the K by the following steps i Whether the jth initial cluster among the initial clusters conforms to the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer: The jth initial cluster includes S j The network status characteristics of the group, the S j The group network status characteristics correspond to S j In the case of a historical network state sequence, obtain the S j The historical network state sequence corresponding to S j curve, where the S j The kth curve in the curves includes N points, and the N points represent the S j A set of historical network state information corresponding to N historical moments included in the kth historical network state sequence in the historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j A positive integer of ; The S j The j-th curve is fitted into the j-th target curve, and according to the j-th target curve, it is determined whether the j-th initial clustering cluster conforms to the preset business logic.
5. The method according to claim 4, characterized in that The S j The curves are fitted into the jth target curve, including: For the S j The points with the same sequence number in each of the S curves are averaged to obtain N average points, and the j-th target curve is determined as a curve including the N average points, wherein the S j The point numbered n in the k-th curve in the curves represents the historical network status information at the n-th historical moment in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or For the S j The points with the same sequence number in each of the curves are weighted and summed to obtain N weighted points, and the j-th target curve is determined to be a curve including the N weighted points.
6. The method according to claim 4, characterized in that The determining, according to the j-th target curve, whether the j-th initial cluster conforms to the preset business logic includes: In response to the instruction to select the j-th target curve, it is determined that the j initial clusters conform to the preset business logic.
7. The method according to claim 3, characterized in that The method further comprises: Determine the K by the following steps i Whether the jth initial cluster among the initial clusters conforms to the preset business logic, where j is greater than or equal to 1 and less than or equal to K i A positive integer: The jth initial cluster includes S j The network status characteristics of the group, the S j The group network status characteristics correspond to S j A historical network state sequence, the S j When each historical network state sequence in the historical network state sequences includes R subsequences, and each subsequence in the R subsequences includes N historical network state information under the same dimension, S is obtained. j ×R subsequences corresponding to S j ×R curves, where the S j The kth group of curves in the ×R curves includes R curves, the sth curve in the R curves includes N points, and the N points represent N historical network state information under the sth dimension included in the sth subsequence in the kth historical network state sequence, S j is a positive integer greater than or equal to 1, k is greater than or equal to 1 and less than or equal to S j , R is a positive integer greater than or equal to 2, and s is a positive integer greater than or equal to 1 and less than or equal to R; The S j ×R curves are fitted into R target curves, and according to the R target curves, it is determined whether the j-th initial cluster conforms to the preset business logic.
8. The method according to claim 7, characterized in that The S j ×R curves are fitted into R target curves, including: For the S j Each group of curves in the ×R curves performs the following fitting operation to obtain one target curve in the R target curves, wherein each group of curves includes the S j ×1 curve: In the S j ×1 curves corresponding to the sth dimension, for the S j The points with the same serial number in each of the ×1 curves are averaged to obtain N average points, and the target curve is determined as a curve including the N average points, wherein the S j The point numbered n in the k-th curve of ×1 curves represents the network status information under the s-th dimension at the n-th moment in the s-th subsequence in the k-th historical network status sequence, where n is a positive integer greater than or equal to 1 and less than or equal to N; or For the S j The points with the same sequence number in each of the ×1 curves are weighted and summed to obtain N weighted points, and the one target curve is determined to be a curve including the N weighted points.
9. The method according to claim 7, characterized in that: The determining, according to the R target curves, whether the j-th initial cluster conforms to the preset business logic includes: In response to the instruction to select the R target curves, it is determined that the j initial clusters conform to the preset business logic.
10. The method according to claim 3, characterized in that: The Q i The network status features of each group included in the initial clusters are adjusted to obtain the Q determined in the i-th iteration. i Clusters include: The Q i The network status features of each group included in the qth initial cluster in the initial clusters are adjusted to obtain the qth cluster determined by the i-th iteration, wherein q is greater than or equal to 1 and less than or equal to Q i A positive integer: The initial category prediction model is trained using a positive sample set and a negative sample set to obtain a qth category prediction model, wherein the qth category prediction model is used to determine the probability that a set of input network state features belongs to the qth cluster, the positive sample set includes each set of network state features included in the qth initial cluster, and the negative sample set includes the P i-1 each group of network state features in the group network state features except each group of network state features in the qth initial cluster; The P i-1 Each group of network state features in the group network state features is input into the qth category prediction model to obtain P i-1 probability, where P i-1 The probability is used to represent the P i-1 The probability that each group of network state features in the group network state features belongs to the qth cluster; The P i-1 The r groups of network state features in the group network state features are determined as the qth cluster determined in the i-th iteration, wherein in the P i-1 The probability corresponding to the r group of network status features in the probability is greater than or equal to the preset probability threshold, and r is greater than or equal to 1 and less than or equal to P i-1 A positive integer.
11. The method according to any one of claims 1 to 10, characterized in that The obtaining of a set of network status features corresponding to the current network status sequence includes: Obtaining the round-trip time RTT of the current moment and the RTT of the N-1 historical moments before the current moment, obtaining an RTT sequence, and performing feature construction on the RTT sequence to obtain a set of RTT features; and / or The packet loss rate at the current moment and the packet loss rates at the N-1 historical moments before the current moment are obtained to obtain a packet loss rate sequence, and feature construction is performed on the packet loss rate sequence to obtain a set of packet loss rate features.
12. The method according to claim 11, characterized in that The feature construction of the RTT sequence to obtain a set of RTT features includes at least one of the following: determining a standard deviation of the RTT in the RTT sequence, determining a mean value of the RTT in the RTT sequence, determining a sequence tail value in the RTT sequence, and determining a sequence head value in the RTT sequence; The feature construction of the packet loss rate sequence to obtain a set of packet loss rate features includes at least one of: determining a standard deviation of the packet loss rate in the packet loss rate sequence, determining a mean of the packet loss rate in the packet loss rate sequence, determining a sequence tail value in the packet loss rate sequence, and determining a sequence head value in the packet loss rate sequence.
13. The method according to any one of claims 1 to 10, characterized in that The obtaining of a current bandwidth adjustment step size matching the current network status category includes: The current bandwidth adjustment step corresponding to the current network status category is obtained in a preset correspondence table, wherein the correspondence table records multiple groups of network status categories and the bandwidth adjustment steps having a corresponding relationship, the multiple groups of network status categories and the bandwidth adjustment steps having a corresponding relationship include the current network status category and the current bandwidth adjustment step having a corresponding relationship, and among the multiple groups of network status categories and the bandwidth adjustment steps having a corresponding relationship, the network status categories of each group are different, and the bandwidth adjustment steps of at least two groups are different.
14. A network bandwidth adjustment device, characterized in that: include: A first acquisition unit is used to acquire a group of network status features corresponding to a current network status sequence, wherein the current network status sequence includes N groups of network status information corresponding to N moments, the N moments include a current moment and N-1 historical moments before the current moment, the N groups of network status information include network status information of each of the N moments, and N is a positive integer greater than or equal to 2; A first processing unit is configured to input the set of network state features into a target category prediction model to obtain a current network state category corresponding to the set of network state features, wherein the target category prediction model is a model obtained by training an initial category prediction model using a historical network state feature set and a corresponding network state category set, the historical network state feature set includes M groups of network state features corresponding to M historical network state sequences, the network state category set includes network state categories obtained by performing a clustering operation on the M groups of network state features, and M is a positive integer greater than or equal to 2; The second acquisition unit is used to acquire a current bandwidth adjustment step length that matches the current network status category, and use the current bandwidth adjustment step length to adjust the current network bandwidth at the current moment to obtain the network bandwidth allowed to be used at a next moment after the current moment.
15. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program can be executed by a terminal device or a computer to execute the method described in any one of claims 1 to 13.
16. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.
17. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 13 through the computer program.