Traffic prediction method and device, electronic equipment and storage medium

CN116743604BActive Publication Date: 2026-10-09CHINA MOBILE GROUP JIANGSU +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210208813.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2026-10-09
Estimated Expiration
2042-03-04

Smart Images

  • Figure CN116743604B_ABST
    Figure CN116743604B_ABST
Patent Text Reader

Abstract

The application relates to the computer field and provides a traffic prediction method and device, electronic equipment and a storage medium. The method comprises the following steps: inputting a current feature and a lag feature into a traffic prediction model to obtain a traffic prediction result output by the traffic prediction model; wherein the traffic prediction model is obtained based on an initial traffic prediction model; the initial traffic prediction model comprises at least two generators, each generator is obtained by respectively performing adversarial training in combination with a discriminator, and each generator performs traffic prediction based on corresponding guide information when performing the adversarial training; the traffic prediction model is used for obtaining at least two initial traffic prediction results based on the initial traffic prediction model after training is completed, and determining the traffic prediction result based on the at least two initial traffic prediction results. The traffic prediction method, device, electronic equipment and storage medium provided in the application can accurately perform traffic prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically to a traffic prediction method, apparatus, electronic device, and storage medium. Background Technology

[0002] Currently, with the increasing maturity of 5G technology, operators need to provide users with personalized data plans. In order to provide users with suitable plans, it is necessary to accurately predict users' data usage.

[0003] Currently, traffic forecasting is mostly based on year-on-year and month-on-month average data, statistical models, or machine learning models. However, the traffic forecast results obtained by the above methods deviate significantly from the actual results and have low accuracy.

[0004] Application content

[0005] This application provides a traffic prediction method, apparatus, electronic device, and storage medium to solve the technical problem of low traffic prediction accuracy in the prior art.

[0006] In a first aspect, embodiments of this application provide a traffic prediction method, including:

[0007] Determine the current characteristics and lag characteristics of the flow to be predicted; the current characteristics are used to characterize the intrinsic attributes of the flow to be predicted, and the lag characteristics are used to characterize the historical flow attributes corresponding to the flow to be predicted.

[0008] The current and lag features are input into the flow prediction model to obtain the flow prediction result output by the flow prediction model.

[0009] The traffic prediction model is obtained by training an initial traffic prediction model based on the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume. The initial traffic prediction model includes at least two generators, each of which is trained adversarially in conjunction with a discriminator. Each generator performs traffic prediction based on corresponding guidance information during adversarial training. The guidance information is used to characterize the statistical information of the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume.

[0010] The traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0011] In one embodiment, the generators are trained based on the following steps:

[0012] The current features and lag features of the sample are respectively input into the initial model of each generator to obtain the sample predicted flow rate output by the initial model of each generator;

[0013] Each sample's predicted flow is input into the discriminator's initial model to obtain the sample predicted flow classification result corresponding to each sample's predicted flow output by the discriminator's initial model;

[0014] Based on the weights of the predicted traffic classification results for each sample, the predicted traffic for each sample, and the traffic for each sample, the loss value for each adversarial training is determined. The weights of the predicted traffic classification results for each sample are determined based on the importance of the current features and the lagged features of the corresponding sample, and the weights of the predicted traffic classification results for each sample are adjustable parameters.

[0015] The initial models of each generator are trained based on the loss values ​​of each adversarial training to obtain each generator.

[0016] In one embodiment, determining the loss value for each adversarial training based on the weights of the predicted traffic classification results for each sample, the predicted traffic for each sample, and the traffic for each sample includes:

[0017] Based on the predicted flow of each sample and the flow of each sample, the actual classification result of each sample is determined.

[0018] Based on the weights of the predicted traffic classification results for each sample, the differences between the predicted traffic classification results and the actual classification results for each sample are weighted and summed to obtain the loss value for each adversarial training.

[0019] In one embodiment, the traffic prediction model is trained based on the following steps:

[0020] The current features and lag features of the sample are input into each generator to obtain the initial predicted flow of the sample output by each generator.

[0021] Based on the weights of each generator, the initial predicted flow of each sample is weighted and summed to obtain the inferred flow of the sample; the weights of each generator are adjustable parameters.

[0022] Based on the estimated flow rate of each sample and the corresponding sample flow rate, the loss value of the flow prediction model is determined.

[0023] The initial traffic prediction model is trained based on the loss value of the traffic prediction model to obtain the traffic prediction model.

[0024] In one embodiment, determining the loss value of the traffic prediction model based on the inferred traffic from each sample and the corresponding sample traffic includes:

[0025] Based on the inferred flow rate of each sample and the corresponding sample flow rate, determine the mean square error between the inferred flow rate of each sample and the corresponding sample flow rate;

[0026] The loss value of the flow prediction model is determined based on the mean squared error between the predicted flow rate of each sample and the flow rate of the corresponding sample.

