User page view prediction method and device, equipment and storage medium
Through the improved LSTM neural network model and state observer, combined with data cleaning and feature processing, the accuracy problem of traditional user visit volume prediction methods under dynamic factors is solved, more accurate visit volume prediction is achieved, and the operational efficiency and user experience of the e-commerce platform are improved.
Patent Information
- Application Number
- CN202510282460.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-07-04
AI Technical Summary
Traditional user visit prediction methods rely on historical data and are difficult to predict scene changes simultaneously, resulting in low accuracy of prediction results, especially under the influence of dynamic factors.
Using an improved long-term short-term memory (LSTM) neural network model, combined with a state observer, the prediction model is trained to predict peak time and peak visits by obtaining the scene characteristics of the platform to be predicted and performing data cleaning, linearization transformation and normalization.
It improves the accuracy of user visits forecasts, helps the platform prepare for operations in advance, deal with peak visits, and improves user experience and operational efficiency.
Smart Images

Figure CN120258869A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data analysis, and in particular, to a method, device, equipment and storage medium for predicting user access volume. Background Art
[0002] With the development of Internet technology, e-commerce platforms have become increasingly mature, and the user access volume has also become larger and larger. In order to ensure the stable operation of e-commerce platforms, the user access volume can be predicted to make early resource allocation and load balancing, thereby improving the user experience.
[0003] However, traditional methods for predicting user access volume only rely on historical user access volume for prediction, making the prediction of user access volume unable to synchronize with the changes in the prediction scenario, reducing the accuracy of the prediction results. Summary of the Invention
[0004] The present application provides a method, device, equipment and storage medium for predicting user access volume, which is used to solve the problem of low accuracy of the prediction results of user access volume.
[0005] To achieve the above object, the present application adopts the following technical solutions:
[0006] In a first aspect, the present application provides a method for predicting user access volume. The method includes: a prediction device for user access volume (hereinafter referred to as "prediction device") obtains a to-be-predicted time period and scene features in the to-be-predicted time period of a to-be-predicted platform. The prediction device inputs the to-be-predicted time period and the scene features in the to-be-predicted time period into a trained prediction model to obtain a peak time and a peak access volume, where the peak time is the time when the user access volume in the to-be-predicted time period is greater than a preset access threshold, and the peak access volume is the user access volume corresponding to the peak time.
[0007] The technical solution provided by the present application at least brings the following beneficial effects: By obtaining the to-be-predicted time period and the scene features in the to-be-predicted time period of the to-be-predicted platform, and inputting these data into the trained prediction model, a peak time and a peak access volume are obtained. Among them, the peak time is the time when the user access volume in the to-be-predicted time period is greater than the preset access threshold, and the peak access volume is the user access volume corresponding to the peak time. In this way, it is possible to more accurately predict the time when the peak of the user access volume in the to-be-predicted platform appears and the user access volume corresponding to the peak time, helping the to-be-predicted platform to make early operation preparations to cope with the challenges brought by the peak of user access volume, so as to improve the user experience and operation efficiency.
[0008] Optionally, the scene features include at least one of the following: holiday feature, social event feature, weather feature, user access habit feature.
[0009] Optionally, the above-mentioned trained prediction model is obtained by the following steps: Obtain the historical access information and historical feature information of the platform to be predicted. The historical access information includes the user access volume of the platform to be predicted at multiple historical moments, and the historical feature information includes the scenario features of the platform to be predicted at multiple historical moments. Process the historical access information and historical feature information according to a preset data processing method to obtain the processed historical access information and the processed historical feature information. The data accuracy rate of the processed historical access information is greater than the first preset quality threshold, and the data accuracy rate of the processed historical feature information is greater than the second preset quality threshold. Then, train a prediction model based on the processed historical access information and the processed historical feature information to obtain the trained prediction model.
[0010] Optionally, the preset data processing method includes at least one of the following: data cleaning, linearization transformation, and normalization processing.
[0011] Optionally, the platform to be predicted includes multiple preset access services. The method of "obtaining the historical access information and historical feature information of the platform to be predicted" includes: obtaining the log information of the platform to be predicted, where the log information includes the access information and feature information of each preset access service. Then, use the access information and feature information of the target access service in the log information as the historical access information and historical feature information respectively to obtain the historical access information and historical feature information, where the target access service is the access service to be predicted among the multiple preset access services.
[0012] Optionally, the multiple preset access services include at least one of the following: ticket booking service, weather query service, and commodity purchase service.
[0013] In a second aspect, the present application provides a device for predicting user access volume, and the device includes: an acquisition module and a processing module.
[0014] The acquisition module is used to obtain the time period to be predicted and the scenario features in the time period to be predicted of the platform to be predicted. The processing module is used to input the time period to be predicted and the scenario features in the time period to be predicted into the trained prediction model to obtain the peak time and the peak access volume. The peak time is the time when the user access volume in the time period to be predicted is greater than the preset access threshold, and the peak access volume is the user access volume corresponding to the peak time.
[0015] Optionally, the scenario features include at least one of the following: holiday features, social event features, weather features, and user access habit features.
[0016] Optionally, an acquisition module is configured to acquire historical access information and historical feature information of the platform to be predicted. The historical access information includes the user access volume of the platform to be predicted at multiple historical moments, and the historical feature information includes the scenario features of the platform to be predicted at multiple historical moments. A processing module is specifically configured to process the historical access information and the historical feature information according to a preset data processing method to obtain processed historical access information and processed historical feature information, where the data accuracy rate of the processed historical access information is greater than a first preset quality threshold, and the data accuracy rate of the processed historical feature information is greater than a second preset quality threshold. The processing module is further configured to train a prediction model based on the processed historical access information and the processed historical feature information to obtain a trained prediction model.
[0017] Optionally, the preset data processing method includes at least one of the following: data cleaning, linearization conversion, and normalization processing.
[0018] Optionally, an acquisition module is configured to acquire log information of the platform to be predicted. The log information includes access information and feature information of each preset access service. The processing module is specifically configured to use the access information and the feature information of the target access service in the log information as the historical access information and the historical feature information respectively to obtain the historical access information and the historical feature information.
[0019] Optionally, the multiple preset access services include at least one of the following: ticket booking service, weather query service, and commodity purchase service.
[0020] In a third aspect, the present application provides a device for predicting user access volume. The device includes: a processor and a memory. The processor and the memory are coupled. The memory is used to store one or more programs, and the one or more programs include computer execution instructions. When the device for predicting user access volume runs, the processor executes the computer execution instructions stored in the memory to implement the method for predicting user access volume described in the first aspect or any optional one of the first aspect.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions run on a computer, the computer is caused to execute the method for predicting user access volume described in the first aspect or any optional one of the first aspect.
[0022] In a fifth aspect, the present application provides a computer program product applied to a server. The computer program product includes computer instructions. When the computer instructions run on the server, the server implements the method for predicting user access volume described in the first aspect or any optional one of the first aspect.
[0023] In the above solution, for the technical problems that can be solved and the technical effects achieved by the user access volume prediction device, equipment, computer storage medium or computer program product, reference can be made to the technical problems solved and technical effects in the first aspect above, which will not be elaborated here. Description of the Drawings
[0024] Figure 1 Schematic diagram of a user access volume prediction device provided by an embodiment of the present application;
[0025] Figure 2 Schematic diagram of another user access volume prediction device provided by an embodiment of the present application;
[0026] Figure 3 Schematic diagram of the operation flow of a user access volume prediction device provided by an embodiment of the present application;
[0027] Figure 4 Schematic diagram of the flow of a user access volume prediction method provided by an embodiment of the present application;
[0028] Figure 5 Schematic diagram of the structure of a user access volume prediction device provided by an embodiment of the present application;
[0029] Figure 6 Schematic diagram of the structure of a user access volume prediction device provided by an embodiment of the present application;
[0030] Figure 7 Conceptual partial view of a computer program product provided by an embodiment of the present application. Detailed Embodiments
[0031] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0032] In this article, the character " / " generally indicates that the objects before and after are in an "or" relationship. For example, A / B can be understood as A or B.
[0033] The terms "first" and "second" in the description and claims of the present application are used to distinguish different objects, rather than to describe a specific order of the objects.
[0034] In addition, the terms "including" and "having" and any variations thereof mentioned in the description of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or modules is not limited to the listed steps or modules, but may optionally further include other steps or modules not listed, or may optionally further include other steps or modules inherent to these processes, methods, products, or devices.
[0035] In addition, in the embodiments of this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present concepts in a specific manner.
[0036] Before introducing the method for predicting the user access volume provided in the embodiments of this application in detail, the implementation environment and application scenarios of the embodiments of this application will be introduced first.
[0037] First, the application scenarios of the embodiments of this application will be introduced.
[0038] With the rapid development of Internet technology, e-commerce platforms have entered a stage of maturity and perfection. With their unparalleled convenience and endless promotional activities, e-commerce platforms continuously attract a large number of users, making e-commerce platforms the preferred shopping platforms for many consumers. However, with the rapid increase in the number of users and the increasingly fierce competition among major e-commerce platforms, the operation mode of e-commerce platforms is no longer single and fixed, but is developing towards the direction of personalization and diversification. For well-known e-commerce platforms, a large number of user accesses undoubtedly pose a severe challenge to their concurrent processing capabilities. Especially during holidays and events, being able to accurately predict the time when the access peak appears and the specific user access volume during the peak period is of crucial significance for the operation and maintenance of e-commerce platforms.
[0039] Currently, the user access volume prediction system can obtain the system access volume of the target system for each unit time within a preset time period according to the access traffic monitoring log of the target system, and construct an initial sample. Secondly, the prediction system can sample the initial sample according to a preset sampling rule, obtain and generate training samples and test samples based on the sampling results. Then, the prediction system can input the training samples into a pre-constructed access volume prediction model for model training to obtain a trained access volume prediction model. Among them, the access volume prediction model is a backpropagation (BP) neural network architecture model based on an improved grey wolf algorithm. Then, the prediction system can input the test samples into the trained access volume prediction model to obtain the access volume test results. And according to the access volume test results, the error backpropagation algorithm of the BP neural network is used to perform secondary optimization on the trained access volume prediction model to obtain the final access volume prediction model. Finally, the prediction system can use the system access volume corresponding to the target system in the latest unit time as a prediction sample, and based on the prediction sample and the final access volume prediction model, predict the access volume of the target system.
[0040] However, traditional methods for predicting user access volume are highly data-dependent, and many prediction models rely heavily on a large amount of historical data input during operation. For newly established enterprises or newly launched products, it may be difficult to collect rich enough data to support accurate predictions. Moreover, for complex machine learning models, especially deep learning models, the internal decision-making process is often as opaque as a black box, which leads to poor interpretability of prediction results and thus makes it difficult to gain users' trust and understanding. At the same time, existing prediction models are sensitive to data noise. When the amount of noise is large, some prediction models may fall into the trap of overfitting, which will cause the model to perform poorly when predicting new data and the prediction results to be distorted. In addition, the access volume of e-commerce platforms is affected by various factors, including dynamic factors such as seasonal fluctuations, holiday effects, and promotional activities, as well as unexpected events or abnormal situations such as natural disasters. These changes make the prediction model may show biases when dealing with these events, and these extreme situations are not considered in model training, making it difficult to accurately capture and predict the impact of these dynamic changes on the access volume.
[0041] In summary, how to improve the accuracy of the prediction results of user access volume has become a technical problem to be solved urgently.
[0042] To solve the above problems, an embodiment of the present application provides a method for predicting user access volume. The method for predicting user access volume provided by the embodiment of the present application is applied to a scenario for predicting user access volume. In the embodiment of the present application, by obtaining the to-be-predicted time period of the to-be-predicted platform and the scenario features in the to-be-predicted time period, and inputting these data into the trained prediction model, the peak time and the peak access volume are obtained. Among them, the peak time is the time when the user access volume in the to-be-predicted time period is greater than the preset access threshold, and the peak access volume is the user access volume corresponding to the peak time. In this way, it is possible to more accurately predict the time when the peak of the user access volume in the to-be-predicted platform appears and the user access volume corresponding to the peak time, helping the to-be-predicted platform to make operational preparations in advance to cope with the challenges brought by the peak of user access volume, so as to improve the user experience and operational efficiency.
[0043] The implementation environment of the embodiment of the present application will be introduced below.
[0044] As Figure 1 shown, it is a schematic diagram of a device for predicting user access volume provided by an embodiment of the present application. The device 100 for predicting user access volume may include: a collection device 101 and a trained prediction model 102.
[0045] Specifically, the prediction device 100 can be used to obtain and process information. The prediction device 100 can use the collection device 101 to obtain the to-be-predicted time period of the to-be-predicted platform and the scenario features in the to-be-predicted time period. The prediction device 100 can also be used to input the to-be-predicted time period and the scenario features in the to-be-predicted time period into the trained prediction model 102 to obtain the peak time and the peak access volume.
[0046] The collection device 101 can be used to obtain the to-be-predicted time period of the to-be-predicted platform and the scenario features in the to-be-predicted time period.
[0047] The trained prediction model 102 can be used to receive the to-be-predicted time period of the to-be-predicted platform and the scenario features in the to-be-predicted time period sent by the collection device 101, and obtain the peak time and the peak access volume.
[0048] In the embodiment of the present application, the trained prediction model 102 can be a long short-term memory (LSTM) neural network model. The LSTM neural network model has unique memory units and gating mechanisms, and can effectively capture long-term dependencies in time series data, which is very suitable for predicting mall access volume and traffic peaks. And, the to-be-predicted platform can improve and optimize the LSTM neural network model according to specific requirements and data characteristics to improve the prediction performance of the model.
[0049] In some embodiments, such as Figure 2As shown in the figure, the prediction device 100 may include: a data collection module 201, a data processing module 202, a model construction and testing module 203, and a user traffic prediction and peak time prediction module 204. Among them, the data collection module 201 may be connected to the data processing module 202 by wire / wirelessly. The data processing module 202 may be connected to the model construction and testing module 203 by wire / wirelessly. The model construction and testing module 203 may be connected to the user traffic prediction and peak time prediction module 204 by wire / wirelessly.
[0050] The data collection module 201 may be used to obtain the prediction period and the scenario features in the prediction period of the platform to be predicted. The data collection module 201 may also be used to obtain historical data from the database of the platform to be predicted, such as daily traffic (i.e., historical access information), user behavior data, holiday information, promotion activity records, etc., and obtain the latest data and activity information in real time or at regular intervals through a customized application programming interface (API) or integration with the data management system of the platform to be predicted. The data collection module 201 may also be used to obtain external data, such as weather conditions, social events, etc., through API interfaces, third-party data providers, and public data sources. The data collection module 201 may also be used to integrate the external data and the holiday information and promotion activity records in the historical data, and perform sentiment analysis using sentiment analysis methods to obtain historical feature information.
[0051] As a possible implementation, the data collection module 201 may use the daily traffic of 90 days as a sample, and extract appropriate sample parameters according to the sample to obtain historical access information and historical feature information. For example, the historical access information and historical feature information include: the user's tendency to access volume, the average daily access volume, the average hourly access volume per day, the average daily access volume on holidays and activity dates, the average hourly access volume per day on holidays and activity dates, the average number of users with a tendency to place orders on the platform to be predicted, the average number of users with a tendency to comment on the platform to be predicted, and the number of users with a tendency to browse multiple times on the platform to be predicted.
[0052] As a possible design, the average daily access volume and the average hourly access volume per day may be represented by the following formula 1 and formula 2.
[0053]
[0054] Among them, V i , dk is the access volume in the i-th hour of date d k , and according to V i , dk , the total daily access volume can be obtained as 24 * V i,dk。
[0055] As another possible design, within 90 days, there are n days that are holiday dates and event dates. After organizing them into a date set, there is The average daily access volume of holiday and event dates and the average hourly access volume of holiday and event dates can be expressed by the following formulas three and four.
[0056]
[0057] Among them, is the access volume in the i-th hour of holiday and event date d k , and according to V i , dk the daily access volume of holiday and event dates can be obtained as The total access volume of holiday and event dates is
[0058] As another possible design, the user access volume of the platform to be predicted is directly affected by access data. However, in order to adapt to the sharp increase in access volume during holidays, user operation data is considered to be introduced to predict user access tendency. Set the total number of user orders in the i-th hour of date d k as b i,dk , the number of user comments in the i-th hour of date d k as c i,dk , and the number of users who browse the platform to be predicted multiple times on the same day in the i-th hour of date d k as m i,dk . The user's tendency access volume can be expressed by the following formula five.
[0059]
[0060] Among them, is the average number of users with an order tendency on the platform to be predicted, is the average number of users with a comment tendency on the platform to be predicted, is the number of users with a tendency to browse multiple times on the platform to be predicted. And α, β, and γ respectively correspond to weights. Considering that there is overlap in the three data, after cleaning the data, α + β + γ = 1, α > β > γ can be obtained.
[0061] The data processing module 202 can receive the historical access information and historical feature information sent by the data collection module 201, and process the collected data using a state observer to obtain a processed feature vector (i.e., process the historical access information and historical feature information according to a preset data processing method to obtain the processed historical access information and processed historical feature information) to ensure the quality and consistency of the data. The data processing module 202 can also compensate and correct missing values, outliers, and data with too large differences in the processed feature vector through the state observer, remove non-time-varying characteristics and non-linear data, and fuse and partition the data set to obtain a target feature vector. The data processing module 202 can also sort the target feature vector according to the time series to generate a training set and a test set, providing high-quality data support for subsequent feature extraction and model training.
[0062] It should be noted that after the data processing module 202 processes the collected data, the prediction device can screen out key features closely related to user traffic and peak time through feature engineering techniques according to the operation characteristics and business requirements, including historical access data, user behavior data, holiday information, promotional activities, weather conditions, and social event impacts, etc. (i.e., the scenario features include at least one of the following: holiday features, social event features, weather features, user access habit features). Through the careful selection and combination of features, it provides comprehensive and effective data support for the subsequent model construction and the training and prediction of the test module 203.
[0063] In summary, the state observer can enhance data processing. The state observer can perform processing operations such as cleaning, linearizing, and normalizing the collected data according to the measured values of the system input variables and output variables to ensure the quality and consistency of the data. Moreover, the state observer can compensate for missing values and outliers. The high-quality data provided by the state observer helps the LSTM neural network converge to the optimal solution faster during the model training process, contributing to improving the efficiency and accuracy of model training.
[0064] Furthermore, during the data processing process, the state observer can screen out features closely related to user traffic and peak time according to the operation characteristics and business requirements of the mall. These features, as the input of the LSTM neural network, can help the model better capture the key information in the data and improve the prediction accuracy. In this way, by combining the state observer with the LSTM neural network, it is possible to more accurately predict the time when the traffic peak of the system appears, helping the mall make preparations in advance for operation, cope with the challenges brought by the traffic peak, and improve the user experience and operation efficiency, which has important commercial value.
[0065] In addition, since the LSTM neural network is particularly good at processing time series data, the state observer can sort and partition the data according to the time series, providing high-quality input data for the LSTM neural network. This helps the LSTM neural network better learn the temporal dependence relationships in the data, further improving the prediction accuracy.
[0066] The model construction and testing module 203 can be used to construct a prediction model. The model construction and testing module 203 can also put the training set and test set generated by the data processing module 202 into the model, and iteratively optimize to select the model with a high accuracy of the final result as the prediction model.
[0067] As a possible implementation, the model construction and testing module 203 can construct an LSTM neural network model. Then, the model construction and testing module 203 can train the prediction model according to the training set to obtain a model to be verified. The model construction and testing module 203 can verify the model to be verified according to the test set, iteratively optimize the model according to the verification result, and select the model with a high accuracy of the final result as the trained LSTM neural network model.
[0068] It should be noted that in the embodiments of the present application, the LSTM neural network model includes an input layer, a hidden layer, and an output layer. The number of LSTM neurons in the input layer is the same as the dimension of the processed feature vector. The number of LSTM neurons in the hidden layer is 50, and the number of LSTM neurons in the output layer is 1. The weights of the connections between the layers of the neural network are initialized by a Gaussian distribution, and the mean of the Gaussian distribution is 0, the variance is 1, and the bias is initialized to 0.
[0069] The user access volume prediction and peak time prediction module 204 can be used to predict the possible peak access volume and peak time of the platform to be predicted based on the trained prediction model.
[0070] It should be noted that after predicting the possible peak access volume and peak time of the platform to be predicted, the prediction device can display the prediction results in an intuitive and easy-to-understand chart form and generate a detailed report. The report includes prediction results, error analysis, and recommended measures, which can provide strong support and reference for the platform to be predicted. Through the result visualization and report, the platform to be predicted can better understand the prediction results and formulate a more scientific and reasonable operation strategy.
[0071] Combined with the interaction process of multiple modules in the above embodiments, the operation process of the prediction device is as Figure 3As shown in the figure. The data collection module 201 can collect historical access information and historical feature information, and input the collected data into the data processing module 202. The state observer is used to process the collected data to obtain the training set and the test set. Moreover, the data processing module 202 can screen out the features closely related to the access volume and traffic peak during the feature engineering stage according to the operation characteristics and business requirements of the platform to be predicted. These features include but are not limited to holiday information, event information, etc., and these features will exist in the training set and the test set in the form of user behavior data. Then, the model construction and testing module 203 can use the LSTM neural network to construct the model to obtain the LSTM neural network model, and perform iterative model training on the LSTM neural network model according to the training set containing user behavior data sent by the data processing module 202. By continuously adjusting the parameters and structure of the model, the model can better fit the data and improve the prediction accuracy. At the same time, various optimization algorithms and loss functions can be introduced to accelerate the convergence speed of the model and improve the generalization ability. Also, the model construction and testing module 203 can use the test set to evaluate and analyze the model after model iteration. By calculating indicators such as accuracy, precision, and recall through model evaluation, the prediction effect of the model can be objectively evaluated. If the prediction effect of the model is not ideal, targeted adjustments and optimizations can be made according to the evaluation results until a satisfactory prediction effect is achieved. Then, the model construction and testing module 203 can optimize the user behavior data according to the model analysis results and the actual peak occurrence time, and then perform feedback optimization on the LSTM neural network model, and select the model with high final result accuracy as the LSTM neural network model after multiple trainings. Finally, the user access volume prediction and peak time prediction module 204 can use the LSTM neural network model after multiple trainings to predict the peak time. This function helps the platform to be predicted to make operation preparations in advance, and also helps the platform to be predicted to better cope with the challenges brought by traffic peaks, improving the user experience and operation efficiency.
[0072] After introducing the application scenarios and implementation environments of the embodiments of the present application, the prediction method for user access volume provided by the embodiments of the present application will be introduced in detail below in combination with the above implementation environment.
[0073] The methods in the following embodiments can all be implemented in the above application scenarios and implementation environments. The embodiments of the present application will be specifically described below in combination with the accompanying drawings of the specification.
[0074] Figure 4 It is a schematic flowchart of a prediction method for user access volume provided by an embodiment of the present application. As Figure 4 shown, the method may include: S401 - S402.
[0075] S401. Obtain the period to be predicted and the scenario features during the period to be predicted for the platform to be predicted.
[0076] Among them, the scenario features include at least one of the following: holiday features, social event features, weather features, and user access habit features.
[0077] As a possible implementation, the prediction device can receive the period to be predicted input by the user. Then, the prediction device can obtain the historical log of the platform to be predicted, or the prediction device can obtain the historical scenario features through the API interface, third-party data providers, and public data sources. Then, the prediction device can predict the scenario features of the period to be predicted based on the historical scenario features to obtain the scenario features during the period to be predicted.
[0078] S402. Input the period to be predicted and the scenario features during the period to be predicted into the trained prediction model to obtain the peak time and the peak access volume.
[0079] Among them, the peak time is the time when the user access volume in the period to be predicted is greater than the preset access threshold, and the peak access volume is the user access volume corresponding to the peak time.
[0080] As a possible implementation, the prediction device can combine the historical access information and the historical feature information as the target information, and divide the target information into a training set and a test set according to the time series and input them into the prediction model. The prediction device can train the prediction model according to the training set to obtain the model to be verified. The prediction device can verify the model to be verified according to the test set, and determine the model to be verified as the trained prediction model when the model to be verified converges.
[0081] It should be noted that in the embodiments of the present application, the prediction model can be an LSTM neural network model. The prediction device can use the improved gradient descent algorithm to iteratively update the LSTM neural network model to obtain the trained prediction model.
[0082] As a possible design, the improved gradient descent algorithm can be represented by the following formula six.
[0083]
[0084] Among them, θ i+1 is used to represent the parameter set of the neural network at the (i + 1)-th iteration, θ i is used to represent the parameter set of the neural network at the i-th iteration, k is used to represent the network learning rate, and J(θ i ) is used to represent the loss function.
[0085] In some embodiments, the prediction device may obtain the historical access information and historical feature information of the platform to be predicted. Then, the prediction device may process the historical access information and historical feature information according to a preset data processing method to obtain the processed historical access information and processed historical feature information, where the data accuracy rate of the processed historical access information is greater than a first preset quality threshold, and the data accuracy rate of the processed historical feature information is greater than a second preset quality threshold. Then, the prediction device may train a prediction model based on the processed historical access information and processed historical feature information to obtain a trained prediction model.
[0086] Among them, the historical access information includes the user access volume of the platform to be predicted at multiple historical moments, and the historical feature information includes the scenario features of the platform to be predicted at multiple historical moments.
[0087] Exemplarily, the historical access information may include the daily access volume and monthly access volume, and the historical feature information may include user behavior data, holiday information, promotion activity records, etc.
[0088] It should be noted that the preset data processing method includes at least one of the following: data cleaning, linearization transformation, and normalization processing.
[0089] As a possible implementation, the prediction device may perform normalization processing on the historical access information and historical feature information of the platform to be predicted respectively. Then, the prediction device may unify the normalized historical access information and historical feature information into the same dimension, and perform fusion processing on the normalized historical access information and historical feature information to obtain the processed historical access information and processed historical feature information.
[0090] As another possible implementation, the prediction device may use a state observer to observe the non-linear perturbations in the historical access information and historical feature information, and compensate the observed results into the original non-linear system to obtain the processed historical access information and processed historical feature information, so as to further ensure the accuracy of the subsequent prediction model training results.
[0091] That is to say, the state observer may use a dynamic equation to calculate the error vector between the true state and the estimated state according to the input and output data in the training set and test set, and optimize the convergence speed of the error by adjusting the gain matrix.
[0092] As a possible design, the state observer can substitute the input and output data in the training set and the test set into the basic state equation of the state observer, calculate the error vector between the true state and the estimated state, obtain the error matrix equation of the state observer, and then optimize the convergence speed of the error through the matrix. The basic state equation, error vector, and error matrix equation of the state observer can be expressed by the following Formula Seven, Formula Eight, and Formula Nine.
[0093]
[0094]
[0095]
[0096] Among them, A is the state matrix, B is the input matrix, C is the output matrix, and L is the observer gain matrix, specifically u is the weighting parameter, y is the activity intensity, x is the input of the state observer, is the output of the state observer. e represents the error vector, represents the error matrix equation, A E is E e is
[0097] It should be noted that the processing of the state observer can enable the LSTM neural network to more accurately capture the changing rules of the system access volume and traffic peak, and improve the prediction performance of the model. During the model training process, the high-quality data provided by the state observer helps the LSTM neural network converge to the optimal solution faster and improves the training efficiency of the model.
[0098] It can be understood that by performing operations such as data cleaning, linearization transformation, and normalization processing on the historical access information and historical feature information, the influence of noise and outliers can be effectively reduced, and the accuracy and consistency of the data can be improved. This provides higher-quality input data for subsequent model training and helps improve the efficiency and accuracy of model training.
[0099] The technical solutions provided by the above embodiments at least bring the following beneficial effects: By obtaining the to-be-predicted time period of the to-be-predicted platform and the scenario features in the to-be-predicted time period, and inputting these data into the trained prediction model, the peak time and peak access volume are obtained. Among them, the peak time is the time when the user access volume in the to-be-predicted time period is greater than the preset access threshold, and the peak access volume is the user access volume corresponding to the peak time. In this way, it is possible to more accurately predict the time when the peak of the user access volume appears in the to-be-predicted platform and the user access volume corresponding to the peak time, helping the to-be-predicted platform make early operation preparations to cope with the challenges brought by the peak of user access volume, so as to improve the user experience and operation efficiency.
[0100] It should be noted that the platform to be predicted may include multiple preset access services. In the process of the above prediction device obtaining the historical access information and historical feature information of the platform to be predicted, the historical access information and historical feature information are the information of all preset access services of the platform to be predicted. The prediction device can also specifically obtain the historical access information and historical feature information of a preset access service to judge the time when the access peak of a single service appears and the specific user access volume during the peak period.
[0101] In some embodiments, the prediction device can obtain the log information of the platform to be predicted, and the log information includes the access information and feature information of each preset access service. Then, the prediction device uses the access information and feature information of the target access service in the log information as the historical access information and historical feature information respectively to obtain the historical access information and historical feature information, and the target access service is the access service to be predicted among the multiple preset access services.
[0102] Among them, the multiple preset access services include at least one of the following: ticket booking service, weather query service, and commodity purchase service.
[0103] It can be understood that by extracting the historical access data and feature information of specific services from the logs, refined prediction can be performed for different services, rather than generally analyzing the access volume of the entire platform. This more targeted method can improve the accuracy of prediction.
[0104] In summary, the present application can use an improved LSTM neural network model, combined with diversified data dimensions, to achieve accurate prediction of user access volume and the time when the traffic peak appears, thereby significantly reducing the operation risk. Among them, the LSTM neural network shows significant advantages in processing complex sequence prediction tasks with its unique gating mechanism. It can efficiently learn and identify potential patterns in time series data, including long-term dependencies, and then achieve more accurate prediction. This learning ability makes the model have a higher prediction accuracy in the field of access volume prediction.
[0105] Moreover, compared with other black-box machine learning models, the structure of the LSTM neural network is relatively intuitive and easy to understand. Through visualization tools and techniques, the connections and parameters between the layers of the model can be clearly displayed, significantly improving the interpretability of the model. It helps to better understand the internal laws and characteristics of the data and can also improve users' trust in the prediction results.
[0106] In addition, since the access volume of the platform to be predicted is a typical time series data, the LSTM neural network has natural advantages in processing time series data. By capturing the time-dependent relationships in the data, the LSTM neural network can more accurately predict the access volume at future moments.
[0107] To fully utilize the performance of the LSTM neural network, this application also adopts various optimization strategies, such as regularization techniques, which can prevent the model from overfitting and improve the generalization ability. And appropriate loss functions and optimization algorithms are used to train the model to ensure that the model can quickly converge to the optimal solution.
[0108] Meanwhile, considering the characteristics that the access volume of the platform to be predicted is affected by various dynamic factors such as holidays and promotional activities, this application introduces a state observer to enhance the dynamic data processing ability of the LSTM neural network. Through the state observer, the operating state of the platform to be predicted and changes in the external environment can be monitored in real time, and this information is passed as input to the LSTM neural network. In this way, the LSTM neural network can adaptively perceive and predict the dynamic changes in the access volume of the platform to be predicted, achieving more accurate predictions.
[0109] The above mainly introduces the solution provided in the embodiments of this application from the perspective of computer devices. It can be understood that in order for a computer device to implement the above functions, it includes the corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, combined with the method steps for predicting the user access volume in each example described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.
[0110] The embodiments of this application also provide a prediction device for user access volume. The prediction device for user access volume can be a computer device, or the CPU in the above computer device, or the processing module in the above computer device for predicting user access volume, or the client in the above computer device for predicting user access volume.
[0111] The embodiments of the present application can divide the prediction device for user access volume into functional modules or functional units according to the above method examples. For example, each functional module or functional unit can be corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware, or in the form of a software functional module or functional unit. Among them, the division of modules or units in the embodiments of the present application is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0112] As Figure 5 shown, it is a schematic structural diagram of a prediction device for user access volume provided by an embodiment of the present application. The prediction device for user access volume is used to execute Figure 4 the prediction method for user access volume shown. The prediction device 500 for user access volume may include: an acquisition module 501 and a processing module 502.
[0113] The acquisition module 501 is used to acquire the to-be-predicted time period of the to-be-predicted platform and the scenario features in the to-be-predicted time period. The processing module 502 is used to input the to-be-predicted time period and the scenario features in the to-be-predicted time period into the trained prediction model to obtain the peak time and the peak access volume. The peak time is the time when the user access volume in the to-be-predicted time period is greater than the preset access threshold, and the peak access volume is the user access volume corresponding to the peak time.
[0114] Optionally, the scenario features include at least one of the following: holiday features, social event features, weather features, and user access habit features.
[0115] Optionally, the acquisition module 501 is used to acquire the historical access information and historical feature information of the to-be-predicted platform. The historical access information includes the user access volume of the to-be-predicted platform at multiple historical moments, and the historical feature information includes the scenario features of the to-be-predicted platform at multiple historical moments. The processing module 502 is specifically used to process the historical access information and historical feature information according to the preset data processing method to obtain the processed historical access information and the processed historical feature information. The data accuracy rate of the processed historical access information is greater than the first preset quality threshold, and the data accuracy rate of the processed historical feature information is greater than the second preset quality threshold. The processing module 502 is further used to train the prediction model according to the processed historical access information and the processed historical feature information to obtain the trained prediction model.
[0116] Optionally, the preset data processing method includes at least one of the following: data cleaning, linearization conversion, and normalization processing.
[0117] Optionally, an acquisition module 501 is configured to acquire log information of a platform to be predicted, where the log information includes access information and feature information of each preset access service. A processing module 502 is specifically configured to use the access information and feature information of a target access service in the log information as historical access information and historical feature information respectively, so as to obtain the historical access information and the historical feature information.
[0118] Optionally, the multiple preset access services include at least one of the following: ticket booking service, weather query service, and commodity purchase service.
[0119] Figure 6 FIG. is a schematic structural diagram of a prediction device for user access volume shown according to an exemplary embodiment. The device may include a processor 602, and the processor 602 is configured to execute application program code, so as to implement the prediction method for user access volume in this application.
[0120] The processor 602 may be a CPU, a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program in this application solution.
[0121] As Figure 6 shown, the prediction device for user access volume may further include a memory 603. Wherein, the memory 603 is configured to store the application program code for executing the solution of this application, and is controlled by the processor 602 to execute.
[0122] The memory 603 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or may also be an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 603 may exist independently and be connected to the processor 602 through a bus 604. The memory 603 may also be integrated with the processor 602.
[0123] AsFigure 6 As shown in Figure 6 , the prediction device for user access volume may further include a communication interface 601. Among them, the communication interface 601, the processor 602, and the memory 603 may be coupled to each other. For example, they may be coupled to each other through a bus 604. The communication interface 601 is used for information interaction with other devices. For example, it supports information interaction between the prediction device for user access volume and other devices.
[0124] It should be noted that Figure 6 the device structure shown in Figure 6 does not constitute a limitation on the prediction device for user access volume. Except Figure 6 for the components shown, the prediction device for user access volume may include more or fewer components than those shown in the figure, or combine certain components, or have a different component layout.
[0125] In actual implementation, the functions implemented by the processing module 502 can all be Figure 6 implemented by the processor 602 shown calling the program code in the memory 603.
[0126] This application also provides a computer-readable storage medium. Instructions are stored on the computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by the processor of the computer device, the computer can execute the prediction method for user access volume provided in the above-mentioned embodiments. For example, the computer-readable storage medium may be the memory 603 including instructions, and the above instructions can be executed by the processor 602 of the computer device to complete the above method. Optionally, the computer-readable storage medium may be a non-transitory computer-readable storage medium. For example, the non-transitory computer-readable storage medium may be ROM, RAM, CD-ROM, magnetic tape, floppy disk, and optical data storage devices, etc.
[0127] Figure 7 Exemplarily shown is a conceptual partial view of a computer program product provided by an embodiment of this application. The computer program product includes a computer program for executing a computer process on a computing device.
[0128] In one embodiment, the computer program product is provided using a signal-bearing medium 700. The signal-bearing medium 700 may include one or more program instructions, which when run by one or more processors can provide the functions or partial functions described above for Figure 4 description. Therefore, for example, referring to Figure 4 the embodiment shown in Figure 4 , one or more features of S401 - S402 may be borne by one or more instructions associated with the signal-bearing medium 700. In addition, Figure 7 the program instructions in Figure 7 also describe example instructions.
[0129] In some examples, the signal-bearing medium 700 may include a computer-readable medium 701, such as but not limited to, a hard disk drive, a compact disk (CD), a digital video disk (DVD), a digital tape, a memory, a read-only memory (ROM), or a random access memory (RAM), and so on.
[0130] In some embodiments, the signal-bearing medium 700 may include a computer-recordable medium 702, such as but not limited to, a memory, a read / write (R / W) CD, an R / W DVD, and so on.
[0131] In some embodiments, the signal-bearing medium 700 may include a communication medium 703, such as but not limited to, a digital and / or analog communication medium (e.g., an optical fiber cable, a waveguide, a wired communication link, a wireless communication link, and so on).
[0132] The signal-bearing medium 700 may be conveyed by a wireless form of the communication medium 703. One or more program instructions may be, for example, computer-executable instructions or logic implementation instructions.
[0133] In some examples, such as for Figure 5 the prediction device for the described user access volume may be configured to provide various operations, functions, or actions in response to one or more program instructions through the computer-readable medium 701, the computer-recordable medium 702, and / or the communication medium 703.
[0134] Through the description of the above embodiments, those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0135] In several embodiments provided in the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are only illustrative. For example, the division of modules or units is only a logical functional division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be electrical, mechanical, or other forms.
[0136] The unit described as a separation component may or may not be physically separated. The component displayed as a unit may be a single physical unit or multiple physical units, that is, it may be in one place or distributed to multiple different places. One can select some or all of the classification units according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] In addition, in each embodiment of the present application, each functional unit may be integrated in a processing unit, may exist separately as individual physical units, or two or more units may be integrated in one unit. The above-mentioned integrated units may be implemented in the form of hardware or in the form of software functional units.
[0138] 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 readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art or all or part of this technical solution can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods of the various embodiments of the present application. The aforementioned storage medium includes various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0139] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A method for predicting the user access volume, characterized in that The method includes: Obtaining a to-be-predicted time period of a to-be-predicted platform and scene features in the to-be-predicted time period; Inputting the to-be-predicted time period and the scene features in the to-be-predicted time period into a trained prediction model to obtain a peak time and a peak access volume, where the peak time is the time when the user access volume in the to-be-predicted time period is greater than a preset access threshold, and the peak access volume is the user access volume corresponding to the peak time.
2. The method according to claim 1, wherein The scene features include at least one of the following: holiday features, social event features, weather features, user access habit features.
3. The method according to claim 1, wherein The trained prediction model is obtained through the following method: Obtaining historical access information and historical feature information of the to-be-predicted platform, where the historical access information includes the user access volume of the to-be-predicted platform at multiple historical moments, and the historical feature information includes the scene features of the to-be-predicted platform at the multiple historical moments; Processing the historical access information and the historical feature information according to a preset data processing method to obtain the processed historical access information and the processed historical feature information, where the data accuracy rate of the processed historical access information is greater than a first preset quality threshold, and the data accuracy rate of the processed historical feature information is greater than a second preset quality threshold; Training the prediction model according to the processed historical access information and the processed historical feature information to obtain the trained prediction model.
4. The method according to claim 3, characterized in that The preset data processing method includes at least one of the following: data cleaning, linearization conversion, normalization processing.
5. The method according to claim 3, wherein The to-be-predicted platform includes multiple preset access services; the obtaining of the historical access information and the historical feature information of the to-be-predicted platform includes: Obtaining the log information of the to-be-predicted platform, where the log information includes the access information and feature information of each preset access service; Using the access information and feature information of the target access service in the log information as the historical access information and the historical feature information respectively to obtain the historical access information and the historical feature information, where the target access service is the access service to be predicted among the multiple preset access services.
6. The method according to claim 5, characterized in that, The multiple preset access services include at least one of the following: ticket booking service, weather query service, commodity purchase service.
7. A prediction device for user access volume, characterized in that, The device includes: An obtaining module, configured to obtain a to-be-predicted time period of a to-be-predicted platform and scene features in the to-be-predicted time period; A processing module, configured to input the to-be-predicted time period and the scene features in the to-be-predicted time period into a trained prediction model to obtain a peak time and a peak access volume, where the peak time is the time when the user access volume in the to-be-predicted time period is greater than a preset access threshold, and the peak access volume is the user access volume corresponding to the peak time.
8. A prediction device for user access volume, characterized in that, Includes: A processor and a memory; The processor is coupled with the memory; The memory is used to store one or more programs, and the one or more programs include computer execution instructions. When the prediction device of the user access volume runs, the processor executes the computer execution instructions stored in the memory, so that the prediction device of the user access volume executes the method according to any one of claims 1-6.
9. A computer-readable storage medium storing instructions therein, characterized in that, When the computer executes the instructions, the computer performs the method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes computer program instructions which, when executed, implement the method according to any one of claims 1-6.