Data-sharing API call volume prediction method, apparatus and device
By optimizing the CNN-LSTM model through variational mode decomposition and an improved particle swarm optimization algorithm, the problem of low accuracy in predicting data sharing API call volume is solved, achieving higher accuracy and better generalization, making it suitable for predicting data sharing API call volume in large sample scenarios.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHANGHAI MOULE NETWORK TECHNOLOGY CO LTD
- Filing Date
- 2025-05-22
- Publication Date
- 2026-05-21
AI Technical Summary
Existing technologies suffer from low prediction accuracy in predicting data sharing API call volume, especially when faced with highly random and complex data sharing API call volume sequences. Traditional methods such as ARIMA, SVR, RF, GRU networks and BP neural networks perform poorly in terms of accuracy and robustness.
Variational mode decomposition is used to decompose the data sharing API call volume data. The decomposed subsequences are divided into training samples and test samples. The hyperparameters of the CNN-LSTM model are optimized by improving the particle swarm optimization algorithm. The CNN-LSTM model is reconstructed using the optimal hyperparameters for prediction. Sequence features are extracted by combining convolutional neural network (CNN) and long short-term memory network (LSTM). Finally, the prediction results are superimposed.
It improves the accuracy and generalization of data sharing API call volume prediction, making it suitable for data sharing API call volume prediction tasks in large sample scenarios. It reduces the instability and random fluctuation of data, and enhances the model's prediction performance.
Smart Images