[0027] In one embodiment, the weights of each generator are adjusted based on the gradient descent algorithm.

[0028] In one embodiment, the guidance information is one of the following:

[0029] Mean of sample lag characteristics and mean of sample flow;

[0030] Standard deviation of sample lag characteristics and standard deviation of sample flow rate;

[0031] Sample current characteristic value, sample lagged characteristic value, and sample flow value.

[0032] Secondly, embodiments of this application provide a flow prediction device, comprising:

[0033] The determination module is used to determine the current characteristics and lag characteristics of the flow to be predicted; the current characteristics are used to characterize the intrinsic attributes of the flow to be predicted, and the lag characteristics are used to characterize the historical flow attributes corresponding to the flow to be predicted.

[0034] The prediction module is used to input the current characteristics and lagged characteristics into the flow prediction model to obtain the flow prediction result output by the flow prediction model;

[0035] The traffic prediction model is obtained by training an initial traffic prediction model based on the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume. The initial traffic prediction model includes at least two generators, each of which is trained adversarially in conjunction with a discriminator. Each generator performs traffic prediction based on corresponding guidance information during adversarial training. The guidance information is used to characterize the statistical information of the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume.

[0036] The traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0037] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory storing a computer program, wherein the processor executes the program to implement the traffic prediction method described in the first aspect.

[0038] Fourthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the traffic prediction method described in the first aspect.

[0039] The traffic prediction method, apparatus, electronic device, and storage medium provided in this application embodiment enable each generator to predict traffic based on corresponding guidance information during adversarial training. This allows the trained generator to contain both traffic trend information and traffic fluctuation information, thereby enabling the traffic prediction model trained by each generator to accurately predict traffic. Attached Figure Description

[0040] To more clearly illustrate the technical solutions in this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0041] Figure 1 This is a flowchart illustrating the traffic prediction method provided in an embodiment of this application;

[0042] Figure 2 This is one of the flowcharts illustrating the generator training method provided in the embodiments of this application;

[0043] Figure 3 This is a second schematic flowchart of the generator training method provided in the embodiments of this application;

[0044] Figure 4 This is the third flowchart illustrating the generator training method provided in this application embodiment;

[0045] Figure 5 This is a traffic diagram illustrating the training sample acquisition method provided in the embodiments of this application;

[0046] Figure 6 This is a traffic diagram illustrating the traffic prediction model training method provided in this application embodiment;

[0047] Figure 7 This is a schematic diagram of the flow prediction device provided in the embodiments of this application;

[0048] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0049] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0050] Currently, the following three methods are commonly used for user traffic prediction: First, traffic prediction is based on inductive strategies, that is, based on the average data of year-on-year and month-on-month comparisons; second, traffic prediction is based on statistical models, such as the Autoregressive Model (AR model), Moving Average Model (MA model), and Autoregressive Moving Average Model (ARMA model); and third, traffic prediction is based on machine learning models such as linear regression and random forest.

[0051] However, traffic prediction based on inductive strategies has fewer independent variables, ignoring the influence of many factors such as trending topics, games, travel, weather, and the pandemic, leading to significant deviations in predicted values ​​and inaccurate predictions. Statistical models for traffic prediction require users to exhibit significant periodicity in their behavior. If user traffic patterns change, the prediction model needs to be rebuilt; otherwise, the prediction results will deviate significantly. Furthermore, when user usage patterns are not obvious, the constructed statistical model will also suffer from inaccurate predictions. Machine learning models also exhibit significant prediction deviations when predicting traffic based on data with large fluctuations.

[0052] Figure 1 This is a flowchart illustrating the traffic prediction method provided in an embodiment of this application. (Refer to...) Figure 1 This application provides a traffic prediction method, which may include:

[0053] Step 110: Determine the current characteristics and lag characteristics of the flow to be predicted; the current characteristics are used to characterize the intrinsic attributes of the flow to be predicted, and the lag characteristics are used to characterize the historical flow attributes corresponding to the flow to be predicted.

[0054] Here, current features are used to characterize the intrinsic attributes of the traffic to be predicted. For example, if the traffic to be predicted is the traffic on day T, the corresponding current features could be whether day T is a holiday, whether day T is a weekend, or whether day T is the end of the month. Lag features are used to characterize the historical traffic attributes corresponding to the traffic to be predicted. For example, if the traffic to be predicted is the traffic on day T, the corresponding lag features could be the number of apps opened on day T-1, the number of apps opened on day T-2, the number of apps opened on day T-3, video traffic consumption on day T-1, video traffic consumption on day T-2, video traffic consumption on day T-3, game traffic consumption on day T-1, game traffic consumption on day T-2, and game traffic consumption on day T-3.

[0055] Step 120: Input the current characteristics and lagged characteristics into the flow prediction model to obtain the flow prediction results output by the flow prediction model;

