Time sequence prediction method based on periodic quantum machine learning network, storage medium and electronic equipment

Through the time series prediction method based on periodic quantum machine learning network, the periodic quantum block constructed by quantum gate extracts periodic features in the time series, solving the difficulties of existing methods in capturing periodic features and achieving more efficient and accurate time series prediction.

CN120124766APending Publication Date: 2025-06-10SOUTHEAST UNIV
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510277502.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The existing time series prediction methods have difficulties in capturing periodic features, and the computing resources are consumed very much, which is prone to overfitting, making it difficult to effectively process complex time series data.

Method used

The time series prediction method based on periodic quantum machine learning network is adopted to extract the periodic features in the time series through steps such as data preprocessing, quantum state preparation, periodic feature extraction, quantum measurement and data post-processing, and the periodic features in the time series are extracted using the periodic quantum block constructed by the quantum gate, and the final prediction output is performed through linear layers and residual branches.

Benefits of technology

It significantly improves the periodic feature capture ability of time series data, reduces model complexity, enhances generalization ability, and improves the stability of model training and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120124766A_ABST
    Figure CN120124766A_ABST
Patent Text Reader

Abstract

The invention discloses a time series prediction method based on a periodic quantum machine learning network, and the method comprises the steps: carrying out the normalization and dimension reduction processing of time series data through a data preprocessing module; secondly, the classical data is converted into a quantum state through quantum state coding; then, periodic features in the time sequence are extracted through a periodic quantum block module, and the module is composed of a rotating door and a control door and can effectively simulate Fourier series; then, the quantum state is converted back to classical data through quantum measurement; and finally, outputting a final prediction result through a data post-processing module in combination with residual connection and a linear layer. According to the method, the advantages of quantum calculation are utilized, the periodic characteristics in the time sequence are captured through the data re-uploading quantum circuit, and the prediction accuracy and the calculation efficiency are remarkably improved. The method is superior to a traditional method in data synthesis and real world time sequence prediction tasks, and shows high generalization ability in non-periodic tasks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of time series prediction, and particularly relates to a time series prediction method, a storage medium, and an electronic device based on a periodic quantum machine learning network. Background Art

[0002] In today's digital age, time series prediction plays a crucial role in numerous fields. Whether it is predicting stock price trends and risk assessment in the financial field, predicting disease incidence and medical resource planning in the healthcare industry, or predicting equipment failures and energy consumption management in the engineering field, accurate time series prediction can provide key basis for decision-making, thereby optimizing resource allocation, reducing risks, and improving efficiency.

[0003] Among traditional time series prediction methods, statistical methods such as autoregressive integrated moving average models show certain advantages in dealing with linear time-dependent relationships due to their interpretability and were widely used in the early stage. However, time series data in the real world often has high complexity, containing a large number of non-linear patterns and complex dependencies, which makes it difficult for traditional statistical methods to accurately capture data features and limits the prediction accuracy.

[0004] With the development of deep learning, neural network-based methods have gradually become the mainstream of time series prediction. For example, recurrent neural networks (RNNs) and their variants, long short-term memory networks (LSTMs) and gated recurrent units (GRUs), can handle long-term dependence problems in time series to a certain extent by introducing a memory mechanism. However, RNNs have training problems such as gradient vanishing and gradient explosion, which limit their performance in complex tasks.

[0005] In recent years, the emergence of the attention mechanism has brought new breakthroughs to time series prediction. The Transformer model, with its self-attention mechanism, can effectively capture long-range dependence relationships in data and supports parallel computing, significantly improving the scalability of the model. Based on the Transformer architecture, a series of improved models have emerged continuously. For example, Temporal Fusion Transformer is specifically designed for the characteristics of time series data, dealing with variable time patterns and integrating external covariates; Informer reduces the computational complexity through sparse self-attention and probability distillation, improving the efficiency of processing long sequences; Autoformer integrates a decomposition module, enhancing the ability to model trends and seasonal components, and improving the interpretability and accuracy of the model; FEDformer uses frequency domain representation for efficient prediction, reducing redundant information of time patterns; PatchTST is inspired by vision Transformers and processes time series data in a block-based manner, improving parallelism and the ability to capture local time structures;

