Multi-scale financial data prediction method based on sequence decomposition, program, equipment and storage medium

Through the multi-scale decomposition and adaptive fusion method, financial data is decomposed into long-term trends and short-term seasonal terms, and the self-attention mechanism is used to model global correlation, solving the problem of insufficient utilization of multi-scale characteristics of financial data and achieving higher-precision financial data prediction.

CN120408077APending Publication Date: 2025-08-01HARBIN ENG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510470923.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-15
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

Existing financial data prediction methods are difficult to fully capture multi-scale features and complex relationships in financial data, especially in dealing with local features and global correlations, and failing to effectively utilize global information of timestamps.

Method used

The multi-scale decomposition method is used to decompose financial data into long-term trend terms and short-term seasonal terms, and predictions are made separately. Combined with the attention-based adaptive fusion module, the global correlation of seasonal terms is modeled through the self-attention mechanism, and the fusion weight of global and local information is dynamically adjusted.

Benefits of technology

It significantly improves the accuracy of financial data prediction, can better capture multi-scale features and complex relationships in financial data, and reduces the impact of data drift problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120408077A_ABST
    Figure CN120408077A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-scale financial data prediction method based on sequence decomposition, a program, equipment and a storage medium, and belongs to the field of computer deep learning. According to the model, an embedded module and a seasonal item prediction module are improved on the basis of an MICN model, and an attention-based adaptive fusion prediction module is added on the basis of the embedded module and the seasonal item prediction module. A multi-scale convolution model is designed for the seasonal item prediction module, local features in short-term fluctuation are captured through convolution kernels of different scales, and meanwhile modeling is conducted on global correlation in seasonal items through a self-attention mechanism. And meanwhile, an attention-based adaptive fusion prediction method is introduced for fully utilizing global information in a timestamp. The prediction model provided by the invention has a remarkable technical effect, and the accuracy of financial data prediction can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer deep learning; specifically, it relates to a multi-scale financial data prediction method, program, device, and storage medium based on sequence decomposition. Background Art

[0002] Financial data prediction is an important technology that can use historical financial data to predict the changing trends of future financial data. In the context of the globalization and informatization era, the volatility and complexity of the financial market have been increasing day by day, so the importance of financial data prediction has become even more prominent.

[0003] Traditional financial data analysis methods mainly rely on statistical models, such as autoregressive models (AR), moving average models (MA), autoregressive integrated moving average models (ARIMA), and more complex vector models such as generalized autoregressive conditional heteroskedasticity models (GARCH). To a certain extent, these methods can capture some characteristics of financial time series, such as trendiness, periodicity, etc. However, they usually assume that financial data is linear or the conditional mean is constant, so it is difficult to fully describe the complex non-linear relationships and non-stationary characteristics in financial data.

[0004] With the rapid development of deep learning technology, new breakthroughs have been made in the field of financial data prediction. Models such as recurrent neural networks (RNN), long short-term memory networks (LSTM), convolutional neural networks (CNN), and Transformer have received extensive attention due to their superiority in processing sequence data. The introduction of these technologies has provided new ideas and methods for financial data prediction, enabling prediction models to better adapt to the complexity and dynamics of the financial market, and providing more accurate decision-making support for investors, policymakers, and regulatory agencies.

[0005] However, although deep learning methods have shown significant advantages in financial data prediction, these methods still have inherent limitations. For example, when processing sequence data, CNN usually relies on pooling layers to reduce the dimensionality of data and extract key features. However, the operations of pooling layers often ignore the mutual relationship between sequence segments and the overall context, resulting in the loss of local information and the destruction of the global structure. Another example is that although the Transformer model performs well in capturing global correlations, the design of its self-attention mechanism makes it more inclined to focus on global dependencies in the sequence, while it performs relatively poorly in modeling local features. In addition, timestamps, as an important part of financial time series, have rich global information. However, most existing methods cannot make full use of timestamps for prediction.

