Multi-step time series prediction method based on quantum bidirectional recurrent network of causal convolution

By using a quantum bidirectional recurrent network based on causal convolution and leveraging the multi-head attention mechanism of quantum causal convolution layers and bidirectional recurrent units, the problem of insufficient performance in multi-step time series prediction in existing technologies is solved. This enables efficient capture and prediction of long-term dependencies and complex time series relationships, thereby improving the optimization effect of industrial production.

CN119250115BActive Publication Date: 2026-03-31GUANGDONG UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing quantum convolutional hybrid networks and quantum recurrent networks have limited prediction performance in multi-step time series prediction, making it difficult to effectively capture long-term dependencies and complex temporal relationships.

Method used

A quantum bidirectional recurrent network based on causal convolution is adopted. Temporal feature information is extracted through residual blocks composed of quantum causal convolutional layers and quantum squeeze excitation layers. Temporal state information is extracted by combining variable quantum circuits. Multi-step temporal prediction is performed through the forward and backward recurrent units of the quantum bidirectional recurrent network, and the hidden layer state is updated by using a multi-head attention mechanism.

Benefits of technology

It effectively captures long-term dependencies and causal relationships in a shallower network structure, improves the performance of multi-step time series prediction, enhances the ability to handle complex time-varying relationships, and optimizes industrial production processes and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250115B_ABST
    Figure CN119250115B_ABST
Patent Text Reader

Abstract

The application provides a multi-step time series prediction method based on a quantum bidirectional recurrent network of causal convolution. The application can capture longer time dependence in a relatively shallow network by using a quantum causal convolution network based on time series perception, and can realize fast capture and processing of long-time dependence, causality and time sequence correlation between data by virtue of the advantages of quantum computing. The application can enhance the expression of time series information and effectively improve the ability to process complex time-varying relationships by fusing time series state information and time series feature information through a quantum bidirectional recurrent network guided by an attention mechanism. The application can capture and integrate important information of long-time span by updating the important information of the hidden layer of the bidirectional recurrent unit by using a multi-head attention mechanism. Compared with the prior art, the application effectively improves the performance of multi-step time series prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of quantum computing technology, and in particular to a multi-step timing prediction method for quantum bidirectional recurrent networks based on causal convolution. Background Technology

[0002] Multi-step time series forecasting has wide applications in industrial and commercial sectors, ranging from energy management and financial market analysis to weather forecasting and smart manufacturing. Accurate multi-step time series forecasting helps decision-makers prepare for future uncertainties. In multi-step time series forecasting tasks, models need to predict not only a single future point in time but also continuous time series forecasts, capturing long-term dependencies and complex temporal dynamics. This places higher demands on the model's ability to capture time series data, integrate information, and be sensitive to time series patterns. Classical machine learning and deep learning methods, such as traditional Convolutional Neural Networks (CNNs), Long Short-Term Memory (LSTM) networks, and Temporal Convolutional Networks (TCNs), have achieved some success in single-step time series forecasting.

[0003] However, multi-step time series prediction tasks often face the following limitations: First, insufficient capture of long-term dependencies. CNNs and TCNs have inherent limitations in handling long-term dependencies. The local receptive field of CNNs limits their effectiveness in capturing long-range dependencies. Although TCNs expand their receptive field through dilated convolutions, they still need to stack multiple layers of convolutions to capture very long-term dependencies, significantly increasing model complexity and training difficulty. Second, insufficient handling of complex temporal relationships. Multi-step time series prediction requires the model to accurately update and maintain the hidden state in each prediction step. However, traditional recurrent neural networks (RNNs) such as LSTM and GRU are prone to gradient vanishing or exploding problems when processing long-term sequences, making it difficult to maintain effective long-term memory and state updates. In addition, the sequential processing method of classic RNNs results in insufficient ability to capture bidirectional dependencies and complex nonlinear relationships in sequential data. Third, limited ability to capture temporal order and causal relationships. Time series data often contains implicit temporal order and causal relationships. Traditional convolutional and recurrent networks lack specialized mechanisms to highlight and utilize these characteristics when dealing with these relationships, resulting in poor performance in complex temporal tasks.