[0056] The traffic prediction model is trained on the initial traffic prediction model based on the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume. The initial traffic prediction model includes at least two generators, each of which is trained adversarially in conjunction with a discriminator. Each generator performs traffic prediction based on corresponding guidance information during adversarial training. The guidance information is used to characterize the statistical information of the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume.

[0057] The traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0058] Specifically, the traffic prediction model is trained on an initial traffic prediction model based on the current characteristics, lag characteristics, and traffic volume of the sample. The initial traffic prediction model includes at least two generators, each of which is trained adversarially in conjunction with a discriminator. For example, if the initial traffic prediction model includes generator A and generator B, generator A is trained adversarially in conjunction with the discriminator, and generator B is trained adversarially in conjunction with the discriminator.

[0059] The original Generative Adversarial Networks (GANs) only require noisy input data to generate data that resembles reality. However, the noisy data from the original GANs lacks any prior information. Therefore, when predicting daily user traffic, prior information needs to be introduced to ensure that the generator's output data is the predictive data required in the actual scenario.

[0060] In this embodiment, each generator performs traffic prediction based on its corresponding guidance information during adversarial training, obtaining the corresponding sample predicted traffic. This guidance information can serve as prior information, guiding each generator to predict traffic values ​​close to the true values ​​and accelerating the convergence of each generator. The guidance information can be any one of the following: the mean of sample lag features and the mean of sample traffic (mean information of original data); the standard deviation of sample lag features and the standard deviation of sample traffic (standard deviation information of original data); or the current characteristics of the sample, the lag features of the sample, and the sample traffic (lag information of original data). These three types of information can represent the statistical properties of the original information.

[0061] Preferably, the initial traffic prediction model in this embodiment includes three generators, each incorporating the aforementioned three types of guidance information to perform traffic prediction. For example... Figure 2 As shown, the generator incorporates guidance information—the mean of sample lag features and the mean of sample flow—to construct a MeanConditionGAN, where (x_mean,Flow_mean)(tk,…,t-1,t) represent the mean of sample lag features and the mean of sample flow, respectively. The calculation formulas are as follows:

[0062] x_mean=(x1_mean,x2_mean,…,xm_mean)

[0063]

[0064] Flow_mean=(Flow 1_mean,Flow 2_mean,…,Flow m_mean)

[0065]

[0066] (x_mean,Flow_mean)(tk,…,t-1,t)=(x_mean,Flow_mean)

[0067] After calculating the mean of the sample lag features and the mean of the sample flow, these lag features and sample flow labels are combined into a conditional feature vector. Following the (x_mean,Flow_mean) format, the final presentation style is (x1_mean,x2_mean,…,xm_mean,Flow 1_mean,Flow 2_mean,…,Flow m_mean).

[0068] like Figure 3As shown, the generator incorporates guidance information—the standard deviation of sample lag features and the standard deviation of sample flow—to construct a standard deviation conditional GAN ​​(StdConditionGAN), where (xn_std,Flow_std)(tk,…,t-1,t) represent the standard deviation of sample lag features and the standard deviation of sample flow, respectively (n is the index of the variable, such as x1, x2, x3, etc.). The calculation formula is as follows:

[0069] x_std=(x1_std,x2_std,…,xm_std)

[0070]

[0071] Flow_std=(Flow 1_std,Flow 2_std,…,Flow m_std)

[0072]

[0073] (x_std,Flow_std)(tk,…,t-1,t)=(x_std,Flow_std)

[0074] like Figure 4 As shown, the generator incorporates guidance information—current sample features, lagged sample features, and sample flow—to construct a lagged conditional GAN, where x(tk,…,t-1,t) represents the current sample features and lagged sample features, and Flow(tk,…,t-1,t) represents the sample flow, which can be expressed as the following formula:

[0075] x(tk,…,t-1,t)=(x1(tk,…,t-1,t),x2(tk,…,t-1,t),…,xm(tk,…,t-1,t))

[0076] xi(tk,…,t-1,t)=(xi_t-k,…,xi_t-1,xi_t)

[0077] Flow(tk,…,t-1,t)=(Flow_t-k,…,Flow_t-1,Flow_t)

[0078] This application embodiment constructs three generators: MeanConditionGAN, StdConditionGAN, and ConditionGAN, and performs adversarial training with a discriminator for each. The resulting generators can contain both trend information of traffic (such as the trend change of daily traffic) and fluctuation information of traffic (such as the fluctuation change of daily traffic), which helps to improve the accuracy of the generator in predicting traffic.

