Service quantity prediction method and device, nonvolatile storage medium and computer equipment
By combining multi-scale decomposition and time convolutional models of historical service volume, the problems of prediction inaccurate due to instability in service volume distribution and multi-factor influence are solved, and a higher accuracy of service volume prediction is achieved.
Patent Information
- Application Number
- CN202411812486.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-04-15
AI Technical Summary
The distribution of service volume is unstable and affected by many factors, resulting in insufficient accuracy of traditional statistical models and machine learning methods in service volume prediction.
By obtaining historical service volume, decompose it into decomposition sequences of different frequency components based on multiple decomposition scales, set up a time convolution model corresponding to each decomposition scale, predict and integrate the prediction results of each decomposition scale to determine the target service volume prediction results.
The accuracy of service volume prediction is improved, and the impact of different factors on service volume is learned from multiple characteristics through multi-scale decomposition, which solves the problem of prediction inaccurate due to service volume distribution and multi-factor influence.
Smart Images

Figure CN119830206A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a service volume prediction method, device, non-volatile storage medium and computer equipment. Background Art
[0002] The distribution of service volume is unstable and often changes due to many factors. At the same time, the service volume series has the characteristics of high noise, non-stationarity, multi-scale and long memory, and has complex correlations with other factors, and contains different characteristic information in different scale sequences. However, in the processing process, traditional statistical models are difficult to model the complex inter-correlations of time series, and the prediction error of non-stationary time series is large; the results of time series prediction models based on machine learning methods have lags, and commonly used deep learning methods, such as RNN, have problems such as gradient explosion / vanishing or lack of memory retention during the modeling process, which makes it have certain defects in prediction performance, and requires a large amount of memory during training and cannot be processed in parallel, resulting in inaccurate service volume prediction.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a service volume prediction method, apparatus, non-volatile storage medium and computer equipment to at least solve the technical problem that the service volume distribution is unstable and is affected by many factors, resulting in inaccurate service volume prediction.
[0005] According to one aspect of an embodiment of the present invention, a service volume prediction method is provided, comprising: obtaining historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; decomposing the historical service volume based on a plurality of preset decomposition scales to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different; setting a time convolution model corresponding to each of the plurality of decomposition scales; inputting the decomposition sequences corresponding to each of the plurality of decomposition scales into the corresponding time convolution model to obtain prediction results corresponding to each of the plurality of decomposition scales; and determining a target service volume prediction result based on the prediction results corresponding to each of the plurality of decomposition scales.
[0006] Optionally, based on a plurality of preset decomposition scales, the historical service volume is decomposed to obtain decomposition sequences corresponding to the plurality of decomposition scales, including: determining an original sequence based on the historical service volume, wherein the original sequence is the historical service volume arranged in a preset time sequence; selecting service volumes that meet a first preset condition from the original sequence to form a reference sequence; subtracting the reference sequence from the original sequence to obtain a target sequence; repeating the above operation of obtaining the target sequence until the target sequence meets a second preset condition, determining the target sequence as a decomposition sequence, wherein the second preset condition is set based on a plurality of decomposition scales; repeating the above operation of obtaining the decomposition sequence until an end condition is met to obtain decomposition sequences corresponding to the plurality of decomposition scales.
[0007] Optionally, time convolution models corresponding to multiple decomposition scales are set, including: obtaining the original time convolution model and the fluctuation feature types corresponding to the multiple decomposition scales; based on the fluctuation feature types corresponding to the multiple decomposition scales, respectively adjusting the parameter values in the original time convolution model to obtain the time convolution models corresponding to the multiple decomposition scales.
[0008] Optionally, decomposition sequences corresponding to multiple decomposition scales are input into respective corresponding time convolution models to obtain prediction results corresponding to the multiple decomposition scales, including: inputting decomposition sequences corresponding to the multiple decomposition scales into respective corresponding time convolution models, and determining dynamic features of the decomposition sequences corresponding to the multiple decomposition scales through the convolution layer in the time convolution model; and performing predictions based on the dynamic features of the decomposition sequences corresponding to the multiple decomposition scales to obtain prediction results corresponding to the multiple decomposition scales.
[0009] Optionally, based on the prediction results corresponding to multiple decomposition scales, the target service volume prediction result is determined, including: determining the component prediction values corresponding to the multiple decomposition scales based on the prediction results corresponding to the multiple decomposition scales; adding the component prediction values corresponding to the multiple decomposition scales to determine the target service volume prediction result.
[0010] Optionally, the temporal convolution model is a combination model of a causal convolutional network and a dilated causal convolutional network.
[0011] According to another aspect of an embodiment of the present invention, a service volume prediction device is also provided, including: an acquisition module for acquiring historical service volume, wherein the historical service volume observation value represents the quantity data of actually processed requests, service events or transactions in a preset historical time period; a decomposition module for decomposing the historical service volume based on a plurality of preset decomposition scales to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different; a setting module for setting time convolution models corresponding to the plurality of decomposition scales; a prediction module for inputting the decomposition sequences corresponding to the plurality of decomposition scales into the respective corresponding time convolution models to obtain the prediction results corresponding to the plurality of decomposition scales; and a determination module for determining the target service volume prediction result based on the prediction results corresponding to the plurality of decomposition scales.
[0012] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is provided, the non-volatile storage medium including a stored program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute any one of the above-mentioned service volume prediction methods.
[0013] According to another aspect of the embodiments of the present invention, a computer device is provided. The computer device includes a processor, and the processor is used to run a program. When the program is run, any one of the above-mentioned service volume prediction methods is executed.
[0014] According to another aspect of the embodiments of the present invention, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, any one of the above-mentioned service volume prediction methods is implemented.
[0015] In an embodiment of the present invention, a service volume prediction method is adopted, by obtaining historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; based on a plurality of preset decomposition scales, the historical service volume is decomposed to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different; a time convolution model corresponding to each of the plurality of decomposition scales is set; the decomposition sequences corresponding to the plurality of decomposition scales are input into the respective corresponding time convolution models to obtain prediction results corresponding to the plurality of decomposition scales; based on the prediction results corresponding to the plurality of decomposition scales, a target service volume prediction result is determined, thereby achieving the purpose of using multi-scale decomposition to learn the influence of different factors on the service volume from multiple features, thereby achieving the technical effect of improving the accuracy of service volume prediction, and further solving the technical problem that the service volume distribution is unstable and is affected by many factors, resulting in inaccurate service volume prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0017] Figure 1 A hardware structure block diagram of a computer terminal for implementing a service volume prediction method is shown;
[0018] Figure 2 is a flow chart of a service volume prediction method provided according to an embodiment of the present invention;
[0019] Figure 3 is a one-dimensional full convolutional network convolution operation diagram of a service volume prediction method provided by an optional embodiment of the present invention;
[0020] Figure 4 is a dilated causal convolution structure diagram with a dilation factor of 2 according to a service volume prediction method provided by an optional embodiment of the present invention;
[0021] Figure 5 It is a structural block diagram of a service volume prediction device provided according to an embodiment of the present invention. DETAILED DESCRIPTION
[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0024] According to an embodiment of the present invention, a method embodiment of a service volume prediction method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0025] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a service volume prediction method. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0026] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0027] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the service volume prediction method in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the () method of the above-mentioned application program is implemented. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0028] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0029] Figure 2 FIG. 1 is a flow chart of a service volume prediction method according to an embodiment of the present invention. Figure 2 As shown, the method comprises the following steps:
[0030] Step S202, obtaining historical service volume, wherein the historical service volume represents the number of actually processed requests, service events or transactions in a preset historical period.
[0031] In this step, the historical service volume can be obtained, that is, the number of actual processed requests, service events or transactions in the historical period. Specifically, the historical service volume refers to the record of the number of service requests processed by the customer service center, website, application or other service provision platform in a certain period of time in the past. These data are usually recorded in a database or log file and may be associated with a specific timestamp (for example, hourly, daily, weekly, etc.) to reflect the service request volume at different time points or time periods. Historical service volume data is the basis for predicting future service demand. It can help analysts and decision makers understand the trend of service requests, seasonal changes, peak and trough periods, and any abnormal events that may affect service volume (such as holidays, promotions, new product launches, etc.). By analyzing historical service volume, a model can be established to predict future service demand, thereby optimizing resource allocation, personnel scheduling and customer service strategies.
[0032] Step S204, based on the preset multiple decomposition scales, the historical service volume is decomposed to obtain decomposition sequences corresponding to the multiple decomposition scales, wherein the frequency components corresponding to the multiple decomposition scales are different.
[0033] In this step, the historical service volume is decomposed based on multiple preset decomposition scales to obtain decomposition sequences corresponding to multiple decomposition scales, which usually involves the use of multi-scale decomposition algorithms in time series analysis. Multi-scale decomposition algorithms may include multi-scale decomposition methods based on empirical mode decomposition (EMD) or ensemble empirical mode decomposition (CEEMD). Among them, the scale can be a time frequency, such as day, week, month, etc. Specifically, a multi-scale decomposition algorithm (such as EMD or CEEMD) decomposes the historical service volume data. The algorithm automatically decomposes the data into a series of IMFs according to the inherent structure of the data, and each IMF reflects the characteristics of the data at different scales. Usually, the first IMF contains high-frequency information, while the subsequent IMFs contain low-frequency information and trend information. According to the needs of the prediction task, select those IMFs that contain the characteristic information required for prediction. For example, if the prediction task focuses on short-term fluctuations in service volume, high-frequency IMFs may be more important; if the focus is on long-term trends, low-frequency IMFs may be more relevant. Use each IMF sequence to train the prediction model and obtain the prediction results. Then, these prediction results are combined to obtain the final prediction sequence. Through the above steps, the complex historical service volume data can be decomposed into multiple sequences with different characteristics at different scales, which helps to deeply understand the fluctuation characteristics of the service volume. In the prediction model, more accurate modeling can be performed for the characteristics of each decomposed sequence, thereby improving the accuracy and stability of the overall prediction.
[0034] Step S206, setting a temporal convolution model corresponding to each of the multiple decomposition scales.
[0035] In this step, because the internal dependence and fluctuation characteristics of sequences of different scales are different, different time convolution models can be set according to multiple decomposition scales, so as to better learn the impact of different factors on service volume. Setting up time convolution models corresponding to multiple decomposition scales mainly involves understanding and adapting to the characteristics of each decomposition scale (i.e., each intrinsic mode function, IMF), and designing the best time convolution architecture for each scale. For example, it is necessary to analyze the characteristics of each IMF sequence obtained by a multi-scale decomposition algorithm (such as EMD or CEEMD), including its fluctuation frequency, stationarity, noise level, long-term and short-term dependence, etc. Set the parameters of the time convolution model according to the characteristics of the IMF. This includes: convolution kernel size (KernelSize), dilation factor (Dilation Rate), residual connection (Residual Connections), number of stacked layers (Number of Stacked Layers), etc., and then build the corresponding time convolution model.
[0036] In practical applications, the design and parameter settings of each TCN model require careful consideration and adjustment to ensure that the model can effectively process sequence features of the corresponding scale. In addition, TCN models can be easily built and trained using deep learning frameworks, which provide tools for implementing causal convolution and dilated convolution, as well as functions for automatically managing deep learning processes such as gradients and backpropagation.
[0037] Step S208: input the decomposition sequences corresponding to the various decomposition scales into the corresponding temporal convolution models to obtain the prediction results corresponding to the various decomposition scales.
[0038] In this step, the decomposition sequences corresponding to the various decomposition scales are input into the corresponding time convolution models (TCN) to obtain the prediction results at each scale. For each decomposition scale sequence (i.e., intrinsic mode function IMF), it can be converted into a format that the model can handle. This usually includes converting the sequence into the appropriate data type, and the sequence needs to be standardized. Make sure that the TCN model parameters (convolution kernel size, dilation factor, residual connection, number of stacking layers, etc.) configured for the sequence of each scale match the characteristics of the scale. Then input the prepared decomposition sequence into the corresponding TCN model for forward propagation to obtain the prediction output of each sequence. The prediction output is usually a numerical prediction of a future time point, which usually needs to be connected to the last known time point of the input sequence to predict the future trend of the sequence. Finally, the model will output the prediction results corresponding to the various decomposition scales.
[0039] Step S210: determining a target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales.
[0040] In this step, the target service volume forecast result is determined according to the forecast results corresponding to the various decomposition scales. For example, according to the requirements of the forecast task, the forecast results of different scales can be weighted averaged, directly added, or integrated using a combination algorithm to obtain the final forecast sequence.
[0041] Through the above steps, the purpose of using multi-scale decomposition to learn the impact of different factors on service volume from multiple features is achieved, thereby achieving the technical effect of improving the accuracy of service volume prediction, and further solving the technical problem of inaccurate service volume prediction caused by unstable service volume distribution and the influence of many factors.
[0042] As an optional embodiment, based on a plurality of preset decomposition scales, the historical service volume is decomposed to obtain decomposition sequences corresponding to the plurality of decomposition scales, including: determining an original sequence based on the historical service volume, wherein the original sequence is the historical service volume arranged in a preset time sequence; selecting service volumes that meet a first preset condition from the original sequence to form a reference sequence; subtracting the reference sequence from the original sequence to obtain a target sequence; repeating the above operation of obtaining the target sequence until the target sequence meets a second preset condition, determining the target sequence as a decomposition sequence, wherein the second preset condition is set based on a plurality of decomposition scales; repeating the above operation of obtaining the decomposition sequence until an end condition is met to obtain decomposition sequences corresponding to the plurality of decomposition scales.
[0043] Optionally, the original sequence can be determined first, and a time series can be constructed from the historical service volume data as the original sequence. This sequence should be arranged in chronological order, and each time point corresponds to a service volume value. Then construct a reference sequence and find all local maxima and local minima in the original time series. Use cubic spline interpolation or piecewise cubic Hermite interpolation polynomials to connect the local maxima and local minima to form an upper envelope and a lower envelope. Calculate the average of the upper envelope and the lower envelope to obtain a reference sequence (local mean). Subtract the reference sequence from the original sequence to obtain a new sequence as the target sequence. Check whether the target sequence meets the first preset condition, which is usually that the difference in the number of zero points and extreme points in the target sequence does not exceed 1, and the average value of the sequence at any time point is close to zero. If the target sequence does not meet the first preset condition, it is regarded as the original sequence and the above steps are repeated. If the target sequence meets the first preset condition but does not meet the second preset condition, it is used as the input sequence of the next decomposition scale. The second preset condition may be based on multiple decomposition scale settings, such as the variance of the sequence is lower than a set threshold, or the sequence becomes monotonic. When the target sequence meets the second preset condition, the sequence is determined as a decomposition sequence, that is, an intrinsic mode function (IMF). The above steps are repeated until all decomposition sequences are extracted, or the remaining sequences meet the final end condition, usually the sequence becomes monotonous or has only one zero point. When the decomposition sequences at all decomposition scales are extracted, or the remaining sequences meet the final end condition, the entire decomposition process ends.
[0044] Specifically, the sequence smoothing algorithm can be used to decompose the observed time series using EMD and CEEMD in the multi-scale decomposition algorithm to decompose the historical observations of service volume and other related sequences. Based on the stable characteristics of the decomposed sequence data, the maximum and minimum values of the sequence are standardized. The specific steps are as follows:
[0045] 1). Determine the original time series All maximum and minimum values;
[0046] 2). Use cubic spline interpolation or piecewise cubic Hermite interpolation polynomial method to construct x according to the maximum and minimum values k (t) upper and lower envelopes;
[0047] 3). Calculate x based on the upper and lower envelopes k The local mean m of (t) 1j (t), using x k (t) minus the local mean m 1j (t) Get the new sequence h 1j (t);
[0048] 4). Use the newly obtained sequence h 1j (t) instead of the original time series x k (t), and repeat the above steps (1)-(3) until h 1j (t) and h 1(j-1) Until the variance of (t) is lower than the set threshold and satisfies the two conditions of IMF. Then the first IMF component IMFs1(t) is h 1j (t), denoted as IMFs1(t)=h 1j (t);
[0049] 5). Through IMFs1(t) and the original sequence x k The subtraction separation of (t) obtains the difference sequence r1(t)=x k (t)-IMFs1(t), filtering high-frequency components in the original sequence;
[0050] 6). Use the differential sequence r1(t) to replace the original sequence x k (t), and repeat the above steps 1-5 until the termination condition is met (usually making the last residual sequence meet monotonicity, or have only one zero point).
[0051] As an optional embodiment, a time convolution model corresponding to each of the multiple decomposition scales is set, including: obtaining the original time convolution model and the fluctuation feature types corresponding to each of the multiple decomposition scales; based on the fluctuation feature types corresponding to each of the multiple decomposition scales, respectively adjusting the parameter values in the original time convolution model to obtain the time convolution models corresponding to each of the multiple decomposition scales.
[0052] Optionally, an original TCN model architecture can be designed. This includes determining the number of convolutional layers, the size of the convolution kernel, the dilation factor, the residual link, the activation function, the loss function, the optimizer and other basic components. Based on the intrinsic mode function (IMF) obtained by the multi-scale decomposition algorithm (such as EMD or CEEMD), the fluctuation characteristics of the sequence at each decomposition scale are analyzed, such as high-frequency or low-frequency fluctuations, stationarity or non-stationarity, noise level, trend characteristics, etc. For each decomposition scale, based on the above fluctuation characteristic analysis, the parameters of the TCN model are selected or adjusted to create a model instance at a specific scale. Among them, the parameters are as follows:
[0053] a. Convolution kernel size (KernelSize): High-frequency sequences may require smaller convolution kernels to capture short-term changes, while low-frequency sequences may require larger convolution kernels to capture long-term changes.
[0054] b. Dilation Factor (DilationRate): The dilation factor controls the receptive field of the model. High-frequency sequences can use a smaller dilation factor, while low-frequency sequences may require a larger dilation factor to expand the model's look-back window to capture longer-distance dependencies.
[0055] c. Residual Connections: Make sure the model contains residual connections to avoid the gradient vanishing problem, especially in the case of deeper models.
[0056] d. Model Depth: The depth of the model can be adjusted according to the complexity of the sequence. For sequences with high non-stationarity or containing complex trends, a deeper model may be required.
[0057] Specifically, the input sequence of the model obtained by multi-scale decomposition is Since the internal dependence and volatility characteristics of each input sequence are different, the IMFs of each component i (i=1,2,…,N) is modeled by the temporal convolutional network TCN.
[0058] For a one-dimensional fully convolutional network, the time series length is T. Now a convolution kernel with a convolution kernel size of 2 is given, and the convolution kernel is used to perform a convolution operation on the data of T time points in the sequence. Figure 3 is a one-dimensional full convolution network convolution operation diagram of a service volume prediction method provided by an optional embodiment of the present invention, such as Figure 3As shown in the figure, the left side of the figure is the convolution operation of a single element. The data of two time points are respectively vector dot producted with the two elements in the convolution kernel and then added to obtain an output. The convolution operation is continued by sliding back. After the convolution operation with a convolution kernel of 2, the data of T time points becomes the data of T-1 time points. Each data is obtained based on the two original data, that is, the current receptive field of the convolution (referring to the number of entries of the original input that affect the output) is 2. Figure 3 As shown in the right figure of . In the field of time series prediction, we cannot use future information, which is "information leakage", so we only add 0 on the left, so that the size of input and output can be guaranteed to remain unchanged, and the output is still T data points.
[0059] For causal convolution, specifically, the sequence problem can be transformed into: according to (x1, x2, ..., x T ) to predict y1,y2,…,y T The definition of causal convolution is, assuming there are K filters F = (f1, f2, ..., f K ), input sequence X = (x1, x2, …, x T ), then in x t The causal convolution at
[0060] Causal convolution has two characteristics. First, it does not consider future information, that is, predicting y t Only the observed sequence (x1, x2, ..., x t ), you cannot use x t+1 ,x t+2 ,…; Second, the longer the history is, the more hidden layers need to be stacked. That is, if you want to make the receptive field larger, you can only increase the number of stacked convolutional layers.
[0061] Because future information cannot be used in time series prediction, convolution operations are all based on causal convolution. Dilated causal convolution achieves the purpose of increasing the receptive field by adding a parameter called dilation rate to the interval value. The dilation rate specifically refers to the interval between the elements involved in the convolution operation when the convolution kernel performs the convolution operation. The dilation rate in the standard convolution operation is 1. Figure 4 is a dilated causal convolution structure diagram with a dilation factor of 2 according to a service volume prediction method provided by an optional embodiment of the present invention, such as Figure 4 The convolution operation is shown when the dilation factor is 2. As defined in the previous section, the definition of dilated convolution is that there are K filters F = (f1, f2, ..., f K ), input sequence X = (x1, x2, …, x T ), then in x t The dilated causal convolution operation with a dilation factor of
[0062] In order to expand the receptive field of the model so as to capture the long-distance dependency information of the sequence, the selection of causal convolution and dilated causal convolution requires multiple layers of stacking to achieve the best effect. When the number of layers is too many, the extra layers beyond the optimal layer are redundant, and the residual connection structure can be selected to introduce into the model. Through the above operations, the temporal convolution model corresponding to various decomposition scales can be obtained.
[0063] As an optional embodiment, decomposition sequences corresponding to multiple decomposition scales are input into respective corresponding time convolution models to obtain prediction results corresponding to the multiple decomposition scales, including: inputting decomposition sequences corresponding to the multiple decomposition scales into respective corresponding time convolution models, and determining dynamic features of the decomposition sequences corresponding to the multiple decomposition scales through the convolution layer in the time convolution model; and performing predictions based on the dynamic features of the decomposition sequences corresponding to the multiple decomposition scales to obtain prediction results corresponding to the multiple decomposition scales.
[0064] Optionally, the decomposition sequences (i.e., intrinsic mode functions, IMFs) corresponding to the various decomposition scales are input into the corresponding time convolutional models (TCNs), specifically, each IMF sequence is input into its corresponding TCN model. The convolutional layer of each model can capture the dynamic characteristics of the sequence, such as trend, periodicity, non-stationarity, and long-term and short-term dependencies. Since each IMF has different volatility characteristics, the parameters of each model (convolution kernel size, dilation factor, number of stacking layers, etc.) should be adjusted according to the characteristics of its input sequence. The convolutional layer convolves the sequence in a sliding window manner, and uses causal convolution and dilated causal convolution to ensure that the model can accurately capture the dynamic characteristics of the sequence without information leakage or dependence on future information. The dynamic characteristics of each IMF sequence are modeled and predicted through the convolutional layers and residual connections in the TCN model. The model outputs the predicted values for future time points, which are calculated based on the dynamic characteristics of the input sequence. For each decomposition scale, a prediction sequence can be obtained, which reflects the prediction results at different scales.
[0065] As an optional embodiment, based on the prediction results corresponding to multiple decomposition scales, the target service volume prediction result is determined, including: based on the prediction results corresponding to each of the multiple decomposition scales, determining the component prediction values corresponding to each of the multiple decomposition scales; adding the component prediction values corresponding to each of the multiple decomposition scales to determine the target service volume prediction result.
[0066] Optionally, at each decomposition scale, the temporal convolutional network (TCN) model generates a forecast sequence, which is the future service volume forecast value corresponding to the IMF (intrinsic mode function). The component forecast values at all decomposition scales are added together to reconstruct the forecast result of the original service volume series. This is because the original series is composed of multiple IMFs of different frequencies. By adding the forecast values of these IMFs, the full range of fluctuation characteristics of the service volume can be captured, including short-term fluctuations, long-term trends, and seasonal changes. Before or after the addition, the component forecast values can also be corrected, such as by performing an inverse transformation (such as inverse normalization or inverse logarithmic transformation) to ensure that they are on the same scale as the original data. In addition, a weighted sum can also be considered, in which the forecast values of different components are assigned different weights according to their fluctuation characteristics or prediction accuracy. The corrected component forecast values are added together to obtain the final target service volume forecast result. This process can be regarded as predicting each component in the frequency domain and then recombining these components in the time domain to generate a complete time series forecast.
[0067] It can capture the complex dynamic characteristics of service volume series from multiple perspectives. Each IMF forecasting model can focus on capturing fluctuations at a specific frequency, and by integrating the forecast results of all IMFs, the model can give a comprehensive service volume forecast, which is usually more accurate than a single model forecast, especially when dealing with non-stationary time series data containing multiple frequency components, avoiding the overfitting problem that may be caused by a single complex model.
[0068] As an optional embodiment, the temporal convolution model is a combination model of a causal convolutional network and a dilated causal convolutional network.
[0069] Optionally, a model that combines causal convolution with dilated causal convolution can make better predictions. Causal convolution ensures that the model does not rely on future information when predicting future values. Dilated causal convolution can effectively expand the receptive field of the model by introducing a dilation factor (Dilation Rate), that is, the length of the input sequence that the model can "see" and use. This allows the model to learn dependencies over longer time spans without increasing the depth of the network or the number of convolutional layers, thereby reducing the number of parameters, reducing training complexity and the risk of overfitting. And TCN can use model parameters more efficiently by using different parameter settings at different time scales. Compared with a single model that tries to fit the fluctuations of the entire time series, TCN (temporal convolution model) can use customized parameters for sequence features of different frequencies, thereby improving prediction accuracy. By using residual connections, TCN can avoid the vanishing or exploding gradient problems that are common when training deep networks. Residual connections allow the model to learn the residual (i.e., difference) of the input data instead of the original value, which helps model training, especially when processing long sequence data.
[0070] In summary, the combined model of causal convolution and dilated causal convolution can effectively handle common challenges in time series prediction, such as avoiding information leakage, expanding the receptive field to capture long-term dependencies, efficient parallel computing, and optimizing gradient propagation, thereby improving the prediction effect.
[0071] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0072] Through the description of the above implementation methods, those skilled in the art can clearly understand that the service volume prediction method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0073] According to an embodiment of the present invention, a service volume prediction device for implementing the above service volume prediction method is also provided. Figure 5 is a structural block diagram of a service volume prediction device provided according to an embodiment of the present invention. Figure 5 As shown, the service volume prediction device includes: an acquisition module 502, a decomposition module 504, a setting module 506, a prediction module 508 and a determination module 510. The service volume prediction device is described below.
[0074] The acquisition module 502 is used to acquire historical service volume, wherein the historical service volume observation value represents the quantity data of actually processed requests, service events or transactions in a preset historical period.
[0075] The decomposition module 504 is connected to the acquisition module 502 and is used to decompose the historical service volume based on a plurality of preset decomposition scales to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different.
[0076] The setting module 506 is connected to the decomposition module 504 and is used to set the temporal convolution model corresponding to each of the multiple decomposition scales.
[0077] The prediction module 508 is connected to the setting module 506 and is used to input the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain the prediction results corresponding to the multiple decomposition scales.
[0078] The determination module 510 is connected to the prediction module 508 and is used to determine the target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales.
[0079] Optionally, the decomposition module is used to decompose the historical service volume based on multiple preset decomposition scales to obtain decomposition sequences corresponding to the multiple decomposition scales, including: determining an original sequence based on the historical service volume, wherein the original sequence is the historical service volume arranged in a preset time sequence; selecting service volumes that meet a first preset condition from the original sequence to form a reference sequence; subtracting the reference sequence from the original sequence to obtain a target sequence; repeating the above operation of obtaining the target sequence until the target sequence meets a second preset condition, determining the target sequence as a decomposition sequence, wherein the second preset condition is set based on multiple decomposition scales; repeating the above operation of obtaining the decomposition sequence until the end condition is met to obtain the decomposition sequences corresponding to the multiple decomposition scales.
[0080] Optionally, a setting module is used to set a time convolution model corresponding to each of the multiple decomposition scales, including: obtaining the original time convolution model and the fluctuation feature types corresponding to each of the multiple decomposition scales; based on the fluctuation feature types corresponding to each of the multiple decomposition scales, adjusting the parameter values in the original time convolution model respectively, to obtain the time convolution models corresponding to each of the multiple decomposition scales.
[0081] Optionally, the prediction module is used to input the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain the prediction results corresponding to the multiple decomposition scales, including: inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to determine the dynamic characteristics of the decomposition sequences corresponding to the multiple decomposition scales through the convolution layer in the time convolution model; and performing prediction based on the dynamic characteristics of the decomposition sequences corresponding to the multiple decomposition scales to obtain the prediction results corresponding to the multiple decomposition scales.
[0082] Optionally, the determination module is used to determine the target service volume prediction result based on the prediction results corresponding to multiple decomposition scales, including: determining the component prediction values corresponding to the multiple decomposition scales based on the prediction results corresponding to the multiple decomposition scales; adding the component prediction values corresponding to the multiple decomposition scales to determine the target service volume prediction result.
[0083] Optionally, the temporal convolution model is a combination model of a causal convolutional network and a dilated causal convolutional network.
[0084] It should be noted that the acquisition module 502, decomposition module 504, setting module 506, prediction module 508 and determination module 510 correspond to steps S202 to S210 in the embodiment, and the examples and application scenarios implemented by the multiple modules and the corresponding steps are the same, but are not limited to the contents disclosed in the above embodiment. It should be noted that the above modules, as part of the device, can be run in the computer terminal 10 provided in the embodiment.
[0085] An embodiment of the present invention may provide a computer device. Optionally, in this embodiment, the computer device may be located in at least one network device among multiple network devices of a computer network. The computer device includes a memory and a processor.
[0086] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the service volume prediction method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned service volume prediction method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0087] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: obtaining historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; decomposing the historical service volume based on multiple preset decomposition scales to obtain decomposition sequences corresponding to the multiple decomposition scales, wherein the frequency components corresponding to the multiple decomposition scales are different; setting time convolution models corresponding to the multiple decomposition scales; inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain the prediction results corresponding to the multiple decomposition scales; and determining the target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales.
[0088] By adopting an embodiment of the present invention, a method for predicting service volume is provided, which obtains historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; decomposes the historical service volume based on a plurality of preset decomposition scales to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different; sets a time convolution model corresponding to each of the plurality of decomposition scales; inputs the decomposition sequences corresponding to the plurality of decomposition scales into the corresponding time convolution model to obtain prediction results corresponding to the plurality of decomposition scales; determines a target service volume prediction result based on the prediction results corresponding to the plurality of decomposition scales, thereby achieving the purpose of using multi-scale decomposition to learn the influence of different factors on the service volume from multiple features, thereby realizing the technical effect of improving the accuracy of service volume prediction, and further solving the technical problem that the service volume distribution is unstable and is affected by many factors, resulting in inaccurate service volume prediction.
[0089] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a non-volatile storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0090] The embodiment of the present invention further provides a non-volatile storage medium. Optionally, in this embodiment, the non-volatile storage medium can be used to store the program code executed by the service volume prediction method provided by the above embodiment.
[0091] Optionally, in this embodiment, the non-volatile storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0092] Optionally, in this embodiment, the non-volatile storage medium is configured to store program code for executing the following steps: obtaining historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; decomposing the historical service volume based on multiple preset decomposition scales to obtain decomposition sequences corresponding to the multiple decomposition scales, wherein the frequency components corresponding to the multiple decomposition scales are different; setting time convolution models corresponding to the multiple decomposition scales; inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain prediction results corresponding to the multiple decomposition scales; and determining the target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales.
[0093] An embodiment of the present invention also provides a computer program product, including a computer program. Optionally, in this embodiment, when the computer program is executed by a processor, it can achieve: obtaining historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; decomposing the historical service volume based on multiple preset decomposition scales to obtain decomposition sequences corresponding to the multiple decomposition scales, wherein the frequency components corresponding to the multiple decomposition scales are different; setting time convolution models corresponding to the multiple decomposition scales; inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain the prediction results corresponding to the multiple decomposition scales; and determining the target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales.
[0094] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0095] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0096] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0097] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0098] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0099] 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 non-volatile storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0100] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A service volume prediction method, characterized in that: include: Obtaining historical service volume, wherein the historical service volume represents the number of requests, service events or transactions actually processed in a preset historical period; Based on a plurality of preset decomposition scales, the historical service volume is decomposed to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different; Setting a temporal convolution model corresponding to each of the multiple decomposition scales; Inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain the prediction results corresponding to the multiple decomposition scales; A target service volume prediction result is determined based on the prediction results corresponding to each of the multiple decomposition scales.
2. The method according to claim 1, characterized in that The decomposing the historical service volume based on the preset multiple decomposition scales to obtain decomposition sequences corresponding to the multiple decomposition scales respectively includes: Determine an original sequence according to the historical service volume, wherein the original sequence is the historical service volume arranged in a preset time sequence; Selecting service volumes that meet a first preset condition from the original sequence to form a reference sequence; Subtracting the reference sequence from the original sequence to obtain a target sequence; Repeat the above operation of obtaining the target sequence until the target sequence satisfies a second preset condition, and then determine that the target sequence is a decomposition sequence, wherein the second preset condition is set based on the multiple decomposition scales; The above operation of obtaining the decomposition sequence is repeated until the end condition is met, and the decomposition sequences corresponding to the multiple decomposition scales are obtained.
3. The method according to claim 1, characterized in that The setting of the temporal convolution models corresponding to the multiple decomposition scales respectively includes: Obtaining the original time convolution model and the fluctuation feature types corresponding to the multiple decomposition scales; Based on the fluctuation feature types corresponding to the multiple decomposition scales, the parameter values in the original time convolution model are adjusted respectively to obtain the time convolution models corresponding to the multiple decomposition scales.
4. The method according to claim 1, characterized in that The step of inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding time convolution models to obtain the prediction results corresponding to the multiple decomposition scales includes: Inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding temporal convolutional models, and determining the dynamic characteristics of the decomposition sequences corresponding to the multiple decomposition scales through the convolutional layers in the temporal convolutional models; Prediction is performed based on the dynamic characteristics of the decomposition sequences corresponding to the multiple decomposition scales to obtain prediction results corresponding to the multiple decomposition scales.
5. The method according to claim 1, characterized in that The step of determining the target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales includes: Determining component prediction values corresponding to the multiple decomposition scales based on the prediction results corresponding to the multiple decomposition scales; The component prediction values corresponding to the multiple decomposition scales are added together to determine the target service volume prediction result.
6. The method according to any one of claims 1 to 5, characterized in that: The temporal convolution model is a combination model of a causal convolutional network and a dilated causal convolution.
7. A service volume prediction device, characterized in that: include: An acquisition module, used to acquire historical service volume, wherein the historical service volume observation value represents the quantity data of actually processed requests, service events or transactions in a preset historical period; A decomposition module, configured to decompose the historical service volume based on a plurality of preset decomposition scales to obtain decomposition sequences corresponding to the plurality of decomposition scales, wherein the frequency components corresponding to the plurality of decomposition scales are different; A setting module, used to set the temporal convolution models corresponding to the multiple decomposition scales; A prediction module, used for inputting the decomposition sequences corresponding to the multiple decomposition scales into the corresponding temporal convolution models, to obtain the prediction results corresponding to the multiple decomposition scales; The determination module is used to determine the target service volume prediction result based on the prediction results corresponding to the multiple decomposition scales.
8. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored program, wherein when the program is executed, the device where the non-volatile storage medium is located is controlled to execute the service volume prediction method according to any one of claims 1 to 6.
9. A computer device, characterized in that: include: Memory and processor, The memory stores a computer program; The processor is used to execute the computer program stored in the memory, and when the computer program is running, the processor executes the service volume prediction method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the service volume prediction method described in any one of claims 1 to 6 is implemented.