[0006] SAMformer becomes a lightweight and efficient time series prediction model by integrating Sharpness Aware Minimization (SAM) and channel attention mechanism; TSLANet introduces adaptive spectral blocks, utilizes Fourier analysis to enhance feature representation, realizes multi-scale interaction and noise reduction.

[0007] Although Transformer and its variants have achieved remarkable results in time series prediction, these methods still have some inherent defects. On the one hand, the permutation invariance property of Transformer may lead to the loss of key time information in time series data, affecting the accuracy of prediction. On the other hand, Transformer usually requires a large amount of computing resources for training and inference, has high requirements for hardware devices, and is prone to overfitting when facing small-scale datasets. In addition, existing research has pointed out that Transformer has difficulties in modeling the periodicity of time series, and periodicity is an important feature of time series data. Accurately capturing periodicity is crucial for improving prediction accuracy.

[0008] In the field of quantum computing, the data re-uploading quantum circuit, as an important paradigm of quantum machine learning, effectively improves the expressive power of the model by repeatedly encoding classical data into the quantum system. It is found that the data re-uploading quantum circuit can be essentially regarded as a Fourier series, which provides a new idea for using quantum computing technology to process time series data. However, the current research on applying quantum computing technology to time series prediction is still in its infancy. How to construct an efficient quantum-classical hybrid model and give full play to the advantages of quantum computing in dealing with periodic features has become an urgent problem in this field.

[0009] In summary, the existing time series prediction methods have many deficiencies when facing complex data and actual application requirements, and the application of quantum computing technology in the field of time series prediction is not yet mature. Therefore, it is of great practical significance and research value to develop a time series prediction method that can effectively overcome the defects of traditional methods and make full use of the advantages of quantum computing. Summary of the Invention

[0010] The purpose of the present invention is to provide a time series prediction method, a storage medium and an electronic device based on a periodic quantum machine learning network.

[0011] The technical solution for realizing the purpose of the present invention is as follows:

[0012] A time series prediction method based on a periodic quantum machine learning network, comprising the following steps:

[0013] Step 1, Data preprocessing: Process the statistical property fluctuation problem of time series data to alleviate distribution shift, and at the same time reduce the dimension of the data so that the data dimension adapts to the subsequent processing requirements.

[0014] Step 2, Quantum state preparation: Convert the preprocessed data into quantum state data by means of quantum state encoding.

[0015] Step 3, Periodic feature extraction: Process the quantum state data using periodic quantum blocks constructed by quantum gates.

[0016] Step 4, Quantum measurement: After processing by the periodic quantum block, measure the quantum state and convert it back to the classical data form.

[0017] Step 5, Data post-processing and prediction output: For the result of quantum measurement, first process it through a linear layer, and then combine two residual branches to obtain the final time series prediction output.

[0018] A computer storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the method are implemented.

[0019] An electronic device, including a memory and one or more processors, the memory is used to store one or more programs; when the one or more programs are executed by the one or more processors, the method described above is implemented.

[0020] Compared with the prior art, the remarkable advantages of the present invention are:

[0021] (1) It has excellent ability in capturing periodic features. Existing methods, such as traditional statistical models and some deep learning models, are difficult to accurately capture the periodic features of time series data. The periodic quantum network, through a uniquely designed periodic quantum block module, is constructed based on quantum gates and can effectively simulate Fourier series, theoretically ensuring the efficient extraction of periodic features, being able to accurately grasp the periodic law in time series, and providing a more reliable basis for prediction.

[0022] (2) The model has strong generalization ability. The periodic quantum network not only performs well in periodic time series prediction tasks, but also shows good adaptability in non-periodic tasks (such as symbolic formula representation tasks). This benefits from its unique architecture based on quantum computing, enabling the model to learn more general feature representations. Compared with traditional methods that can only model specific types of data, the periodic quantum network can better handle complex and changing practical application scenarios and has a broader application prospect.

[0023] (3) It has a relatively low model complexity. Although the periodic quantum network has powerful functions, it is relatively compact in structural design. Compared with some complex deep learning models (such as certain Transformer variants), the periodic quantum network has relatively fewer parameters but can achieve more efficient learning and prediction. This not only reduces the training cost of the model, reduces the risk of overfitting, but also makes the model more convenient for actual deployment, has lower requirements for hardware resources, and is easier to run on resource-constrained devices.