[0004] In recent years, the introduction of quantum computing has provided a new perspective and method for time series prediction, and combining quantum computing with deep learning has become a new direction for solving complex time series prediction problems. By utilizing properties such as quantum superposition and quantum entanglement, quantum computing can process multiple states simultaneously, thus providing higher parallel computing power and stronger state representation capabilities than classical computing. Therefore, theoretically, it is possible to effectively capture and process long-term dependencies and complex temporal relationships in relatively shallow network structures.

[0005] Currently, quantum convolutional networks (QCNNs) primarily focus on quantum two-dimensional and one-dimensional convolutions. However, this research faces similar limitations to traditional convolutional networks in time series prediction. Convolutional networks were not originally designed for time series prediction, and time series models have been extended to the quantum realm. These studies have demonstrated the significant potential of quantum recurrent networks such as quantum recurrent neural networks (QRNNs), quantum gated recurrent networks (QGRUs), and quantum long short-term memory networks (QLSTMs) in capturing long-term dependencies and nonlinear dynamic relationships, providing new solutions for multi-step time series prediction. However, in multi-step time series prediction, more sophisticated network models are often required to improve prediction performance. Therefore, designing suitable quantum convolutional structures and integrating the characteristics of different networks has significant theoretical and practical value in the field of quantum network time series prediction.

[0006] Existing quantum convolutional hybrid networks (QCNNs) mainly fall into two categories: The first is two-dimensional convolution, leveraging the advantages of quantum computing to analyze the performance of QCNNs in processing classical data with high-dimensional features, aiming to improve the efficiency and accuracy of classical data classification tasks. For example, introducing two-dimensional dilated convolution into quantum networks, through quantum dilated convolution operations, has significant advantages in feature extraction and capturing a wide range of contextual information, improving the performance of such networks in processing time-series and image data. However, these networks are mainly applied to static data classification tasks and do not address the more complex dynamic features of time-series prediction. The second is one-dimensional convolution. One-dimensional quantum convolutional neural networks are applied to time-series prediction. For example, a one-dimensional QCNN architecture suitable for time-series data demonstrates its potential in feature extraction and prediction. In general, both directions primarily focus on performance comparisons with classical CNNs and the advantages of quantum computing in classification tasks.

[0007] Existing quantum recurrent networks (QRNNs) mainly fall into three categories: first, introducing qubits to represent network weights; second, using quantum optimization algorithms to optimize the performance of classical networks; and third, through bidirectional design or fusion with convolutional networks such as CNNs. However, as data-driven modeling becomes increasingly complex, especially for multi-step time series prediction, the predictive performance of these networks remains limited.

[0008] Therefore, there is an urgent need for a new multi-step time prediction method based on causal convolution quantum bidirectional recurrent networks to solve the above-mentioned technical problems. Summary of the Invention

[0009] This invention proposes a novel multi-step time series prediction method based on causal convolution quantum bidirectional recurrent networks, aiming to improve the performance of multi-step time series prediction so as to optimize industrial production processes and production efficiency based on the prediction results of multi-step time series.

[0010] This invention proposes a multi-step temporal prediction method based on causal convolution of quantum bidirectional recurrent networks. The multi-step temporal prediction method includes the following steps:

[0011] S1. Obtain time series data;

[0012] S2. Establish a time-aware quantum causal convolutional network, and use the time-series data as the input of the quantum causal convolutional network to extract information, thereby obtaining time-series state information and time-series feature information;

[0013] S3. Establish a quantum bidirectional recurrent network, and use the temporal state information and the temporal feature information as inputs to the quantum bidirectional recurrent network to perform multi-step temporal prediction and obtain multi-step prediction values.

[0014] Preferably, the quantum causal convolutional network includes a multi-layered temporal-dimensional quantum causal convolutional layer, a quantum squeeze excitation layer, and a variable quantum circuit;

[0015] The quantum causal convolutional layer and the quantum squeeze excitation layer constitute a residual block, which is used to extract the temporal feature information from the time series data, and the variable quantum circuit is used to extract the temporal state information from the time series data.

[0016] Preferably, the quantum causal convolutional layer includes a quantum dilated causal convolutional layer, a weight normalization layer, a ReLU layer, and a dropout layer; wherein, the quantum dilated causal convolutional layer is used to extract the temporal dependencies in the time series data through the superposition and dilation of quantum states.