[0079] After obtaining the initial traffic prediction model, the generators in the initial traffic prediction model are trained based on the current characteristics, lag characteristics, and traffic volume of the samples to obtain a traffic prediction model. This traffic prediction model can then perform traffic predictions based on each generator in the trained initial traffic prediction model, obtaining corresponding initial traffic prediction results. Based on these initial traffic prediction results, the final traffic prediction result is determined. Optionally, in this embodiment, the average value of the initial traffic prediction results can be used as the traffic prediction result, or the initial traffic prediction results can be weighted and summed to obtain the final traffic prediction result. This embodiment does not specifically limit the specific method used.

[0080] Furthermore, when acquiring training samples (current features, lagged features, and sample traffic), operator staff can select relevant indicator data as training samples based on experience. Table 1 is a list of indicators. As shown in Table 1, current features refer to feature T in Table 1, and lagged features refer to features T-1, T-2, and T-3. Taking the number of app openings as an example, denoted by X, X_t, X_t-1, X_t-2, and X_t-3 represent the number of app openings in the current period, lagged by one period, lagged by two periods, and lagged by three periods, respectively. The lagged period label refers to the traffic value in periods T-1, T-2, and T-3, which is the sample traffic, denoted by Flow_t-1, Flow_t-2, and Flow_t-3, respectively. Figure 5 As shown, the training samples are vectors formed by merging features and labels, represented as (X_t, X_t-1, X_t-2, X_t-3, ..., Flow_t-1, Flow_t-2, Flow_t-3), where ellipses indicate features other than the number of apps opened.

[0081] Table 1

[0082]

[0083]

[0084] The predictable features of a sample in the current period represent the properties of the sample itself, while the features of the sample in the lagged period reflect historical information. The combination of the two ensures the completeness of the feature information, which is conducive to improving prediction accuracy and optimizing the performance of subsequent model construction.

[0085] The traffic prediction method provided in this application embodiment allows each generator to predict traffic based on corresponding guidance information during adversarial training. This enables the trained generator to contain both traffic trend information and traffic fluctuation information, thereby enabling the traffic prediction model trained by each generator to accurately predict traffic.

[0086] Based on the above embodiments, each generator is trained using the following steps:

[0087] The current characteristics and lag characteristics of the sample are input into the initial model of each generator to obtain the sample predicted flow rate output by the initial model of each generator;

[0088] Each sample's predicted flow is input into the discriminator's initial model to obtain the sample predicted flow classification result corresponding to each sample's predicted flow output by the discriminator's initial model;

[0089] Based on the weights of the predicted traffic classification results for each sample, the predicted traffic for each sample, and the traffic for each sample, the loss value for each adversarial training is determined. The weights of the predicted traffic classification results for each sample are determined based on the importance of the current features and the lagged features of the corresponding sample, and the weights of the predicted traffic classification results for each sample are adjustable parameters.

[0090] The initial models of each generator are trained based on the loss values ​​of each adversarial training to obtain each generator.

[0091] Specifically, when training each generator, the current features and lag features of the samples are input into the initial model of each generator, and the initial model of each generator performs traffic prediction based on the corresponding guidance information to obtain the sample predicted traffic output by the initial model of each generator.

[0092] Then, the predicted flow of each sample is input into the initial model of the discriminator. The initial model of the discriminator classifies the predicted flow of each sample to confirm whether it is real flow and outputs the corresponding sample predicted flow classification result.

[0093] Furthermore, considering the timeliness of predictions, the importance of the traffic classification results for period T+1 is generally higher than that for period T+2. In other words, the closer the predicted traffic classification result is to the current period, the higher its importance, i.e., the higher its weight. Therefore, in this embodiment, the weight of the predicted traffic classification result for each sample is used as an adjustable parameter for iterative optimization. The loss value for each adversarial training is determined by combining the predicted traffic classification result, the predicted traffic volume, and the traffic volume of each sample. The loss values ​​of each adversarial training are used to train each generator, thereby enabling each generator to accurately predict traffic.

[0094] Based on any of the above embodiments, the loss value for each adversarial training is determined based on the weight of the predicted traffic classification result for each sample, the predicted traffic for each sample, and the traffic for each sample, including:

[0095] Based on the predicted flow of each sample and the flow of each sample, the actual classification result of each sample is determined.

[0096] Based on the weights of the predicted traffic classification results for each sample, the differences between the predicted traffic classification results and the actual classification results for each sample are weighted and summed to obtain the loss value for each adversarial training.

[0097] Specifically, based on the predicted traffic and the actual traffic of each sample, it can be determined whether the predicted traffic is the real traffic, thus obtaining the actual classification result for each sample. Then, based on the weights of the predicted traffic classification results for each sample, the differences between the predicted traffic classification results and the actual classification results are weighted and summed to obtain the loss value for each adversarial training exercise. The weights of the predicted traffic classification results for each sample are used as parameters for iterative optimization during training, and are optimized during model iteration. The loss function formula is shown below:

[0098]

[0099] stw i >=w j i<=j