[0024] (4) The model training has high stability. The periodic quantum network adopts a residual connection structure with a linear layer in the data post-processing stage. This design can dynamically adjust the offset of the fitting function and provide a more stable learning path for the model during training. Compared with the fluctuations and instabilities that traditional models are prone to during training, the periodic quantum network can converge to a better solution faster, improving the success rate of model training and the reliability of prediction results. Description of the Drawings

[0025] Figure 1 It is a flowchart of the time series prediction method based on the periodic quantum network of the present invention.

[0026] Figure 2 It is a visualization diagram of the time series prediction method process based on the periodic quantum network of the present invention. Detailed Embodiments

[0027] The present invention will be further clarified below in conjunction with the drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and not to limit the scope of the present invention.

[0028] As Figure 1 and Figure 2 shown, a time series prediction method based on a periodic quantum machine learning network specifically includes the following steps:

[0029] Step 1, perform data preprocessing on the statistical characteristic fluctuation problem of time series data to alleviate distribution shift, and at the same time perform dimensionality reduction on the data so that the data dimension adapts to the subsequent processing requirements;

[0030] Use reversible instance normalization (RevIN) to process the statistical characteristic fluctuation problem of time series data to eliminate distribution shift. RevIN is an advanced normalization and denormalization technology. It can adaptively adjust the statistical characteristics of data by introducing learnable affine transformations. Specifically, for the input data, first input it into the RevIN module, and through r t = RevIN(x t)This operation performs normalization. During this process, the RevIN module will learn appropriate scaling factors and offsets according to the data distribution, standardize the mean and variance of the data, thereby effectively alleviating the distribution shift problem. This not only makes the data have more stable statistical characteristics in subsequent processing but also enhances the model's adaptability to different data distributions.

[0031] In addition, since quantum networks have specific requirements for the feature dimensions of input data, and the dimensions of actual time series data are often too high, exceeding the processing capabilities of current quantum computing simulation platforms. For example, some traffic flow time series datasets may contain up to hundreds or even thousands of feature dimensions, which poses a huge challenge to quantum computing simulation platforms. Therefore, in order to make the data adapt to the processing requirements of quantum networks, the present invention uses linear transformation for dimensionality reduction operations. The specific linear transformation operation is h t = W(r t ) + b, where W is the weight matrix and b is the bias vector, and they jointly constitute the parameters of the linear transformation. Through this linear transformation, the data dimensions can be reduced to the range that can be processed by the quantum network while retaining the key information of the data, and the loss of information is minimized as much as possible to ensure the smooth progress of subsequent steps such as quantum state preparation and feature extraction. Such dimensionality reduction operations not only improve the computational efficiency but also avoid problems such as waste of computational resources and degradation of model performance caused by too high dimensions.

[0032] Step 2, Quantum state preparation: Convert the preprocessed data into quantum state data by means of quantum state encoding;

[0033] The present invention adopts the angle encoding method in quantum state encoding to accurately convert the preprocessed classical state data into quantum state data. Angle encoding, as an encoding scheme widely used in the field of quantum machine learning, has unique advantages. It cleverly encodes classical data as the rotation angles of single-qubit gates, thereby realizing the mapping from classical data to quantum states. In the time series prediction method of the present invention, for the feature vector h t obtained through preprocessing, it is transformed through a specific angle encoding function H(·), specifically expressed as q t = H(h t ).

[0034] Step 3, Periodic feature extraction: Process the quantum state data using a periodic quantum block constructed by quantum gates;

[0035] Innovatively, a periodic quantum block composed of rotation gates (RX) and controlled gates (CONT) is adopted to deeply mine and extract the periodic features of the quantum state data.

[0036] The rotation gate (RX) and the controlled gate (CONT), as basic operation units in quantum computing, possess unique quantum mechanical properties. The RX rotation gate can perform rotation operations on the states of qubits. By adjusting the rotation angle, the changes of qubits in the quantum state space can be precisely controlled. The CONT controlled gate, on the other hand, realizes the mutual control and information transfer between qubits, enabling the states of different qubits to be correlated and influenced with each other.