[0006] In summary, future work needs to further study, based on existing methods, how to design more suitable financial prediction methods according to the characteristics of financial data, combining the advantages of different models, in order to better capture the multi-scale features and complex relationships in financial data. Summary of the Invention

[0007] The object of the present invention is to design a method that makes full use of local features and global correlations in financial data to obtain accurate and reliable financial data prediction results. First, the financial historical data is decomposed into a long-term trend term and a short-term seasonal term through a multi-scale decomposition method, and predictions are made respectively for the characteristics. Finally, the prediction results of the long-term trend term and the short-term seasonal term are fused, combining local feature and global correlation information to obtain the final prediction result. Moreover, for the data drift and online concept drift problems encountered in the dynamically changing financial market, the present invention also conducts in-depth analysis and designs solutions. This method captures global dependencies by separately modeling time stamps and adaptively adjusts the fusion weight of global and local information.

[0008] The present invention provides a multi-scale financial data prediction method based on sequence decomposition. The financial data X based on time series is input into a pre-trained new MDC-Net model after padding preprocessing; the new MDC-Net model is based on the MICN model and introduces an attention-based adaptive fusion prediction method; the new MDC-Net model includes a multi-scale sequence decomposition module and an attention-based adaptive fusion module;

[0009] The multi-scale sequence decomposition module decomposes the input financial data X into independent trend terms and seasonal terms. The decomposed trend term data and seasonal term data will be respectively input into the trend term prediction module and the seasonal term prediction module; the trend term prediction module and the seasonal term prediction module perform modeling and prediction according to the characteristics of the trend term data and the seasonal term data, and then add the prediction results of the two modules to obtain a relatively local prediction result

[0010] The attention-based adaptive fusion module maps the historical time stamp feature and the future time stamp feature in the input financial data X into an initial historical mapping through an attention-based mapper respectively and an initial future mapping Then the denormalizer denormalizes based on the output of the mapper into and Finally, the adaptive combiner will dynamically adjust the global mapping within the prediction window according to the difference between the final mapping and the actual observation X and the local prediction result obtained through the multi-scale prediction model based on sequence decomposition The combined weights are used to obtain the final prediction result Y.

[0011] Further, the multi-scale sequence decomposition module is specifically as follows: First, the preprocessed financial data after padding is subjected to multi-kernel average pooling operation, and then the results of all multi-kernel average pooling operations are averaged to obtain the trend term X t , and finally the seasonal term X is obtained by subtracting the trend component from the original sequence s ;

[0012]

[0013] X t = mean(A1, A2, …, A n )

[0014] X s = X - X t

[0015] where A n is the output result of the multi-kernel average pooling operation; AvgPool represents the average pooling operation; Padding represents the sequence padding operation; kernel represents the kernel size of the average pooling.

[0016] Further, the trend term prediction module uses the linear regression method to predict the long-term trend sequence, and is designed as follows:

[0017] Y t = Regression(X t )

[0018] where Y t is the trend term prediction result; Regression represents the linear regression operation.

[0019] Further, the seasonal prediction module includes a preprocessing embedding module and a local-global module; the preprocessing embedding module first concatenates the input seasonal term data with a zero vector, and then performs a value embedding operation and a time feature embedding operation on the concatenated data to convert the time feature into a low-dimensional embedding representation;

[0020]

[0021] where Embedding is the embedding operation; Concat is the concatenation operation; X0 is the zero vector, is the output result of the embedding module;

[0022] The local-global module includes a multi-scale convolutional model, which captures local features in the seasonal term fluctuations through convolutional kernels of different scales, and at the same time models the global correlation in the seasonal term through the self-attention mechanism.

[0023] Y s,l = MultiScaleConv(Y S,l-1 ), l ∈ {1, 2, …, N}

[0024] Y s = Truncate(Projection(Y s,N ))

[0025] where MultiScaleConv is a multi-scale feature extraction module; Y s,l is the output of the multi-scale feature extraction module at the l-th layer, l ∈ {1, 2, …, N}, Y s,N is the output of the N-th multi-scale feature extraction module; Truncate is a truncation operation; Projection is a projection operation; Y s is the seasonal term prediction result.