[0100] Where st represents the constraint condition, y t+i This represents the predicted actual value for period i (i.e., the flow rate in period t+i, where t is the current period). w represents the predicted value for period i (i.e., the value of the flow in period t+i predicted using the algorithm's preceding inference process). i The weights represent the weights for predicting the loss in period i (the weight coefficients are initially randomly set and then iteratively optimized during model training). When using GANs to build the discriminator, the overall parameters are θ (these parameters are model parameters, obtained through iterative model optimization), and the loss function can be optimized as follows:

[0101]

[0102] The iterative formulas for the discriminator parameters and weights are shown below:

[0103] W=W+λ1ΔW

[0104] θ=θ+λ2Δθ

[0105] Where W refers to w i The matrix representation is given by ΔW, where ΔW is the gradient of W and Δθ is the gradient of θ.

[0106] Based on the loss function and optimization strategy, the discriminator's parameter optimization performance is improved, enabling it to better calculate the difference between the actual and predicted traffic values.

[0107] Based on any of the above embodiments, the weights of the predicted traffic classification results for each sample are adjusted using the gradient descent algorithm.

[0108] Specifically, gradient descent is an iterative method used to solve least squares problems. When minimizing the loss function, gradient descent can be used to iterate step-by-step to obtain the minimized loss function and model parameter values. In machine learning, iterative solutions can be achieved using methods such as stochastic gradient descent and batch gradient descent.

[0109] Based on any of the above embodiments, the traffic prediction model is trained using the following steps:

[0110] The current characteristics and lag characteristics of the sample are input into each generator to obtain the initial predicted flow of the sample output by each generator;

[0111] Based on the weights of each generator, the initial predicted flow of each sample is weighted and summed to obtain the inferred flow of the sample; the weights of each generator are adjustable parameters.

[0112] Based on the estimated flow rate of each sample and the corresponding sample flow rate, the loss value of the flow prediction model is determined.

[0113] The initial traffic prediction model is trained based on the loss value of the traffic prediction model to obtain the traffic prediction model.

[0114] Specifically, after obtaining the generators that have completed adversarial training, the generators are used to form an initial traffic prediction model, and the initial traffic prediction model is trained to obtain the traffic prediction model.

[0115] Specifically:

[0116] The current and lag features of the samples are input into each generator to obtain the initial predicted flow of the samples output by each generator. Since each generator is trained based on different guidance information during adversarial training, their focuses differ, thus requiring different weights to be assigned to each generator. These weights are adjustable parameters that are iteratively optimized during model training.

[0117] Therefore, in this embodiment, the initial predicted flow of each sample is weighted and summed based on the weights of each generator to obtain the sample inferred flow. Based on the difference between the inferred flow of each sample and the corresponding sample flow, the loss value of the flow prediction model is determined. Then, the flow prediction model can be trained based on the loss value of the flow prediction model to obtain the flow prediction model, so that the flow prediction model can accurately predict the flow.

[0118] Based on any of the above embodiments, the loss value of the traffic prediction model is determined based on the inferred traffic from each sample and the corresponding sample traffic, including:

[0119] Based on the inferred flow rate of each sample and the corresponding sample flow rate, determine the mean square error between the inferred flow rate of each sample and the corresponding sample flow rate;

[0120] The loss value of the flow prediction model is determined based on the mean square error between the predicted flow rate of each sample and the flow rate of the corresponding sample.

[0121] like Figure 6 As shown, taking three generators as an example, Pre represents the predicted value (i.e., sample inference flow) after the model's preceding inference process. The formula for calculating Pre is: This refers to the initial predicted flow weights of the samples output by each generator. The weights w are updated using a gradient descent algorithm based on the loss function. The loss of the flow prediction model uses the mean squared error, expressed as follows:

[0122]

[0123] Based on any of the above embodiments, the weights of each generator are adjusted using the gradient descent algorithm.

[0124] like Figure 6 As shown, taking three generators as an example, the update strategy for the weight W of each generator is gradient descent:

[0125] W=W+λ3ΔW

[0126] Set the number of iterations to obtain the parameters W = (w1, w2, w3), and then calculate the weighted sum of the outputs of the three generators:

[0127] Pre=w1×Node1Out+w2×Node2Out+w3×Node3Out

[0128] Wherein, Node1Out, Node2Out, and Node3Out represent the initial predicted traffic samples output by each generator. w1, w2, and w3 are iteratively optimized during model training. After meeting the required number of iterations, optimal parameters can be obtained, enabling the trained traffic prediction model to accurately predict traffic. Using the traffic prediction model provided in this application embodiment, in actual traffic prediction of 10,000 users, the average absolute error is 32.15M, indicating good model performance and high prediction accuracy.

[0129] Based on any of the above embodiments, the guidance information is one of the following:

[0130] Mean of sample lag characteristics and mean of sample flow;

[0131] Standard deviation of sample lag characteristics and standard deviation of sample flow rate;

[0132] Sample current characteristic value, sample lagged characteristic value, and sample flow value.

[0133] Specifically, the guidance information can serve as prior information, guiding each generator to predict flows that are close to the true values, thus accelerating the convergence of each generator. This guidance information can be any one of the following: the mean of sample lag features and the mean of sample flows (mean information of the original data); the standard deviation of sample lag features and the standard deviation of sample flows (standard deviation information of the original data); or the current characteristics of the samples, the lag characteristics of the samples, and the sample flows (lag information of the original data). These three types of information can represent the statistical properties of the original information.

[0134] The flow prediction apparatus provided in the embodiments of this application is described below. The flow prediction apparatus described below can be referred to in correspondence with the flow prediction method described above.

[0135] Based on any of the above embodiments, this application also provides a flow prediction device, such as... Figure 7 As shown, the device includes:

[0136] The determination module 710 is used to determine the current characteristics and lag characteristics of the flow to be predicted; the current characteristics are used to characterize the intrinsic attributes of the flow to be predicted, and the lag characteristics are used to characterize the historical flow attributes corresponding to the flow to be predicted.

[0137] The prediction module 720 is used to input the current characteristics and lag characteristics into the flow prediction model to obtain the flow prediction result output by the flow prediction model;

[0138] The traffic prediction model is obtained by training an initial traffic prediction model based on the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume. The initial traffic prediction model includes at least two generators, each of which is trained adversarially in conjunction with a discriminator. Each generator performs traffic prediction based on corresponding guidance information during adversarial training. The guidance information is used to characterize the statistical information of the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume.

[0139] The traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0140] Based on any of the above embodiments, the device further includes:

[0141] The generation module is used to input the current features and the lagged features of the sample into the initial model of each generator to obtain the sample prediction flow output by the initial model of each generator;

[0142] The discrimination module is used to input the predicted flow of each sample into the initial model of the discriminator, and obtain the sample predicted flow classification result corresponding to the predicted flow of each sample output by the initial model of the discriminator;

[0143] The adversarial loss determination module is used to determine the loss value of each adversarial training based on the weight of the predicted traffic classification results of each sample, the predicted traffic of each sample, and the traffic of each sample. The weight of the predicted traffic classification results of each sample is determined based on the importance of the current features and the lagged features of the corresponding sample, and the weight of the predicted traffic classification results of each sample is an adjustable parameter.

[0144] The adversarial training module is used to train the initial model of each generator based on the loss value of each adversarial training, so as to obtain each generator.

[0145] Based on any of the above embodiments, the adversarial loss determination module includes:

[0146] The actual classification result determination module is used to determine the actual classification result of each sample based on the predicted flow of each sample and the flow of each sample.

[0147] The first loss determination module is used to sum the weights of the predicted traffic classification results for each sample and the actual classification results for each sample to obtain the loss value for each adversarial training.

[0148] Based on any of the above embodiments, the weights of the predicted traffic classification results for each sample are adjusted using the gradient descent algorithm.

[0149] Based on any of the above embodiments, the device further includes:

[0150] The initial prediction module is used to input the current features and the lag features of the sample into each generator to obtain the initial prediction flow of the sample output by each generator.

[0151] The sample inference module is used to sum the initial predicted flows of each sample based on the weights of each generator to obtain the sample inferred flows; the weights of each generator are adjustable parameters.

[0152] The flow loss determination module is used to determine the loss value of the flow prediction model based on the inferred flow from each sample and the corresponding sample flow.

[0153] The traffic prediction training module is used to train the initial traffic prediction model based on the loss value of the traffic prediction model to obtain the traffic prediction model.

[0154] Based on any of the above embodiments, the traffic loss determination module includes:

[0155] The calculation module is used to determine the mean square error between the estimated flow rate of each sample and the corresponding sample flow rate based on the estimated flow rate of each sample and the corresponding sample flow rate.

[0156] The second loss determination module is used to determine the loss value of the flow prediction model based on the mean square error between the inferred flow of each sample and the flow of the corresponding sample.

[0157] Based on any of the above embodiments, the weights of each generator are adjusted using the gradient descent algorithm.

[0158] Based on any of the above embodiments, the guidance information is one of the following:

[0159] Mean of sample lag characteristics and mean of sample flow;

[0160] Standard deviation of sample lag characteristics and standard deviation of sample flow rate;

[0161] Sample current characteristic value, sample lagged characteristic value, and sample flow value.

