Time series data prediction method and device, storage medium and electronic equipment
By using an autocorrelation mechanism-based target prediction model to extract and fuse features from long-series time-series data, the problem of low prediction accuracy for long-series time-series data is solved, and prediction accuracy and computational efficiency are improved.
Patent Information
- Application Number
- CN202611432729.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-27
AI Technical Summary
Existing technologies have low prediction accuracy when processing long time series data, and increase computational and resource consumption, which affects prediction performance.
A target prediction model based on autocorrelation mechanism is adopted to perform feature extraction and feature fusion processing on the time series data to be predicted. It includes an autocorrelation module, a first gated fusion module, a feedforward module, and a second gated fusion module. Through autocorrelation calculation, feature transformation, and feature fusion, the target prediction time series data is output.
It improves the accuracy of prediction for long time series data, reduces computational complexity and inference latency, and enhances the adaptive capture ability and generalization robustness of sudden spikes and nonlinear fluctuations.
Smart Images

Figure CN123180447A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology, and more specifically, to a method and apparatus for time series data prediction, a storage medium, and an electronic device. Background Technology
[0002] Time series forecasting is a technique for analyzing and predicting data arranged in chronological order. It is widely used in scenarios such as financial business data processing and system operation monitoring. Existing time series forecasting methods include statistical models, recurrent neural networks, and deep learning models based on attention mechanisms.
[0003] When processing long time series data, related technologies are affected by factors such as noise, nonlinearity, nonstationarity, and sudden fluctuations in the data, which affects the extraction of effective time series correlation features from historical data and thus reduces the accuracy of prediction results. At the same time, as the length of the input sequence increases, the computational load and resource consumption of some prediction models also increase, further affecting the prediction performance of long time series data.
[0004] When performing long-series time-series data prediction using related technologies, there is a problem of low prediction accuracy, and no effective solution has yet been proposed. Summary of the Invention
[0005] The main objective of this application is to provide a time series data prediction method, apparatus, storage medium, and electronic device to solve the problem of low prediction accuracy when predicting long-sequence time series data in related technologies.
[0006] To achieve the above objectives, according to one aspect of this application, a time series data prediction method is provided. The method includes: acquiring time series data to be predicted, wherein the time series data to be predicted includes financial business characteristic data from multiple historical moments arranged in chronological order; performing feature extraction and feature fusion processing on the time series data to be predicted using a target prediction model to obtain fused features, wherein the target prediction model is obtained by training an initial prediction model based on an autocorrelation mechanism using sample time series data; performing feature transformation and feature fusion processing based on the fused features, and outputting target predicted time series data corresponding to the time series data to be predicted, wherein the target predicted time series data is used to provide data reference for a financial business processing system to perform corresponding financial business processing operations.
[0007] Furthermore, the target prediction model performs feature extraction and feature fusion processing on the time series data to be predicted to obtain fused features, including: inputting the time series data to be predicted into the autocorrelation module of the target prediction model, and performing feature extraction processing on the time series data to be predicted through the autocorrelation module to obtain autocorrelation features; inputting the autocorrelation features and the time series data to be predicted into the first gated fusion module of the target prediction model, and performing feature fusion processing on the autocorrelation features and the time series data to be predicted through the first gated fusion module to obtain fused features.
[0008] Furthermore, the autocorrelation module performs feature extraction processing on the time series data to be predicted, obtaining autocorrelation features including: calculating the autocorrelation of the time series data to be predicted based on multiple time delays to obtain the autocorrelation value corresponding to each time delay, wherein the autocorrelation value is used to characterize the degree of correlation between time series data under different time delays; determining a preset number of target time delays from the multiple time delays based on the autocorrelation values, and determining the aggregation weight corresponding to the target time delay based on the autocorrelation value corresponding to the target time delay; and performing weighted aggregation of the time delay features corresponding to the target time delays based on the aggregation weights to obtain the autocorrelation features, wherein the time delay features are obtained by performing time delay processing on the time series data to be predicted along the time axis based on the target time delays.
[0009] Furthermore, the autocorrelation features and the time series data to be predicted are fused by the first gating fusion module to obtain fused features, including: calculating the first fusion weight corresponding to the autocorrelation features based on the preset parameters of the autocorrelation features and the first gating fusion module; and performing weighted fusion of the autocorrelation features and the time series data to be predicted based on the first fusion weight to obtain fused features.
[0010] Furthermore, based on the fusion features, feature transformation and feature fusion processing are performed to output the target prediction time series data corresponding to the time series data to be predicted, including: inputting the fusion features into the feedforward module of the target prediction model, performing feature transformation processing on the fusion features through the feedforward module to obtain the transformed target features; inputting the target features and fusion features into the second gated fusion module of the target prediction model, performing feature fusion processing on the target features and fusion features through the second gated fusion module to output the target prediction time series data.
[0011] Furthermore, the fused features are transformed by the feedforward module to obtain the transformed target features, including: performing a first linear transformation on the fused features according to the first preset parameters of the feedforward module to obtain a first transformed feature, and performing a nonlinear transformation on the first transformed feature to obtain a second transformed feature; and performing a second linear transformation on the second transformed feature according to the second preset parameters of the feedforward module to obtain the transformed target features.
[0012] Furthermore, the target features and fused features are fused by the second gating fusion module to output target prediction time series data, including: calculating the second fusion weight corresponding to the target features based on the target features and the preset parameters of the second gating fusion module; and performing weighted fusion of the target features and fused features based on the second fusion weight to output target prediction time series data.
[0013] To achieve the above objectives, according to another aspect of this application, a time series data prediction apparatus is provided. The apparatus includes: an acquisition unit for acquiring time series data to be predicted, wherein the time series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order; a first processing unit for performing feature extraction and feature fusion processing on the time series data to be predicted using a target prediction model to obtain fused features, wherein the target prediction model is obtained by training an initial prediction model based on an autocorrelation mechanism using sample time series data; and a second processing unit for performing feature transformation and feature fusion processing based on the fused features, outputting target predicted time series data corresponding to the time series data to be predicted, wherein the target predicted time series data is used to provide data reference for a financial business processing system to perform corresponding financial business processing operations.
[0014] Furthermore, the first processing unit includes: a first processing subunit, used to input the time series data to be predicted into the autocorrelation module of the target prediction model, and to perform feature extraction processing on the time series data to be predicted through the autocorrelation module to obtain autocorrelation features; and a second processing subunit, used to input the autocorrelation features and the time series data to be predicted into the first gated fusion module of the target prediction model, and to perform feature fusion processing on the autocorrelation features and the time series data to be predicted through the first gated fusion module to obtain fused features.
[0015] Further, the first processing subunit includes: a first processing module, used to perform autocorrelation calculation on the time series data to be predicted based on multiple time delays, to obtain an autocorrelation value corresponding to each time delay, wherein the autocorrelation value is used to characterize the degree of correlation between time series data under different time delays; a second processing module, used to determine a preset number of target time delays from the multiple time delays based on the autocorrelation values, and to determine the aggregation weight corresponding to the target time delay based on the autocorrelation values corresponding to the target time delays; and a third processing module, used to perform weighted aggregation on the time delay features corresponding to the target time delays based on the aggregation weights, to obtain autocorrelation features, wherein the time delay features are obtained by performing time delay processing on the time series data to be predicted along the time axis based on the target time delays.
[0016] Furthermore, the second processing subunit includes: a fourth processing module, used to calculate based on the autocorrelation features and the preset parameters of the first gated fusion module to obtain the first fusion weight corresponding to the autocorrelation features; and a fifth processing module, used to perform weighted fusion of the autocorrelation features and the time series data to be predicted based on the first fusion weight to obtain the fused features.
[0017] Furthermore, the second processing unit includes: a third processing subunit, used to input the fused features into the feedforward module of the target prediction model, and to perform feature transformation processing on the fused features through the feedforward module to obtain the transformed target features; and a fourth processing subunit, used to input the target features and fused features into the second gated fusion module of the target prediction model, and to perform feature fusion processing on the target features and fused features through the second gated fusion module to output target prediction time series data.
[0018] Furthermore, the third processing subunit includes: a sixth processing module, used to perform a first linear transformation on the fused features according to the first preset parameters of the feedforward module to obtain a first transformed feature, and to perform a nonlinear transformation on the first transformed feature to obtain a second transformed feature; and a seventh processing module, used to perform a second linear transformation on the second transformed feature according to the second preset parameters of the feedforward module to obtain the transformed target feature.
[0019] Furthermore, the fourth processing subunit includes: an eighth processing module, used to calculate based on the target features and the preset parameters of the second gating fusion module to obtain the second fusion weight corresponding to the target features; and a ninth processing module, used to perform weighted fusion of the target features and the fusion features based on the second fusion weight, and output the target prediction time series data.
[0020] According to another aspect of the present invention, an electronic device is also provided, comprising: a memory storing an executable program; and a processor for running the program, wherein the program executes the time-series data prediction method of any one of the above-mentioned methods during runtime.
[0021] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein the storage medium stores a program, wherein the program controls the device where the storage medium is located to execute the time-series data prediction method described above during runtime.
[0022] In this embodiment, the following steps are employed: acquiring time-series data to be predicted, wherein the time-series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order; performing feature extraction and feature fusion processing on the time-series data to be predicted using a target prediction model to obtain fused features, wherein the target prediction model is obtained by training an initial prediction model based on an autocorrelation mechanism using sample time-series data; performing feature transformation and feature fusion processing based on the fused features to output target predicted time-series data corresponding to the time-series data to be predicted, wherein the target predicted time-series data is used to provide data reference for the financial business processing system to perform corresponding financial business processing operations. This solves the technical problem of low prediction accuracy when predicting long-series time-series data in related technologies.
[0023] In this scheme, a target prediction model based on autocorrelation mechanism is used to extract and fuse features from the time series data to be predicted. This enables the model to adaptively capture the nonlinear and high volatility features in financial business data, reduce the computational complexity and inference delay of long sequence modeling, improve the model's adaptive capture ability and generalization robustness of sudden spikes and nonlinear fluctuations, and improve prediction accuracy. Attached Figure Description
[0024] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0025] Figure 1 A hardware structure block diagram of a computer terminal for implementing a time series data prediction method is shown.
[0026] Figure 2 This is a flowchart of a time-series data prediction method provided according to an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of a time-series data prediction device provided according to an embodiment of this application;
[0028] Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0029] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0030] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0031] It should be noted that the information collected in this application (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) are information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, storage, use, processing, transmission, provision, disclosure, and application of this data all comply with relevant laws, regulations, and standards, and necessary measures have been taken to ensure compliance with public order and good morals. Corresponding access points are provided for users to choose whether to authorize or refuse. For example, interfaces are established between this system and relevant users or organizations, providing users with corresponding access points to choose whether to agree to or refuse automated decision-making results; if the user chooses to refuse, the process proceeds to the expert decision-making stage.
[0032] Example 1
[0033] According to an embodiment of this application, a method embodiment for time series data prediction is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0034] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a time-series data prediction method is shown. Figure 1As shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0035] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0036] 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 time-series data prediction method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned time-series data prediction method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0037] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.
[0038] The display may be a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0039] Under the aforementioned operating environment, this application provides the following: Figure 2 The time series data prediction method shown. Figure 2 This is a flowchart of a time series data prediction method according to Embodiment 1 of this application. The time series data prediction method includes:
[0040] Step S201: Obtain the time series data to be predicted, wherein the time series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order.
[0041] Step S202: The target prediction model performs feature extraction and feature fusion processing on the time series data to be predicted to obtain fused features. The target prediction model is obtained by training an initial prediction model based on autocorrelation mechanism based on the sample time series data.
[0042] Step S203: Based on the fusion features, perform feature transformation and feature fusion processing, and output the target predicted time series data corresponding to the time series data to be predicted. The target predicted time series data is used to provide data reference for the financial business processing system to perform corresponding financial business processing operations.
[0043] Optionally, a time series data prediction system is used as the execution body. The system acquires the time series data to be predicted. This data consists of financial business characteristic data from multiple historical moments arranged in chronological order. For example, complex and dynamic transaction data and time series in transaction logs (such as transaction volume per second, transaction success rate, transaction response time, etc.) are noisy, nonlinear, and highly volatile. In particular, sudden changes in traffic may occur during holidays, promotional activities, or system anomalies. Traditional models are difficult to predict accurately, resulting in delayed system alarms or frequent false alarms.
[0044] Optionally, a pre-trained long-sequence data prediction model based on autocorrelation mechanism (i.e., the target prediction model) is used to extract and fuse features from the time-series data to be predicted, resulting in fused features. This model includes an autocorrelation module, a first-gated fusion module, a feedforward module, and a second-gated fusion module. Its input can be a segment of historical time-series data, such as historical time-series data of financial transactions generated by a financial transaction processing system, and its output is future time-series data predicted based on this historical time-series data. The autocorrelation mechanism refers to calculating the autocorrelation of sequences to filter out periods with higher scores, using these as the basis for mining correlations between sequences. Through progressive decomposition, it can better model complex time patterns.
[0045] Optionally, during the model training phase, sample time-series data for model training is acquired. This sample time-series data can be represented as data from multiple time points arranged in chronological order, with each time point including one or more features, such as financial trading volume, trading success rate, and trading response time. The sample time-series data is input into the autocorrelation module of the initial prediction model. The autocorrelation module performs autocorrelation calculations on the sample time-series data to obtain autocorrelation values corresponding to different time delays. Based on the autocorrelation values, time delays with higher periodic correlation are determined. A preset number of time delays are selected from the determined time delays, and the autocorrelation values corresponding to the selected time delays are normalized to obtain the aggregation weights corresponding to each time delay. The sample time-series data is then subjected to time-delay rolling and weighted aggregation along the time axis based on the aggregation weights to obtain the autocorrelation aggregation result. The autocorrelation aggregation result is input into the first gating fusion module, which contains learnable parameters. and The first gating fusion module, based on the autocorrelation aggregation results, utilizes the data obtained from the current training iteration. and Calculate the fusion weights, and then use the fusion weights to fuse the autocorrelation aggregation results and residual connections to obtain the fusion result. and The parameters will be continuously updated during model training through backpropagation, gradient descent, etc., to learn the ratio of autocorrelation output and residual connections. Finally, after training, a set of definite parameters will be obtained. and .
[0046] Optionally, during the model training phase, the fusion result is input into a feedforward module. This module performs a non-linear mapping on the feature representation at each time step to obtain a feature-transformed representation. The feature-transformed representation is then input into a second gated fusion module. This module contains learnable parameters with the same principle as the first gated fusion module (details omitted here). The second gated fusion module further performs feature selection and information fusion on the feature-transformed representation to obtain a deep feature representation for the prediction task. Based on this deep feature representation, a prediction result is generated. Then, based on the difference between the prediction result and the corresponding target data (i.e., the true label), the learnable parameters in the prediction model are updated, enabling the prediction model to gradually acquire the ability to predict long-sequence time-series data. During model training, the above data processing and parameter update process is repeated until the preset training termination condition is met, thus obtaining a trained prediction model.
[0047] Optionally, the target prediction model further performs feature transformation and feature fusion processing based on the fusion features, thereby outputting the target prediction time series data corresponding to the time series data to be predicted. This data can provide a data reference for the financial business processing system to perform corresponding financial business processing operations. For example, the target prediction time series data can be provided to the financial business processing system so that the system can perform corresponding financial business processing operations based on the target prediction time series data, such as performing financial business status monitoring, abnormal fluctuation alarms, or financial business processing resource scheduling.
[0048] In summary, by using a target prediction model based on autocorrelation mechanism to extract and fuse features from the time series data to be predicted, the nonlinear and high volatility features in financial business data can be adaptively captured. This reduces the computational complexity and inference delay of long sequence modeling, improves the model's adaptive capture ability and generalization robustness for sudden spikes and nonlinear fluctuations, and enhances prediction accuracy.
[0049] Optionally, in the time series data prediction method provided in this application embodiment, the process of extracting and fusing features from the time series data to be predicted by the target prediction model to obtain fused features includes: inputting the time series data to be predicted into the autocorrelation module of the target prediction model, extracting features from the time series data to be predicted by the autocorrelation module to obtain autocorrelation features; inputting the autocorrelation features and the time series data to be predicted into the first gated fusion module of the target prediction model, fusing features from the autocorrelation features and the time series data to be predicted by the first gated fusion module to obtain fused features.
[0050] In an optional embodiment, the time series data to be predicted (such as historical financial transaction time series data) is used. Input the autocorrelation module of the target prediction model, where, Represents the set of real numbers. Indicates time, The system represents features. An autocorrelation module extracts features from the time series data to be predicted, yielding autocorrelation features. This module captures long-term dependencies by mining and aggregating similar, periodically repeating sub-processes in the time series, efficiently capturing long-range periodic dependencies and directly embedding them into the codec architecture. The autocorrelation features and the time series data to be predicted are then input into the first gating fusion module of the target prediction model. This module performs feature fusion processing on the autocorrelation features and the time series data to be predicted, obtaining fused features. This module can then use the input autocorrelation features and trained parameters to... and An adaptive fusion weight is generated, and the fusion ratio between the autocorrelation feature and the original temporal feature is determined using the adaptive fusion weight, thereby dynamically fusing the two types of features to obtain the fused feature.
[0051] By calculating the autocorrelation of a sequence through an autocorrelation mechanism to filter high-scoring periods and aggregate subprocesses, long-range periodic dependencies can be efficiently captured while reducing computational complexity and memory usage, thus solving the resource bottleneck in long sequence modeling. Combined with the first gating fusion module, the fusion ratio of autocorrelation output and original input can be dynamically adjusted using a learnable adaptive weight matrix, which can adaptively enhance periodic effective signals and suppress sudden noise and redundant features in non-stationary sequences, thereby alleviating the gradient vanishing and feature degradation problems in deep networks.
[0052] Optionally, in the time series data prediction method provided in this application embodiment, the autocorrelation module performs feature extraction processing on the time series data to be predicted to obtain autocorrelation features, including: calculating the autocorrelation of the time series data to be predicted based on multiple time delays to obtain an autocorrelation value corresponding to each time delay, wherein the autocorrelation value is used to characterize the degree of correlation between time series data under different time delays; determining a preset number of target time delays from the multiple time delays based on the autocorrelation values, and determining the aggregation weight corresponding to the target time delay based on the autocorrelation value corresponding to the target time delay; and performing weighted aggregation on the time delay features corresponding to the target time delays to obtain autocorrelation features, wherein the time delay features are obtained by performing time delay processing on the time series data to be predicted along the time axis based on the target time delays.
[0053] In an optional embodiment, autocorrelation is calculated on the time series data to be predicted based on multiple time delays to obtain the autocorrelation value corresponding to each time delay. The formula is as follows:
[0054]
[0055] in, Indicates the data length. Indicates time, express Values at a given point in time This indicates the number of steps in the time delay. A higher autocorrelation value indicates a greater time delay. The higher the similarity of the corresponding subsequences.
[0056] In an optional embodiment, a preset number of target time delays are determined from multiple time delays based on autocorrelation values; for example, the time delay with the highest autocorrelation value is selected. A time delay ( ), which is represented as follows:
[0057]
[0058] in, , For hyperparameters, Indicates to The result is rounded down. Indicates time delay Below, the autocorrelation value between the query vector (Query, Q) and the key vector (Key, K).
[0059] In an optional embodiment, the aggregation weights corresponding to the target time delay are determined based on the autocorrelation values corresponding to the target time delay. For example, these... Corresponding autocorrelation value Inputting the SoftMax activation function yields a set of normalized weights. This weight determines its proportion during aggregation, as shown below:
[0060]
[0061] In an optional embodiment, based on the aggregation weight The time delay features corresponding to the target time delay are weighted and aggregated to obtain autocorrelation features. These time delay features are obtained by processing the time series data to be predicted along the time axis based on the target time delay. For example, for each selected time delay... , value sequence Execute scroll ( This operation involves scrolling the sequence backward along the time axis. Step 1. Elements that have scrolled beyond the first position are re-added to the end. Then, all scrolled sequences are processed according to their calculated weights. We perform a weighted summation to obtain the aggregated result, which is the autocorrelation feature. , means as follows:
[0062]
[0063] in, This refers to the process of feature aggregation based on a sequence of queries, keys, and values, using an autocorrelation mechanism.
[0064] By calculating the autocorrelation values under multiple time delays to quantify the correlation of time series data under different delays, and selecting a preset number of target time delays and their corresponding aggregation weights, it is possible to accurately identify and focus on similar subprocesses with significant periodic repetition in the sequence. Then, based on the aggregation weights, the time delay features are weighted and aggregated, which can efficiently capture long-range periodic dependencies, reduce computational complexity and memory usage, and improve the model's processing efficiency and prediction accuracy for long-series time series data.
[0065] Optionally, in the time series data prediction method provided in this application embodiment, the feature fusion processing of autocorrelation features and time series data to be predicted by the first gating fusion module to obtain fused features includes: calculating the first fusion weight corresponding to the autocorrelation features based on the autocorrelation features and the preset parameters of the first gating fusion module; and performing weighted fusion of the autocorrelation features and time series data to be predicted based on the first fusion weight to obtain fused features.
[0066] In an optional embodiment, based on autocorrelation characteristics The preset parameters (i.e., the trained parameters) of the first gating fusion module and The autocorrelation characteristics are calculated. Corresponding first fusion weight Then based on the first fusion weight Autocorrelation characteristics and the time series data to be predicted Weighted fusion is performed to obtain fused features. For example, autocorrelation features are combined. With weight parameters and bias parameters The calculations are performed, and then an adaptive fusion weight matrix is generated using the Sigmoid activation function. This yields the output of the module, namely the fused features. , means as follows:
[0067]
[0068]
[0069] in, This is a gating fusion function, representing the operation process of performing a gating mechanism to fuse two input features.
[0070] By dynamically calculating the first fusion weight based on autocorrelation features and preset parameters, the mixing ratio of autocorrelation features and original time series data to be predicted can be adaptively determined according to the specific content of the input data. This allows for the flexible integration of long-term periodic dependency information while preserving local details of the original sequence. This effectively alleviates the gradient vanishing and feature degradation problems in deep networks, improves the model's ability to filter out sudden noise and redundant features in non-stationary sequence data, and enhances the signal-to-noise ratio of feature representation and its adaptability and robustness to complex nonlinear patterns.
[0071] Optionally, in the time series data prediction method provided in this application embodiment, the process of performing feature transformation and feature fusion processing based on fusion features to output the target predicted time series data corresponding to the time series data to be predicted includes: inputting the fusion features into the feedforward module of the target prediction model, performing feature transformation processing on the fusion features through the feedforward module to obtain the transformed target features; inputting the target features and fusion features into the second gated fusion module of the target prediction model, performing feature fusion processing on the target features and fusion features through the second gated fusion module to output the target predicted time series data.
[0072] In an optional embodiment, the fusion features are... The feedforward module of the target prediction model is input, and the fused features are processed through the feedforward module. The module performs feature transformation processing to obtain the transformed target features. For example, this module performs fusion feature processing. Feature transformation is performed, and the features corresponding to each time step are further processed and enhanced through parameterized high-dimensional feature mapping, thereby outputting enhanced temporal features. (i.e., the transformed target features). Then the target features and fusion features The second gated fusion module inputs the target prediction model and processes the target features. and fusion features The module performs feature fusion processing and outputs target prediction time series data. For example, the module generates a second fusion weight based on the enhanced time series features, and uses the second fusion weight to fuse the enhanced time series features and the fusion features to output the prediction features.
[0073] By inputting the fused features into the feedforward module to perform high-dimensional nonlinear feature transformation to enhance feature representation capabilities, and using the second gated fusion module to adaptively weight and fuse the transformed target features with the original fused features, it is possible to further refine the effective features in the deep layers, alleviate the gradient vanishing problem in deep networks, dynamically balance the contribution ratio of new and old features, thereby improving the model's fitting accuracy for complex nonlinear time series data and its robustness under data distribution changes.
[0074] Optionally, in the time series data prediction method provided in this application embodiment, the transformation of the fused features by the feedforward module to obtain the transformed target features includes: performing a first linear transformation on the fused features according to the first preset parameters of the feedforward module to obtain a first transformed feature, and performing a nonlinear transformation on the first transformed feature to obtain a second transformed feature; and performing a second linear transformation on the second transformed feature according to the second preset parameters of the feedforward module to obtain the transformed target features.
[0075] In an optional embodiment, the feedforward module performs in-depth processing and enhancement of the feature representation at each time step through independent, nonlinear, and high-dimensional mapping, complementing the autocorrelation mechanism that captures dependencies between sequences to jointly build sequence modeling capabilities. Firstly, based on the first preset parameters of the feedforward module (… and ) on fusion features Perform the first linear transformation, which is to fuse the features. With parameters Perform a linear transformation (matrix multiplication) and add parameters. Thus, the first transformation feature (represented as) is obtained. ), and then the first transformation feature ( A nonlinear transformation is performed, such as through the ReLU activation function, which retains positive values and sets negative values to zero, thus obtaining the second transformation feature (represented as...). ), and then based on the second preset parameter of the feedforward module ( and ) for the second transformation feature ( Perform a second linear transformation on the second transformation feature ( ) and parameters Perform a linear transformation (matrix multiplication) and add parameters. Thus, the transformed target features are obtained. The formula is as follows:
[0076]
[0077] in, , The weight parameter matrix, , For the bias parameter matrix, This represents the hidden layer dimension in a feedforward network (i.e., a feedforward module), for example, .
[0078] By sequentially executing the first linear transformation, nonlinear transformation, and second linear transformation through the feedforward module, a high-dimensional nonlinear mapping mechanism can be constructed to deeply process and enhance the fused features, thereby capturing the complex nonlinear dependencies in the data. This complements the autocorrelation mechanism and together improves the model's overall modeling ability for time-series data and the richness of feature representation.
[0079] Optionally, in the time series data prediction method provided in this application embodiment, the target feature and the fused feature are fused by the second gating fusion module to output the target prediction time series data, including: calculating the second fusion weight corresponding to the target feature based on the target feature and the preset parameters of the second gating fusion module; and performing weighted fusion of the target feature and the fused feature based on the second fusion weight to output the target prediction time series data.
[0080] In an optional embodiment, based on target features The target features are obtained by calculating the preset parameters of the second gating fusion module (learnable parameters with the same principle as the first gating fusion module). The corresponding second fusion weight (refer to the calculation process of the first gating fusion module, which will not be elaborated here), and then the target features are processed according to the second fusion weight. and fusion features Perform weighted fusion to output target prediction time series data. , means as follows:
[0081]
[0082] By dynamically calculating the second fusion weight based on the target features and preset parameters, the mixing ratio of deep transformation features and shallow fusion features can be adaptively determined. This enhances the depth and purity of feature representation while preserving the effective information of the intermediate layers, effectively alleviating the gradient vanishing and feature degradation problems in deep networks. The dual-gated fusion makes each layer of the model a powerful feature extractor, capable of performing more complex nonlinear transformations and feature selections. Its learning objective is to learn the deep representation that is most useful for the final prediction task.
[0083] By employing an autocorrelation mechanism, long-range periodic dependency information can be effectively extracted, and the feature fusion ratio can be dynamically adjusted according to the input sequence. This improves the accuracy and stability of prediction for long-series time-series data, reduces computational complexity, and solves the problems of high computational complexity leading to memory overflow and high inference latency. It enables the model to support modeling with longer historical windows under hardware resource constraints, improving inference speed and throughput, meeting the low-latency computing requirements of streaming big data scenarios, and enhancing the internal performance of the computer. By constructing a dual-gated fusion module and utilizing a learnable adaptive weight matrix, feature selection and information retention are performed after autocorrelation calculation and after the feedforward network, respectively, solving the gradient vanishing and feature degradation problems in deep networks and improving the purity of feature representation. The gating mechanism can also dynamically adjust the fusion ratio of new and old features, enabling the model to respond sensitively to abrupt changes in non-stationary sequence data, avoiding model failure due to changes in data distribution, and improving the robustness of the system in complex environments. This allows for reliable and accurate prediction of sequence data with high noise, nonlinearity, and volatility.
[0084] The time-series data prediction method provided in this application includes the following steps: acquiring time-series data to be predicted, wherein the time-series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order; performing feature extraction and feature fusion processing on the time-series data to be predicted using a target prediction model to obtain fused features, wherein the target prediction model is obtained by training an initial prediction model based on an autocorrelation mechanism using sample time-series data; performing feature transformation and feature fusion processing based on the fused features, and outputting target predicted time-series data corresponding to the time-series data to be predicted, wherein the target predicted time-series data is used to provide data reference for the financial business processing system to perform corresponding financial business processing operations. This method solves the technical problem of low prediction accuracy when predicting long-series time-series data in related technologies.
[0085] In this scheme, a target prediction model based on autocorrelation mechanism is used to extract and fuse features from the time series data to be predicted. This enables the model to adaptively capture the nonlinear and high volatility features in financial business data, reduce the computational complexity and inference delay of long sequence modeling, improve the model's adaptive capture ability and generalization robustness of sudden spikes and nonlinear fluctuations, and improve prediction accuracy.
[0086] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0087] Example 2
[0088] This application also provides a time series data prediction apparatus. It should be noted that the time series data prediction apparatus of this application can be used to execute the time series data prediction method provided in this application. The time series data prediction apparatus provided in this application is described below.
[0089] According to embodiments of this application, a time series data prediction apparatus for implementing the above-described time series data prediction method is also provided, such as... Figure 3 As shown, the device includes: an acquisition unit 301, a first processing unit 302, and a second processing unit 303.
[0090] The acquisition unit 301 is used to acquire the time series data to be predicted, wherein the time series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order.
[0091] The first processing unit 302 is used to perform feature extraction and feature fusion processing on the time series data to be predicted through the target prediction model to obtain fused features. The target prediction model is obtained by training an initial prediction model based on autocorrelation mechanism based on the sample time series data.
[0092] The second processing unit 303 is used to perform feature transformation and feature fusion processing based on the fusion features, and output the target predicted time series data corresponding to the time series data to be predicted. The target predicted time series data is used to provide data reference for the financial business processing system to perform corresponding financial business processing operations.
[0093] Optionally, in the time series data prediction apparatus provided in this application embodiment, the first processing unit includes: a first processing subunit, used to input the time series data to be predicted into the autocorrelation module of the target prediction model, and to perform feature extraction processing on the time series data to be predicted through the autocorrelation module to obtain autocorrelation features; and a second processing subunit, used to input the autocorrelation features and the time series data to be predicted into a first gated fusion module of the target prediction model, and to perform feature fusion processing on the autocorrelation features and the time series data to be predicted through the first gated fusion module to obtain fused features.
[0094] Optionally, in the time series data prediction apparatus provided in this application embodiment, the first processing subunit includes: a first processing module, configured to perform autocorrelation calculation on the time series data to be predicted based on multiple time delays to obtain an autocorrelation value corresponding to each time delay, wherein the autocorrelation value is used to characterize the degree of correlation between time series data under different time delays; a second processing module, configured to determine a preset number of target time delays from the multiple time delays based on the autocorrelation values, and determine the aggregation weight corresponding to the target time delay based on the autocorrelation values corresponding to the target time delays; and a third processing module, configured to perform weighted aggregation on the time delay features corresponding to the target time delays based on the aggregation weights to obtain autocorrelation features, wherein the time delay features are obtained by performing time delay processing on the time series data to be predicted along the time axis based on the target time delays.
[0095] Optionally, in the time series data prediction device provided in this application embodiment, the second processing subunit includes: a fourth processing module, used to calculate based on the autocorrelation feature and the preset parameters of the first gated fusion module to obtain the first fusion weight corresponding to the autocorrelation feature; and a fifth processing module, used to perform weighted fusion of the autocorrelation feature and the time series data to be predicted based on the first fusion weight to obtain the fused feature.
[0096] Optionally, in the time series data prediction apparatus provided in this application embodiment, the second processing unit includes: a third processing subunit, used to input the fused features into the feedforward module of the target prediction model, and perform feature transformation processing on the fused features through the feedforward module to obtain the transformed target features; and a fourth processing subunit, used to input the target features and the fused features into the second gated fusion module of the target prediction model, and perform feature fusion processing on the target features and the fused features through the second gated fusion module to output the target prediction time series data.
[0097] Optionally, in the time series data prediction device provided in the embodiments of this application, the third processing subunit includes: a sixth processing module, used to perform a first linear transformation on the fused features according to the first preset parameters of the feedforward module to obtain a first transformed feature, and to perform a nonlinear transformation on the first transformed feature to obtain a second transformed feature; and a seventh processing module, used to perform a second linear transformation on the second transformed feature according to the second preset parameters of the feedforward module to obtain the transformed target feature.
[0098] Optionally, in the time series data prediction device provided in this application embodiment, the fourth processing subunit includes: an eighth processing module, used to calculate based on the target features and the preset parameters of the second gating fusion module to obtain the second fusion weight corresponding to the target features; and a ninth processing module, used to perform weighted fusion of the target features and the fusion features based on the second fusion weight, and output the target prediction time series data.
[0099] It should be noted that the acquisition unit 301, the first processing unit 302, and the second processing unit 303 mentioned above correspond to steps S201 to S203 in Embodiment 1. The three units and the corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules or units can be hardware or software components stored in memory (e.g., memory 104) and processed by one or more processors (e.g., processors 102a, 102b, ..., 102n). The above units can also be part of a device and run in the computer terminal 10 provided in Embodiment 1.
[0100] Example 3
[0101] Embodiments of this application may provide an electronic device. Figure 4 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 4 As shown, the electronic device may include: one or more ( Figure 4 (Only one is shown) processor 402, memory 404, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0102] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the methods and apparatus in the embodiments of this application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the above-described methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0103] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. Electronic devices can also be smartphones, tablets, handheld computers, mobile internet devices (MIDs), PADs, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, electronic devices may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.
[0104] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0105] Example 4
[0106] Embodiments of this application also provide a computer-readable storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the time-series data prediction method provided in Embodiment 1.
[0107] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.
[0108] This application also provides a computer program product that, when executed on a data processing device, is suitable for performing steps of a time-series data prediction method.
[0109] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0110] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0111] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0112] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0113] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0114] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0115] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A method for predicting time series data, characterized in that, include: Obtain the time series data to be predicted, wherein the time series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order; The target prediction model is used to extract and fuse features from the time series data to be predicted to obtain fused features. The target prediction model is obtained by training an initial prediction model based on autocorrelation mechanism based on the sample time series data. Based on the fusion features, feature transformation and feature fusion processing are performed to output the target predicted time series data corresponding to the time series data to be predicted. The target predicted time series data is used to provide data reference for the financial business processing system to perform corresponding financial business processing operations.
2. The method according to claim 1, characterized in that, The target prediction model is used to extract and fuse features from the time series data to be predicted, resulting in fused features including: The time series data to be predicted is input into the autocorrelation module of the target prediction model, and the autocorrelation module performs feature extraction processing on the time series data to be predicted to obtain autocorrelation features. The autocorrelation features and the time series data to be predicted are input into the first gated fusion module of the target prediction model. The first gated fusion module performs feature fusion processing on the autocorrelation features and the time series data to be predicted to obtain the fused features.
3. The method according to claim 2, characterized in that, The autocorrelation module performs feature extraction processing on the time series data to be predicted, and the resulting autocorrelation features include: The autocorrelation of the time series data to be predicted is calculated based on multiple time delays to obtain the autocorrelation value corresponding to each time delay. The autocorrelation value is used to characterize the degree of correlation between time series data under different time delays. Based on the autocorrelation value, a preset number of target time delays are determined from the plurality of time delays, and based on the autocorrelation value corresponding to the target time delay, the aggregation weight corresponding to the target time delay is determined; The time delay features corresponding to the target time delay are weighted and aggregated according to the aggregation weight to obtain the autocorrelation features, wherein the time delay features are obtained by performing time delay processing on the time series data to be predicted along the time axis according to the target time delay.
4. The method according to claim 2, characterized in that, The autocorrelation features and the time series data to be predicted are fused using the first gated fusion module to obtain the fused features, which include: The first fusion weight corresponding to the autocorrelation feature is obtained by calculating based on the autocorrelation feature and the preset parameters of the first gated fusion module; The autocorrelation feature and the time series data to be predicted are weighted and fused according to the first fusion weight to obtain the fused feature.
5. The method according to claim 1, characterized in that, Based on the fusion features, feature transformation and feature fusion processing are performed to output the target predicted time series data corresponding to the time series data to be predicted, including: The fused features are input into the feedforward module of the target prediction model, and the feedforward module performs feature transformation processing on the fused features to obtain the transformed target features; The target features and the fused features are input into the second gated fusion module of the target prediction model. The second gated fusion module performs feature fusion processing on the target features and the fused features, and outputs the target prediction time series data.
6. The method according to claim 5, characterized in that, The feedforward module performs feature transformation processing on the fused features to obtain the transformed target features, including: The fusion features are subjected to a first linear transformation based on the first preset parameters of the feedforward module to obtain a first transformed feature, and the first transformed feature is subjected to a nonlinear transformation to obtain a second transformed feature. The second transformed feature is subjected to a second linear transformation based on the second preset parameters of the feedforward module to obtain the transformed target feature.
7. The method according to claim 5, characterized in that, The second gating fusion module performs feature fusion processing on the target features and the fused features, and outputs the target prediction time series data, including: The second fusion weight corresponding to the target feature is obtained by calculation based on the target feature and the preset parameters of the second gated fusion module; The target feature and the fusion feature are weighted and fused according to the second fusion weight to output the target prediction time series data.
8. A time-series data prediction device, characterized in that, include: An acquisition unit is used to acquire time series data to be predicted, wherein the time series data to be predicted includes financial business characteristic data of multiple historical moments arranged in chronological order; The first processing unit is used to perform feature extraction and feature fusion processing on the time series data to be predicted through the target prediction model to obtain fused features, wherein the target prediction model is obtained by training an initial prediction model based on autocorrelation mechanism based on the sample time series data; The second processing unit is used to perform feature transformation and feature fusion processing based on the fusion features, and output the target predicted time series data corresponding to the time series data to be predicted, wherein the target predicted time series data is used to provide data reference for the financial business processing system to perform corresponding financial business processing operations.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the computer-readable storage medium resides to perform the time-series data prediction method according to any one of claims 1 to 7.
10. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program executes the time-series data prediction method according to any one of claims 1 to 7.