[0037] The periodic quantum block in the present invention consists of a multi-layer structure, and the quantum state data sequentially passes through L layers of stacked periodic quantum blocks. Each layer of the quantum block contains a parameter layer W(·) and an encoding layer S(·), where the parameter layer W(·) is implemented by the RX rotation gate and the encoding layer S(·) is implemented by the CONT controlled gate. This ingenious design combines the advantages of the two quantum gates, enabling the periodic quantum block to have a powerful feature extraction ability.

[0038] When processing quantum state data, its transformation process follows specific rules:

[0039]

[0040] Among them, p(·) represents the feature transformation performed by the quantum block, thereby effectively extracting the periodic features in the time series. f (l) represents the data features obtained after the operation of the l-th layer of the quantum block. Through this progressive way, each layer of the quantum block further mines and extracts the periodic features in the quantum state data on the basis of the previous layer. As the number of layers increases, the periodic quantum block can capture more complex and deep periodic patterns in the time series.

[0041] Step 4, quantum measurement: After being processed by the periodic quantum block, the quantum state is measured and converted back to the classical data form;

[0042] In the time series prediction process of the present invention, after the periodic features of the quantum state data are extracted, the quantum state needs to be converted back to the classical data form for subsequent analysis and prediction. This conversion process is achieved through quantum measurement, and its specific operation involves multiple key steps.

[0043] Before measurement, in order to optimize the measurement effect, an additional W(·) layer is introduced first. The role of this layer is to further transform and adjust the quantum state processed by the periodic quantum block, enabling the quantum state to better adapt to the subsequent measurement operation, which helps to more accurately extract the effective information contained therein.

[0044] After introducing an additional W(·) layer, the expectation value of the quantum state is measured using common observables. In the present invention, observables widely used in quantum circuits, such as the Pauli Z operator, are employed for the measurement. As a fundamental quantum mechanical operator, the Pauli Z operator can detect and quantify the properties of a quantum state in a specific direction. The specific measurement process can be expressed by the formula:

[0045] Q = O(W(f (L) ))

[0046] where O represents the observable quantum measurement, which defines how to observe and quantify the quantum state; W(f (L) ) represents the quantum state after being processed by the additional W(·) layer. This quantum state is the result of being processed by L layers of periodic quantum blocks and contains the key feature information of the time series data. By measuring W(f (L) ) with the observable O, the measurement result Q can be obtained. This measurement result Q is in the form of classical data, which presents the information contained in the quantum state in the way of classical data and provides an important data basis for subsequent data post-processing and the final time series prediction.

[0047] Step 5, data post-processing and prediction output: For the result of the quantum measurement, first process it through a linear layer, and then combine two residual branches to obtain the final time series prediction output;

[0048] The characteristic data Q obtained through Step 4 is first input into the linear layer for processing. In the present invention, after being processed by the linear layer, y linear is obtained, and its calculation formula is y linear = W linear Q + b linear , where y linear is the result obtained by the backbone network through the linear layer transformation processing of the characteristic data Q, W linear is the weight matrix of this linear layer, and b linear is the bias vector of this linear layer. The purpose of this step is to perform preliminary weighted and offset operations on the characteristic data, so that the data can better reflect the potential law of the time series and also prepare for the subsequent fusion with other data branches.

[0049] Next, two residual connection branches are introduced. The first residual connection branch y res is calculated through the formula y res = W res r t + b res , where W res and b res are respectively the weight matrix and bias vector of the linear layer of this residual branch, rt It is the input feature after RevIN normalization in the data preprocessing stage. The introduction of residual connections can effectively solve the problem of gradient disappearance in deep learning, making it easier for the model to converge to the optimal solution during training. In this way, part of the feature information of the original data is retained, avoiding excessive loss of information during complex model processing.

[0050] The second residual connection branch y revin directly takes r in the data preprocessing stage t , that is, y revin = r t . This design further emphasizes the importance of the original data in the model, ensuring that the model can make full use of the key information in the original data.

[0051] Then, y linear , y res and y revin are fused. This fusion method combines the features after linear layer transformation, the retained original data features, and the information obtained from the residual connection, and can more comprehensively reflect the features and trends of the time series.