[0162] Figure 8 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application, such as... Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830, and a communication bus 840, wherein the processor 810, the communication interface 820, and the memory 830 communicate with each other through the communication bus 840. The processor 810 can call a computer program in the memory 830 to execute the steps of a traffic prediction method, including, for example: determining the current characteristics and lag characteristics of the traffic to be predicted; the current characteristics are used to characterize the intrinsic attributes of the traffic to be predicted, and the lag characteristics are used to characterize the historical traffic attributes corresponding to the traffic to be predicted; inputting the current characteristics and lag characteristics into a traffic prediction model to obtain a traffic prediction result output by the traffic prediction model; wherein, the traffic prediction model is trained on an initial traffic prediction model based on the current characteristics of the samples, the lag characteristics of the samples, and the sample traffic; the initial traffic prediction model includes at least two generators, each generator being trained adversarially in conjunction with a discriminator, and each generator performing traffic prediction based on corresponding guidance information during adversarial training, the guidance information being used to characterize the statistical information of the current characteristics of the samples, the lag characteristics of the samples, and the sample traffic; the traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0163] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0164] On the other hand, this application also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can perform the steps of the traffic prediction method provided in the above embodiments, such as: determining the current characteristics and lag characteristics of the traffic to be predicted; the current characteristics are used to characterize the intrinsic attributes of the traffic to be predicted, and the lag characteristics are used to characterize the historical traffic attributes corresponding to the traffic to be predicted; inputting the current characteristics and lag characteristics into a traffic prediction model to obtain the traffic prediction result output by the traffic prediction model; wherein The traffic prediction model is trained on an initial traffic prediction model based on the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume. The initial traffic prediction model includes at least two generators, each of which is trained adversarially in conjunction with a discriminator. During adversarial training, each generator performs traffic prediction based on corresponding guidance information, which is used to characterize the statistical information of the current characteristics of the sample, the lag characteristics of the sample, and the sample traffic volume. The traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0165] On the other hand, embodiments of this application also provide a processor-readable storage medium storing a computer program. The computer program is used to cause a processor to execute the steps of the traffic prediction method provided in the above embodiments, including, for example,: determining the current characteristics and lag characteristics of the traffic to be predicted; the current characteristics characterize the intrinsic attributes of the traffic to be predicted, and the lag characteristics characterize the historical traffic attributes corresponding to the traffic to be predicted; inputting the current characteristics and lag characteristics into a traffic prediction model to obtain a traffic prediction result output by the traffic prediction model; wherein the traffic prediction model is trained on an initial traffic prediction model based on sample current characteristics, sample lag characteristics, and sample traffic; the initial traffic prediction model includes at least two generators, each generator being trained adversarially in conjunction with a discriminator, and each generator performing traffic prediction based on corresponding guidance information during adversarial training, the guidance information characterizing the sample current characteristics, the sample lag characteristics, and the statistical information of the sample traffic; the traffic prediction model is used to obtain at least two initial traffic prediction results based on the trained initial traffic prediction model, and to determine the traffic prediction result based on the at least two initial traffic prediction results.

[0166] The processor-readable storage medium can be any available medium or data storage device that the processor can access, including but not limited to magnetic memory (e.g., floppy disk, hard disk, magnetic tape, magneto-optical disk (MO)), optical memory (e.g., CD, DVD, BD, HVD), and semiconductor memory (e.g., ROM, EPROM, EEPROM, non-volatile memory (NAND FLASH), solid-state drive (SSD)).

[0167] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0168] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A flow prediction method, characterized in that, include: Determine the current and lag characteristics of the flow to be predicted; The current feature is used to characterize the intrinsic attributes of the flow to be predicted, and the lag feature is used to characterize the historical flow attributes corresponding to the flow to be predicted. The current and lag features are input into the flow prediction model to obtain the flow prediction result output by the flow prediction model. The traffic prediction model is trained on an initial traffic prediction model based on current sample features, lagged sample features, and sample traffic volume. The initial traffic prediction model includes three generators, each trained adversarially in conjunction with a discriminator. Each generator performs traffic prediction based on different guidance information during adversarial training. This guidance information characterizes the statistical information of the current sample features, lagged sample features, and sample traffic volume. Specifically, the guidance information for one generator consists of the mean of the lagged sample features and the mean of the sample traffic volume, both of which are the original data mean information. The guidance information for another generator consists of the standard deviation of the lagged sample features and the standard deviation of the sample traffic volume, both of which are the original data standard deviation information. Finally, the guidance information for yet another generator consists of the current sample features, lagged sample features, and sample traffic volume, where the current sample features, lagged sample features, and sample traffic volume are the lagged period information of the original data. The traffic prediction model is used to perform traffic prediction based on each generator in the trained initial traffic prediction model to obtain three initial traffic prediction results, and to determine the traffic prediction result based on the three initial traffic prediction results. Each generator is trained using its initial model based on the loss values ​​from each adversarial training session. The steps for determining the loss values ​​for each adversarial training session include: Based on the predicted flow of each sample and the flow of each sample, the actual classification result of each sample is determined. Based on the weights of the predicted traffic classification results for each sample, the differences between the predicted traffic classification results and the actual classification results for each sample are weighted and summed to obtain the loss value for each adversarial training. The weights of the predicted traffic classification results for each sample are used as parameters for iterative optimization during the training process and are optimized during model iteration.