[0026] Furthermore, the specific operation of mapping the attention-based mapper to the initial historical mapping and the initial future mapping is as follows:

[0027] Step 1.1: Tokenize the historical timestamps and future timestamps in the financial data X that have not been fully utilized through the embedding layer of the mapper; the embedding layer includes a linear layer;

[0028]

[0029] where P is the historical timestamp; F is the future timestamp;

[0030] Step 1.2: Interact the outputs obtained from the embedding layer through the attention blocks respectively, and the process is as follows:

[0031]

[0032] where is the output of the historical timestamp of the embedding layer; is the output of the future timestamp of the embedding layer;

[0033] Step 1.3: Use the projection layer for the outputs of the attention blocks to obtain the initial mappings of the historical timestamps and future timestamps; the projection layer includes a linear layer;

[0034]

[0035] where is the output of the historical timestamp of the attention block; is the output of the future timestamp of the attention block.

[0036] Further, the obtaining of the inverse normalization mapping and is that the inverse normalizer, based on the median and quantile deviations between the initial historical mapping output by the mapper and the actual observed financial data X within the historical window, inverse normalizes the initial mapping and into and

[0037]

[0038] wherein, and are respectively the quantile ranges of the initial mapping of each channel and the actual observed value X, that is, the distance between the q - quantile and the 1 - q - quantile; and are respectively the median of the initial mapping of each channel and the actual observed value X.

[0039] Further, the specific operation of the adaptive combiner is as follows:

[0040] Step 2.1: Input the deviation between the mapping and the actual observed financial data X into a multi - layer perceptron to obtain the combination weight W;

[0041]

[0042] MLP(·) = Softmax(ReLU((·)×W h +b h ))

[0043] wherein, MLP is the multi - layer perceptron; W h represents the weight matrix of the hidden layer, b h represents the bias vector of the hidden layer; ReLU is the activation function, defined as ReLU(x)=max(0,x);

[0044] Step 2.2: Perform a concatenation operation on the global mapping and the local prediction , multiply the result obtained by the concatenation through the combination weight W, and then sum over the last dimension to obtain the final prediction result Y:

[0045]

[0046] The present invention also provides a computer device / apparatus / system, including a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, the steps of the multi-scale financial data prediction method based on sequence decomposition described in any one of the above are implemented.

[0047] The present invention also provides a computer-readable storage medium, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the steps of the multi-scale financial data prediction method based on sequence decomposition described in any one of the above are implemented.

[0048] The present invention also provides a computer program product, including a computer program / instruction. When the computer program / instruction is executed by a processor, the steps of the multi-scale financial data prediction method based on sequence decomposition described in any one of the above are implemented.

[0049] The beneficial effects of the present invention are as follows:

[0050] The present invention proposes a multi-scale adaptive fusion prediction model MDC-Net based on sequence decomposition. This model improves the embedding module and the seasonal term prediction module on the basis of the MICN model, and adds an attention-based adaptive fusion prediction module on this basis. Specifically, the model first adopts a multi-scale sequence decomposition module, and this decomposition method can effectively separate the long-term trend and short-term fluctuations in the data. For the long-term trend term, a linear regression model is used for prediction. For the short-term seasonal term, the present invention designs a multi-scale convolution model to capture local features in short-term fluctuations through convolution kernels of different scales, and at the same time models the global correlation in the seasonal term through a self-attention mechanism. In addition, in order to make full use of the global information in the timestamp, an attention-based adaptive fusion prediction method is introduced. The prediction model proposed by the present invention has significant technical effects and can effectively improve the accuracy of financial data prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 It is the overall structure diagram of the model of the multi-scale financial data prediction method based on sequence decomposition of the present invention;

[0052] Figure 2 It is the local-global module structure diagram of the multi-scale financial data prediction method based on sequence decomposition of the present invention;

[0053] Figure 3 It is the comparison performance experiment result of the method of the present invention with other methods;

[0054] Figure 4 It is the comparison visualization result of the method of the present invention with other methods. DETAILED DESCRIPTION OF THE INVENTION