[0052] Finally, post-processing is performed on the fused data to obtain the final time series prediction output. First, it is processed through the reversible instance normalization RevIN -1 , which is the inverse operation of RevIN used in the data preprocessing stage. It can restore the normalized data to the original data scale range while retaining the feature information after the data is processed by the model. Then, a linear transformation is performed. Through this series of operations, the prediction output y t ′ is finally obtained, and the calculation formula is:

[0053] y t ′ = RevIN -1 (Linear(y linear + y res + y revin ))。

Claims

1. A time series prediction method based on a periodic quantum machine learning network, characterized in that: The following steps are involved: Step 1: Data preprocessing: Process the statistical fluctuation of time series data to alleviate distribution shift and reduce the dimension of the data to make it suitable for subsequent processing requirements. Step 2, quantum state preparation: converting the preprocessed data into quantum state data using quantum state encoding; Step 3, periodic feature extraction: Processing quantum state data using periodic quantum blocks constructed by quantum gates; Step 4, quantum measurement: After the periodic quantum block processing, the quantum state is measured and converted back to classical data form; Step 5, data post-processing and prediction output: The results of quantum measurement are first processed through a linear layer, and then combined with two residual branches to obtain the final time series prediction output.

2. The time series prediction method based on periodic quantum network according to claim 1 is characterized in that: Step 1: Reversible instance normalization RevIN is used to deal with the statistical characteristic fluctuation problem of time series data to eliminate distribution offset, and linear transformation is used to reduce the dimension to adapt to the quantum network; the specific operation is to transform the input data x t , first through r t =RevIN(x t ) to normalize and obtain the normalized input feature r t , and then through h t =W(r t )+b for linear transformation to obtain the preprocessed feature vector h t , where W is the weight matrix and b is the linear transformation parameter and the bias vector.

3. The time series prediction method based on periodic quantum network according to claim 2 is characterized in that: Step 2 uses the angle coding in quantum state coding to convert the preprocessed classical state data into quantum state data, which is specifically expressed as q t =H(h t ), where H(·) is the angle encoding function.

4. The time series prediction method based on periodic quantum network according to claim 3 is characterized in that: Step 3 uses a periodic quantum block composed of a rotating gate RX and a controlled gate CONT to extract periodic features from the quantum state data; the quantum state passes through L layers of stacked periodic quantum blocks in sequence, each layer of quantum blocks consists of a parameter layer W(·) and a coding layer S(·), where the parameter layer W(·) is implemented by the rotating gate RX and the coding layer S(·) is implemented by the controlled gate CONT. The transformation process is: Where p(·) represents the feature transformation performed by the quantum block to effectively extract the periodic features in the time series; f (l) Represents the data characteristics obtained after the l-th layer quantum block operation.

5. The time series prediction method based on periodic quantum network according to claim 4 is characterized in that: Step 4 measures the quantum state and converts it back to classical data form. Before the measurement, an additional parameter layer W(·) is introduced, and then the expected value of the quantum state is measured through observables to obtain the measurement result, as shown in the following formula: Q=O(W(f (L) )) Among them, Q represents characteristic data, O represents observable quantum measurement, and W(f (L) ) represents the quantum state after being processed by the additional parameter layer W(·).

6. The time series prediction method based on periodic quantum network according to claim 5 is characterized in that: The feature data Q obtained by step 4 is first processed by the linear layer to obtain y linear =W linear Q+b linear , and then combine the two residual connection branches y res =W res r t +b res and revin =r t , and finally normalize RevIN by reversible instance -1 And a linear transformation to get the final time series forecast output: and t ′ =RevIN -1 (Linear(and linear +y res +y revin )) Among them, y linear is the result obtained by the backbone network processing the feature data Q through linear layer transformation, W linear is the weight matrix of the linear layer, b linear is the weight bias vector of the linear layer, y res is the first residual connection branch, W res is the weight matrix of the first residual branch linear layer, b res is the weight bias vector of the first residual branch linear layer, y revin is the second residual connection branch, y t ′ is the final predicted output.

7. A computer storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

8. An electronic device, characterized in that: It comprises a memory and one or more processors, wherein the memory is used to store one or more programs; when the one or more programs are executed by the one or more processors, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Data processing method and device, equipment, storage medium and program product

    CN120806189A

  • Method for effectively simulating general quantum computing based on classical circuit network

    CN121390337A