2. The flow prediction method according to claim 1, characterized in that, Each generator is trained based on the following steps: The current features and lag features of the sample are respectively input into the initial model of each generator to obtain the sample predicted flow rate output by the initial model of each generator; Each sample's predicted flow is input into the discriminator's initial model to obtain the sample predicted flow classification result corresponding to each sample's predicted flow output by the discriminator's initial model; Based on the weights of the predicted traffic classification results for each sample, the predicted traffic classification results for each sample, the predicted traffic for each sample, and the traffic for each sample, the loss value for each adversarial training is determined. The weight of each sample's predicted flow classification result is determined based on the importance of the corresponding sample's current characteristics and the sample's lagged characteristics, and the weight of each sample's predicted flow classification result is an adjustable parameter. The initial models of each generator are trained based on the loss values ​​of each adversarial training to obtain each generator.

3. The flow prediction method according to any one of claims 1 to 2, characterized in that, The traffic prediction model is trained based on the following steps: The current features and lag features of the sample are input into each generator to obtain the initial predicted flow of the sample output by each generator. Based on the weights of each generator, the initial predicted flow of each sample is weighted and summed to obtain the inferred flow of the sample; the weights of each generator are adjustable parameters. Based on the estimated flow rate of each sample and the corresponding sample flow rate, the loss value of the flow prediction model is determined. The initial traffic prediction model is trained based on the loss value of the traffic prediction model to obtain the traffic prediction model.

4. The flow prediction method according to claim 3, characterized in that, The step of determining the loss value of the traffic prediction model based on the inferred traffic from each sample and the corresponding sample traffic includes: Based on the inferred flow rate of each sample and the corresponding sample flow rate, determine the mean square error between the inferred flow rate of each sample and the corresponding sample flow rate; The loss value of the flow prediction model is determined based on the mean squared error between the predicted flow rate of each sample and the flow rate of the corresponding sample.

5. The flow prediction method according to claim 3, characterized in that, The weights of each generator are adjusted based on the gradient descent algorithm.

6. The flow prediction method according to any one of claims 1 to 2, characterized in that, The guidance information is one of the following: Mean of sample lag characteristics and mean of sample flow; Standard deviation of sample lag characteristics and standard deviation of sample flow rate; Sample current characteristic value, sample lagged characteristic value, and sample flow value.

7. A flow prediction device, characterized in that, include: The determination module is used to determine the current and lag characteristics of the flow to be predicted; The current feature is used to characterize the intrinsic attributes of the flow to be predicted, and the lag feature is used to characterize the historical flow attributes corresponding to the flow to be predicted. The prediction module is used to input the current characteristics and lagged characteristics into the flow prediction model to obtain the flow prediction result output by the flow prediction model; The traffic prediction model is trained on an initial traffic prediction model based on current sample features, lagged sample features, and sample traffic volume. The initial traffic prediction model includes three generators, each trained adversarially in conjunction with a discriminator. Each generator performs traffic prediction based on different guidance information during adversarial training. This guidance information characterizes the statistical information of the current sample features, lagged sample features, and sample traffic volume. Specifically, the guidance information for one generator consists of the mean of the lagged sample features and the mean of the sample traffic volume, both of which are the original data mean information. The guidance information for another generator consists of the standard deviation of the lagged sample features and the standard deviation of the sample traffic volume, both of which are the original data standard deviation information. Finally, the guidance information for yet another generator consists of the current sample features, lagged sample features, and sample traffic volume, where the current sample features, lagged sample features, and sample traffic volume are the lagged period information of the original data. The traffic prediction model is used to perform traffic prediction based on each generator in the trained initial traffic prediction model to obtain three initial traffic prediction results, and to determine the traffic prediction result based on the three initial traffic prediction results. Each generator is trained using its initial model based on the loss values ​​from each adversarial training session. The steps for determining the loss values ​​for each adversarial training session include: Based on the predicted flow of each sample and the flow of each sample, the actual classification result of each sample is determined. Based on the weights of the predicted traffic classification results for each sample, the differences between the predicted traffic classification results and the actual classification results for each sample are weighted and summed to obtain the loss value for each adversarial training. The weights of the predicted traffic classification results for each sample are used as parameters for iterative optimization during the training process and are optimized during model iteration.

8. An electronic device comprising a processor and a memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the traffic prediction method according to any one of claims 1 to 6.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the traffic prediction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Data type determination method and device, storage medium and electronic device

    CN110781433A

  • Network traffic prediction method based on generative adversarial network

    CN112801411A

  • Network flow generation method and device based on knowledge enhancement generative adversarial network

    CN113726545A