[0017] Preferably, step S2 includes the following sub-steps:

[0018] S21. The time series data is stacked through the quantum causal convolutional layer to stack the dimensions of the time series data to obtain the second time series data;

[0019] S22. The second timing data is divided into multiple time state information according to the dimension, and the multiple time state information is used as the input of the variable quantum circuit to calculate the timing state information.

[0020] S23. Input the time-series state information as weight information into the quantum squeezing excitation layer for squeezing processing to obtain residual block information;

[0021] S24. Calculate the time series feature information based on the residual block information and the second time series data.

[0022] Preferably, the quantum bidirectional loop network includes a forward loop unit and a reverse loop unit, wherein the forward loop unit and the reverse loop unit include a reset gate, an update gate, and candidate hidden states.

[0023] Preferably, step S3 includes the following sub-steps:

[0024] S31. The timing state information and the timing feature information are processed as inputs to the forward loop unit to obtain the hidden layer state information of all time steps in the timing state information and the timing feature information.

[0025] S32. The hidden layer state information is updated through a multi-head attention mechanism based on a sliding window, and the future hidden layer state information is predicted in multiple steps to obtain positive multi-step hidden layer state information.

[0026] S33. Set the multiplication element of the hidden layer state in the reverse loop unit according to the hidden layer state information, take the temporal state information and the temporal feature information as the input of the reverse loop unit, update it based on the multi-head attention mechanism of the sliding window, and perform multi-step prediction of the future hidden layer information to obtain the reverse multi-step hidden layer state information.

[0027] S34. Calculate the multi-step prediction value based on the forward multi-step hidden layer state information and the reverse multi-step hidden layer state information.

[0028] Compared with existing technologies, this invention utilizes a time-aware quantum causal convolutional network. This network comprises multiple time-dimensional quantum causal convolutional layers and residual blocks composed of quantum squeezing excitation mechanism layers. This allows for the capture of longer temporal dependencies within a shallower network. Leveraging the advantages of quantum computing, it enables rapid capture and processing of long-term dependencies, causal relationships, and temporal order correlations among data. Simultaneously, it extracts temporal state information through variable quantum circuits and feeds it back to the residual blocks, thus achieving a time-aware quantum causal convolutional network. Furthermore, an attention-guided quantum bidirectional recurrent network integrates temporal state and feature information to enhance the representation of temporal information, effectively improving the ability to handle complex time-varying relationships. The multi-head attention mechanism guides the updating of important hidden information in the bidirectional recurrent units, capturing and integrating important information over long time spans, effectively improving the performance of multi-step temporal prediction. Attached Figure Description

[0029] The present invention will now be described in detail with reference to the accompanying drawings. The above and other aspects of the present invention will become clearer and more readily understood through the detailed description following the accompanying drawings. In the drawings:

[0030] Figure 1 This is a flowchart of a multi-step temporal prediction method for quantum bidirectional recurrent networks based on causal convolution provided in an embodiment of the present invention.

[0031] Figure 2 This is a schematic diagram of the structure of the quantum causal convolutional network and the quantum bidirectional recurrent network provided in the embodiments of the present invention;

[0032] Figure 3 This is a schematic diagram of the quantum causal convolutional layer provided in an embodiment of the present invention. Detailed Implementation

[0033] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0034] Please refer to Figures 1-3 This invention provides a multi-step time series prediction method based on causal convolution of quantum bidirectional recurrent networks. The multi-step time series prediction method includes the following steps:

[0035] S1. Obtain time series data;

[0036] In this embodiment of the invention, time series data refers to data arranged in chronological order, which records the measurement values ​​of a variable or a group of variables at different points in time.

[0037] S2. Establish a time-aware quantum causal convolutional network, and use the time-series data as the input of the quantum causal convolutional network to extract information, thereby obtaining time-series state information and time-series feature information;

[0038] In this embodiment of the invention, the quantum causal convolutional network includes a quantum causal convolutional layer based on multiple temporal dimensions, a quantum squeeze excitation layer, and a variable quantum circuit.

[0039] The quantum causal convolutional layer and the quantum squeeze excitation layer constitute a residual block, which is used to extract the temporal feature information from the time series data, and the variable quantum circuit is used to extract the temporal state information from the time series data.