[0055] The present invention will be further described below with reference to the accompanying drawings.

[0056] The present invention discloses a multi-scale financial data prediction method based on sequence decomposition. This method adopts a new model of MDC-Net. The new model of MDC-Net is based on the MICN model and introduces an attention-based adaptive fusion prediction method. Its overall structure is as Figure 1 , and the model specifically includes the following modules:

[0057] Multi-scale sequence decomposition module: First, in order to maintain the consistency of its length, we use a padding operation to pad the sequence. Next, in order to effectively separate financial data at different scales into independent trend terms and seasonal terms, we perform a multi-kernel average pooling operation on the padded financial sequence data. Next, a simple average operation is performed on the results of all multi-kernel average pooling operations. Through this step, the decomposed trend term can be obtained. Finally, the seasonal term is obtained by subtracting the trend component from the original sequence.

[0058] Trend term prediction module: The linear regression method is used to predict the long-term trend sequence.

[0059] Seasonal term prediction module: It includes a preprocessing embedding module and a local-global module.

[0060] Preprocessing embedding module: In order to better capture and utilize the multi-scale features in the sequence data, we propose a preprocessing embedding module. This module can map the original data to a continuous, low-dimensional vector space through preprocessing embedding operations on the seasonal term sequence obtained from the previous decomposition operation, and provide a richer and more meaningful input data representation for subsequent prediction tasks. Specifically, first, we concatenate the input data with a zero vector. Next, value embedding operations are performed on the concatenated data first. Next, time feature embedding operations are performed. By converting time features (such as hours, minutes, seconds, etc.) into low-dimensional embedding representations, the model can better understand and utilize time information. The specific process is as follows:

[0061] Local-global module: As Figure 2 shown, this module consists of two key modules: a local module and a global module. The main function of the local module is to aggregate local features. It captures local patterns and details in the sequence by performing convolution operations on the input sequence using convolution kernels of different scales. Corresponding to the local module, the role of the global module is to model the relationships between all local features. This module can identify and emphasize the interconnections and dependencies between different local features by applying the self-attention mechanism technology, thereby constructing a global feature representation. The steps are as follows:

[0062] 1) Time series padding and pooling operations: Input First, it is sent to the local module for local feature extraction. Specifically, first, a padding operation is performed to keep the sequence length unchanged during the pooling process. Then, an average pooling operation is adopted. The average pooling uses a window with a kernel size of k to slide over the sequence and calculates the average value of the elements within the window, thereby obtaining the pooled feature B k .

[0063] 2) Local feature extraction: For the pooled feature B k a one-dimensional convolution operation is adopted to perform local feature extraction at different scales. The one-dimensional convolution uses a convolution kernel with both the kernel size and the stride size of k for downsampling. This operation effectively reduces the length of the input sequence to 1 / k of the original, thereby aggregating the features of every k adjacent time points into a local feature. By selecting N different k values for average pooling and downsampling at different scales, local features at different scales can be extracted to generate local feature representations

[0064] 3) Global modeling: The local feature sequence after being downsampled by the local module will be input into the global module. Specifically, a masked self-attention mechanism is adopted. First, when calculating the attention weights, a mask is applied to future positions, making the attention weights of these positions become negative infinity, so that the model cannot rely on future information. And the global correlation in the sequence can be effectively modeled by calculating the correlation of each element in the sequence with other elements

[0065] 4) Restore the sequence length: An upsampling operation is performed using a one-dimensional transposed convolution, and a two-dimensional convolution is used to combine different results with different weights

[0066] 5) Generate the prediction result: Projection and truncation operations are adopted to obtain the sequence prediction result Y of the final seasonal term s ;

[0067] Mapper module: First, the historical timestamps P and future timestamps F that are not fully utilized in the historical observation X are tokenized respectively through the embedding layer of this method. Next, the outputs obtained from the embedding layer will be interacted through the attention blocks respectively. Finally, a projection layer is adopted for the outputs of the attention blocks to obtain the initial mappings of the historical timestamp P and the future timestamp F