Figure CN2025096621_21052026_PF_FP_ABST
Abstract
Description
A method, apparatus, and device for predicting the volume of data sharing API calls. Technical Field
[0001] This invention relates to the field of call volume prediction technology, and specifically to a method, apparatus, and device for predicting the call volume of a data sharing API. Background Technology
[0002] Data sharing APIs serve as a medium for data centers to share data with internal cross-departmental developers and external third-party developers. By calling data sharing APIs, internal information shared by the data center can be accessed, facilitating convenient and efficient data acquisition for different systems, departments, and organizations. Data sharing API call volume refers to the number of times a specific data sharing API is called within a specific time frame. This metric is crucial for evaluating API usage, performance, and system load. Traditional prediction methods such as ARIMA, SVR, and RF have limitations in accuracy and robustness when dealing with highly random and complex sequence data such as data sharing API call volume sequences.
[0003] Existing technology CN117009758A describes a method, medium, and device for predicting system access volume based on deep learning. This invention uses a variational mode algorithm optimized by a genetic algorithm to perform mode decomposition on data, and then inputs the decomposed mode components into a CNN network and a GRU network. The model outputs are then summed to obtain the final predicted value. This technology improves the model's predictive ability by reducing data volatility and instability. However, the empirically set parameters of the GRU network have not achieved optimal results, leading to inaccurate predictions.
[0004] The existing technology CN116703466A describes a system access volume prediction method and related equipment based on an improved gray wolf algorithm. This invention addresses the problem that BP neural networks are prone to forming local extrema and cannot predict the access volume of the target system in a timely and accurate manner by improving the gray wolf algorithm and optimizing the BP neural network. However, the time series of system access volume has strong fluctuations and instability, which makes the optimized BP neural network perform poorly when processing the time series of access volume, resulting in reduced accuracy of the prediction results.
[0005] Therefore, in the field of data sharing API call volume prediction, there is a need for an efficient, robust, and accurate method for predicting data sharing API call volume sequences. Summary of the Invention
[0006] In view of this, the purpose of the present invention is to provide a method, apparatus and device for predicting the volume of data sharing API calls, so as to overcome the problem of low prediction accuracy in the present invention.
[0007] To achieve the above objectives, the present invention adopts the following technical solution:
[0008] Firstly, this application provides a method for predicting the volume of data sharing API calls, including:
[0009] Get data on the number of API calls to the data sharing platform;
[0010] The sequence of data sharing API call volume data is decomposed using the variational mode decomposition method;
[0011] The subsequences obtained by the variational mode decomposition algorithm are divided into training samples and test samples and then normalized.
[0012] Optimize the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm;
[0013] The CNN-LSTM model is reconstructed using the optimal hyperparameters and trained using the training samples, while the test samples are used for prediction.
[0014] The subsequences obtained by the variational mode decomposition algorithm are input into the CNN-LSTM model for prediction, and the prediction results of the subsequences obtained by the variational mode decomposition algorithm are superimposed to obtain the predicted value of the data sharing API call volume.
[0015] Furthermore, the method described above, wherein obtaining the data sharing API call volume data includes:
[0016] Based on the access logs on the data center server, obtain the system access volume for each unit of time within a fixed time interval;
[0017] Missing system access values for each time unit are filled in by the nearest available value to form preprocessed time series data.
[0018] Furthermore, the method described above, wherein the step of using variational mode decomposition to decompose the sequence of data sharing API call volume data includes:
[0019] The time series data is input into the VMD algorithm, and the number of modes and their initial modal components and center frequencies are set.
[0020] The VMD algorithm is iterated, and the modal components and center frequency are updated. After each iteration, the VMD algorithm is checked to confirm whether the convergence condition has been met.
[0021] If so, the VMD algorithm will generate updated modal components and frequency outputs, thereby obtaining a subsequence of the data sharing API call volume data sequence.
[0022] Furthermore, in the above-described method, the step of dividing the subsequences obtained by the variational mode decomposition algorithm into training samples and test samples and performing normalization processing includes:
[0023] The first 70% of the subsequence of the data sharing API call volume data sequence is used as the training sample, and the last 30% is used as the test sample.
[0024] The training samples and the test samples are normalized using a calculation formula.
[0025] Furthermore, the method described above, wherein optimizing the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm, includes:
[0026] Determine the range of parameters to be optimized, including: learning rate, time step, batch size, and number of hidden layer neurons;
[0027] The population size, number of iterations, learning factor, initial particle position and velocity are determined for the particle swarm optimization algorithm, and the mean square error of the CNN-LSTM model is used as the fitness function.
[0028] Calculate the fitness of each particle and update the velocity and position of each particle;
[0029] Update the individual best fitness and position of each particle, and the group's historical best fitness and position;
[0030] Determine if the maximum number of iterations has been reached; if so, output the parameters corresponding to the historical best fitness value of the population.
[0031] If not, continue calculating the fitness of each particle and updating the velocity and position of each particle.
[0032] Furthermore, the method described above, wherein reconstructing the CNN-LSTM model using optimal hyperparameters and training it using the training samples, and performing prediction using the test samples, includes:
[0033] The CNN-LSTM model is reconstructed based on the parameters corresponding to the historical optimal fitness values of the group.
[0034] The CNN-LSTM model is trained using the training samples and predicted using the test samples.
[0035] Furthermore, in the above-described method, the step of inputting the sub-sequences obtained by the variational mode decomposition algorithm into the CNN-LSTM model for prediction, and superimposing the prediction results of the sub-sequences obtained by the variational mode decomposition algorithm to obtain the predicted value of the data sharing API call volume, includes:
[0036] A subsequence of the data sharing API call volume data sequence is input into the CNN-LSTM model;
[0037] The spatial features of the subsequences of the data sharing API call volume data sequence are extracted through the CNN layer in the CNN-LSTM model, flattened through the flattening layer, and then extracted through the temporal features of the subsequences of the data sharing API call volume data sequence through the LSTM layer composed of multiple hidden layers.
[0038] The predicted values of the subsequences of the data sharing API call volume data sequence are output through the fully connected layers in the CNN-LSTM model.
[0039] The predicted values of the subsequences of all the data sharing API call volume data sequences are denormalized and summed to obtain the predicted values of the data sharing API call volume.
[0040] Furthermore, the methods described above also include:
[0041] The prediction performance of the CNN-LSTM model is evaluated using mean squared error, mean absolute error, mean absolute percentage error, and coefficient of determination as evaluation metrics.
[0042] Secondly, this application provides a data sharing API call volume prediction device, comprising:
[0043] The data acquisition module is used to acquire data on the number of calls to the data sharing API.
[0044] The sequence decomposition module is used to decompose the sequence of the data sharing API call volume data using the variational mode decomposition method;
[0045] The preprocessing module is used to divide the subsequences obtained by the variational mode decomposition algorithm into training samples and test samples and perform normalization processing.
[0046] The model improvement module is used to optimize the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm.
[0047] The model training module is used to reconstruct the CNN-LSTM model using the optimal hyperparameters, train it using the training samples, and make predictions using the test samples.
[0048] The prediction module is used to input the subsequences obtained by the variational mode decomposition algorithm into the CNN-LSTM model for prediction, and to superimpose the prediction results of the subsequences obtained by the variational mode decomposition algorithm to obtain the predicted value of the data sharing API call volume.
[0049] Thirdly, this application provides a data sharing API call volume prediction device, including a processor and a memory, wherein the processor is connected to the memory:
[0050] The processor is used to call and execute the program stored in the memory;
[0051] The memory is used to store the program, which is at least used to execute the data sharing API call volume prediction method described in any of the above descriptions.
[0052] The beneficial effects of this invention are as follows:
[0053] This application first obtains data on the number of API calls to the data sharing platform. It then uses variational mode decomposition (VMD) to decompose the sequence of the VMD data. The subsequences obtained by the VMD algorithm are divided into training samples and test samples and normalized. Next, an improved particle swarm optimization algorithm is used to optimize the hyperparameters of the CNN-LSTM model. The CNN-LSTM model is reconstructed using the optimal hyperparameters and trained using the training samples, while the test samples are used for prediction. Finally, the subsequences obtained by the VMD algorithm are input into the CNN-LSTM model for prediction, and the prediction results of the subsequences obtained by the VMD algorithm are superimposed to obtain the predicted value of the number of API calls to the data sharing platform. In this application, the VMD algorithm is used to decompose the time series of the original call volume to reduce the instability and strong random fluctuations of the data, thereby enhancing the prediction effect of the model. To address the problem of weak feature extraction capability and low prediction accuracy of a single model, the convolutional neural network (CNN) and long short-term memory (LSTM) are combined to enhance the ability to extract sequence features and improve the sequence prediction accuracy. An improved particle swarm optimization algorithm is used to improve the global and local search capabilities of particles at different stages of the iteration process, thereby enhancing the ability to search for the optimal hyperparameters of the CNN-LSTM prediction model, thus improving prediction accuracy and generalization. This method is suitable for prediction tasks of data-sharing API call volume in large-sample scenarios. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 is a flowchart of an embodiment of a data sharing API call volume prediction method according to the present invention;
[0056] Figure 2 is a schematic diagram of the structure of an embodiment of the data sharing API call volume prediction device of the present invention;
[0057] Figure 3 is a schematic diagram of the structure of an embodiment of the data sharing API call volume prediction device of the present invention. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be described in detail below. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other implementation methods obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0059] Figure 1 is a flowchart of an embodiment of a data sharing API call volume prediction method according to the present invention. Referring to Figure 1, this embodiment may include the following steps:
[0060] S1. Obtain data on the number of API calls to the data sharing platform;
[0061] S2. The variational mode decomposition method is used to decompose the sequence of data sharing API call volume data;
[0062] S3. Divide the subsequences obtained by the variational mode decomposition algorithm into training samples and test samples and perform normalization processing.
[0063] S4. Optimize the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm;
[0064] S5. Reconstruct the CNN-LSTM model using the optimal hyperparameters, and train it using training samples and use test samples for prediction.
[0065] S6. Input the subsequences obtained by the variational mode decomposition algorithm into the CNN-LSTM model for prediction, and superimpose the prediction results of the subsequences obtained by the variational mode decomposition algorithm to obtain the predicted value of the data sharing API call volume.
[0066] Understandably, this embodiment first obtains data on the volume of API calls for data sharing, then uses variational mode decomposition to decompose the sequence of the data sharing API call volume data. The subsequences obtained by the variational mode decomposition algorithm are divided into training samples and test samples and normalized. Then, an improved particle swarm optimization algorithm is used to optimize the hyperparameters of the CNN-LSTM model. The CNN-LSTM model is reconstructed using the optimal hyperparameters and trained using training samples and predicted using test samples. Finally, the subsequences obtained by the variational mode decomposition algorithm are input into the CNN-LSTM model for prediction, and the prediction results of the subsequences obtained by the variational mode decomposition algorithm are superimposed to obtain the predicted value of the data sharing API call volume. In this embodiment, the VMD algorithm is used to decompose the time series of the original call volume to reduce the instability and strong random fluctuations of the data, thereby enhancing the prediction effect of the model. To address the problem of weak feature extraction capability and low prediction accuracy of a single model, the convolutional neural network (CNN) and long short-term memory (LSTM) are combined to enhance the ability to extract sequence features and improve the sequence prediction accuracy. An improved particle swarm optimization algorithm is used to improve the global and local search capabilities of particles at different stages of the iteration process, thereby enhancing the ability to search for the optimal hyperparameters of the CNN-LSTM prediction model. This improves the prediction accuracy and generalization, making it suitable for prediction tasks of data-sharing API call volume in large-sample scenarios.
[0067] Preferably, step S1 includes:
[0068] Based on the access logs on the data center server, obtain the system access volume for each unit of time within a fixed time interval;
[0069] Missing system access values for each time unit are filled in by the nearest available value to form preprocessed time series data.
[0070] Understandably, based on the access logs under the data center server, the system access volume for each unit of time within a fixed time interval is obtained, and missing values in the original data are filled in as close as possible to form a preprocessed time series sample.
[0071] Preferably, step S2 includes:
[0072] The time series data is input into the VMD algorithm, and the number of modes and their initial modal components and center frequencies are set.
[0073] The VMD algorithm is iterated and the modal components and center frequency are updated. After each iteration, the VMD algorithm is checked to confirm whether the convergence condition has been met.
[0074] If so, the VMD algorithm will generate updated modal components and frequency outputs, thereby obtaining a subsequence of the data sequence of data sharing API call volume.
[0075] Understandably, the acquired data from the shared API access is non-stationary, highly volatile, and indirect. EMD and EEMD decomposition algorithms cannot effectively handle modality aliasing. To reduce model complexity and better fit the prediction model, the VMD algorithm, with its high-intensity denoising capabilities, is used to decompose the data from the shared API call sequence. VMD can extract multi-scale features from the data, effectively decomposing the complexity of the original sequence into multiple subsequences to capture components of different frequencies and modal importance information. This helps to more comprehensively capture changes and trends at different time scales, resulting in relatively stable subsequences.
[0076] The process of using the VMD algorithm to process the sequence of data sharing API calls is as follows:
[0077] First, the original data-sharing API call sequence is input, and the number of modes N and its initial modal components and center frequencies are set. During each iteration, the modal components and center frequencies are updated according to a specific formula. After each iteration, the algorithm is checked to confirm whether the convergence condition has been met. Once the algorithm meets the convergence condition, the variational mode decomposition (VMD) algorithm will produce updated modal components and frequencies, thus obtaining N IMFs (sub-modes) of the data-sharing API call sequence.
[0078] The working principle of the VMD model is as follows:
[0079] VMD decomposes a signal into a set of local vibrational modes using variational inference. These modes contain multiple frequency components, each corresponding to a specific center frequency and a finite bandwidth. The constrained variational model is as follows:
[0080]
[0081]
[0082] In the formula: and These are the sets of the k-th modal component and the center frequency after decomposition, respectively. It is a pulse function; The imaginary unit; is the mode function; k is the number of modes obtained from the decomposition; t is the number of sampling points.
[0083] In solving the variational problem, the introduction of Lagrange multipliers λ and a quadratic penalty factor α transforms the variational problem into an unconstrained problem, converting it into an augmented Lagrangian function. The constructed augmented Lagrangian function is expressed as follows:
[0084]
[0085] The variational mode decomposition (IMF) components and their corresponding center frequencies are obtained by iteratively solving using the alternating multiplier method. These steps complete the variational mode decomposition of the original signal.
[0086] Preferably, step S3 includes: using the first 70% of the subsequence of the data sharing API call volume data sequence as training samples and the last 30% as test samples;
[0087] The training and test samples are normalized using a calculation formula.
[0088] Understandably, the first 70% of each modality component dataset is used as training samples, and the last 30% as test samples. To reduce the interference of outlier data on predictions, accelerate the convergence speed of the prediction model, avoid gradient vanishing and gradient exploding, and further improve the generalization ability of the model, the training and test sets are normalized.
[0089] The formula for normalization is as follows:
[0090]
[0091] The value is the normalized value; Modal components after decomposing the data sharing API call volume; and These represent the maximum and minimum values of the corresponding indicators, respectively.
[0092] The model's prediction step size is set to 12, and each modal component dataset is divided into two parts: one part is the model's input, and the other part is the model's output.
[0093]
[0094] Where X is the model input, and Y is the actual value corresponding to the model prediction; each row in X represents the number of data sharing API calls in the first 12 time units, and each row in Y corresponds to the number of data sharing API calls in the 13th time unit, representing the value to be predicted.
[0095] Preferably, step S4 includes:
[0096] Determine the range of parameters to be optimized, including: learning rate, time step, batch size, and number of hidden layer neurons;
[0097] The population size, number of iterations, learning factor, initial particle position and velocity are determined for the particle swarm optimization algorithm, and the mean squared error of the CNN-LSTM model is used as the fitness function.
[0098] Calculate the fitness of each particle and update the velocity and position of each particle;
[0099] Update the individual best fitness and position of each particle, and the group's historical best fitness and position;
[0100] Determine if the maximum number of iterations has been reached; if so, output the parameters corresponding to the historical best fitness value of the population.
[0101] If not, continue calculating the fitness of each particle and updating the velocity and position of each particle.
[0102] Understandably, the first step is to determine the range of parameters to be optimized. In this application, the parameters whose range needs to be determined are the learning rate, time step, batch size, and number of hidden layer neurons of the prediction model. Secondly, the population size, number of iterations, learning factor, and initial particle positions and velocities of the particle swarm optimization algorithm are determined. The mean squared error of the model prediction is used as the fitness function. The fitness of each particle is calculated, and the velocity and position of each particle are updated. The individual optimal fitness and position of each particle, as well as the historical optimal fitness and position of the population, are updated. It is determined whether the maximum number of iterations has been reached. If not, the calculation of the fitness of each particle is returned to continue; if the condition is met, the optimization process ends, and the parameters corresponding to the historical optimal fitness value of the population are output.
[0103] fitness function The definition is as follows:
[0104]
[0105] in, For the test sample size, This is the actual value. These are predicted values.
[0106] The update formulas for the position and velocity of the i-th particle are as follows:
[0107]
[0108]
[0109] in, This represents the velocity of the i-th particle after t+1 iterations. Let i be the position of the i-th particle after t+1 iterations. , These are individual learning factors and group learning factors, respectively. , It is a random number. Let be the optimal position of particle i at time t. Let be the optimal position of the particle population at time t. Let ω be the particle position at time t, and ω be the inertia factor, which is a non-negative number. A larger ω is beneficial for global search, helping to escape local optima; a smaller ω is beneficial for local convergence search, allowing the algorithm to converge quickly to the optimal solution.
[0110] The improved particle swarm optimization algorithm improves global convergence in the early stages and local convergence in the later stages by updating ω.
[0111] The update of ω is performed according to the following formula:
[0112]
[0113] Where k is a constant, taking the value of t represents the current iteration number, and T represents the maximum number of iterations. This indicates that the minimum value of ω is 0.3.
[0114] Preferably, step S5 includes:
[0115] Reconstruct the CNN-LSTM model based on the parameters corresponding to the group's historical best fitness values;
[0116] The CNN-LSTM model is trained using training samples and predicted using test samples.
[0117] Preferably, step S6 includes:
[0118] A subsequence of the data sequence of data sharing API calls is input into the CNN-LSTM model;
[0119] Spatial features of subsequences of data sharing API call volume data sequence are extracted through the CNN layer in the CNN-LSTM model, flattened through the flattening layer, and temporal features of subsequences of data sharing API call volume data sequence are extracted through the LSTM layer composed of multiple hidden layers.
[0120] The predicted values of subsequences of the data sequence are obtained by outputting the data sharing API call volume data sequence through the fully connected layers in the CNN-LSTM model;
[0121] The predicted values of the subsequences of all data sharing API call volume data sequences are denormalized and summed to obtain the predicted values of data sharing API call volume.
[0122] Understandably, a CNN-LSTM is constructed based on the optimal hyperparameters output. First, the feature extraction capabilities of the CNN are used to extract time-series features, which are then input into the LSTM for further prediction. The input data first passes through a CNN layer consisting of a single one-dimensional convolutional layer to extract spatial features; then it undergoes flattening processing through a flattening layer; finally, it passes through an LSTM layer composed of multiple hidden layers to extract temporal features, and finally, it outputs the predicted value through a fully connected layer.
[0123] In CNNs, convolutional layers perform convolution operations by sliding convolution kernels across the input data to extract high-level features. The convolution operation formula is as follows:
[0124]
[0125] The core unit of the LSTM model consists of three gates and a memory unit. By learning weights to control the flow of information, the model can remember or forget previous messages.
[0126] Forget Gate Calculation Formula:
[0127] in For the Gate of Oblivion Here is the weight matrix for the forget gate. Forget Gate Bias
[0128] Input gate calculation formula:
[0129] in For input gate, Here is the weight matrix of the input gate. This is the bias of the input gate. This represents the update status of time-memory cells.
[0130] Cell state update formula:
[0131] in The output of the time memory cell at time t
[0132] Output gate calculation formula:
[0133] in For input gate, This is the weight matrix of the output gate. This is the bias of the output gate.
[0134] The CNN-LSTM prediction model outputs the prediction results for each subsequence. The prediction results of all modal components are denormalized and summed to obtain the final prediction result of the data sharing API call volume.
[0135] Preferred options also include:
[0136] The predictive performance of the CNN-LSTM model is evaluated using mean squared error, mean absolute error, mean absolute percentage error, and coefficient of determination as evaluation metrics.
[0137] Understandably, the formula for calculating the mean squared error is as follows:
[0138]
[0139] The formula for calculating the mean absolute error is as follows:
[0140]
[0141] The formula for calculating the mean absolute percentage error is as follows:
[0142]
[0143] The formula for calculating the coefficient of determination is as follows:
[0144] .
[0145] The present invention also provides a data sharing API call volume prediction device for implementing the above-described method embodiments. Figure 2 is a schematic diagram of the structure of an embodiment of the data sharing API call volume prediction device of the present invention. As shown in Figure 2, it includes:
[0146] Data acquisition module 1 is used to acquire data on the number of calls to the data sharing API;
[0147] Sequence decomposition module 2 is used to decompose the sequence of data sharing API call volume data using the variational mode decomposition method;
[0148] Preprocessing module 3 is used to divide the subsequences obtained by the variational mode decomposition algorithm into training samples and test samples and perform normalization processing.
[0149] Model improvement module 4 is used to optimize the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm;
[0150] Model training module 5 is used to reconstruct the CNN-LSTM model using the optimal hyperparameters, and to train it using training samples and make predictions using test samples.
[0151] Prediction module 6 is used to input the subsequences obtained by variational mode decomposition algorithm into the CNN-LSTM model for prediction, and to superimpose the prediction results of the subsequences obtained by variational mode decomposition algorithm to obtain the predicted value of data sharing API call volume.
[0152] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0153] This invention also provides a data sharing API call volume prediction device for implementing the above-described method embodiments. Figure 3 is a schematic diagram of the structure of an embodiment of the data sharing API call volume prediction device of this invention. As shown in Figure 3, the data sharing API call volume prediction device of this embodiment includes a processor 21 and a memory 22, with the processor 21 connected to the memory 22. The processor 21 is used to call and execute a program stored in the memory 22; the memory 22 is used to store the program, which is at least used to execute the data sharing API call volume prediction method in the above embodiments.
[0154] The specific implementation scheme of the data sharing API call volume prediction device provided in this application embodiment can refer to the implementation scheme of the data sharing API call volume prediction method in any of the above embodiments, and will not be repeated here.
[0155] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.
[0156] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.
[0157] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0158] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0159] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0160] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0161] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.
[0162] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0163] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for predicting data sharing API call volume, characterized in that, include: Get data on the number of API calls to the data sharing platform; The sequence of data sharing API call volume data is decomposed using the variational mode decomposition method; The subsequences obtained by the variational mode decomposition algorithm are divided into training samples and test samples and then normalized. Optimize the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm; The CNN-LSTM model is reconstructed using the optimal hyperparameters and trained using the training samples, while the test samples are used for prediction. The subsequences obtained by the variational mode decomposition algorithm are input into the CNN-LSTM model for prediction, and the prediction results of the subsequences obtained by the variational mode decomposition algorithm are superimposed to obtain the predicted value of the data sharing API call volume.
2. The method of claim 1, wherein, The acquisition of data sharing API call volume data includes: Based on the access logs on the data center server, obtain the system access volume for each unit of time within a fixed time interval; Missing system access values for each time unit are filled in by the nearest available value to form preprocessed time series data.
3. The method of claim 2, wherein, The step of using variational mode decomposition to decompose the sequence of data sharing API call volume data includes: The time series data is input into the VMD algorithm, and the number of modes and their initial modal components and center frequencies are set. The VMD algorithm is iterated, and the modal components and center frequency are updated. After each iteration, the VMD algorithm is checked to confirm whether the convergence condition has been met. If so, the VMD algorithm will generate updated modal components and frequency outputs, thereby obtaining a subsequence of the data sharing API call volume data sequence.
4. The method of claim 3, wherein, The step of dividing the subsequences obtained by the variational mode decomposition algorithm into training samples and test samples and performing normalization processing includes: The first 70% of the subsequence of the data sharing API call volume data sequence is used as the training sample, and the last 30% is used as the test sample. The training samples and the test samples are normalized using a calculation formula.
5. The method of claim 4, wherein, The optimization of the hyperparameters of the CNN-LSTM model using the improved particle swarm optimization algorithm includes: Determine the range of parameters to be optimized, including: learning rate, time step, batch size, and number of hidden layer neurons; The population size, number of iterations, learning factor, initial particle position and velocity are determined for the particle swarm optimization algorithm, and the mean square error of the CNN-LSTM model is used as the fitness function. Calculate the fitness of each particle and update the velocity and position of each particle; Update the individual best fitness and position of each particle, and the group's historical best fitness and position; Determine if the maximum number of iterations has been reached; if so, output the parameters corresponding to the historical best fitness value of the population. If not, continue calculating the fitness of each particle and updating the velocity and position of each particle.
6. The method of claim 5, wherein, The process of reconstructing the CNN-LSTM model using optimal hyperparameters, training it with the training samples, and making predictions using the test samples includes: The CNN-LSTM model is reconstructed based on the parameters corresponding to the historical optimal fitness values of the group. The CNN-LSTM model is trained using the training samples and predicted using the test samples.
7. The method of claim 6, wherein, The step of inputting the subsequences obtained by the variational mode decomposition algorithm into the CNN-LSTM model for prediction, and superimposing the prediction results of the subsequences obtained by the variational mode decomposition algorithm to obtain the predicted value of the data sharing API call volume includes: A subsequence of the data sharing API call volume data sequence is input into the CNN-LSTM model; The spatial features of the subsequences of the data sharing API call volume data sequence are extracted through the CNN layer in the CNN-LSTM model, flattened through the flattening layer, and then extracted through the temporal features of the subsequences of the data sharing API call volume data sequence through the LSTM layer composed of multiple hidden layers. The predicted values of the subsequences of the data sharing API call volume data sequence are output through the fully connected layers in the CNN-LSTM model. The predicted values of the subsequences of all the data sharing API call volume data sequences are denormalized and summed to obtain the predicted values of the data sharing API call volume.
8. The method of claim 7, wherein, Also includes: The prediction performance of the CNN-LSTM model is evaluated using mean squared error, mean absolute error, mean absolute percentage error, and coefficient of determination as evaluation metrics. 9.A data sharing API call volume prediction apparatus characterized by comprising: include: The data acquisition module is used to acquire data on the number of calls to the data sharing API. The sequence decomposition module is used to decompose the sequence of the data sharing API call volume data using the variational mode decomposition method; The preprocessing module is used to divide the subsequences obtained by the variational mode decomposition algorithm into training samples and test samples and perform normalization processing. The model improvement module is used to optimize the hyperparameters of the CNN-LSTM model using an improved particle swarm optimization algorithm. The model training module is used to reconstruct the CNN-LSTM model using the optimal hyperparameters, train it using the training samples, and make predictions using the test samples. The prediction module is used to input the subsequences obtained by the variational mode decomposition algorithm into the CNN-LSTM model for prediction, and to superimpose the prediction results of the subsequences obtained by the variational mode decomposition algorithm to obtain the predicted value of the data sharing API call volume.
10. A data sharing API call volume prediction device characterized by, It includes a processor and a memory, wherein the processor is connected to the memory: The processor is used to call and execute the program stored in the memory; The memory is used to store the program, which is at least used to execute the data sharing API call volume prediction method according to any one of claims 1-8.