[0040] The quantum causal convolutional layer includes a quantum dilated causal convolutional layer, a weight normalization layer, a ReLU layer, and a dropout layer; wherein, the quantum dilated causal convolutional layer is used to extract the temporal dependencies in the time series data through the superposition and dilation of quantum states.

[0041] Specifically, the single-layer quantum causal convolutional layer (TQCC) in the residual block is consistent with the last layer of the aforementioned multi-layer quantum causal convolution, aiming to achieve channel transformation while maintaining the consistency of the residual connection dimension. The quantum squeeze excitation layer (QSE_TI) mainly consists of a squeeze operation with temporal state information feedback and a quantum excitation layer.

[0042] In this embodiment of the invention, step S2 includes the following sub-steps:

[0043] S21. The time series data is stacked through the quantum causal convolutional layer to stack the dimensions of the time series data, thereby obtaining the second time series data.

[0044] For details, please refer to Figure 2 and Figure 3 , Figure 2 This is a schematic diagram of the structure of the quantum causal convolutional network and the quantum bidirectional recurrent network provided in the embodiments of the present invention. Figure 3 This is a schematic diagram of the quantum causal convolutional layer provided in an embodiment of the present invention; the convolution operation of the quantum causal convolutional layer is implemented by the kernel convolution filtering operation through the quantum convolution filter Qfilter, and the quantum convolution filter is implemented by the variable quantum circuit.

[0045] For low-level temporal quantum causal convolutions, the dilation factor d defaults to 1, representing the one-dimensional data interval between input qubits and controlling the receptive field of the convolution. As the number of layers increases, the receptive field becomes larger. To obtain a linearly and steadily growing receptive field, this invention increases the dilation factor d by 1 layer by layer. For a given number of layers L and kernel size k, the final receptive field size is 1 + (k-1)*L.

[0046] Furthermore, once the inflation factor d is determined, the corresponding padding size is also determined to be (k-1)*d, where k is the number of qubits in the variable quantum circuit, which determines the number of qubits involved in each convolution operation. Stride is the stride length, which is usually set to 1 to ensure causality.

[0047] Finally, the clipping operation (clip = padding) is used to ensure that the output of each layer has the same length as the input signal. In quantum computing, data can be represented as quantum states |ψ>, which can be manipulated through quantum gates.

[0048] The mathematical description of the dilated causal convolution process is as follows:

[0049]

[0050] Where U represents the quantum convolution kernel, i.e., the quantum filter, it can be represented as a quantum gate acting on the input quantum state: |ψ y >=U|ψ x >; d, k, and U[i] represent the expansion factor, kernel size, and weight of the quantum gate operation, respectively.

[0051] The variable quantum circuit of the quantum convolution filter (Qfilter) in this invention uses H, Ry, and Rz quantum gates to quantum encode the data in its encoding layer. For each input element, θ is taken as... i,1 =arctan(x i )and The N-dimensional input vector generates 2N rotation angles, which are used as inputs to the Ry and Rz quantum gates, respectively.

[0052] For variable layering, using strong entanglement variable layering, assuming N qubits and L layers of strong entanglement, the mathematical description can be: in It is a single-qubit rotation gate in the Lth layer, which can be expressed as the tensor product of the rotation gate on each qubit: Strong embedding is manifested in the fact that the circuit first undergoes a rotation gate operation, followed by a CNOT (Controlled-NOT) gate. If the CNOT gate were used first, the complexity might be limited because the entangled structure of the quantum state is fixed at the initial stage. Subsequent rotation gates can only adjust within this fixed entanglement structure, which may limit the circuit's expressive power, especially when capturing more complex timing patterns. For the measurement layer, each quantum filter is measured using the Pauli Z operator, and the measurement results are summed to obtain the output of the quantum convolution filter.

[0053] S22. The second timing data is divided into multiple time state information according to the dimension, and the multiple time state information is used as the input of the variable quantum circuit to calculate the timing state information.

[0054] Specifically, the time-stage variable quantum circuit not only serves as a key to realizing time-aware capabilities in quantum causal convolutional networks, but also enhances the expression of temporal information in subsequent attention-guided quantum bidirectional recurrent networks, improving their ability to handle complex temporal relationships. The specific implementation method is as follows:

[0055] For the input data of each time window, firstly, the number of channels is transformed to be consistent with the number of qubits in each time step through a quantum causal convolutional layer; then, for the data of each time step in the window, the variable quantum circuit evolution is performed sequentially, and the circuit evolution process of each qubit in the next stage is affected by the quantum mid-path measurement; finally, the measurement results obtained from the circuit evolution of all time steps in the time window are added together, which is used as the time state information (TI_state).

[0056] S23. The time-series state information is input as weight information into the quantum squeezing excitation layer for squeezing processing to obtain residual block information.

[0057] S24. Calculate the time series feature information based on the residual block information and the second time series data.

[0058] The temporal state information is generated by the aforementioned temporal staged quantum circuit and is used as the weight information for global average pooling in the squeezing operation to compress the spatial information of each channel into a scalar. Then, the quantum squeezing excitation layer uses parameterized quantum gates (such as rotation gates and entanglement gates) to operate on the squeezed information, where this part of the quantum circuit is consistent with the variable quantum circuit in the quantum convolution filter.

[0059] Finally, the weights obtained from the excitation are applied to each channel of the input feature, adjusting the weights of each channel. The Quantum Squeeze Excitation Layer (QSE_TI), as a mechanism to enhance the model's attention across channels or feature dimensions, not only incorporates the characteristics of quantum computing but also adjusts the importance of different channels by fusing temporal state information, thereby better capturing important information.

[0060] S3. Establish a quantum bidirectional recurrent network, and use the temporal state information and the temporal feature information as inputs to the quantum bidirectional recurrent network to perform multi-step temporal prediction and obtain multi-step prediction values.

[0061] In this embodiment of the invention, the quantum bidirectional recurrent network includes a forward recurrent unit (QGRUcell) and a reverse recurrent unit (QGRUcell), and the forward recurrent unit and the reverse recurrent unit include a reset gate, an update gate, and candidate hidden states.

[0062] Specifically, the mathematical formulas for calculating the reset gate, update gate, and candidate hidden states in the forward and reverse loop units are as follows:

[0063] The mathematical formula for resetting the door is described below:

[0064] r t =σ(VQC1[Global_Info]) t ,(TI_state[t-1]⊙h t-1 )]);

[0065] Global_Info t Represents global information at the current time step t; VQC1 is a variable quantum circuit; ⊙ represents element-wise multiplication.

[0066] The mathematical formula for updating the gate is described below:

[0067] z t =σ(VQC2[Global_Info) t ,(TI_state[t-1]⊙h t-1 )]);

[0068] New candidate hidden states The mathematical calculation formula is described as follows:

[0069]

[0070] Hidden state update h t The calculation formula is as follows:

[0071]

[0072] In this embodiment of the invention, step S3 includes the following sub-steps:

[0073] S31. The timing state information and the timing feature information are processed as inputs to the forward loop unit to obtain the hidden layer state information of all time steps in the timing state information and the timing feature information.

[0074] S32. The hidden layer state information is updated through a multi-head attention mechanism based on a sliding window, and the future hidden layer state information is predicted in multiple steps to obtain positive multi-step hidden layer state information.

[0075] Specifically, the forward loop unit extracts the state information corresponding to the first time step in the time window from the timing state information and uses it as the multiplication element of the hidden state h0.

[0076] The hidden layer information H obtained from all time steps of the forward loop unit F =[h1,h2,...,h T After updating via a multi-head attention mechanism, the updated terminal hidden layer information h is extracted. final After being processed by the forward recurrent unit, this hidden layer information serves not only as the data input to the forward recurrent unit but also as the input to the hidden state. The output is the predicted hidden layer information for the next step, which can be described as h. new =QCell([h final ,h final ]).

[0077] Based on this, to achieve an attention-guided bidirectional network, all hidden layer information is cascaded H' = [h'1, h'2, ..., h'']. final ,h new And select the hidden layer information H” = [h'2,...,h”] that needs to be updated through a sliding window. final ,h new This refers to the multi-head attention mechanism and the Add&LayerNorm layer. To further predict the next step, the updated terminal hidden layer information is extracted and used as the input to the forward recurrent unit, with the output being the predicted hidden layer information for the next step. This process is repeated to obtain the future multi-step hidden layer information output of the forward recurrent unit. The specific mathematical description is as follows:

[0078] In selecting the hidden layer information that needs to be updated using a sliding window, for H = [h1, h2, ..., h...] T ,h new ],

[0079] Through calculation The single-head attention weight output is mathematically described as follows:

[0080] Multi-head attention calculates the attention weights for each head separately and then concatenates them: MultiHead(Q,K,V) = Concat(head1,...,head) h Finally, the hidden layer information is updated through the Add&LayerNormcao operation. The mathematical process is described as H′=LayerNorm(H+MultiHead(Q,K,V)). For multi-step prediction, the latest terminal hidden state is taken from the updated hidden state as the input of the positive recurrent unit of the prediction block for the next step, and the recursion continues to obtain the multi-step prediction value.

[0081] S33. Set the multiplication element of the hidden layer state in the reverse loop unit according to the hidden layer state information, take the temporal state information and the temporal feature information as the input of the reverse loop unit, update it based on the multi-head attention mechanism of the sliding window, and perform multi-step prediction of future hidden layer information to obtain reverse multi-step hidden layer state information.

[0082] Specifically, the unsliding initial window hidden layer information obtained from the update is inverted and used sequentially as the multiplication element of the hidden states ht at each time step of the reverse recurrent unit. Furthermore, the output of the aforementioned quantum causal convolutional network—the global information of temporal features—is also used as the input to the reverse recurrent unit. Subsequent operations are the same as in the forward network; therefore, the output of the reverse recurrent unit is the hidden layer information for the future multiple steps. This process is consistent with that of the forward recurrent unit.

[0083] S34. Calculate the multi-step prediction value based on the forward multi-step hidden layer state information and the reverse multi-step hidden layer state information.

[0084] Specifically, the hidden layer information output by all the forward and backward recurrent units is cascaded and summed, then input into the feedforward linear layer to obtain the final output of the overall model, which is the prediction value for the next several steps. By fusing the global temporal feature information and temporal state information obtained from the aforementioned quantum causal convolutional network through a quantum bidirectional recurrent network guided by an attention mechanism, the forward and backward recurrent units are treated as non-independent entities. Guided by the attention module, the network can better capture and integrate important information over long time spans, ultimately improving the model's ability to handle complex temporal relationships and complex nonlinear data.

[0085] To better understand, let's take multivariate, multi-step time series forecasting as an example. Given input time series data X... t If the dimension of the output multi-step prediction is (batchsize, seq, inputdim), then the dimension of the output multi-step prediction is (batchsize, pre_step).

[0086] In the temporal sequence (seq) dimension, the system utilizes stacked temporal quantum causal convolutional layers. The first layer has an inflation factor (d) of 1, increasing by 1 with each subsequent layer. The filter size (k) equals the number of qubits (wires), a hyperparameter. The stride is 1, ensuring the capture of causal relationships between all elements. The padding size is (k-1)*d, equal to the clipping size, which is also used to prevent the leakage of future information, thus ensuring the implementation of causal convolution. After stacking four layers, the resulting dimension is (batchsize, seq, final_channels), but the number of channels changes through a linear transformation, also a hyperparameter.

[0087] After the first layer of quantum causal convolution, the resulting second temporal data has a dimension of (batchsize, seq, qubit_numbers). The number of channels is transformed to match the number of qubits in the staged quantum circuit. This second temporal data is then sequentially divided into seq current time state information with a dimension of (batchsize, qubit_numbers), which are used as inputs to the staged quantum circuit. Quantum circuits at different time steps influence each other sequentially through quantum mid-path measurements. The output is then the temporal state information with a dimension of (seq, batchsize, qubit_numbers). After a linear layer transformation, output data with a dimension of (seq, batchsize, hidden_dim) is obtained to match the input dimension of subsequent networks.

[0088] Similarly, the temporal sequence data (seq) is processed by a quantum causal convolutional layer, with the number of channels consistent with the last quantum causal convolutional layer, ensuring consistent output dimensions of the residual blocks. Building upon this, a quantum squeezing activation mechanism layer is applied. In this layer, the temporal state information obtained above is used as feedback weights and input into the squeezing operation to form a weighted global average pooling layer. As the network optimizes, important information in the quantum temporal causal convolutional structure is continuously updated. By adding the residual block information to the output (batchsize, seq, final_channels) obtained in the first step, the global temporal feature information output of the time-aware quantum causal convolutional network is obtained.