[0068] Denormalizer module: This module proposes a denormalization method based on the median and the quantile range to reduce the influence of outliers on the denormalizer. The median and the quantile range are more robust statistics. They are insensitive to extreme values and can better reflect the central tendency and the distribution range of the data

[0069] Adaptive Combiner Module: By analyzing the deviation between the final mapping result of the model within the historical window and the actual observation value, the combined weights of the global mapping and local prediction within the prediction window are dynamically adjusted. Finally, by weighted aggregation of these two types of information, the final prediction result is obtained.

[0070] Input the financial data X into the multi-scale sequence decomposition module. The financial data X is decomposed by the multi-scale sequence decomposition module into two parts: a trend term and a seasonal term. Next, the decomposed trend term data and seasonal term data are respectively input into the trend term prediction module and the seasonal term prediction module, and these two modules respectively model and predict according to the characteristics of the trend term and the seasonal term. Finally, by adding the prediction results of the two modules, a relatively local prediction result can be obtained.

[0071] At the same time, the attention-based adaptive fusion module will first map the historical timestamp feature P and the future timestamp feature F in the input historical data X through the attention-based mapper into an initial historical mapping and an initial future mapping Next, the denormalizer will, based on the quantile deviation between the initial historical mapping output by the mapper and the actual observation X within the historical window, denormalize the initial mapping and into and thereby reducing the impact of the data drift problem in the financial data. Finally, the adaptive combiner will dynamically adjust the combined weights of the global mapping within the prediction window and the local prediction result obtained through the multi-scale prediction model based on sequence decomposition according to the difference between the final mapping and the actual observation X, thereby obtaining the final prediction result Y.

[0072] The present invention discloses a multi-scale financial data prediction method based on sequence decomposition, specifically including the following steps:

[0073] Step S1.1: Obtain the trend term X t and the seasonal term X s :

[0074] Perform a multi-kernel average pooling operation on the padded financial sequence data.

[0075]

[0076] Among them, AvgPool represents the average pooling operation, Padding represents the sequence padding operation, kernel represents the kernel size of the average pooling, and X represents the original financial sequence data.

[0077] Perform a simple averaging operation on the results of all multi-core average pooling operations.

[0078] X t = mean(A1, A2, …, A n ) (2)

[0079] Where X t represents the long-term trend term sequence decomposed from the original sequence, and mean represents the averaging operation.

[0080] Finally, obtain the seasonal term by subtracting the trend component from the original sequence.

[0081] X s = X - X t (3)

[0082] Where X s represents the short-term seasonal term sequence.

[0083] Step S1.2 Obtain the trend term prediction result Y t :

[0084] In addition, since the trend term decomposed from the sequence often represents a long-term trend with little fluctuation, in the trend prediction branch, we simply and effectively use the linear regression method to predict the long-term trend sequence. The specific process is as follows:

[0085] Y t = Regression(X t ) (4)

[0086] Where Regression represents the linear regression operation, and Y t represents the trend term prediction result.

[0087] Step S1.3 Obtain the seasonal term prediction result Y s :

[0088] The overall process of the multi-scale seasonal prediction module can be described as follows:

[0089]

[0090] Y s,l = MultiScaleConv(Y S,l-1 ), l ∈ {1, 2, …, N} (7)

[0091] Y s = Truncate(Projection(Y s,N )) (8)

[0092] Among them, Embedding represents the embedding operation, Concat represents the concatenation operation, X0 represents the zero vector, represents the output result of the embedding module. Y s,l represents the output of the l-th layer multi-scale feature extraction module, where l ∈ {1, 2, …, N}, and MultiScaleConv represents the multi-scale feature extraction module. Y s,N represents the output of the N-th multi-scale feature extraction module, Truncate represents the truncation operation, Projection represents the projection operation, Y s represents the seasonal term prediction result.

[0093] Step S1.4 to obtain the final prediction value

[0094] By adding the results of the trend term and the seasonal term, the final local prediction value can be obtained:

[0095]

