A long-term time series forecasting method based on dual-path Mamba for data processing
By processing multivariate time series through the dual-path Mamba method, the problems of high computational complexity and weak temporal order dependencies in the Transformer architecture are solved, achieving more efficient time series prediction.
Patent Information
- Application Number
- CN202510121420.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-26
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-01-26
AI Technical Summary
The existing time series prediction model based on the Transformer architecture has high computational complexity and weak temporal sequence dependencies, which limits the improvement of data processing efficiency.
A two-way Mamba method is used. After normalizing the multivariate time series, the channels are independently mapped to the latent space, and the data is divided into non-overlapping sub-time series. The global and local information are trained using the Mamba network and fused into the prediction results.
It improves the computational efficiency and accuracy of the model when processing complex time series data, and enhances the modeling ability, adaptability and robustness of time dependencies.
Smart Images

Figure CN119557605B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a dual-path Mamba long-term time series prediction method for data processing. Background Art
[0002] At present, with the popularization of big data technology and artificial intelligence technology, intelligent data processing solutions are widely used in commercial finance, administrative supervision, manufacturing management and other fields. In the process of data processing, many prediction methods need to be applied.
[0003] Among these, time series forecasting methods have extensive and crucial applications in many scenarios, and their accuracy and effectiveness directly affect the quality and efficiency of decision-making. For example, in manufacturing management, accurate time series forecasting can monitor and maintain equipment. Combined with neural network models, it can identify possible equipment failures in advance, perform predictive maintenance on equipment, and reduce downtime and repair costs. In terms of traffic flow forecasting, accurate forecasts can alleviate congestion, optimize traffic management, and improve travel efficiency. In the financial field, time series forecasting helps manage risks in the financial market and ensure the effective allocation of funds. In addition, with the development of big data technology and the continuous emergence of real-time data, traditional forecasting methods face low generalization and performance bottlenecks. Therefore, more advanced methods are urgently needed to process complex time series data.
[0004] Current time series prediction algorithms based on deep learning, especially those based on the Transformer architecture and RNN, have shown superior performance in image and natural language processing, but they still have limitations in handling deep temporal dependencies and computational complexity.
[0005] The time series prediction model based on the Transformer architecture has the problem of high computational complexity and weak temporal dependency of the model. As a result, the current time series prediction solution has limited optimization space and has formed a certain degree of technical bottleneck, thus limiting the improvement of actual computational efficiency in data processing and failing to keep up with the increasingly high demand for real-time data. Summary of the Invention
[0006] The embodiments of the present invention provide a dual-path Mamba long-term time series prediction method for data processing, which can solve the problems of high computational complexity and weak modeling time sequence dependency in related technologies such as time series prediction models based on the Transformer architecture.
[0007] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:
[0008] The method provided by an embodiment of the present invention includes:
[0009] S1. Extract multivariate time series from business data and perform normalization to obtain multivariate data;
[0010] The business data includes, but is not limited to, sensor data in the industrial manufacturing field, power load data of equipment in power systems, traffic flow data, and financial data. For example, the sampled data is uniformly sampled, with a sampling frequency of, but not limited to, one minute or one hour. In the industrial manufacturing field, business data can be data from an assembly line sampled L times over a period of time, with each sampling containing data from M sensors, such as equipment temperature, power, and pressure. In the power system field, business data can be data from L sampling points on a power transformer over a period of time, with each sampling containing data from M sensors, such as external load values and oil temperature of different types of equipment. In the transportation field, business data can be traffic statistics recorded by highway sensors sampled L times over a period of time, with each sampling containing M road data. In the financial field, business data can be stock data sampled L times over a period of time, with each sampling containing M prices, such as opening price, closing price, and trading volume.
[0011] S2, process the obtained multivariate data channel-independently and map them into the latent space;
[0012] S3. Patch the data of each variable to obtain non-overlapping sub-time series; the data of each variable can be understood as the feature representation after multivariate data mapping. ;
[0013] S4, inputting the obtained sub-time series into the Mamba network for training to obtain global information and local information;
[0014] S5. Mapping the global information into a weight, multiplying the weight by the local information, and then mapping it into the length of the time series to be predicted, thereby serving as a prediction result;
[0015] S6. Use the prediction results to train a time series prediction model, and then import the trained time series model into the business data processing system. The time series prediction model can use the input historical business data to predict data at T future time points. For example, in the industrial manufacturing field, it can perform predictive maintenance on equipment and predict in advance whether equipment parameters will exceed thresholds. In the power system field, it can predict future power transformer loads to manage power distribution according to demand. In the transportation field, it can predict future road occupancy rates to alleviate congestion in advance. In the financial field, it can predict future transaction trends to ensure the effective allocation of funds.
[0016] The embodiment of the present invention provides a dual-path Mamba long-term time series prediction method for data processing, which normalizes an input multivariate time series to obtain multivariate data; makes the multivariate data channel-independent and maps the data into a latent space; performs patch partitioning on the data of each variable to divide it into non-overlapping subsequences; inputs the divided time series into a global information module, uses a patch-by-patch representation, and inputs it into a Mamba network for model training as global information; inputs each patch into a local information module, uses a point-by-point representation, and performs model training in the Mamba network as local information; maps the obtained global information into a weight multiplied by a local feature and mapped to the length of the time series to be predicted to obtain a final prediction result; trains a time series prediction model using the prediction result to obtain a trained time series model, achieves the capture of the temporal dependency of the long-term time series from two perspectives, unifies the intra-patch and inter-patch information, improves the model's ability to process fine-grained time series data in the application field, and thus solves the problems of high computational complexity and weak modeling of temporal sequence dependencies. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 A schematic diagram of a possible implementation of the dual-path Mamba long-term time series prediction method provided in an embodiment of the present invention.
[0019] Figure 2 A schematic diagram of a method flow chart provided in an embodiment of the present invention.
[0020] Figure 3 This is the visualization of the embodiment of the present invention, iTransformer, and PatchTST on the ETTh2 dataset, where the input business data length L is 96 and the prediction length T is 96.
[0021] Figure 4 This is the visualization of the embodiment of the present invention, iTransformer, and PatchTST on the ETTh2 dataset, where the input business data length L is 96 and the prediction length T is 336. DETAILED DESCRIPTION
[0022] To enable those skilled in the art to better understand the technical solutions of the present invention, the present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. The embodiments of the present invention will be described in detail below, with examples of the embodiments illustrated in the accompanying drawings. Throughout, identical or similar reference numerals represent identical or similar elements or elements having identical or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and intended only to explain the present invention and are not to be construed as limiting the present invention. Those skilled in the art will appreciate that, unless otherwise stated, the singular forms "a," "an," "said," and "the" used herein may also include the plural forms. It should be further understood that the term "comprising" as used in the description of the present invention refers to the presence of the stated features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when an element is referred to as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or intervening elements may be present. Furthermore, "connected" or "coupled" as used herein may include wireless connections or couplings. The term "and / or" as used herein includes any and all combinations of one or more of the associated listed items. It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art in the art to which this invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art, and unless defined as such, will not be interpreted in an idealized or overly formal sense.
[0023] Compared to Transformers and RNNs, the State Space Model (SSM) has emerged as a promising paradigm, mapping infinite-dimensional history into a finite-dimensional latent space. Compared to previous RNN- and LSTM-based approaches, which only have a memory space of approximately 50 tokens, SSM-based approaches have a much longer memory space. Compared to Transformers, SSMs offer significant advantages in inference speed and computational resource overhead, and demonstrate impressive performance in contextual regression tasks. In this embodiment, Mamba introduces a new SSM parameterization method based on input features, combined with a simple selection mechanism to address the SSM's inefficiency in handling selective replication tasks. This opens up the possibility of SSM applications in the field of long-term time series forecasting. Further specific designs have been implemented to address the high computational complexity and weak temporal dependency modeling issues inherent in related technologies, such as time series forecasting models based on the Transformer architecture.
[0024] The embodiment of the present invention provides a long-term time series prediction method of a dual-path Mamba for data processing, such as Figure 1 、 2 Shown, including:
[0025] S1. Extracting a multivariate time series from business data and performing normalization processing to obtain multivariate data; wherein the business data includes at least industrial sensor data, power load data of equipment in a power system, traffic flow data, and financial data. The data in the time series sample can be extracted from the aforementioned industrial sensor data, power load data of equipment in a power system, traffic flow data, financial data, or other data; this embodiment does not limit the data type.
[0026] S2. Process the obtained multivariate data channel-independently and map them into the latent space. The mapping process involves mapping the time point data of each variable through a linear layer to obtain the corresponding initial embedding to represent the sequence characteristics of the original sequence.
[0027] S3. Patch the data of each variable to obtain non-overlapping sub-time series; wherein the patch partitioning includes: dividing the time series data of each variable into multiple non-overlapping continuous patch segments according to the period, and each patch contains a fixed number of time point data.
[0028] S4. Input the obtained sub-time series into the Mamba network for training to obtain global information and local information.
[0029] S5. Mapping the global information into weights, multiplying the weights by the local information, and then mapping them into the length of the time series to be predicted, thereby providing a prediction result; wherein the global information and local information can be fused through an information fusion module. The information fusion module includes: mapping the results of the patch-by-patch representation into weights that guide local information modeling through a linear layer, wherein the features of each patch are mapped into a scalar weight and multiplied by each time point of the corresponding patch in the local information.
[0030] S6. Using the prediction results to train a time series prediction model, and then importing the trained time series model into a business data processing system.
[0031] Specifically, in S1 of this embodiment, it includes: obtaining time series data, normalizing the input multivariate time series to obtain multivariate data, scaling the data to a range of mean 0 and variance 1, so that the data distribution is close to a normal distribution. The time series sample is obtained by sorting multiple data samples according to the collection time of the data samples, and the sequence fragment sample includes at least one data sample. It is achieved by the following formula: extracting L data samples at preset moments from the business data and arranging them in the order of the preset moments to obtain a time series sample, where L is a positive integer and L≥2; the specific implementation steps of normalizing the time series sample are: , is the original input time series sample, μ is the mean of the data, σ is the variance of the data, X is the standardized data, and the standardized data of multiple variables are used as the multivariate data. During the normalization process, the multivariate data is scaled to a range with a mean of 0 and a variance of 1.
[0032] For example Figure 1 As shown in the figure, the input multivariate time series is normalized to obtain multivariate data, the processed multivariate data is channel-independent and mapped into the latent space, the data of each variable is patch-divided into non-overlapping subsequences, and the divided time series is input into the global information module, represented patch by patch, and input into the Mamba network for model training as global information. At the same time, each patch is input into the local information module, represented point by point, and trained in the Mamba network as local information. The global information is then mapped into a weight multiplied by the local feature and mapped to the length of the time series to be predicted to obtain the final prediction result. Finally, the time series prediction model is trained by the prediction result to obtain a trained time series model.
[0033] It's important to note that traditional time series forecasting methods in related technologies, such as the Autoregressive Integrated Moving Average (ARIMA) and Vector Autoregression (VAR), use statistical methods to discover patterns, trends, and seasonality in temporal variations. Their predictive capabilities are hampered by inherent limitations in capturing the complex nonlinear relationships and long-term dependencies found in real-world time series data. The strict assumptions of linearity and stationarity that underpin these models limit their adaptability to events and constantly changing data streams, resulting in poor generalization and accuracy in today's complex data scenarios. The Transformer model in related technologies uses a point-by-point granularity in its self-attention mechanism, treating each time point as a token. Using a pixel or a word as a token is effective in computer vision and natural language processing, where sequential dependencies are weak. However, in time series data, the Transformer's self-attention mechanism, through pairwise multiplication, ignores and destroys the sequential temporal dependencies inherent in time series data. Positional encoding mitigates this issue, but positional encoding alone cannot provide a complete picture of temporal dependencies. In this embodiment, the input multivariate time series is normalized to obtain multivariate data; the multivariate data is channel-independent and mapped into a latent space, which can effectively reduce overfitting of the model; the data of each variable is patch-divided into non-overlapping subsequences, which can simultaneously model global information and local information; the divided time series is input into a global information module, represented patch by patch, and input into a Mamba network for model training as global information; each patch is input into a local information module, represented point by point, and model trained in a Mamba network as local information; the obtained global information is mapped into a weight multiplied by a local feature and mapped to the length of the time series to be predicted, which can reduce the redundancy of time information utilization and obtain the final prediction result.
[0034] The data in the time series samples may be industrial sensor data, power load data of equipment in a power system, traffic flow data, financial data, or other data. This embodiment does not limit the data type.
[0035] The embodiments of the present invention utilize channel-independent operations, enhancing the model's generalization capabilities and demonstrating robustness and adaptability to various data types, such as sensor data from industrial manufacturing, power load data from equipment in power systems, traffic flow data, and financial data. In related art, Transformer-based models simply employ a patch-by-patch representation. This approach can increase local semantic density, but it fails to effectively model the temporal dependencies within each patch, resulting in a lack of fine-grained modeling. The embodiments of the present invention primarily utilize a point-by-point representation, combining it with a patch-by-patch representation to provide the model with more fine-grained information. Furthermore, because the global information in the patch-by-patch representation already includes information from the point-by-point representation, the embodiments of the present invention reduce the information content of this global information and use it as a weight to assist the modeling of the point-by-point representation. Therefore, the embodiments of the present invention unify intra-patch and inter-patch information, taking into account both global and local information. This not only captures the overall trend of the time series but also provides excellent detailed modeling capabilities, better meeting the data accuracy requirements of various fields.
[0036] For example Figure 3 、 4 As shown, the embodiment of the present invention uses the ETTh2 dataset as a visualization example. This dataset contains power load data of equipment in the power system. A single power transformer load variable is selected for comparison. The compared methods are named iTransformer and PatchTST. The parameters of the two comparison methods are strictly based on the original settings of each method. It can be seen that the values predicted by the method proposed in the embodiment of the present invention are closer to the true values than those of other methods. This proves that the embodiment of the present invention is more capable of modeling fine-grained details, while other methods can only detect such seasonal trends but cannot accurately model the amplitude.
[0037] Specifically, in S2 of this embodiment, the steps include: dividing the data of each variable into different channels, making the normalized multivariate data channel-independent, and mapping the data into a latent space. For example, S2 may include the following sub-steps (steps 2-1 to 2-2):
[0038] In step 2-1, the M variables are divided into M different channels so that each channel can be processed separately in the subsequent steps. The channel independent operation is achieved by the following formula:
[0039] in, Indicates independent channel operation. The data corresponding to each variable after channel independence, the multivariate data after division can be expressed by the following formula:
[0040] In step 2-2, the time point data of each independent variable is mapped through a linear layer to obtain the corresponding initial embedding to represent the sequence characteristics of the original sequence. The mapping operation is implemented by the following formula:
[0041] in, is the feature representation after mapping, is a linear mapping operation, For the dimensionality increase operation at the time point, For input data.
[0042] Specifically, in S3 of this embodiment, the data of each variable is divided into multiple non-overlapping continuous patches according to the period, and each patch contains a fixed number of time point data. The data of each variable is divided into multiple non-overlapping continuous patch segments according to the period, and each patch contains a fixed number of time point data, which is achieved by the following formula:
[0043] in, For patch partitioning operations, is the patch fragment after division, and the divided patch can be expressed by the following formula:
[0044]
[0045] in, For the time series that needs to be divided, For the merge operation, For the divided patches, each patch has the same size by default. is a time point in the time series.
[0046] Specifically, in S4 of this embodiment, it includes: inputting the divided time series into the global information module, using patch-by-patch representation, and inputting it into the Mamba network for model training to obtain global information; inputting each patch into the local information module, using point-by-point representation, and inputting it into the Mamba network for model training to obtain local information. The global information module includes: treating each patch of the divided time series as a token, using position encoding, and processing it with the Mamba network to provide the model with information about the position of each patch data in the sequence. The local information module includes: using patch-independent operations in the divided time series, using position encoding for each patch separately, treating a time point as a token, and processing it with the Mamba network to provide the model with information about the position of each time point data in each patch.
[0047] Specifically, the global information module includes the following steps: inputting the divided time series into the global information module, using a patch-by-patch representation, treating each patch of the divided time series as a token, using position encoding to provide the model with information about the position of each patch data in the sequence, and inputting it into the Mamba network for model training as global information. Each input time series is independently matched to generate a learnable additional position encoding. This position encoding can provide information about the position of each patch data in the sequence to monitor the temporal order of the patches in the time series. Position encoding is implemented using the following formula:
[0048] in, is the patch-by-patch representation after position encoding, is the patch-by-patch representation of the input, is a learnable positional encoding, Size and same.
[0049] Furthermore, the Mamba module, as a state space model, maps the input sequence to the output through the latent space, which is implemented by the following formula:
[0050] in, is the state matrix change parameter, 、 is the mapping parameter, is the input function, For hidden space, is the output function, is the function's independent variable.
[0051] The discrete form of SSM uses the time scale parameter Transforming continuous parameters 、 、 Discretization is achieved through the following formula:
[0052]
[0053]
[0054]
[0055]
[0056] in, 、 、 is the discretized parameter, Represents the discretized sampling points, is the discretized input sequence values, is the output sequence after discretization values, After discretization, Step hidden space, is the state matrix change parameter, 、 is the mapping parameter, is the identity matrix. The discrete form of the cyclic SSM is actually untrainable due to its sequential nature. Since continuous convolution is a linear time-invariant system, in order to obtain an efficient representation, the continuous convolution is modeled as a discrete convolution. The previous step is vectorized into convolution, which is implemented by the following formula:
[0057]
[0058] in, represents a single convolution operation, is the first value of the input sequence after discretization, is the discretized input sequence values, is the discretized input sequence, is the discretized output sequence, is the length of the input sequence after discretization.
[0059] Specifically, the global Mamba uses a selection mechanism to parameterize the input of the SSM. For each input token, there is a unique and different and Parameters enable Mamba to effectively solve the content perception problem. For example, the position encoding operation of the divided patch representation is achieved through the following formula: ,in, This is a position encoding operation, as shown in the above example. The position-encoded patch representation is fed into the global Mamba module for training, which is expressed by the following formula: ,in, For the global Mamba module, is the global information representation trained by the Mamba network, as shown in the above example.
[0060] In the local information module, each patch is input into the local information module, represented point by point, and the divided time series is operated on independently. Each patch is individually positionally encoded, and a time point is used as a token to provide the model with information about the position of each time point data in each patch. The information is then used for model training in the Mamba network as local information. Each input patch is independently matched to generate a learnable additional position encoding. This position encoding provides information about the position of each time point data in the patch to monitor the temporal order of the time points in the patch. The position encoding is implemented using the following formula: ,in, is the point-by-point representation after position encoding, is the point-by-point representation of each patch in the input, is a learnable positional encoding, Size and same.
[0061] Specifically, the local Mamba uses similar operations as when processing all information, except that the parameter size is changed. For example, the position encoding operation is performed on the point-by-point representation after division, which is achieved through the following formula: ,in, This is the position encoding operation, as shown in the above example. The point-by-point representation after position encoding is sent to the Mamba network for training, which is expressed by the following formula: ,in, For local Mamba modules, see the example above.
[0062] Specifically, in S5 of this embodiment, it includes: mapping the global information represented by each patch to a weight for guiding the modeling of local information through a linear layer, wherein the features of each patch are mapped to a scalar weight; multiplying each time point of the corresponding patch in the local information represented point by point by the scalar weight, and then mapping it to the length of the time series to be predicted, thereby obtaining the final prediction result. Among them, mapping the global information represented by each patch to a weight for guiding the modeling of local information through a linear layer, wherein the features of each patch are mapped to a scalar weight, and multiplying each time point of the corresponding patch in the local information represented point by point and mapping it to the length of the time series to be predicted, thereby obtaining the final prediction result. For example: compressing the patch-by-patch representation modeled by the Mamba network to the weight represented by each patch through a linear layer is achieved by the following formula: ,in, is the compressed weight representation.
[0063] Multiplying the compressed weight representation with the point-by-point representation modeled by the Mamba network is achieved through the following formula: ,in, is the representation after the fusion of global information and local information, It is an element-wise multiplication operation.
[0064] Mapping the fused representation to the length of the time series to be predicted is achieved through the following formula: ,in, is the time series that needs to be predicted.
[0065] Specifically, in S6 of this embodiment, it includes: using the prediction results to establish a loss function, and using the loss function to train the time series prediction model. Specifically, the prediction results are optimized using the mean square error and the mean error as the loss function to train the time series prediction model, and a trained time series model is obtained. The optimization function formula is as follows:
[0066]
[0067] ,in, is the mean square error, is the mean error, and the number of time series channels corresponds to the data of M variables. is the input sequence, is the output sequence, 、 is the hyperparameter that controls the weight, is the final loss function.
[0068] Based on the method flow of the above embodiment, this embodiment also provides a dual-path Mamba long-term time series prediction system, including:
[0069] The preprocessing module is configured to: obtain the time series to be predicted and perform normalization processing to obtain multivariate data.
[0070] The mapping module is configured to perform channel-independent operations on multivariate data and map the data into a latent space.
[0071] The partitioning module is configured to: partition the data of each variable into multiple non-overlapping subsequences by patch.
[0072] The global information module is configured to represent multiple patches patch by patch and input them into the Mamba network for model training to obtain global information.
[0073] The local information module is configured to represent each patch point by point and input it into the Mamba network for model training to obtain local information.
[0074] The information fusion module is configured to: fuse the global information with the local information and map them to the length of the time series to be predicted to obtain a prediction result.
[0075] The training module is configured to use the prediction results to train a time series prediction model, and the model realizes time series prediction of multiple variables.
[0076] Based on the method flow of the above embodiment, this embodiment further provides an electronic device comprising a memory for storing computer program instructions and a processor for executing the program instructions. When the computer program instructions are executed by the processor, the electronic device is triggered to execute the dual-path Mamba long-term time series prediction method described in Example 1. The present invention provides a computer-readable storage medium comprising a stored program. When the program is executed, the device containing the computer-readable storage medium is controlled to execute the dual-path Mamba long-term time series prediction method described in the first aspect. The electronic device may include: a processor, a memory, and a communication unit. These components communicate via one or more buses. Those skilled in the art will appreciate that the structure of the electronic device does not limit the embodiments of the present invention and may be a bus structure, a star structure, a combination of certain components, or a different arrangement of components. The communication unit is configured to establish a communication channel, thereby enabling the electronic device to communicate with other devices and receive user data from other devices or send user data to other devices. The processor is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and / or processes data by running or executing software programs and / or modules stored in the memory, and calling data stored in the memory. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores. The memory is used to store the execution instructions of the processor. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory are executed by the processor, the electronic device is enabled to execute part or all of the method steps in this embodiment.
[0077] In the solution of this embodiment, the dual-path Mamba architecture realizes long-term time series prediction, which can be used in most scenarios involving natural language processing and time series analysis, such as industrial manufacturing, traffic flow prediction, finance, etc. In this solution, the trend of future data is predicted based on historical data. Specifically, the input multivariate time series is normalized to obtain multivariate data; the multivariate data is channel-independent and the data is mapped into the latent space; the data of each variable is patch-divided into non-overlapping subsequences; the divided time series is input into the global information module, represented patch by patch, and input into the Mamba network for model training as global information; each patch is input into the local information module, represented point by point, and model training is performed in the Mamba network as local information; the obtained global information is mapped to the weight multiplied by the local feature and mapped to the length of the time series to be predicted to obtain the prediction result; the time series prediction model is trained by the prediction result to obtain a trained time series model. This invention is based on the dual-path patch architecture, reduces the redundancy of time information utilization, and improves the accuracy and reliability of long-term time series prediction.
[0078] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited to this. Any changes or replacements that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A long-term time series prediction method based on dual-path Mamba for data processing, characterized in that: include: S1. Extract multivariate time series from business data as samples and perform normalization to obtain multivariate data; The types of business data include sensor data, power load data of equipment in the power system, and traffic flow data; sensor data includes: equipment temperature, power, and pressure data sampled from industrial production lines over a period of time; power load data of equipment in the power system includes: external load values and oil temperature data of equipment sampled from power transformers over a period of time; traffic flow data includes: traffic statistics data sampled from highways over a period of time; S2, process the obtained multivariate data channel-independently and map them into the latent space; S3. Patch-dividing the data of each variable to obtain non-overlapping sub-time series; wherein the patch-dividing includes: dividing the time series data of each variable into multiple non-overlapping continuous patch segments according to the period, and each patch contains a fixed number of time point data; S4, inputting the obtained sub-time series into the Mamba network for training to obtain global information and local information; S5. Mapping the global information into a weight, multiplying the weight by the local information, and then mapping it into the length of the time series to be predicted, thereby serving as a prediction result; S6. Using the prediction results to train a time series prediction model, and then importing the trained time series model into a business data processing system; The time series prediction model uses input historical business data to predict data at T moments in the future, including: predictive maintenance of equipment in industrial manufacturing; or predicting future power transformer loads to manage power distribution according to demand; or predicting future road occupancy rates; S4 includes: inputting the divided time series into the global information module, using patch-by-patch representation, and inputting it into the Mamba network for model training to obtain global information; inputting each patch into the local information module, using point-by-point representation, and inputting it into the Mamba network for model training to obtain local information; In the global information module, each patch of the divided time series is used as a token and position coding is adopted. The position coding method includes: , is the patch-by-patch representation after position encoding, is the patch-by-patch representation of the input, It is a learnable position encoding. In the local information module, each patch is individually position encoded, and a time point is used as a token. The position encoding methods include: , is the point-by-point representation after position encoding, is the point-by-point representation of each patch in the input, Encoding learnable positions; S5 includes: mapping the global information represented by each patch into a weight to guide the modeling of local information through a linear layer, where the feature of each patch is mapped into a scalar weight; multiplying each time point of the corresponding patch in the local information represented by the scalar weight point by point, and then mapping it to the time length T of the time series to be predicted, so as to obtain the final prediction result , L is the number of data samples at the preset time, T is a positive integer and T≥2.
2. The method according to claim 1, characterized in that S1 includes: Extracting L data samples at preset moments from the business data and arranging them in chronological order according to the preset moments to obtain a time series sample, where L is a positive integer and L≥2, and the t-th time point contains M variables; The time series samples are normalized, including: , X raw is the original input time series sample, is the mean of the data, is the variance of the data, The standardized data is a collection of standardized data of multiple variables as the multivariate data.
3. The method according to claim 1, characterized in that S2 includes: The multivariate data includes data of M variables, and the data of the M variables are divided into M different channels, including: ,in, The data corresponding to the first variable, ..., the i-th variable, ..., the M-th variable after division, Independent operation for channels; The mapping operation for each variable data includes: , is the feature representation after mapping to the latent space, is a linear mapping operation, For the dimensionality increase operation at the time point, The data corresponding to the i-th variable of the input.
4. The method according to claim 1, wherein S6 includes: A loss function is established using the prediction results, and the time series prediction model is trained using the loss function.