Network traffic prediction method and apparatus, electronic device, and non-transitory storage medium
By acquiring social factor data and network traffic data, determining the weight index of social factors, and combining it with an autoregressive integrated moving average model to dynamically adjust the difference order, the problem of poor traffic prediction accuracy caused by ignoring the influence of social factors in existing technologies is solved, achieving more accurate traffic prediction.
Patent Information
- Application Number
- CN202411357512.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2044-09-26
AI Technical Summary
Existing network traffic prediction technologies ignore the influence of social factors, resulting in poor accuracy in traffic prediction.
By acquiring social factor data and network traffic data, the weight indicators of social factors are determined. Combined with an autoregressive integrated moving average model, the difference order is dynamically adjusted to construct an accurate, flexible, and robust traffic prediction system.
It improves the accuracy of network traffic prediction, enabling more precise traffic forecasting.
Smart Images

Figure CN119316305B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent network operation, in particular to a network traffic prediction method and device, electronic equipment and nonvolatile storage medium. BACKGROUND
[0002] With the continuous popularity of networks and the rapid development of 5G (5th Generation Mobile Communication Technology) networks, the complexity of network applications is increasing, and the difficulty of network management is also increasing. High-quality prediction of network traffic has become an urgent problem to be solved.
[0003] However, the traffic prediction technology in the related art ignores the influence of social factors, and has technical problems such as poor traffic prediction accuracy.
[0004] In view of the above problems, no effective solution has been proposed so far. SUMMARY
[0005] The embodiments of the present application provide a network traffic prediction method and device, electronic equipment and nonvolatile storage medium to at least solve the technical problem of poor traffic prediction accuracy caused by the traffic prediction technology in the related art ignoring the influence of social factors.
[0006] According to an aspect of an embodiment of the present application, a network traffic prediction method is provided, comprising: obtaining social factor data, wherein the social factor data contains influence parameters of a plurality of social factors corresponding to each time period, and the influence parameters are used to represent the traffic distribution influence degree of the social factors; obtaining network traffic data of a historical time period, wherein the network traffic data is used to represent network traffic values of the network platform corresponding to each time period in the historical time period; determining a weight index corresponding to the social factors according to the correlation coefficient between the influence parameters and the network traffic values corresponding to the same time period in the social factor data and the network traffic data, wherein the weight index is used to indicate the influence degree of the social factors on the network traffic values; and determining network traffic data corresponding to a target time period according to the social factor data, the network traffic data of the historical time period, and the weight index corresponding to the social factors, wherein the target time period is a time period after the historical time period.
[0007] Optionally, obtaining social factor data includes: obtaining the search index and information index corresponding to each social factor on the network platform for each time period, wherein the social factors include at least one of the following: keywords related to social hotspots, holiday information, weather information, the search index is used to characterize the frequency and trend of social factors being searched, and the information index is used to characterize the attention paid to information content containing social factors; determining the first weight corresponding to the search index and the second weight corresponding to the information index, and determining the influence parameters corresponding to each social factor for each time period based on the search index, the first weight, the information index, and the second weight.
[0008] Optionally, determining the first weight corresponding to the search index and the second weight corresponding to the information index includes: determining the first Pearson correlation coefficient between the search index and the web traffic data, and the second Pearson correlation coefficient between the information index and the web traffic data; determining the target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient, and determining the first weight and the second weight based on the target ratio, so that the ratio between the first weight and the second weight is equal to the target ratio.
[0009] Optionally, obtaining network traffic data for historical time periods includes: determining the Z-score corresponding to the network traffic value for each time period in the network traffic data, and removing outliers from the network traffic data based on the Z-score, wherein the Z-score is used to characterize the relative position of the data point of the network traffic value to the average value of the overall network traffic data dataset; using a random forest model, predicting missing values in the network traffic data based on the features of missing values and the corresponding related features, to obtain missing value prediction results, wherein the features of missing values include: network address features and timestamp features in the network traffic, and the related features include: periodic features of the network traffic data and network traffic data features within the historical event window; and filling in the missing values in the network traffic data based on the missing value prediction results to obtain the final network traffic data.
[0010] Optionally, removing outliers from network traffic data based on the Z-score includes: obtaining network traffic values corresponding to each time period within a neighboring time period, wherein the neighboring time period contains multiple time periods; determining the arithmetic mean and root mean square difference of all network traffic values within the neighboring time period; determining the difference between the network traffic value corresponding to the time period and the arithmetic mean, and determining the ratio between the difference and the root mean square difference as the Z-score corresponding to the network traffic value of the time period; and deleting the network traffic data from the network traffic data if the Z-score exceeds a preset threshold range.
[0011] Optionally, based on the correlation coefficient between the influence parameter and the network traffic value corresponding to the same time period in the social factor data and network traffic data, the weight index corresponding to the social factor is determined by: determining the absolute value of the difference between the rank of the influence parameter and the rank of the network traffic value for each time period within a preset sliding window; determining the third weight corresponding to each time period based on the decay coefficient and the position of the time period within the preset sliding window; determining the correlation coefficient between the influence parameter and the network traffic value based on the absolute value of the difference, the third weight, and the number of samples within the preset sliding window; and mapping the correlation coefficient to a preset data range to obtain the initial weight index corresponding to the social factor.
[0012] Optionally, after obtaining the initial weight indicators corresponding to the social factors, the method further includes: predicting network traffic data for a historical time period based on the social factor data and the initial weight indicators corresponding to the social factors to obtain predicted values; determining the prediction error between the predicted value and the actual value of the network traffic data; calculating the first derivative of the prediction error with respect to the social factor data, and calculating the second derivative of the social factor data with respect to the weight indicators of each social factor; determining the gradient of the weight indicators of each social factor based on the first and second derivatives, and updating the initial weight indicators corresponding to the social factors based on the gradient, wherein the prediction error between the predicted value and the actual value obtained based on the updated weight indicators is less than the prediction error between the predicted value and the actual value obtained based on the weight indicators before the update.
[0013] Optionally, determining the network traffic data for the target time period based on social factor data, historical network traffic data for different time periods, and the weighting indicators corresponding to the social factors includes: using an autoregressive integrated moving average model and adaptively adjusting the difference order to determine the autoregressive coefficients and difference coefficients corresponding to the network traffic data; and determining the network traffic data for the target time period based on the autoregressive coefficients and difference coefficients for historical time periods, network traffic data, social factor data, and the weighting indicators corresponding to the social factors.
[0014] According to another aspect of the embodiments of this application, a network traffic prediction device is also provided, comprising: a first data acquisition module, configured to acquire social factor data, wherein the social factor data includes multiple social factors corresponding to each time period, the influence parameters being used to characterize the degree of influence of the social factors on the traffic distribution; a second data acquisition module, configured to acquire network traffic data for historical time periods, wherein the network traffic data being used to characterize the network traffic value of the network platform corresponding to each time period of the historical time period; a weight index determination module, configured to determine the weight index corresponding to the social factors based on the correlation coefficient between the influence parameters corresponding to the same time period and the network traffic value in the social factor data and the network traffic data, wherein the weight index being used to indicate the degree of influence of the social factors on the network traffic value; and a network traffic prediction module, configured to determine the network traffic data corresponding to a target time period based on the social factor data, the network traffic data for historical time periods, and the weight index corresponding to the social factors, wherein the target time period is a time period located after the historical time period.
[0015] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, the processor being configured to run a program stored in the memory, wherein the program executes a network traffic prediction method during runtime.
[0016] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes a network traffic prediction method by running the computer program.
[0017] According to another aspect of the embodiments of this application, a computer program product is also provided, including a computer program that, when executed by a processor, implements the steps of a network traffic prediction method.
[0018] In this embodiment, social factor data is acquired, including multiple social factors and their corresponding influence parameters for each time period. These influence parameters characterize the degree of influence of social factors on traffic distribution. Historical network traffic data is also acquired, characterizing the network traffic value of the network platform for each time period within that historical timeframe. Based on the correlation coefficients between the influence parameters and network traffic values corresponding to the same time period in the social factor data and network traffic data, a weight index corresponding to the social factor is determined. This weight index indicates the degree of influence of the social factor on the network traffic value. Finally, based on the social factor data, historical network traffic data, and the corresponding weight index, network traffic data for a target time period is determined. The target time period is defined as the time period following the historical time period. By comprehensively incorporating social factors, implementing automatic weight adjustment, and employing intelligent data supplementation and dynamic adjustment of the difference order, a more accurate, flexible, and robust traffic prediction system is constructed. This improves the accuracy of traffic prediction and solves the problem of poor traffic prediction accuracy caused by the neglect of social factors in related technologies. Attached Figure Description
[0019] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0020] Figure 1 This is a hardware structure block diagram of a computer terminal (or electronic device) for implementing a method for network traffic prediction according to an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of a network traffic prediction method provided according to an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of a network traffic prediction method that integrates social factors according to an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of a method for acquiring and preprocessing social factor data according to an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of a method for automatically supplementing missing traffic under a corresponding timestamp, according to an embodiment of this application.
[0025] Figure 6 This is a schematic diagram of a method for determining the weights of social factor data in a prediction model according to an embodiment of this application;
[0026] Figure 7 This is a schematic diagram of an ARIMA network traffic prediction model provided according to an embodiment of this application;
[0027] Figure 8 This is a schematic diagram of a network traffic prediction device provided according to an embodiment of this application. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] To facilitate a better understanding of the embodiments of this application by those skilled in the art, some technical terms or nouns involved in the embodiments of this application are explained as follows:
[0031] Search Index: This reflects the frequency and trend of netizens actively searching for a specific keyword. It is calculated based on a large amount of user behavior data collected by search engines and is an estimate representing how keyword search volume changes over time. A higher search index indicates that the keyword is searched more frequently and receives more attention.
[0032] Information Index: This reflects the trend of netizens' attention to specific information content, especially content pushed through news, articles, social media, and other channels. It may include, but is not limited to, news click-through rates, social media shares, and the number of comments. A high information index means that information related to the keywords receives more attention and is disseminated more widely.
[0033] Pearson correlation coefficient: a statistical measure used to measure the direction and strength of the linear relationship between two variables. Its value ranges from -1 to +1, where +1 indicates a perfect positive correlation, -1 indicates a perfect negative correlation, and 0 indicates no linear correlation.
[0034] ARIMA (Autoregressive Integrated Moving Average) is a statistical model used for time series forecasting. It combines three components: autoregression (AR), difference integration (I), and moving average (MA) to capture the dynamic characteristics of data and predict future values.
[0035] The 3σ rule states that in a normal distribution, approximately 99.73% of the data values will fall within three standard deviations of the mean. This is a basic criterion in statistics for measuring data distribution and detecting anomalies.
[0036] Network traffic analysis methods in related technologies mainly include: using statistical methods to extract intrinsic time patterns from cellular network traffic sequences, and attempting to fit models to the spatial distribution of traffic sequences; clustering studies on spatiotemporal correlations by splitting and recombining spatiotemporal factors, etc. However, these algorithms in related technologies usually ignore the changing trends and correlations between data in the traffic sequences, and ignore the impact of social factors on traffic prediction. This leads to existing traffic prediction results often failing to meet the original characteristics of actual traffic data, resulting in a series of problems such as prediction results not meeting user needs and inaccurate results.
[0037] To address the aforementioned issues, this application provides relevant solutions. Specifically, it offers a novel network traffic combination prediction model that considers social factors. This model takes into account that social factors can more comprehensively reflect the dynamic characteristics of network usage. For example, during holidays or social events, people's network usage patterns may change significantly. Traditional models may not be able to capture these changes, while models that incorporate social factors can better predict these changes. This will be explained in detail below.
[0038] According to an embodiment of this application, a method embodiment for network traffic prediction is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0039] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1A hardware block diagram of a computer terminal (or electronic device) for implementing a network traffic prediction method is shown. Figure 1 As shown, the computer terminal 10 (or electronic device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0040] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or electronic device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0041] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the network traffic prediction method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the above-mentioned network traffic prediction method. The memory 104 may include high-speed random access memory, and may also include 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 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0043] The display may be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or electronic device).
[0044] Under the above operating environment, this application provides a network traffic prediction method. Figure 2 This is a schematic diagram of a network traffic prediction method provided according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0045] Step S202: Obtain social factor data, wherein the social factor data contains multiple social factors corresponding to each time period, and the influence parameters are used to characterize the degree of influence of the social factors on the flow distribution.
[0046] Step S204: Obtain network traffic data for historical time periods, wherein the network traffic data is used to characterize the network traffic value of the network platform at each time period in the historical time period.
[0047] Step S206: Based on the correlation coefficient between the influence parameters and network traffic values corresponding to the same time period in the social factor data and network traffic data, determine the weight index corresponding to the social factor. The weight index is used to indicate the degree of influence of the social factor on the network traffic value.
[0048] Step S208: Based on social factor data, network traffic data for historical time periods, and the weighting indicators corresponding to social factors, determine the network traffic data corresponding to the target time period, wherein the target time period is the time period following the historical time period.
[0049] Through the above steps, by fully incorporating social factors, implementing automatic weight adjustment, and using intelligent data supplementation and dynamic adjustment of the difference order, a more accurate, flexible, and robust traffic prediction system is constructed, thereby improving the accuracy of traffic prediction and solving the technical problem of poor traffic prediction accuracy caused by the neglect of the influence of social factors in related traffic prediction technologies.
[0050] The network traffic prediction method in steps S202 to S208 of the embodiments of this application will be further described below.
[0051] Figure 3 This is a schematic diagram of a network traffic prediction method that integrates social factors according to an embodiment of this application, as shown below. Figure 3 As shown.
[0052] First, social factor data can be acquired and processed, and the specific steps are as follows.
[0053] In some embodiments of this application, obtaining social factor data includes the following steps: obtaining the search index and information index corresponding to each social factor in the network platform for each time period, wherein the social factors include at least one of the following: keywords related to social hotspots, holiday information, weather information, the search index is used to characterize the frequency and trend of social factors being searched, and the information index is used to characterize the attention paid to information content containing social factors; determining the first weight corresponding to the search index and the second weight corresponding to the information index, and determining the influence parameter corresponding to each social factor for each time period based on the search index, the first weight, the information index, and the second weight.
[0054] Specifically, such as Figure 4 As shown, the primary keys of the data collected from a certain platform's index website include: multiple keywords related to social hot topics, weather information, holiday information, etc., with corresponding data including: search index S and information index N. Then, the collected social data series and time series are merged into a Data... new_new This ensures that each data point has a corresponding date stamp (i.e., each data point corresponds to a time period; in this embodiment, the time period is illustrated using days as an example).
[0055] Furthermore, the obtained search index and information index need to be fused together. The sequence of the two indices is fused into a main sequence, and the processed time series and the main sequence are used as features to be input into the prediction model. In this embodiment, a weighted average method can be used to fuse the search index and information index. First, the weights k1 (first weight) and k2 (second weight) corresponding to the search index and information index need to be determined respectively. The specific steps are as follows.
[0056] In some embodiments of this application, determining the first weight corresponding to the search index and the second weight corresponding to the information index includes the following steps: determining the first Pearson correlation coefficient between the search index and the network traffic data, and the second Pearson correlation coefficient between the information index and the network traffic data; determining the target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient, and determining the first weight and the second weight based on the target ratio, so that the ratio between the first weight and the second weight is equal to the target ratio.
[0057] Specifically, the Pearson correlation coefficients between S and N and the network traffic data are calculated as P0 and P1, respectively. S (First Pearson correlation coefficient) and P N (Second Pearson correlation coefficient), k1 and k2 range from 0 to 1, according to P S and P N The ratio l (i.e., the target ratio mentioned above) determines the ratio of k1 and k2, and further determines the values of k1 and k2 using the following formula:
[0058]
[0059] After determining the first weight K1 and the second weight K2, the values of Si and Ni at each time point Ti (i.e., the time period) are multiplied by the corresponding weights k1 and k2 to obtain weighted values A1i and A2i. Adding A1i and A2i yields the value of the main sequence, Merged. i (That is, the influence parameters of each of the above social factors in each time period), the specific formula is as follows:
[0060] Merged i =S i ·k1+N i ·k2
[0061] Finally, remove Si and Ni corresponding to Ti in the social factor data sequence and update it to Merged. i And update the data. new_new This yields the final social factor data.
[0062] On the other hand, it is also necessary to obtain network traffic data for historical time periods, remove inferior data, and automatically supplement traffic data for missing time periods. The specific steps are as follows.
[0063] In some embodiments of this application, obtaining network traffic data for historical time periods includes the following steps: determining the Z-score corresponding to the network traffic value for each time period in the network traffic data, and removing outliers from the network traffic data based on the Z-score, wherein the Z-score is used to characterize the relative position of the data point of the network traffic value to the average value of the overall dataset of the network traffic data; using a random forest model, predicting missing values in the network traffic data based on the features of missing values and the related features corresponding to the missing values, and obtaining missing value prediction results, wherein the features of missing values include: network address features and timestamp features in the network traffic, and the related features include: periodic features of the network traffic data and network traffic data features within the historical event window; and filling in the missing values in the network traffic data based on the missing value prediction results to obtain the final network traffic data.
[0064] Specifically, such as Figure 5 As shown in the embodiments of this application, a method for automatically supplementing traffic data within a missing time period by a model is provided, including: detection of missing data by the model; elimination of poor-quality data by the model; a method for generating traffic data for the missing time period by the model based on existing network traffic data; and an automatic supplementation method for traffic data within a missing time period by the model, which will be described in detail below.
[0065] For example, traffic data can be obtained from a platform's statistics website and preprocessed. Specifically, traffic data for the platform's website within the time frame from June 10, 2021 to March 24, 2024 can be obtained from the statistics website, on a daily basis. Daily data includes page views (PV), unique visitors (UV), and IP addresses. In this embodiment, the PV column can be used as a reference for the daily traffic value. Data preprocessing includes two aspects: supplementing missing values and removing low-quality data.
[0066] In this embodiment of the application, the pandas library can be used to detect missing time points (time point periods); and abnormal low-quality values in network traffic data can be identified and removed by calculating Z-scores. The specific steps are as follows.
[0067] In some embodiments of this application, removing outliers from network traffic data based on Z-scores includes the following steps: obtaining network traffic values corresponding to each time period within a neighborhood time period, wherein the neighborhood time period contains multiple time periods; determining the arithmetic mean and root mean square difference of all network traffic values within the neighborhood time period; determining the difference between the network traffic value corresponding to the time period and the arithmetic mean, and determining the ratio between the difference and the root mean square difference as the Z-score corresponding to the network traffic value of the time period; if the Z-score exceeds a preset threshold range, determining the network traffic data as an outlier and deleting it from the network traffic data.
[0068] Specifically, in this embodiment, any Z-score less than -3 or greater than +3 can be considered an outlier, based on... In principle, data with Z-scores between (-3, +3) are considered normal, while values exceeding 3 times the standard deviation are considered outliers. Data greater than 3 and less than -3 are removed and regenerated by calculating the Z-score. The formula for calculating the Z-score is shown below:
[0069]
[0070] Among them, Tra d α is the network traffic value for the day, α is the arithmetic mean of the network traffic values for the week surrounding the day (i.e., the neighboring time period of the above time period), and δ is the root mean square difference of the network traffic values for the week surrounding the day.
[0071] exist In principle, Z-values are selected within the range of (-3, +3) (i.e., the aforementioned preset threshold range). Outliers exceeding three times the standard deviation are considered outliers. (Positive and negative values are not specified.) The probability is 99.7%, then the distance from the average is... The probability of other values appearing is It is an extremely rare and low-probability event.
[0072] After removing outliers and detecting missing values, missing data in network traffic data can be predicted, generated, and automatically filled in. For example, a random forest model can be used to fill in missing values, which will be further introduced below.
[0073] Specifically, a random forest model can be used to determine the relationship between the predicted results of missing values and the features related to the missing values. The missing value features serve as the input feature vector and need to be predicted by the model. Other features related to the missing value features serve as the input of the model to assist in predicting the missing values. The formula is as follows:
[0074]
[0075] Among them, Result missing Indicates the prediction result for missing values; X missing Features representing missing values include: network address features and timestamp features in network traffic; X related This represents other features related to the missing value feature, namely the related features corresponding to the missing value mentioned above, including: periodic features extracted using timestamp data and network traffic data features within historical event windows, etc.; f represents the random forest model. Where w i f is the weight of the i-th tree. iis the decision function for the i-th tree, and n is the number of trees in the random forest.
[0076] Furthermore, the imputed missing values can be analyzed: the statistical indicator MSE is used to assess the accuracy of the estimates. A lower MSE value indicates a smaller difference between the estimates and the actual observations. After obtaining a good MSE value, the sample dataset is updated to Data. new .
[0077] Subsequently, as an optional implementation, network traffic data that has already had outliers removed can be used to fit the ARIMA model, as detailed below.
[0078] In this embodiment, a rolling prediction method can be used to progressively predict the value at each missing time point, using historical seven-day data D fitted by the model. t-7:t Predict the value for the next day, fit the ARIMA model, and obtain the model parameters θ. t Using the fitted ARIMA model θ t To predict the value of missing time points
[0079]
[0080] Predicted values As an estimate for a specific time period, check whether the estimate meets expectations. If checking the estimate... If the result meets expectations, the estimated value is added to the sample data as the new historical seven-day dataset D. t-6:t+1 According to the prediction error Dynamically increase model parameters θ t+1 :
[0081]
[0082] Where α is the learning rate, σ 2 This is the variance of the prediction error. Continue predicting the value for the next day and verifying whether the estimate meets expectations. Repeat the process until data for all missing time periods is filled.
[0083] The dynamic adjustment mechanism of model parameters during automatic supplementation is a key component in achieving this process. By dynamically adjusting the learning rate, the model can adaptively adjust parameter updates based on the magnitude of the prediction error, thereby improving prediction accuracy and model performance. The learning rate adjustment mechanism adjusts the learning rate according to the magnitude of the prediction error, thus affecting the speed and magnitude of parameter updates, as shown in the following formula:
[0084]
[0085] Where, λt+1 It is the adjusted parameter for time t+1, λ t The parameter is time t, ρ is the learning rate, and ξ is the learning rate. t It is the prediction error for time t. It's the weight.
[0086] For a given parameter λ, the parameter is updated by dynamically adjusting the learning rate ρ. To make the parameter adjustment more flexible and adaptive, weights are introduced. This is used to measure the importance of the current prediction error ξ. Specifically, if the current prediction error is large, the weight is reduced. This reduces the magnitude of parameter updates; conversely, if the current prediction error is small, the weights are increased. To update parameters more quickly.
[0087] Among them, weight The update rule is: if the prediction error ξ t A value greater than 0 indicates that the predicted value is higher than the actual value, and the weight will be adjusted accordingly. Subtract a small adjustment value If the prediction error ξ t A value less than 0 indicates that the predicted value is lower than the actual value, and the weight will be adjusted accordingly. Add a small adjustment value If the prediction error ξ t If the value is close to 0, indicating accurate prediction, then the weight is maintained. constant.
[0088] In this embodiment, the step of checking whether the estimated value meets expectations includes using the mean squared error (MSE) as an evaluation metric. MSE is a commonly used statistical metric that measures the average variance between the estimated value and the actual observed value. A lower MSE value indicates a smaller difference between the estimated value and the actual observed value, thus reflecting the accuracy of the estimated value and the goodness of fit of the model. In this method, the MSE between the estimated value and the corresponding actual observed value is calculated to determine whether the estimated value meets expectations, thereby evaluating the performance and accuracy of the model. The advantage of this method is its simplicity and effectiveness, providing a reliable assessment of the accuracy of the estimated value, thus providing a reliable basis for subsequent data processing and decision-making.
[0089] The following describes the process of determining the weights of social factor data in the prediction model. In this embodiment, correlation coefficients can be converted into weight indicators. This conversion process is based on the magnitude and direction of the correlation coefficients, as well as the actual impact of social factors on traffic flow. By converting correlation coefficients into weight indicators, the importance of social factors in traffic flow prediction can be more accurately reflected, thereby improving the accuracy and reliability of the prediction model. The specific steps are as follows.
[0090] In some embodiments of this application, determining the weight index corresponding to the social factor based on the correlation coefficient between the influence parameter and the network traffic value corresponding to the same time period in social factor data and network traffic data includes the following steps: determining the absolute value of the difference between the rank of the influence parameter and the rank of the network traffic value for each time period within a preset sliding window range; determining the third weight corresponding to each time period based on the attenuation coefficient and the position of the time period within the preset sliding window range; determining the correlation coefficient between the influence parameter and the network traffic value based on the absolute value of the difference, the third weight, and the number of samples within the preset sliding window range; and mapping the correlation coefficient to a preset data range to obtain the initial weight index corresponding to the social factor.
[0091] Specifically, the social factor data set in the daily data is defined as follows:
[0092] social={merged hotspots ,merged weather ,merged holiday}
[0093] Among them, merged hotspots ,merged weather ,merged holiday These represent the combined search index S and information index N for keywords related to social hotspots, weather information, and holiday information, respectively.
[0094] like Figure 6 As shown, a local computation method can be used to calculate the correlation coefficient (e.g., Spearman's correlation coefficient) between social factor data and network traffic data with the same timestamp. Specifically, the time range of the sliding window is selected as follows: Where i is the index of the current time point, and A is the window size. For each time point in the window, the ranks of X and Ψ are calculated, where X and Ψ represent two variables in the time series data, namely the rank of the influencing parameter and the rank of the network traffic value corresponding to each time period. The formula for calculating the Spearman correlation coefficient of the ranks of X and Ψ within the window is shown below:
[0095]
[0096] Where, d i This indicates the time point i within the window. That is, the absolute difference between the rank of X and the rank of Ψ. ω i α is the weight of the i-th data point, n is the number of data samples in the window, α is the decay coefficient, and i is the position of the data point in the window. The specific formula for the exponential decay function is:
[0097] ωi =e -α(i-1)
[0098] Next, the calculated correlation coefficient needs to be converted into a weight index. Specifically, the calculated Spearman correlation coefficient γ is normalized and scaled to the range of [0,1] (i.e., the preset data range mentioned above), and its absolute value is taken as the weight index Q, thus obtaining the initial weight index corresponding to the social factor.
[0099] For example, currently, three types of social factor data are used: keywords related to social hot topics, weather information, and holiday information. Through the weighting index determination process described above, the initial weight index W corresponding to these social factors can be determined. hotspots W weather W holiday As shown in the following formula:
[0100] Q i ={W hotspots W weather W holiday}
[0101] Assuming initial weight Q i All values are 0.33, indicating a uniform distribution. Applying these weights to the social factor data yields comprehensive social factor data. in, These refer to the combined influence parameters of the search index S and information index N for relevant social hot topics, weather, and holidays at the corresponding time point t.
[0102] Furthermore, the embodiments of this application can also dynamically adjust the initial weight index, and automatically learn and adjust the weight of different social factors in the prediction model based on historical data and real-time feedback. The specific steps are as follows.
[0103] In some embodiments of this application, after obtaining the initial weight index corresponding to the social factors, the method further includes the following steps: predicting network traffic data for a historical time period based on the social factor data and the initial weight index corresponding to the social factors to obtain a predicted value; determining the prediction error between the predicted value of the network traffic data and the actual value of the network traffic data; calculating the first derivative of the prediction error with respect to the social factor data, and calculating the second derivative of the social factor data with respect to the weight index of each social factor; determining the gradient of the social factor data with respect to the weight index of each social factor based on the first derivative and the second derivative, and updating the initial weight index corresponding to the social factors based on the gradient, wherein the prediction error between the predicted value and the actual value obtained based on the updated weight index is less than the prediction error between the predicted value and the actual value obtained based on the weight index before the update.
[0104] Specifically, using the current Mixed_Social data... t Perform traffic prediction to obtain the predicted traffic value Net_traffic_prediction t This involves using social factor data and the initial weighting of those social factors to predict network traffic data for a historical period, obtaining a predicted value, and then comparing the predicted value with the actual traffic value Net_traffic. t Compare the prediction error E with the actual value of network traffic data (i.e., the actual value of network traffic data) to calculate the prediction error E. t The specific formula is as follows:
[0105]
[0106] Using the gradient descent algorithm, the weights of each social factor are updated based on the prediction error. Specifically, the error E is calculated. t For each weight W hotspots W weather W holiday The gradient, or partial derivative, can be decomposed into two parts according to the chain rule: the derivative of the prediction error with respect to the comprehensive social factor data (i.e., the first derivative mentioned above), and the derivative of the comprehensive social factor data with respect to the weights (i.e., the second reciprocal mentioned above). Specifically, as follows.
[0107] First, calculate the error E. t For the measured flow rate value Net_traffic_prediction t The derivative:
[0108]
[0109] Next, we calculate the derivative β1 of the predicted value with respect to the mixed social factors data Mixed_Socialt. Taking a linear regression model as an example:
[0110]
[0111] Finally, the derivatives of the mixed social factor data Mixed_Socialt with respect to each weight Wi are calculated. Now, the derivative results from the above steps can be combined to obtain the error E. t For each weight W hotspots W weather W holiday The gradient of W. hotspots For example, the gradient is:
[0112]
[0113] Update the weights using the gradients calculated above:
[0114]
[0115] Here, η is the learning rate, which controls the step size of each weight update.
[0116] By applying the chain rule, the sensitivity of error to weights can be decomposed into a series of computable derivative steps, which reflect the relationship between prediction error and the comprehensive social factor data and its weights. Finally, the weights are updated using gradient descent, achieving dynamic adaptability of the model to different social factors. This process iterates with each new real-time data release, gradually updating the weights. Over time, the weights gradually stabilize, meaning the model's sensitivity to different social factors becomes more consistent with reality, thus improving the accuracy of traffic prediction. Suppose that over a certain period, the impact of information related to a social hotspot on traffic gradually weakens, while the impact of weather factors strengthens. In each weight update process, the weight W... hotspots It will gradually decrease, while W weather This will gradually increase. Eventually, the model can automatically adapt to this change, improving prediction accuracy.
[0117] After obtaining social factor data, historical network traffic data, and the corresponding weight indicators for social factors, network traffic can be predicted by combining the weight indicators of social factor data with the generated traffic data. The specific steps are as follows.
[0118] In some embodiments of this application, determining the network traffic data corresponding to a target time period based on social factor data, network traffic data for historical time periods, and weight indicators corresponding to social factors includes the following steps: using an autoregressive integrated moving average model, and by adaptively adjusting the difference order, determining the autoregressive coefficient and difference coefficient corresponding to the network traffic data; and determining the network traffic data corresponding to the target time period based on the autoregressive coefficient and difference coefficient of historical time periods, network traffic data, social factor data, and weight indicators corresponding to social factors.
[0119] like Figure 7 As shown, the ARIMA model can be used for modeling, and an adaptive adjustment method for the differencing order can be adopted to dynamically determine the differencing order d of the time series data. The seasonal differencing operation, considering the seasonality and periodicity characteristics of the time series data, is described in the following formula:
[0120]
[0121] in, Let x represent the difference sequence obtained at time t after applying a dynamically determined difference order d. tThis represents the value of the time series at time t, x. t-d dt represents the values of the time series up to d time units, where d is the difference order dynamically determined based on the characteristics of the data. dt represents the difference order adaptively adjusted at time t. This represents the time series x at time t where the d-th order difference is applied. t For the time series x t Performing a d-th order difference yields a new difference sequence.
[0122] Furthermore, the calculated weights of social factor data and the generated traffic data are used as multidimensional inputs. In the ARIMA model, social factor data is introduced as an external variable to form the ARIMAX model. This embodiment determines the weight of each social factor data point to ensure that it correctly influences the prediction results of traffic data within the model. These weights can be determined through analysis of historical data and model training to ensure that the model effectively captures the impact of social factors on traffic data. The mathematical expression of this model is shown below:
[0123] y t =β0+β1y t-1 +β2y t-2 +...+β p y t-p +α1Δy t-1 +α2Δy t-2 +...+α q Δy t-q +γ1z t-1 +γ2z t-2 +...+γ m z m-2 +ε t
[0124] Among them, y t z represents the value of the flow data at time t. t This represents the values of social factor data at time t, β0, β1, ..., β p These are the autoregressive coefficients of the model, α1, α2, ..., α q These are the difference coefficients of the model, γ1, γ2, ..., γ m It is the coefficient of social factor data, ε t This represents the white noise in the model.
[0125] In addition, after the model is built, the mean squared error (MSE) can be used to evaluate the model's predictive performance.
[0126] This application introduces social factor data as an external variable into the model prediction, which effectively improves the accuracy of the prediction. It automatically supplements the missing data samples to ensure the effectiveness of the supplemented data and improve the accuracy of the supplemented data. It adopts an adaptive differencing algorithm to better handle the seasonal changes of time series data and dynamically adjusts the differencing order according to the characteristics of the data to improve the model's fitting performance and prediction accuracy.
[0127] This application proposes a network traffic prediction model based on social factors. Unlike traditional network traffic prediction methods, this model integrates social factors closely related to network traffic (such as social hotspots, weather, and holidays), and uses index data from network platforms to reflect the social hotspots and public attention to these factors. Users only need to provide relevant social factor data, and the model can automatically fill in the missing data and automatically adjust the weights using a weighted average method and Pearson correlation coefficient, achieving fully automated and high-precision traffic prediction. Furthermore, by dynamically adjusting the difference order, the model's adaptability to handling complex data is enhanced.
[0128] Improving forecast accuracy by comprehensively incorporating social factors: Social factors, such as holidays, special events (e.g., concerts, sporting events), and policy changes, have a significant impact on various types of traffic flow, including traffic volume, internet traffic, and pedestrian flow. By introducing and effectively integrating this social factor data, the complexity and diversity of traffic flow changes can be captured more comprehensively, thereby improving the accuracy and reliability of forecasts.
[0129] To address the issue of integrating social factor data into traffic prediction models, this application designs an automatic weight adjustment mechanism. This mechanism automatically learns and adjusts the weights of different social factors in the prediction model based on historical data and real-time feedback, ensuring the model can dynamically adapt to changes in the social environment and improving its flexibility and adaptability. Simultaneously, this reduces the need for manual intervention and lowers operating costs.
[0130] To address the common problem of missing data in traffic forecasting, this application proposes an intelligent data supplementation strategy. By employing advanced forecasting techniques, this strategy can automatically identify and fill in missing data points, ensuring the integrity and continuity of the input data for the forecasting model. Furthermore, to further improve forecasting accuracy, a dynamic adjustment function for the difference order is introduced. This function automatically adjusts the model's difference order based on changes in data characteristics to adapt to traffic data at different time scales and frequencies, thereby further enhancing the adaptability and accuracy of the forecasting model.
[0131] According to an embodiment of this application, an embodiment of a network traffic prediction device is also provided. Figure 8 This is a schematic diagram of a network traffic prediction device according to an embodiment of this application.Figure 8 As shown, the device includes:
[0132] The first data acquisition module 80 is used to acquire social factor data, which includes multiple social factors with corresponding influence parameters for each time period. The influence parameters are used to characterize the degree of influence of the flow distribution of social factors.
[0133] The second data acquisition module 82 is used to acquire network traffic data for historical time periods, wherein the network traffic data is used to characterize the network traffic value of the network platform at each time period in the historical time period.
[0134] The weight index determination module 84 is used to determine the weight index corresponding to the social factor based on the correlation coefficient between the influence parameter and the network traffic value in the same time period in the social factor data and network traffic data. The weight index is used to indicate the degree of influence of the social factor on the network traffic value.
[0135] The network traffic prediction module 86 is used to determine the network traffic data corresponding to the target time period based on social factor data, network traffic data of historical time periods, and the weight indicators corresponding to social factors. The target time period is the time period after the historical time period.
[0136] Optionally, obtaining social factor data includes: obtaining the search index and information index corresponding to each social factor on the network platform for each time period, wherein the social factors include at least one of the following: keywords related to social hotspots, holiday information, weather information, the search index is used to characterize the frequency and trend of social factors being searched, and the information index is used to characterize the attention paid to information content containing social factors; determining the first weight corresponding to the search index and the second weight corresponding to the information index, and determining the influence parameters corresponding to each social factor for each time period based on the search index, the first weight, the information index, and the second weight.
[0137] Optionally, determining the first weight corresponding to the search index and the second weight corresponding to the information index includes: determining the first Pearson correlation coefficient between the search index and the web traffic data, and the second Pearson correlation coefficient between the information index and the web traffic data; determining the target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient, and determining the first weight and the second weight based on the target ratio, so that the ratio between the first weight and the second weight is equal to the target ratio.
[0138] Optionally, obtaining network traffic data for historical time periods includes: determining the Z-score corresponding to the network traffic value for each time period in the network traffic data, and removing outliers from the network traffic data based on the Z-score, wherein the Z-score is used to characterize the relative position of the data point of the network traffic value to the average value of the overall network traffic data dataset; using a random forest model, predicting missing values in the network traffic data based on the features of missing values and the corresponding related features, to obtain missing value prediction results, wherein the features of missing values include: network address features and timestamp features in the network traffic, and the related features include: periodic features of the network traffic data and network traffic data features within the historical event window; and filling in the missing values in the network traffic data based on the missing value prediction results to obtain the final network traffic data.
[0139] Optionally, removing outliers from network traffic data based on the Z-score includes: obtaining network traffic values corresponding to each time period within a neighboring time period, wherein the neighboring time period contains multiple time periods; determining the arithmetic mean and root mean square difference of all network traffic values within the neighboring time period; determining the difference between the network traffic value corresponding to the time period and the arithmetic mean, and determining the ratio between the difference and the root mean square difference as the Z-score corresponding to the network traffic value of the time period; and deleting the network traffic data from the network traffic data if the Z-score exceeds a preset threshold range.
[0140] Optionally, based on the correlation coefficient between the influence parameter and the network traffic value corresponding to the same time period in the social factor data and network traffic data, the weight index corresponding to the social factor is determined by: determining the absolute value of the difference between the rank of the influence parameter and the rank of the network traffic value for each time period within a preset sliding window; determining the third weight corresponding to each time period based on the decay coefficient and the position of the time period within the preset sliding window; determining the correlation coefficient between the influence parameter and the network traffic value based on the absolute value of the difference, the third weight, and the number of samples within the preset sliding window; and mapping the correlation coefficient to a preset data range to obtain the initial weight index corresponding to the social factor.
[0141] Optionally, after obtaining the initial weight indicators corresponding to the social factors, the weight indicator determination module 84 is further configured to: predict network traffic data for a historical time period based on the social factor data and the initial weight indicators corresponding to the social factors, and obtain predicted values; determine the prediction error between the predicted value of the network traffic data and the actual value of the network traffic data; calculate the first derivative of the prediction error with respect to the social factor data, and calculate the second derivative of the social factor data with respect to the weight indicators of each social factor; determine the gradient of the weight indicators of each social factor based on the first and second derivatives, and update the initial weight indicators corresponding to the social factors based on the gradient, wherein the prediction error between the predicted value and the actual value obtained based on the updated weight indicators is less than the prediction error between the predicted value and the actual value obtained based on the weight indicators before the update.
[0142] Optionally, determining the network traffic data for the target time period based on social factor data, historical network traffic data for different time periods, and the weighting indicators corresponding to the social factors includes: using an autoregressive integrated moving average model and adaptively adjusting the difference order to determine the autoregressive coefficients and difference coefficients corresponding to the network traffic data; and determining the network traffic data for the target time period based on the autoregressive coefficients and difference coefficients for historical time periods, network traffic data, social factor data, and the weighting indicators corresponding to the social factors.
[0143] It should be noted that each module in the above-mentioned network traffic prediction device can be a program module (e.g., a set of program instructions to implement a certain function) or a hardware module. For the latter, it can be manifested in the following forms, but is not limited to them: each of the above modules is manifested as a processor, or the functions of each of the above modules are implemented by a processor.
[0144] It should be noted that the network traffic prediction device provided in this embodiment can be used to perform... Figure 2 The network traffic prediction method shown above is also applicable to the embodiments of this application, and will not be repeated here.
[0145] This application embodiment also provides a non-volatile storage medium, which includes a stored computer program. The device containing the non-volatile storage medium executes the following network traffic prediction method by running the computer program: acquiring social factor data, wherein the social factor data includes multiple social factors corresponding to influence parameters in each time period, and the influence parameters are used to characterize the degree of influence of social factors on traffic distribution; acquiring network traffic data for historical time periods, wherein the network traffic data is used to characterize the network traffic value of the network platform corresponding to each time period in the historical time period; determining the weight index corresponding to the social factors based on the correlation coefficient between the influence parameters and network traffic values corresponding to the same time period in the social factor data and network traffic data, wherein the weight index is used to indicate the degree of influence of social factors on network traffic values; and determining the network traffic data corresponding to a target time period based on the social factor data, the network traffic data for historical time periods, and the weight index corresponding to the social factors, wherein the target time period is the time period following the historical time period.
[0146] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the network traffic prediction method described in various embodiments of this application: acquiring social factor data, wherein the social factor data includes multiple social factors corresponding to influence parameters in each time period, and the influence parameters are used to characterize the degree of influence of social factors on traffic distribution; acquiring network traffic data for historical time periods, wherein the network traffic data is used to characterize the network traffic value of the network platform in each time period of the historical time period; determining the weight index corresponding to the social factor based on the correlation coefficient between the influence parameters and the network traffic value corresponding to the same time period in the social factor data and the network traffic data, wherein the weight index is used to indicate the degree of influence of the social factor on the network traffic value; and determining the network traffic data corresponding to the target time period based on the social factor data, the network traffic data for historical time periods, and the weight index corresponding to the social factor, wherein the target time period is the time period located after the historical time period.
[0147] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0148] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0150] 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 units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0151] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0152] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it 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 all or 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, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0153] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A network traffic prediction method, characterized in that, include: Acquire social factor data, wherein the social factor data includes multiple social factors with corresponding influence parameters for each time period, and the influence parameters are used to characterize the degree of influence of the social factors on the flow distribution; The acquisition of social factor data includes: acquiring the search index and information index of each social factor in the network platform for each time period, wherein the social factors include at least one of the following: keywords related to social hotspots, holiday information, and weather information; the search index is used to characterize the frequency and trend of the social factor being searched, and the information index is used to characterize the attention paid to information content containing the social factor; determining the first weight corresponding to the search index and the second weight corresponding to the information index, and determining the influence parameter corresponding to each social factor for each time period based on the search index, the first weight, the information index, and the second weight; Obtain network traffic data for a historical time period, wherein the network traffic data is used to characterize the network traffic value of the network platform corresponding to each time period of the historical time period; Based on the correlation coefficient between the influence parameter and the network traffic value corresponding to the same time period in the social factor data and the network traffic data, a weight index corresponding to the social factor is determined, wherein the weight index is used to indicate the degree of influence of the social factor on the network traffic value; Based on the social factor data, the network traffic data for the historical time period, and the weight index corresponding to the social factors, the network traffic data corresponding to the target time period is determined, wherein the target time period is the time period following the historical time period.
2. The network traffic prediction method according to claim 1, characterized in that, Determining the first weight corresponding to the search index and the second weight corresponding to the information index includes: Determine the first Pearson correlation coefficient between the search index and the network traffic data, and the second Pearson correlation coefficient between the information index and the network traffic data; A target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient is determined, and based on the target ratio, the first weight and the second weight are determined such that the ratio between the first weight and the second weight is equal to the target ratio.
3. The network traffic prediction method according to claim 1, characterized in that, Obtaining historical network traffic data for a given period includes: Determine the Z-score corresponding to the network traffic value for each time period in the network traffic data, and remove outliers from the network traffic data based on the Z-score, wherein the Z-score is used to characterize the relative position between the data point of the network traffic value and the average value of the overall dataset of the network traffic data; A random forest model is used to predict missing values in the network traffic data based on the characteristics of the missing values and the corresponding related features, thereby obtaining the missing value prediction results. The characteristics of the missing values include network address features and timestamp features in the network traffic, and the related features include the periodic features of the network traffic data and network traffic data features within historical event windows. Based on the missing value prediction results, the missing values in the network traffic data are filled in to obtain the final network traffic data.
4. The network traffic prediction method according to claim 3, characterized in that, Based on the Z-score, outliers in the network traffic data are removed, including: Obtain the network traffic value corresponding to each time period within a neighboring time period of the time period, wherein the neighboring time period includes multiple time periods; Determine the arithmetic mean and root mean square difference of all network traffic values within the neighborhood time period; The difference between the network traffic value and the arithmetic mean corresponding to the time period is determined, and the ratio between the difference and the root mean square error is determined as the Z score corresponding to the network traffic value of the time period. If the Z score exceeds a preset threshold range, the network traffic data is identified as an outlier and deleted from the network traffic data.
5. The network traffic prediction method according to claim 1, characterized in that, Based on the correlation coefficients between the influence parameters and the network traffic values corresponding to the same time period in the social factor data and the network traffic data, the weight indicators corresponding to the social factors are determined as follows: Within a preset sliding window range, determine the absolute value of the difference between the rank of the influence parameter corresponding to each time period and the rank of the network traffic value; Based on the attenuation coefficient and the position of the time period within the preset sliding window range, a third weight corresponding to each time period is determined; The correlation coefficient between the influencing parameter and the network traffic value is determined based on the absolute value of the difference, the third weight, and the number of samples within the preset sliding window range. The correlation coefficient is mapped to a preset data range to obtain the initial weight index corresponding to the social factor.
6. The network traffic prediction method according to claim 5, characterized in that, After obtaining the initial weight index corresponding to the social factors, the method further includes: Based on the social factor data and the initial weight index corresponding to the social factors, the network traffic data for the historical time period is predicted to obtain the predicted value; Determine the prediction error between the predicted value of the network traffic data and the actual value of the network traffic data; Calculate the first derivative of the prediction error with respect to the social factor data, and calculate the second derivative of the social factor data with respect to the weight index of each social factor; Based on the first derivative and the second derivative, the gradient of the social factor data with respect to the weight index of each social factor is determined, and the initial weight index corresponding to the social factor is updated based on the gradient, wherein the prediction error between the predicted value and the actual value obtained based on the updated weight index is less than the prediction error between the predicted value and the actual value obtained based on the weight index before the update.
7. The network traffic prediction method according to claim 1, characterized in that, Based on the social factor data, the network traffic data for the historical time period, and the weighting index corresponding to the social factors, the network traffic data for the target time period is determined as follows: An autoregressive integrated moving average model is used, and the autoregressive coefficients and difference coefficients corresponding to the network traffic data are determined by adaptively adjusting the difference order. Based on the autoregressive coefficient and the difference coefficient of the historical time period, the network traffic data, the social factor data, and the weight index corresponding to the social factors, the network traffic data corresponding to the target time period is determined.
8. A network traffic prediction device, characterized in that, include: The first data acquisition module is used to acquire social factor data, wherein the social factor data includes multiple social factors with corresponding influence parameters for each time period, and the influence parameters are used to characterize the degree of influence of the traffic distribution of the social factors. The acquisition of social factor data includes: acquiring the search index and information index of each social factor in the network platform for each time period, wherein the social factors include at least one of the following: keywords related to social hotspots, holiday information, and weather information; the search index is used to characterize the frequency and trend of the social factor being searched, and the information index is used to characterize the attention paid to information content containing the social factor; determining the first weight corresponding to the search index and the second weight corresponding to the information index, and determining the influence parameter corresponding to each social factor for each time period based on the search index, the first weight, the information index, and the second weight; The second data acquisition module is used to acquire network traffic data for a historical time period, wherein the network traffic data is used to characterize the network traffic value of the network platform corresponding to each time period in the historical time period. The weight index determination module is used to determine the weight index corresponding to the social factor based on the correlation coefficient between the influence parameter and the network traffic value corresponding to the same time period in the social factor data and the network traffic data. The weight index is used to indicate the degree of influence of the social factor on the network traffic value. The network traffic prediction module is used to determine the network traffic data corresponding to a target time period based on the social factor data, the network traffic data of the historical time period, and the weight index corresponding to the social factors, wherein the target time period is the time period after the historical time period.
9. An electronic device, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when running, performs the network traffic prediction method according to any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that, The non-volatile storage medium includes a stored computer program, wherein the device containing the non-volatile storage medium executes the network traffic prediction method according to any one of claims 1 to 7 by running the computer program.
11. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the network traffic prediction method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for predicting regional traffic flow
CN109559512A
User traffic prediction method and device, computer equipment and storage medium
CN115915233A