[0096] Step S1.5 to obtain the initial historical mapping and the initial future mapping

[0097] First, the historical timestamps P and future timestamps F in the historical observations X that have not been fully utilized are tokenized respectively through the embedding layer of this method. For the sake of simplicity of implementation, the embedding layer is implemented using a linear layer, and the process is as follows:

[0098]

[0099] Next, the outputs obtained by the embedding layer will be interacted through the attention blocks respectively, and the process is as follows:

[0100]

[0101] Among them, i = 0, …, l - 1. represents the output of the intermediate feature variable from the i-th attention block, and d represents the dimension of the intermediate feature variable.

[0102] Finally, a projection layer is used for the outputs of the attention blocks to obtain the initial mappings of the historical timestamp P and the future timestamp F, and this layer is implemented using a simple linear layer:

[0103]

[0104] Step S1.6 to obtain the inverse normalization mapping and

[0105] An inverse normalization method based on the median and quantile range is adopted to reduce the influence of outliers on the inverse normalizer. The process is as follows:

[0106]

[0107]

[0108] where, represents the final mapping through inverse normalization. and respectively represent the initial mapping of each channel and the quantile range of the actual observed value X, that is, the distance between the q - quantile and the 1 - q quantile. and respectively represent the initial mapping of each channel and the median of the actual observed value X.

[0109] Step S1.7 obtains the final prediction result Y:

[0110] First, calculate the deviation between the final mapping result of the model within the historical window and the actual observed value X, that is Then, input the obtained deviation into a multi - layer perceptron (MLP), and finally obtain the combined weight W. The specific process is as follows:

[0111]

[0112] where, W h represents the weight matrix of the hidden layer, b h represents the bias vector of the hidden layer. ReLU is the activation function, defined as ReLU(x) = max(0, x).

[0113] Next, connect the global mapping and the local prediction perform a connection operation, multiply the result obtained by the connection by the combined weight w, and then sum over the last dimension to obtain the final prediction result Y. The process is as follows:

[0114]

[0115] Example 1

[0116] The data set is selected from five stock market index data, including the CSI300 index in China, the S&P 500 index in the United States, the N225 index in Japan, the HSI index in China, and the FTSE 100 index in the United Kingdom. The main characteristics of these data sets are shown in Table 1.

[0117] Table 1 Main Features of the Dataset

[0118]

[0119] For comprehensive evaluation, the present invention selects the following popular baseline methods for comparison: TCN, LSTNet, DLinear, Informer, Autoformer, FEDformer, iTansformer, MICN, TimesNet.

[0120] All models are implemented using PyTorch and trained using an NVIDIA GeForce RTX 4090 GPU.

[0121] These baseline methods cover a variety of different time series prediction techniques, providing rich comparison perspectives for the experiment. By comparing with these baseline methods, the performance of the present invention on different datasets can be evaluated more comprehensively. In this experiment, the mean squared error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) are used as the metric standards, and the results are shown in Table 2. The lower the values of these metrics, the better the results. All datasets are uniformly divided into a training set, a validation set, and a test set in a ratio of 6:2:2. The historical review window for all methods is 10, and the prediction step is 10.

[0122] Table 2 Performance of Different Methods on Different Datasets

[0123]

[0124] Table 2 summarizes the performance comparison results of MDC-Net and other baselines on four datasets. The MDC-Net model of the present invention performs well on multiple datasets, tying for first place with TimesNet only in terms of the MSE metric on the CSI300 dataset, and outperforming other comparison algorithms on all other datasets.

[0125] The results of the ablation experiment are shown in Table 3.

[0126] Table 3 Ablation Experiment

[0127]

[0128] To verify the effectiveness of the proposed method, rigorous ablation experiments were conducted on the proposed method. Specifically, we set up five groups of ablation experiments, namely: A: Eliminate the multi-scale sequence decomposition module in the proposed method and replace it with only the sequence decomposition module identical to that of the Autoformer model; B: Eliminate the embedding module and replace it with only the embedding method identical to that of the FEDformer model. C: Eliminate the attention block adopted by the mapper based on the attention mechanism in the proposed multi-scale adaptive fusion method and replace it with only the MLP network with the same function; D: Eliminate the optimized denormalizer in the adaptive fusion method and replace it with only the traditional denormalization method; E: Eliminate the adaptive combiner capable of dynamically calculating weights and replace it with only a simple average calculation.