[0089] In the forward loop unit, during the execution at time step t, QGRUcells(x t ,h t-1 Input x t ,h t-1 They are Global_Info and TI_state[t-1]⊙h' respectively. t-1The corresponding dimensions are (batchsize, seq, final_channels) and (batchsize, hidden_dim), respectively. t-1 This is the hidden state initialized by the forward loop unit. At this time, the output of the forward loop unit is the hidden state information H for all time steps. F =[h1,h2,...,h T ].

[0090] Define the following process as process A, which processes the hidden state information of all time steps through a multi-head attention mechanism and extracts the terminal hidden layer information h'. T After passing through the positive recurrent unit, the output is the hidden layer information for the next step, which can be described as h. new =QCell([h' T ,h' T The hidden layer information is defined as (batchsize, hidden_dim). To accurately predict the second step, a multi-head attention mechanism based on a sliding window is used to update the hidden layer information, i.e., to update the new hidden layer information h. new By connecting with H, we get H' = [h2,...,h T ,h new Then, through a multi-head attention mechanism and an Add&LayerNorm layer update, the hidden layer information at this point is extracted and processed by QCell to obtain the new hidden layer information for predicting the second step. If predicting the next N steps, process A is repeated N times to obtain N h values. new,backward After being cascaded, the output data of the positive vector subnetwork is obtained, with dimensions (N, batchsize, hidden_dim).

[0091] Extract the hidden layer information H corresponding to the initial window that has not been slidable from the updated hidden layer state. N H N =[h 1N ,h 2N ,...,h TN This is used as the multiplication element of the hidden state of the reverse loop unit. That is, in the reverse loop unit, during the execution at the corresponding time step t, QGRUcells(x t ,h t-1 Input x t ,h t-1 They are Global_Info and H N [t-1]⊙h' t-1,backwards The corresponding dimensions are (batchsize, seq, final_channels) and (batchsize, hidden_dim), respectively. t-1,backwardsThis is the hidden state initialized by the inverse loop unit. At this point, the output of the inverse loop unit will also be the hidden state information H for all time steps. B =[h1,h2,...,h T ].

[0092] The reverse loop unit also repeats process A N times, obtaining N predicted hidden state information h. new,backward With the above N h new,forward The data are summed and connected to a feedforward network (FFN), meaning the input data dimension is (batchsize, N, hidden_dim) and the output dimension is (batchsize, N). Mathematically, this is described as y pre =W2·ReLU(W1x+b1)+b2. This achieves multivariate, multi-step prediction output.

[0093] The operation of the forward loop unit and the reverse loop unit at time step t consists of four stages: resetting the gate, updating the gate, calculating the new candidate hidden state, and updating the hidden state.

[0094] Phase 1: The reset gate controls how the input at the current time step t is combined with the previous hidden state to determine the generation of the current candidate hidden state. The output r of the reset gate... t The previous hidden state h was determined. t-1 The degree of influence when generating new candidate hidden states.

[0095] Phase 2: Update the current hidden state h of the gate control. t This refers to how much information from the previous hidden state and how much information from the new candidate hidden state are retained. Here, the formula is similar in form to the reset gate, but the update gate z... t They have different effects when updating hidden states. t The current hidden state h is determined. t It is more about keeping the source from h t-1 The information should be used to determine whether to adopt new candidate hidden states more often.

[0096] The third stage: New candidate hidden states combine the current input information and the previous hidden state (whose influence is controlled by the reset gate) to generate potential new hidden states for the current time step, fusing current input and historical information. New candidate hidden states It combines the global information Global_Info of the current time step with the previous hidden state h after the reset gate. t-1 .

[0097] Phase 4: Combining the previous hidden state and the new candidate hidden states, update the hidden state at the current time step. Specifically, use the update gate z. t Update the hidden state h of the current time step t.t The formula for calculating the update of hidden states is as follows: This weighted summation method ensures that the model can smoothly transition to new hidden states, making full use of historical information and current input information.

[0098] Compared with existing technologies, this invention utilizes a time-aware quantum causal convolutional network. This network comprises multiple time-dimensional quantum causal convolutional layers and residual blocks composed of quantum squeezing excitation mechanism layers. This allows for the capture of longer time dependencies within a shallower network. Leveraging the advantages of quantum computing, it enables rapid capture and processing of long-term dependencies, causal relationships, and temporal order correlations among data. Simultaneously, it extracts temporal state information through variable quantum circuits and feeds it back to the residual blocks, thus achieving a time-aware quantum causal convolutional network. Furthermore, an attention-guided quantum bidirectional recurrent network integrates temporal state and feature information to enhance the expression of temporal information, effectively improving the ability to handle complex time-varying relationships. The multi-head attention mechanism guides the updating of important hidden information in the bidirectional recurrent units, capturing and integrating important information over long time spans, effectively improving the performance of multi-step temporal prediction. This allows for the optimization of industrial production processes and efficiency based on the prediction results of multi-step temporal sequences.

[0099] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0100] The embodiments of the present invention have been described above with reference to the accompanying drawings. The disclosed embodiments are merely preferred embodiments of the present invention. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many equivalent changes in form without departing from the spirit and scope of the claims of the present invention, and all such changes are within the protection scope of the present invention.

Claims

1. A multi-step time series prediction method based on a causal convolution-based quantum bidirectional recurrent network, characterized in that, The multi-step time series prediction method comprises the following steps: S1, acquiring time series data; S2, establishing a quantum causal convolution network based on time series perception, performing information extraction on the time series data as the input of the quantum causal convolution network to obtain time series state information and time series feature information; S3, establishing a quantum bidirectional recurrent network, performing multi-step time series prediction on the time series state information and the time series feature information as the input of the quantum bidirectional recurrent network to obtain a multi-step prediction value; The quantum causal convolution network comprises a quantum causal convolution layer based on a multi-layer time series dimension, a quantum squeeze excitation layer, and a variational quantum circuit; The quantum causal convolution layer and the quantum squeeze excitation layer constitute a residual block, the residual block is used to extract the time series feature information in the time series data, and the variational quantum circuit is used to extract the time series state information in the time series data; The quantum causal convolution layer comprises a quantum dilated causal convolution layer, a weight normalization layer, a ReLU layer, and a dropout layer; wherein the quantum dilated causal convolution layer is used to extract the time dependence in the time series data through superposition processing and dilated processing of quantum states; The quantum bidirectional recurrent network comprises a forward recurrent unit and a reverse recurrent unit, and the forward recurrent unit and the reverse recurrent unit comprise a reset gate, an update gate, and a candidate hidden state.

2. The method of Claim 1, wherein the multi-step time series prediction method based on the causal convolutional bidirectional recurrent quantum network is characterized by, In step S2, the following sub-steps are included: S21, performing stack processing on the time series data through the quantum causal convolution layer to stack the dimensions of the time series data to obtain second time series data; S22, dividing the second time series data into multiple time state information according to the dimensions, and calculating the time series state information by taking the multiple time state information as the input of the variational quantum circuit; S23, inputting the time series state information as weight information into the quantum squeeze excitation layer for squeeze processing to obtain residual block information; S24, calculating the time series feature information according to the residual block information and the second time series data.

3. The method of Claim 1, wherein the multi-step time series prediction method based on the causal convolutional bidirectional recurrent quantum network is characterized by, In step S3, the following sub-steps are included: S31, inputting the time series state information and the time series feature information as the input of the forward recurrent unit to obtain hidden layer state information of all time steps in the time series state information and the time series feature information; S32, updating the hidden layer state information through a multi-head attention mechanism based on a sliding window, and performing multi-step prediction on future hidden layer state information to obtain forward multi-step hidden layer state information; S33, setting the multiplication elements of the hidden layer state in the reverse recurrent unit according to the hidden layer state information, inputting the time series state information and the time series feature information as the input of the reverse recurrent unit, updating based on a multi-head attention mechanism based on a sliding window, and performing multi-step prediction on future hidden layer information to obtain reverse multi-step hidden layer state information; S34, calculating the multi-step prediction value according to the forward multi-step hidden layer state information and the reverse multi-step hidden layer state information.

Citation Information

Patent Citations

  • Time sequence prediction method based on neural network

    CN117371594A

  • Carbon emission prediction method and application system based on time sequence perception quantum LSTM

    CN118607715A