Network traffic prediction method and device, electronic equipment and nonvolatile storage medium
By obtaining social factor data and historical network traffic data, calculating influencing parameters and weight indicators, combining autoregression to integrate moving average model and random forest model, predicting network traffic data for target time periods, solving the poor accuracy of traffic prediction in the existing technology The problem has achieved more accurate and flexible traffic prediction.
Patent Information
- Application Number
- CN202411357512.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2044-09-26
AI Technical Summary
In the prior art, network traffic prediction technology ignores the influence of social factors, resulting in poor accuracy of traffic prediction and lack of effective solutions.
By obtaining social factor data and historical network traffic data, calculate the parameters and weight indicators of social factors affecting network traffic, combine autoregression to integrate the moving average model and random forest model, predict the network traffic data in the target time period, and realize automatic weight adjustment and Smart data supplement.
It improves the accuracy of traffic prediction and builds a more accurate, flexible and robust traffic prediction system, solving the problem of poor accuracy caused by the neglect of social factors.
Smart Images

Figure CN119316305A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent network operation technology, and specifically, to a network traffic prediction method, device, electronic device and non-volatile storage medium. Background Art
[0002] With the continuous popularization of the Internet and the rapid development of 5G (5th Generation Mobile Communication Technology) networks, the complexity of network applications is constantly increasing, and the difficulty of network management is increasing accordingly. High-quality prediction of network traffic is becoming an urgent problem that needs to be solved.
[0003] However, the traffic prediction technology in related technologies ignores the influence of social factors and has technical problems such as poor traffic prediction accuracy.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a network traffic prediction method, device, electronic device and non-volatile 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 one aspect of an embodiment of the present application, a network traffic prediction method is provided, including: obtaining social factor data, wherein the social factor data includes influence parameters corresponding to multiple social factors in each time period, and the influence parameters are used to characterize the degree of influence of the social factors on traffic distribution; obtaining network traffic data for a historical time period, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform in the historical time period; determining a weight index corresponding to the social factor based on a 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 degree of influence of the social factor on the network traffic value; determining the network traffic data corresponding to a target time period based on the social factor data, the network traffic data for the historical time period, and the weight index corresponding to the social factor, wherein the target time period is a time period located after the historical time period.
[0007] Optionally, obtaining social factor data includes: obtaining the search index and information index corresponding to each social factor in the network platform in each time period, wherein the social factors include at least one of the following: keywords related to social hot spots, holiday information, and 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 a first weight corresponding to the search index and a second weight corresponding to the information index, and determining the influence parameters corresponding to each social factor in each time period based on the search index, the first weight, the information index, and the second weight.
[0008] Optionally, determining a first weight corresponding to the search index and a second weight corresponding to the information index includes: determining a first Pearson correlation coefficient between the search index and network traffic data, and a second Pearson correlation coefficient between the information index and the network traffic data; determining a target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient, and based on the target ratio, determining the first weight and the second weight 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 a historical time period includes: determining the Z score corresponding to the network traffic value of each time period in the network traffic data, and eliminating outliers in 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 data set of the network traffic data; using a random forest model, based on the characteristics of the missing values and related features corresponding to the missing values, predicting the missing values in the network traffic data to obtain missing value prediction results, wherein the characteristics of the missing values include: network address features and timestamp features in the network traffic, and related features include: periodic features of the network traffic data, and features of the network traffic data within the historical event window; based on the missing value prediction results, completing the missing values in the network traffic data to obtain the final network traffic data.
[0010] Optionally, based on the Z score, eliminating abnormal values in the network traffic data includes: obtaining the network traffic value corresponding to each time period in a neighborhood time period of the time period, wherein the neighborhood time period includes multiple time periods; determining the arithmetic mean and root mean square difference of all network traffic values in 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; when the Z score exceeds a preset threshold range, determining the network traffic data as an abnormal value and deleting it from the network traffic data.
[0011] Optionally, based on the correlation coefficient between the influencing parameters and the network traffic values corresponding to the same time period in the social factor data and the network traffic data, determining the weight index corresponding to the social factor includes: determining the absolute value of the difference between the rank of the influencing parameter and the rank of the network traffic value corresponding to 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 influencing 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; mapping the correlation coefficient to the 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 also includes: predicting the network traffic data of the historical time period based on the social factor data and the initial weight indicators 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 indicator of each social factor; determining the gradient of the social factor data with respect to the weight indicator of each social factor based on the first derivative and the second derivative, and updating the initial weight indicators corresponding to the social factors based on the gradient, wherein the prediction error between the predicted value obtained by predicting based on the updated weight indicator and the actual value is smaller than the prediction error between the predicted value obtained by predicting based on the weight indicator before the update and the actual value.
[0013] Optionally, determining the network traffic data corresponding to the 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 includes: using the autoregressive integrated moving average model to determine the autoregressive coefficient and the differential coefficient corresponding to the network traffic data by adaptively adjusting the differential order; determining the network traffic data corresponding to the target time period based on the autoregressive coefficient and the differential coefficient of the historical time period, the network traffic data, the social factor data, and the weight index corresponding to the social factors.
[0014] According to another aspect of the embodiment of the present application, a network traffic prediction device is also provided, including: a first data acquisition module, used to acquire social factor data, wherein the social factor data includes influence parameters corresponding to multiple social factors in each time period, and the influence parameters are used to characterize the degree of influence of the social factors on traffic distribution; a second data acquisition module, used to acquire network traffic data of a historical time period, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform in the historical time period; a weight index determination module, used to determine the weight index corresponding to the social factor based on 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 degree of influence of the social factor on the network traffic value; a network traffic prediction module, used to determine the network traffic data corresponding to the 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 factor, wherein the target time period is the time period located after the historical time period.
[0015] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including: a memory and a processor, the processor being used to run a program stored in the memory, wherein the network traffic prediction method is executed when the program is run.
[0016] According to another aspect of the embodiments of the present application, a non-volatile storage medium is provided, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the network traffic prediction method by running the computer program.
[0017] According to another aspect of the embodiments of the present application, a computer program product is provided, including a computer program, which implements the steps of the network traffic prediction method when the computer program is executed by a processor.
[0018] In an embodiment of the present application, social factor data is obtained, wherein the social factor data includes influence parameters corresponding to multiple social factors in each time period, and the influence parameters are used to characterize the degree of influence of social factors on traffic distribution; network traffic data of a historical time period is obtained, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform in the historical time period; weight indicators corresponding to social factors are determined 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 the network traffic data, wherein the weight indicators are used to indicate the degree of influence of social factors on network traffic values; network traffic data corresponding to a target time period is determined based on the social factor data, the network traffic data of the historical time period, and the weight indicators corresponding to the social factors, wherein the target time period is a time period after the historical time period, and a more accurate, flexible and robust traffic prediction system is constructed by fully incorporating social factors, realizing automatic weight adjustment, and intelligent data supplementation and dynamic adjustment of differential order, thereby achieving the purpose of improving the accuracy of traffic prediction, thereby solving the technical problem of poor traffic prediction accuracy caused by the traffic prediction technology in related technologies ignoring the influence of social factors. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0020] Figure 1 It is a hardware structure block diagram of a computer terminal (or electronic device) for implementing a method for network traffic prediction provided in an embodiment of the present application;
[0021] Figure 2 It is a schematic diagram of a method flow for network traffic prediction provided according to an embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of a network traffic prediction method integrating social factors provided in an embodiment of the present application;
[0023] Figure 4 It is a schematic diagram of a method flow for acquiring and preprocessing social factor data provided in accordance with an embodiment of the present application;
[0024] Figure 5 It is a schematic diagram of a method flow for automatically supplementing missing traffic at a corresponding timestamp provided in an embodiment of the present application;
[0025] Figure 6 It is a schematic diagram of a method flow for determining weights of social factor data in a prediction model provided in an embodiment of the present application;
[0026] Figure 7 It is a schematic diagram of an ARIMA network traffic prediction model provided according to an embodiment of the present application;
[0027] Figure 8 It is a structural diagram of a network traffic prediction device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0030] In order to facilitate those skilled in the art to better understand the embodiments of the present application, some technical terms or nouns involved in the embodiments of the present application are explained as follows:
[0031] Search Index: reflects the frequency and trend of netizens actively searching for a keyword. It is calculated based on a large amount of netizen behavior data collected by search engines. It is an estimated value that represents the change in the search volume of a keyword over time. The higher the search index, the more times the keyword has been searched, and the higher the attention it has received.
[0032] Information Index: reflects the trend of netizens' attention to specific information content, especially those pushed through news, articles, social media and other channels. It may include but is not limited to: news click-through rate, social media sharing, number of comments, etc. A high information index means that information related to the keyword receives high attention and dissemination.
[0033] Pearson correlation coefficient: A statistical measure used to measure the direction and strength of the linear relationship between two variables, with values ranging 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 for time series forecasting that combines autoregression (AR), integrated difference (I), and moving average (MA) to capture the dynamic characteristics of data and predict future values.
[0035] 3σ principle: In a normal distribution, approximately 99.73% of data values fall within three standard deviations of the mean. This is a basic criterion for measuring data distribution and anomaly detection in statistics.
[0036] The network traffic analysis methods in the related technology mainly include: using statistical methods to extract the intrinsic time pattern of cellular network traffic sequences, and attempting to fit the model to the spatial distribution of traffic sequences; clustering the spatiotemporal correlation by splitting and reorganizing spatiotemporal factors, etc. However, these algorithms in the related technology usually ignore the changing trends contained in the traffic sequences and the correlation between the data, and ignore the impact of social factors on traffic prediction. This leads to the existing traffic prediction results usually failing to meet the original characteristics of the actual traffic data, resulting in a series of problems such as the prediction results not meeting user needs and inaccurate results.
[0037] In order to solve the above problems, relevant solutions are provided in the embodiments of the present application. Specifically, a new type of network traffic combination prediction model considering social factors is provided. The model can take into account social factors and 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 incorporating social factors can better predict these changes. A detailed description is given below.
[0038] According to an embodiment of the present application, a method embodiment of network traffic prediction is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1FIG. 1 shows a hardware structure block diagram of a computer terminal (or electronic device) for implementing a network traffic prediction method. Figure 1 As shown, the computer terminal 10 (or electronic device) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), 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 the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0040] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or electronic device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal 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 the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned network traffic prediction method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0043] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or electronic device).
[0044] Under the above operating environment, the embodiment of the present application provides a network traffic prediction method. Figure 2 is a schematic diagram of a method flow for network traffic prediction provided according to an embodiment of the present application, such as Figure 2 As shown, the method comprises the following steps:
[0045] Step S202, obtaining social factor data, wherein the social factor data includes impact parameters corresponding to multiple social factors in each time period, and the impact parameters are used to characterize the impact degree of the social factors on the traffic distribution;
[0046] Step S204, obtaining network traffic data of a historical time period, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform in the historical time period;
[0047] Step S206, determining a weight index corresponding to the social factor based on the correlation coefficient between the influencing parameter 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;
[0048] Step S208, determining the network traffic data corresponding to the 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 factor, wherein the target time period is the time period after the historical time period.
[0049] Through the above steps, a more accurate, flexible and robust traffic prediction system is constructed by fully incorporating social factors, realizing automatic weight adjustment, intelligent data supplementation and dynamic adjustment of differential order, etc., which achieves the purpose of improving the accuracy of traffic prediction, and thus solves the technical problem of poor traffic prediction accuracy caused by the traffic prediction technology in related technologies ignoring the influence of social factors.
[0050] The following further introduces the network traffic prediction method in steps S202 to S208 of the embodiment of the present application.
[0051] Figure 3 is a schematic diagram of a network traffic prediction method based on comprehensive social factors provided in an embodiment of the present application, such as Figure 3 shown.
[0052] First, the social factor data can be acquired and processed. The specific steps are as follows.
[0053] In some embodiments of the present 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 in each time period, wherein the social factors include at least one of the following: keywords related to social hot spots, holiday information, and 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 a first weight corresponding to the search index and a second weight corresponding to the information index, and determining the influence parameters corresponding to each social factor in each time period based on the search index, the first weight, the information index, and the second weight.
[0054] Specifically, Figure 4 As shown in Figure 1, the collected data primary keys can be obtained from a platform index website, including: multiple keywords related to social hot spots, weather information, holiday information, etc. The corresponding data includes: search index S and information index N. Afterwards, the collected social data series and time series are merged into Data new_new , ensure that each data point has a corresponding date stamp (that is, each data point corresponds to a time period, and in this embodiment, the time period is explained by taking days as an example),
[0055] Furthermore, it is necessary to fuse the acquired search index and information index, fuse the sequences of the two indexes into a main sequence, and input the processed time series and the main sequence as features into the prediction model. In this embodiment, the search index and the information index can be fused by weighted averaging. First, it is necessary to determine the weights k1 (first weight) and k2 (second weight) corresponding to the search index and the information index respectively. The specific steps are as follows.
[0056] In some embodiments of the present application, determining a first weight corresponding to a search index and a second weight corresponding to an information index includes the following steps: determining a first Pearson correlation coefficient between the search index and network traffic data, and a second Pearson correlation coefficient between the information index and network traffic data; determining a target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient, and based on the target ratio, determining a first weight and a second weight 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 P S (first Pearson correlation coefficient) and P N (Second Pearson correlation coefficient), the value range of k1 and k2 is between 0 and 1, according to P S and P N The ratio l (i.e. the above target ratio) determines the ratio of k1 and k2, and further determines the values of k1 and k2. The specific formula is as follows:
[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., time period) are multiplied by the corresponding weights k1 and k2 to obtain weighted values A1i and A2i. A1i and A2i are added to obtain the value of the main sequence Merged i (i.e. the impact parameter corresponding to 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, delete Si and Ni corresponding to Ti of the social factor data sequence and update it to Merged i And update Data new_new , and obtain the final social factor data.
[0062] On the other hand, it is also necessary to obtain network traffic data for historical time periods, eliminate poor quality data, and automatically supplement traffic data corresponding to the missing time periods. The specific steps are as follows.
[0063] In some embodiments of the present application, obtaining network traffic data for a historical time period includes the following steps: determining the Z score corresponding to the network traffic value of each time period in the network traffic data, and eliminating outliers in 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 data set of the network traffic data; using a random forest model, based on the characteristics of the missing values and the related features corresponding to the missing values, predicting the missing values in the network traffic data to obtain missing value prediction results, wherein the characteristics of the 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 features of the network traffic data within the historical event window; based on the missing value prediction results, completing the missing values in the network traffic data to obtain the final network traffic data.
[0064] Specifically, Figure 5 As shown, in an embodiment of the present application, a method for automatically supplementing traffic data in a missing time period by a model is provided, which includes: detection of missing data by the model; elimination of poor quality data by the model; a method for the model to generate traffic data for a missing time period based on existing network traffic data; and a method for automatically supplementing traffic data for a missing time period by a model, which is described in detail below.
[0065] For example, traffic data can be obtained from a platform statistics website and preprocessing of the data can be completed. The traffic data of the platform website within the time range of 2021 / 6 / 10 to 2024 / 3 / 24 can be obtained from the platform statistics website. The daily data includes page views (PV), number of visitors (UV) and number of IP addresses. In this embodiment, the PV column can be used as a reference for the traffic value of the day. The preprocessing of the data includes two aspects: supplementing missing values and eliminating poor quality data.
[0066] In an embodiment of the present application, the pandas library can be used to detect missing time points (time point periods); and the Z score can be calculated to identify and eliminate abnormal and inferior values in network traffic data. The specific steps are as follows.
[0067] In some embodiments of the present application, based on the Z score, eliminating outliers in network traffic data includes the following steps: obtaining the network traffic value corresponding to each time period in a neighborhood time period of the time period, wherein the neighborhood time period includes multiple time periods; determining the arithmetic mean and root mean square difference of all network traffic values in 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; when 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 value with a Z score less than -3 or greater than +3 can be regarded as an outlier. In principle, data with a Z score between (-3, +3) is considered normal, while values exceeding 3 times the standard deviation are considered outliers. By calculating the Z score, data greater than 3 and less than -3 are eliminated and regenerated. The calculation formula for the Z score is as follows:
[0069]
[0070] Among them, Tra d is the traffic value of the day, α is the arithmetic mean of the network traffic values in the week around the day (i.e., the neighborhood time period of the above time period), and δ is the root mean square difference of the network traffic values in the week around the day.
[0071] exist In principle, the Z value is selected between (-3, +3) (i.e. the preset threshold range mentioned above). If the outlier exceeds 3 times the standard deviation, it can be regarded as an outlier. The probability is 99.7%, then the distance from the average The probability of a value other than It is an extremely rare event with low probability.
[0072] After the outliers are removed and the missing values are detected, the missing data in the network traffic data can be predicted and automatically supplemented. For example, the random forest model can be used to supplement the missing values, which is further introduced below.
[0073] Specifically, the random forest model can be used to determine the relationship between the prediction results of missing values and the features related to the missing values. The missing value features are used as the input feature vectors, which need to be predicted by the model. Other features related to the missing value features are used 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 of missing values; X missing Features that represent missing values, including network address features and timestamp features in network traffic; X related represents other features related to the missing value feature, namely, the above-mentioned related features corresponding to the missing value, including: periodic features extracted from timestamp data and network traffic data features within the historical event window, etc.; f represents the random forest model. i is the weight of the i-th tree, f iis the decision function of the ith tree, and n is the number of trees in the random forest.
[0076] Furthermore, the missing value data can be judged: the statistical indicator MSE is used to evaluate the accuracy of the estimated value. A lower error indicator value indicates that the difference between the estimated value and the actual observed value is smaller. After obtaining a better MSE value, update the sample data set to Data new .
[0077] Afterwards, as an optional implementation, the network traffic data after outliers have been removed may be used to fit the ARIMA model, as follows.
[0078] In the embodiment of the present application, a rolling prediction method can be used to gradually predict the value of each missing time point, using the historical seven-day data D fitted by the model. t-7:t Predict the value of the next day, fit the model ARIMA, and get the model parameter θ t Using the fitted ARIMA model θ t To predict the value of the missing time point
[0079]
[0080] The predicted value As an estimate for a certain period of time, check whether the estimate is as expected. If you check the estimate If it meets expectations, the estimated value is put into the sample data as a new historical seven-day data set D t-6:t+1 , according to the prediction error Dynamically increase the model parameter θ t+1 :
[0081]
[0082] Among them, α is the learning rate, σ 2 is the variance of the forecast error. Continue to predict the value of the next day and verify whether the estimated value is in line with expectations, repeating the process until all missing time periods have been supplemented.
[0083] The dynamic adjustment of model parameters in the automatic replenishment process is a key component of the automatic replenishment process. By dynamically adjusting the learning rate, the model can adaptively adjust parameter updates according to the size of the prediction error, thereby improving the accuracy of the prediction and the performance of the model. The learning rate adjustment mechanism adjusts the learning rate according to the size of the prediction error, thereby affecting the speed and amplitude of the parameter update. The formula is as follows:
[0084]
[0085] Among them, λt+1 is the adjusted parameter at time t+1, λ t is the parameter of time t, ρ is the learning rate, ξ t is the prediction error at time t, is the weight.
[0086] For a given parameter λ, the parameter is updated by dynamically adjusting the learning rate ρ. In order to make the parameter adjustment more flexible and adaptive, the weight It is used to measure the importance of the current prediction error ξ. Specifically, if the current prediction error is large, reduce the weight Thereby reducing the update amplitude of the parameters; on the contrary, if the current prediction error is small, increase the weight to update parameters faster.
[0087] The weight The update rule is: if the prediction error ξ t If it is greater than 0, it means that the predicted value is higher than the actual value, then the weight Subtract a small adjustment value If the prediction error ξ t Less than 0, indicating that the predicted value is lower than the actual value, the weight Plus a small adjustment value If the prediction error ξ t Close to 0, that is, the prediction is accurate, then keep the weight constant.
[0088] In an embodiment of the present application, the step of checking whether the estimated value meets expectations includes using mean square error (MSE) as an evaluation index. Mean square error is a commonly used statistical index for measuring the average variance between the estimated value and the actual observed value. A lower mean square error value indicates that the difference between the estimated value and the actual observed value is smaller, thereby reflecting the accuracy of the estimated value and the degree of fit of the model. In this method, by calculating the mean square error between the estimated value and the corresponding actual observed value, it is determined whether the estimated value meets expectations, and then the performance and accuracy of the model are evaluated. The advantage of this method is that it is simple and effective, and a reliable assessment of the accuracy of the estimated value can be provided, thereby providing a reliable basis for subsequent data processing and decision-making.
[0089] The following is an introduction to the process of determining the weight of social factor data in the prediction model. The embodiment of the present application can convert the correlation coefficient into a weight index. The conversion process is based on the size and direction of the correlation coefficient and the actual impact of the social factor on the traffic. By converting the correlation coefficient into a weight index, the importance of social factors in traffic 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 the present application, determining the weight index corresponding to the social factor based on the correlation coefficient between the influencing parameter and the network traffic value corresponding to the same time period in the social factor data and the network traffic data includes the following steps: determining the absolute value of the difference between the rank of the influencing parameter and the rank of the network traffic value corresponding to 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 influencing 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; mapping the correlation coefficient to the preset data range to obtain the initial weight index corresponding to the social factor.
[0091] Specifically, the social factor data set in daily data is defined as:
[0092] social={merged hotspots ,merged weather ,merged holiday}
[0093] Among them, merged hotspots ,merged weather ,merged holiday They respectively represent the fusion sequence of the search index S and information index N of keywords related to social hot spots, weather information, and holiday information in social factors.
[0094] like Figure 6 As shown, the correlation coefficient (such as the Spearman correlation coefficient) between the social factor data and the network traffic data with the same timestamp can be calculated using a local calculation method. Specifically, the time range of the sliding window is selected as Where i is the index of the current time point, A is the size of the window, and 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 Ψ in the above window is as follows:
[0095]
[0096] Among them, d i Indicates that at the i-th time point in 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 samples in the window, α is the decay coefficient, i is the position of the data point in the window, and the exponential decay function formula is as follows:
[0097] ωi =e -α(i-1)
[0098] Afterwards, 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, thereby obtaining the initial weight index corresponding to the social factor.
[0099] For example, currently there are three types of social factor data: keywords related to social hot spots, weather information, and holiday information. Through the above weight index determination process, the initial weight index W corresponding to these social factors can be determined. hotspots ,W weather ,W holiday , as shown below:
[0100] Q i = {W hotspots ,W weather ,W holiday}
[0101] Assume that the initial weight Q i The weights are all 0.33, which means they are evenly distributed. Applying the weights to the social factor data yields the comprehensive social factor data. in, They respectively refer to the influencing parameters of the fusion of the search index S and information index N of the keywords, weather, and holidays related to social hot spots at the corresponding time point t.
[0102] Furthermore, the embodiment of the present application can also dynamically adjust the initial weight index, automatically learn and adjust the weights of different social factors in the prediction model according to historical data and real-time feedback. The specific steps are as follows.
[0103] In some embodiments of the present application, after obtaining the initial weight indicators corresponding to the social factors, the method also includes the following steps: predicting the network traffic data of the historical time period based on the social factor data and the initial weight indicators 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 indicator of each social factor; determining the gradient of the social factor data with respect to the weight indicator of each social factor based on the first derivative and the second derivative, and updating the initial weight indicators corresponding to the social factors based on the gradient, wherein the prediction error between the predicted value obtained by predicting based on the updated weight indicator and the actual value is smaller than the prediction error between the predicted value obtained by predicting based on the weight indicator before the update and the actual value.
[0104] Specifically, using the current comprehensive social factor data Mixed_Social t Perform traffic prediction and obtain the predicted traffic value Net_traffic_prediction t That is, based on the social factor data and the initial weight index corresponding to the social factor, the network traffic data of the historical time period is predicted to obtain the predicted value, and then the predicted value is compared with the actual traffic value Net_traffic t (i.e. the actual value of network traffic data) and calculate the prediction error E t , the specific formula is as follows:
[0105]
[0106] Using the gradient descent algorithm, the weight of each social factor is updated according to the prediction error. Specifically, the error E is calculated. t For each weight W hotspots ,W weather ,W holiday The gradient of is the partial derivative. According to the chain rule, this can be decomposed into two parts: 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 weight (i.e. the second inverse mentioned above). The details are as follows.
[0107] First, calculate the error E t Net_traffic_prediction for measuring traffic value t The derivative of :
[0108]
[0109] Next, calculate the derivative β1 of the predicted value to the comprehensive social factor data Mixed_Socialt. Take the linear regression model as an example:
[0110]
[0111] Finally, the derivatives of the comprehensive social factor data Mixed_Socialt with respect to each weight Wi are calculated. Now, the derivative results in 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] Using the gradients calculated above, update each weight:
[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 the error to the weight can be decomposed into a series of computable derivative steps, which reflect the relationship between the prediction error and the comprehensive social factor data and its weights. Finally, the weights are updated by the gradient descent method to achieve the dynamic adaptability of the model to different social factors. This process will be iterated every time new real-time data arrives, and the weights will be gradually updated. Over time, the weights will gradually stabilize, that is, the sensitivity of the model to different social factors will be more in line with the actual situation, thereby improving the accuracy of traffic prediction. Suppose that over a period of time, the impact of relevant information on a social hotspot on traffic gradually weakens, while the impact of weather factors increases. In each weight update process, the weight W hotspots will gradually decrease, and W weather Eventually, the model can automatically adapt to this change and improve the prediction accuracy.
[0117] After obtaining the social factor data, the network traffic data of the historical time period, and the weight index corresponding to the social factor, the network traffic can be predicted by combining the weight index of the social factor data with the generated traffic data. The specific steps are as follows.
[0118] In some embodiments of the present application, determining the network traffic data corresponding to the 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 includes the following steps: using the autoregressive integrated moving average model to determine the autoregressive coefficient and the differential coefficient corresponding to the network traffic data by adaptively adjusting the differential order; determining the network traffic data corresponding to the target time period based on the autoregressive coefficient and the differential coefficient of the historical time period, the network traffic data, the social factor data, and the weight index corresponding to the social factors.
[0119] like Figure 7 As shown, the ARIMA model can be used for modeling, and the method of adaptively adjusting the difference order can be used to dynamically determine the difference order d of the time series data, considering the seasonal difference operation of the seasonal and cyclical characteristics of the time series data. The specific formula is as follows:
[0120]
[0121] in, represents the difference sequence obtained after applying the dynamically determined difference order d at time t, x trepresents the value of the time series at time t, x t-d represents the value of the time series d time units ago, d is the differential order dynamically determined according to the characteristics of the data. dt represents the differential order adaptively adjusted at time t. represents the time series x with d-order differences applied at time t t For the time series x t Perform d-order difference to obtain a new difference sequence
[0122] Furthermore, the weight index of the calculated social factor data and the generated traffic data are used as multi-dimensional inputs. In the ARIMA model, the social factor data is introduced into the model as an external variable to form an ARIMAX model. The embodiment of the present application determines the weight of each social factor data to ensure that it correctly affects the prediction results of the traffic data in the model. The determination of these weights can be achieved by analyzing historical data and model training to ensure that the model can effectively capture the impact of social factors on traffic data. The mathematical expression of the model is as follows:
[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 represents the value of the flow data at time t, z t represents the value of social factor data at time t, β0,β1,...,β p are the autoregressive coefficients of the model, α1, α2, ..., α q are the differential coefficients of the model, γ1,γ2,...,γ m is the coefficient of the social factor data, ε t Represents the white noise of the model.
[0125] In addition, after the model is established, the mean square error (MSE) can be used to evaluate the prediction effect of the model.
[0126] The embodiment of the present application introduces social factor data as external variables into the model prediction, which effectively improves the accuracy of the prediction, automatically supplements the data for samples with missing data, ensures the effectiveness of the supplemented data, and improves the accuracy of the supplemented data. An adaptive difference algorithm is used to better handle the seasonal changes of time series data, and the difference order is dynamically adjusted according to the characteristics of the data, thereby improving the fitting performance and prediction accuracy of the model.
[0127] This application proposes a network traffic prediction model based on social factors. Different from the traditional network traffic prediction method, this model integrates social factors closely related to network traffic (such as social hot spots, weather, holidays, etc.), and reflects the social hot spots and public attention of these factors through the index data of the network platform. Users only need to provide relevant social factor data, and the model can automatically supplement the missing data, and automatically adjust the weights through the weighted average method and the Pearson correlation coefficient, realizing full automation and high precision of traffic prediction. In addition, by dynamically adjusting the difference order, the adaptability of the model in processing complex data is enhanced.
[0128] Improve forecast accuracy by fully incorporating social factors: Social factors, such as holidays, special events (such as concerts, sports events), policy changes, etc., have a significant impact on various types of traffic, such as traffic flow, network flow, and pedestrian flow. By introducing and effectively integrating these social factor data, the complexity and diversity of traffic changes can be more comprehensively captured, thereby improving the accuracy and reliability of forecasts.
[0129] In order to solve the problem of integrating social factor data into the traffic prediction model, this application has designed an automatic weight adjustment mechanism, which can automatically learn and adjust the weights of different social factors in the prediction model based on historical data and real-time feedback, ensuring that the model can dynamically adapt to changes in the social environment and improve the flexibility and adaptability of the prediction model. At the same time, this also reduces the need for manual intervention and reduces operating costs.
[0130] In response to the common problem of missing data in traffic forecasting, this application proposes an intelligent data supplementation strategy. By using advanced forecasting technology, this strategy can automatically identify and fill in missing data points to ensure the integrity and continuity of the input data of the forecasting model. In addition, in order to further improve the forecasting accuracy, a dynamic adjustment function of the difference order is introduced. This function can automatically adjust the difference order of the model according to the changes in data characteristics to adapt to traffic data of different time scales and frequencies, thereby further improving the adaptability and accuracy of the forecasting model.
[0131] According to an embodiment of the present application, an embodiment of a network traffic prediction device is also provided. Figure 8 Schematic diagram of a network traffic prediction device provided according to an embodiment of the present application. Figure 8 As shown, the device comprises:
[0132] A first data acquisition module 80 is used to acquire social factor data, wherein the social factor data includes impact parameters corresponding to multiple social factors in each time period, and the impact parameters are used to characterize the impact degree of the social factors on the traffic distribution;
[0133] A second data acquisition module 82 is used to acquire network traffic data of a historical time period, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform 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 impact parameter and the network flow value corresponding to the same time period in the social factor data and the network flow data, wherein the weight index is used to indicate the influence degree of the social factor on the network flow value;
[0135] The network traffic prediction module 86 is used to determine the network traffic data corresponding to the 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 factor, wherein 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 in the network platform in each time period, wherein the social factors include at least one of the following: keywords related to social hot spots, holiday information, and 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 a first weight corresponding to the search index and a second weight corresponding to the information index, and determining the influence parameters corresponding to each social factor in each time period based on the search index, the first weight, the information index, and the second weight.
[0137] Optionally, determining a first weight corresponding to the search index and a second weight corresponding to the information index includes: determining a first Pearson correlation coefficient between the search index and network traffic data, and a second Pearson correlation coefficient between the information index and the network traffic data; determining a target ratio between the first Pearson correlation coefficient and the second Pearson correlation coefficient, and based on the target ratio, determining the first weight and the second weight 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 a historical time period includes: determining the Z score corresponding to the network traffic value of each time period in the network traffic data, and eliminating outliers in 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 data set of the network traffic data; using a random forest model, based on the characteristics of the missing values and related features corresponding to the missing values, predicting the missing values in the network traffic data to obtain missing value prediction results, wherein the characteristics of the missing values include: network address features and timestamp features in the network traffic, and related features include: periodic features of the network traffic data, and features of the network traffic data within the historical event window; based on the missing value prediction results, completing the missing values in the network traffic data to obtain the final network traffic data.
[0139] Optionally, based on the Z score, eliminating abnormal values in the network traffic data includes: obtaining the network traffic value corresponding to each time period in a neighborhood time period of the time period, wherein the neighborhood time period includes multiple time periods; determining the arithmetic mean and root mean square difference of all network traffic values in 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; when the Z score exceeds a preset threshold range, determining the network traffic data as an abnormal value and deleting it from the network traffic data.
[0140] Optionally, based on the correlation coefficient between the influencing parameters and the network traffic values corresponding to the same time period in the social factor data and the network traffic data, determining the weight index corresponding to the social factor includes: determining the absolute value of the difference between the rank of the influencing parameter and the rank of the network traffic value corresponding to 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 influencing 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; mapping the correlation coefficient to the preset data range to obtain the initial weight index corresponding to the social factor.
[0141] Optionally, after obtaining the initial weight index corresponding to the social factor, the weight index determination module 84 is also used to: predict the network traffic data of the historical time period based on the social factor data and the initial weight index corresponding to the social factor to obtain a 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; determine 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 update the initial weight index corresponding to the social factor based on the gradient, wherein the prediction error between the predicted value obtained by predicting based on the updated weight index and the actual value is smaller than the prediction error between the predicted value obtained by predicting based on the weight index before the update and the actual value.
[0142] Optionally, determining the network traffic data corresponding to the 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 includes: using the autoregressive integrated moving average model to determine the autoregressive coefficient and the differential coefficient corresponding to the network traffic data by adaptively adjusting the differential order; determining the network traffic data corresponding to the target time period based on the autoregressive coefficient and the differential coefficient of the historical time period, the network traffic data, the social factor data, and the weight index corresponding to the social factors.
[0143] It should be noted that the various modules in the above-mentioned network traffic prediction device can be program modules (for example, a set of program instructions that implement a certain specific function) or hardware modules. For the latter, it can be expressed in the following forms, but is not limited to this: the expression form of each of the above-mentioned modules is a processor, or the functions of each of the above-mentioned 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, therefore, the relevant explanations and descriptions of the above-mentioned network traffic prediction method are also applicable to the embodiments of the present application and will not be repeated here.
[0145] The embodiment of the present application also provides a non-volatile storage medium, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the following network traffic prediction method by running the computer program: obtaining social factor data, wherein the social factor data includes influence parameters corresponding to multiple social factors in each time period, and the influence parameters are used to characterize the degree of influence of the social factors on the traffic distribution; obtaining network traffic data of a historical time period, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform in 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 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 degree of influence of the social factor on the network traffic value; determining the network traffic data corresponding to the 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 factor, wherein the target time period is the time period located after the historical time period.
[0146] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the network traffic prediction method described in each embodiment of the present application: obtaining social factor data, wherein the social factor data includes influence parameters corresponding to multiple social factors in each time period, and the influence parameters are used to characterize the degree of influence of the social factors on traffic distribution; obtaining network traffic data for a historical time period, wherein the network traffic data is used to characterize the network traffic values corresponding to each time period of the network platform in 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 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 degree of influence of the social factor on the network traffic value; determining the network traffic data corresponding to the target time period based on the social factor data, the network traffic data for the historical time period, and the weight index corresponding to the social factor. The target time period is a time period located after the historical time period.
[0147] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0148] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0149] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0150] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0151] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0152] If the integrated unit is implemented in the form of 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 the present application is essentially 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, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0153] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A network traffic prediction method, characterized in that: include: Acquire social factor data, wherein the social factor data includes impact parameters corresponding to multiple social factors in each time period, and the impact parameters are used to characterize the impact degree of the social factors on traffic distribution; Acquire network traffic data of a historical time period, wherein the network traffic data is used to characterize the network traffic value corresponding to each time period of the network platform in the historical time period; Determine a weight index corresponding to the social factor according to a correlation coefficient between the influencing parameter 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; The network traffic data corresponding to the target time period is determined based on the social factor data, the network traffic data of the historical time period, and the weight index corresponding to the social factor, wherein the target time period is a time period after the historical time period.
2. The network traffic prediction method according to claim 1, characterized in that: Obtaining social factors data includes: Obtaining the search index and information index corresponding to each of the social factors in the network platform in each of the time periods, wherein the social factors include at least one of the following: keywords related to social hot spots, holiday information, and weather information, the search index is used to characterize the frequency and trend of searches for the social factors, and the information index is used to characterize the attention paid to the information content containing the social factors; Determine a first weight corresponding to the search index and a second weight corresponding to the information index, and determine the impact parameter corresponding to each social factor in each time period based on the search index, the first weight, the information index, and the second weight.
3. The network traffic prediction method according to claim 2, characterized in that: Determining the first weight corresponding to the search index and the second weight corresponding to the information index includes: Determining a first Pearson correlation coefficient between the search index and the network traffic data, and a 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 so that the ratio between the first weight and the second weight is equal to the target ratio.
4. The network traffic prediction method according to claim 1, characterized in that: Obtaining network traffic data for a historical period includes: Determine a Z score corresponding to the network traffic value of each of the time periods in the network traffic data, and remove abnormal values in 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 data set of the network traffic data; A random forest model is used to predict the missing values in the network traffic data according to the characteristics of the missing values and the related features corresponding to the missing values, so as to obtain the missing value prediction results, wherein the characteristics of the missing values include: network address characteristics and timestamp characteristics in the network traffic, and the related features include: The periodic characteristics of the network traffic data and the network traffic data characteristics within the historical event window; According to the missing value prediction result, the missing values in the network traffic data are completed to obtain the final network traffic data.
5. The network traffic prediction method according to claim 4, characterized in that: Eliminating outliers in the network traffic data according to the Z score includes: Obtain the network traffic value corresponding to each of the time periods in a neighboring time period of the time period, wherein the neighboring time period includes a plurality of the time periods; Determine the arithmetic mean and root mean square difference of all the network flow values in the neighborhood time period; Determine a difference between the network flow value corresponding to the time period and the arithmetic mean, and determine a ratio between the difference and the root mean square difference as the Z score corresponding to the network flow value of the time period; When the Z score exceeds a preset threshold range, the network traffic data is determined as an abnormal value and deleted from the network traffic data.
6. The network traffic prediction method according to claim 1, characterized in that: Determining the weight index corresponding to the social factor according to the correlation coefficient between the influencing parameter and the network traffic value corresponding to the same time period in the social factor data and the network traffic data includes: Determine the absolute value of the difference between the rank of the influencing parameter and the rank of the network traffic value corresponding to each time period within a preset sliding window range; Determine a third weight corresponding to each of the time periods according to the attenuation coefficient and the position of the time period within the preset sliding window; Determine a correlation coefficient between the influencing parameter and the network traffic value according to the absolute value of the difference, the third weight, and the number of samples within the preset sliding window; The correlation coefficient is mapped into a preset data range to obtain the initial weight index corresponding to the social factor.
7. The network traffic prediction method according to claim 6, characterized in that: After obtaining the initial weight index corresponding to the social factor, the method further includes: Predicting the network traffic data in the historical time period according to the social factor data and the initial weight index corresponding to the social factor to obtain a predicted value; determining a prediction error between a predicted value of the network flow data and an actual value of the network flow data; Calculating a first derivative of the prediction error with respect to the social factor data, and calculating a second derivative of the social factor data with respect to the weight index of each of the social factors; Based on the first derivative and the second derivative, the gradient of the social factor data for the weight index of each social factor is determined, and based on the gradient, the initial weight index corresponding to the social factor is updated, wherein the prediction error between the predicted value obtained by predicting the updated weight index and the actual value is smaller than the prediction error between the predicted value obtained by predicting the weight index before the update and the actual value.
8. The network traffic prediction method according to claim 1, characterized in that: Determining the network traffic data corresponding to the 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 factor includes: Adopting an autoregressive integrated moving average model, by adaptively adjusting the difference order, the autoregressive coefficient and the difference coefficient corresponding to the network traffic data are determined; The network traffic data corresponding to the target time period is determined based on the autoregressive coefficient and the differential coefficient of the historical time period, the network traffic data, the social factor data, and the weight index corresponding to the social factor.
9. A network traffic prediction device, characterized in that: include: A first data acquisition module is used to acquire social factor data, wherein the social factor data includes impact parameters corresponding to multiple social factors in each time period, and the impact parameters are used to characterize the impact degree of the social factors on traffic distribution; A second data acquisition module is used to acquire network traffic data of a historical time period, wherein the network traffic data is used to characterize the network traffic value corresponding to each time period of the network platform in the historical time period; A weight index determination module, used to determine the weight index corresponding to the social factor according to the correlation coefficient between the influencing parameter 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 influence degree of the social factor on the network traffic value; The network traffic prediction module is used to determine the network traffic data corresponding to the 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 factor, wherein the target time period is a time period after the historical time period.
10. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the network traffic prediction method described in any one of claims 1 to 8 when running.
11. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the network traffic prediction method described in any one of claims 1 to 8 by running the computer program.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the network traffic prediction method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Method and device for predicting regional traffic flow
CN109559512A
Pedestrian flow prediction device and method
CN111144648A
User traffic prediction method and device, computer equipment and storage medium
CN115915233A
Flow rate prediction device, pattern estimation device, flow rate prediction method, pattern estimation method and program
JP2017220000A
Cited By
FTTR network data quality optimization method, device, equipment and medium
CN119996880A
Network information demand prediction method and system based on Bi-GRU and ARIMAX fusion
CN121727968A