[0129] Analyzing the results in Table 3, it can be seen that, with the model structure unchanged, adopting the multi-scale sequence decomposition module, stacked attention blocks, the optimized denormalization method, and the adaptive combiner for dynamic weight calculation is beneficial to the prediction of the model.

[0130] In addition, to further prove the performance and effectiveness of the proposed invention, we also conducted performance tests and visualization of the experimental results, as shown specifically in Figure 3 , 4.

[0131] In particular, in some preferred embodiments of the present invention, a computer device is further provided, including a memory, a processor, and a computer program stored on the memory. When the processor executes the computer program, the steps of the multi-scale financial data prediction method based on sequence decomposition in any of the above embodiments are implemented.

[0132] In some other preferred embodiments of the present invention, a computer-readable storage medium is further provided, on which a computer program / instructions are stored. When the computer program is executed by a processor, the steps of the multi-scale financial data prediction method based on sequence decomposition in any of the above embodiments are implemented.

[0133] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the processes of the embodiments of the multi-scale financial data prediction method based on sequence decomposition as described above, which will not be repeated here.

[0134] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the method of using the bionic mechanical fish to identify and track aquatic biological communities as described above.

[0135] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or N embodiments or examples. In addition, without contradiction, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0136] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" can explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "N" is at least two, such as two, three, etc., unless otherwise specifically defined.

[0137] Any process or method description shown in the flowchart or described in other ways herein can be understood as representing a module, segment, or part of code including one or more executable instructions for implementing a customized logic function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a substantially simultaneous manner or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the art to which the embodiments of the present invention belong.

[0138] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definable sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device), or in conjunction with these instruction execution systems, apparatus, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion (electronic device) having one or N wirings, a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable media on which the program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory.

[0139] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits having suitable combinational logic gate circuits, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0140] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0141] In addition, each functional unit in various embodiments of the present invention may be integrated into one processing module, may exist physically alone for each unit, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0142] The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disc, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A multi-scale financial data prediction method based on sequence decomposition, characterized in that: The pre - processed financial data X based on time series is input into the pre - trained novel MDC - Net model; The novel MDC - Net model is based on the MICN model and introduces an attention - based adaptive fusion prediction method; The novel MDC - Net model includes a multi - scale sequence decomposition module, a trend term prediction module, a seasonal term prediction module, and an attention - based adaptive fusion module; The multi-scale sequence decomposition module decomposes the input financial data X into independent trend terms and seasonal terms. The decomposed trend term data and seasonal term data will be respectively input into the trend term prediction module and the seasonal term prediction module. The trend term prediction module and the seasonal term prediction module perform modeling and prediction according to the characteristics of the trend term data and the seasonal term data, and then add the prediction results of the two modules to obtain a relatively local prediction result The attention-based adaptive fusion module maps the historical timestamp features and future timestamp features in the input financial data X to the initial historical mapping and the initial future mapping respectively through the attention-based mapper. Then, the denormalizer denormalizes based on the mapper output to and and Finally, the adaptive combiner dynamically adjusts the combination weights of the global mapping within the prediction window and the local prediction result obtained by the sequence decomposition-based multi-scale prediction model according to the difference between the final mapping and the actual observation X, and obtains the final prediction result Y.

2. The multi-scale financial data prediction method based on sequence decomposition according to claim 1, wherein: In step 2, the multi-scale sequence decomposition module specifically is: First, perform a multi-core average pooling operation on the preprocessed financial data after padding, and then perform an averaging operation on the results of all the multi-core average pooling operations to obtain the trend term X t , and finally obtain the seasonal term X by subtracting the trend component from the original sequence s ; X t = mean(A1, A2, …, A n ) X s = X - X t Among them, A n is the output result of the multi-core average pooling operation; AvgPool represents the average pooling operation; Padding represents the sequence padding operation; kernel represents the kernel size of the average pooling.

3. The multi-scale financial data prediction method based on sequence decomposition according to claim 1, wherein: The trend term prediction module uses the linear regression method to predict the long - term trend sequence, and is designed as follows: Y t = Regression(X t ) Among them, Y t is the prediction result of the trend item; Regression represents the linear regression operation.

4. The multi-scale financial data prediction method based on sequence decomposition according to claim 1, characterized in that: The seasonal prediction module includes a pre - processing embedding module and a local - global module; the pre - processing embedding module first concatenates the input seasonal term data with a zero vector, and then performs a value embedding operation and a time feature embedding operation on the concatenated data, by converting the time feature into a low - dimensional embedding representation; Among them, Embedding is the embedding operation; Concat is the concatenation operation; X0 is the zero vector, which is the output result of the embedding module; The local - global module includes a multi - scale convolution model, which captures local features in the seasonal term fluctuations through convolution kernels of different scales, and at the same time models the global correlation in the seasonal term through the self - attention mechanism. Y s,l = MultiScaleConv(Y S,l-1 ), l ∈ {1, 2, …, N} Y s = Truncate(Projection(Y s,N )) Among them, MultiScaleConv is a multi-scale feature extraction module; Y s,l is the output of the multi-scale feature extraction module at the l-th layer, where l ∈ {1, 2, …, N}, Y s,N is the output of the N-th multi-scale feature extraction module; Truncate is a truncation operation; Projection is a projection operation; Y s is the prediction result of the seasonal term.

5. The multi-scale financial data prediction method based on sequence decomposition according to claim 1, wherein: The attention-based mapper is respectively mapped to an initial historical mapping and an initial future mapping The specific operation is as follows: Step 1.1: Tokenize the historical timestamps and future timestamps that cannot be fully utilized in the financial data X through the embedding layer of the mapper; the embedding layer includes a linear layer; Where, P is the historical timestamp; F is the future timestamp; Step 1.2: Interact the outputs obtained from the embedding layer through the attention block respectively, and the process is as follows: Among them, is the historical timestamp output of the embedding layer; is the future timestamp output of the embedding layer; Step 1.3: Use the projection layer for the outputs of the attention block to obtain the initial mappings of the historical timestamp and the future timestamp; the projection layer includes a linear layer; Among them, is the historical timestamp output of the attention block; is the future timestamp output of the attention block.

6. The multi-scale financial data prediction method based on sequence decomposition according to claim 1, wherein: The inverse normalization mapping and are obtained by the inverse normalizer based on the median and quantile deviations between the initial historical mapping output by the mapper and the actual observed financial data X within the historical window, and the initial mapping and are inverse-normalized to and Among them, and are the initial mappings for each channel and the quantile range of the actual observation value X, that is, the distance between the q-quantile and the 1-q quantile; and are the initial mappings for each channel and the median of the actual observation value X.

7. The multi-scale financial data prediction method based on sequence decomposition according to claim 1, wherein: The specific operation of the adaptive combiner is: Step 2.1: Input the deviation between the mapping and the actual observed financial data X into a multi-layer perceptron to obtain the combined weight W; MLP(·) = Softmax(ReLU((·) × W h + b h )) Among them, MLP is a multi-layer perceptron; W h represents the weight matrix of the hidden layer, and b h represents the bias vector of the hidden layer; ReLU is an activation function defined as ReLU(x) = max(0, x); Step 2.2: Global mapping and local prediction are concatenated, and the result of the concatenation is multiplied by the combination weight W, and then the sum is taken over the last dimension to obtain the final prediction result Y:

8. A computer device / apparatus / system, comprising a memory, a processor, and a computer program stored on the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 7.

9. A computer-readable storage medium having computer programs / instructions stored thereon, characterized in that: When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer program product, comprising a computer program / instructions, characterized in that: When the computer program / instructions are executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.