Multi-step time sequence prediction method of quantum bidirectional circulation network based on causal convolution

Through a quantum bidirectional recurrent network based on causal convolution, using quantum causal convolution layer and multi-head attention mechanism, the problem of insufficient long-term dependence and causal relationship capture in multi-step timing prediction is solved, and the prediction performance and industry are improved Productivity.

CN119250115AActive Publication Date: 2025-01-03GUANGDONG UNIV OF TECH

Patent Information

Application Number
CN202411286884.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-13
Publication Date
2025-01-03
Estimated Expiration
2044-09-13

AI Technical Summary

Technical Problem

In the multi-step timing prediction, existing quantum computing has problems such as insufficient long-term dependency capture, insufficient processing of complex timing relationships, and limited chronological and causal relationship capture capabilities.

Method used

A multi-step timing prediction method for quantum bidirectional recurrent network based on causal convolution is proposed. Through the time-sequence-aware quantum causal convolution network and quantum bidirectional recurrent network, it uses quantum causal convolution layer, quantum extrusion excitation layer and variable component quantum The circuit extracts timing state and feature information, and updates the hidden state through the multi-head attention mechanism to capture and process long-term dependence and causal relationships.

Benefits of technology

Effectively capture and handle long-term dependencies and complex timing relationships in a shallow network structure, improving the performance of multi-step timing prediction and the ability to optimize industrial production processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250115A_ABST
    Figure CN119250115A_ABST
Patent Text Reader

Abstract

The invention provides a multi-step time sequence prediction method of a quantum bidirectional circulation network based on causal convolution. According to the quantum causal convolutional network based on time sequence perception, the quantum causal convolutional network comprises a quantum causal convolutional layer with multiple layers of time sequence dimensions and a residual block formed by a quantum extrusion excitation mechanism layer, longer time dependence can be captured in a shallow network, and by means of the advantages of quantum calculation, the time sequence perception can be improved. The long-time dependency relationship, the causal relationship and the time sequence relevance among the data can be quickly captured and processed; through a quantum bidirectional circulation network guided by an attention mechanism, time sequence state information and time sequence feature information are fused to enhance the expression of time sequence information, the capability of processing a complex time-varying relationship is effectively improved, and a multi-head attention mechanism is utilized to guide updating of hidden layer important information of a bidirectional circulation unit, so that the time-varying relationship processing efficiency is improved. And long-time-span important information is captured and integrated. Compared with the prior art, the performance of multi-step time sequence prediction is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention is applicable to the field of quantum computing technology, and in particular relates to a multi-step time series prediction method of a quantum bidirectional recurrent network based on causal convolution. Background Art

[0002] Multi-step time series forecasting has a wide range of applications in the industrial and commercial fields, from energy management, financial market analysis to weather forecasting and intelligent manufacturing. Accurate multi-step time series forecasting can help decision makers prepare in advance to deal with future uncertainties. In the multi-step time series forecasting task, the model not only needs to predict a future time point, but also needs to provide continuous time series forecasts to capture long-term dependencies and complex time dynamic characteristics. This places higher demands on the model's time series capture ability, information integration ability, and sensitivity to time series patterns. Classic machine learning and deep learning methods such as traditional convolutional neural networks (CNN), long short-term memory networks (LSTM), and temporal convolutional networks (TCN) have achieved certain success in single-step time series forecasting.

[0003] However, in the multi-step time series prediction task, the following limitations are often faced: 1. Insufficient capture of long-term dependencies. CNN and TCN have natural limitations in dealing with long-term dependencies. The local receptive field of CNN makes it limited in capturing long-range dependency information. Although TCN expands the receptive field through dilated convolution, when facing very long time series dependencies, TCN still needs to capture such long-term dependencies by stacking multiple layers of convolution, resulting in a significant increase in model complexity and training difficulty. 2. Insufficient processing of complex time series relationships. Multi-step time series prediction requires the model to accurately update and maintain hidden states in each step of prediction. However, traditional recurrent neural networks (RNNs) such as LSTM and GRU are prone to gradient vanishing or gradient exploding problems when dealing with long time series, and it is difficult to maintain effective long-term memory and state updates. In addition, the sequential processing method of classic RNNs leads to its inadequacy in capturing bidirectional dependencies and complex nonlinear relationships of sequence data. 3. Limited ability to capture time sequence and causal relationships. Time series data often contains implicit time sequence and causal relationships. Traditional convolutional and recurrent networks lack dedicated mechanisms to highlight and utilize these features when dealing with these relationships, resulting in poor performance in complex temporal tasks.

[0004] In recent years, the introduction of quantum computing has provided new perspectives and methods for time series prediction, and combining quantum computing with deep learning has become a new direction for solving complex time series prediction problems. Quantum computing can process multiple states at the same time by utilizing properties such as quantum superposition and quantum entanglement, thereby providing higher parallel computing capabilities and stronger state representation capabilities than classical computing. Therefore, in theory, it is possible to effectively capture and process long-term dependencies and complex time series relationships in a shallow network structure.

[0005] At present, the main research directions of quantum convolutional networks (QCNN) are quantum two-dimensional convolution and one-dimensional convolution. However, this type of research also has similar limitations as traditional convolutional networks in time series prediction. Convolutional networks themselves were not born for time series prediction, and time series models have also been extended to the quantum field. These studies have demonstrated the significant potential of quantum recurrent neural networks such as quantum recurrent neural networks (QRNN), quantum gated recurrent networks QGRU, and quantum long short-term memory networks (QLSTM) 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, in order to improve the prediction performance, it is often necessary to design a more complete network model. It can be seen that designing a suitable quantum convolution structure and integrating the characteristics of different networks have important theoretical and application value in the field of time series prediction of quantum networks.

[0006] The existing quantum convolution hybrid network (QCNN) mainly includes the following two directions: the first is two-dimensional convolution, which uses the advantages of quantum computing to analyze the performance of QCNN in processing classical data with high-dimensional features, aiming to improve the efficiency and accuracy of classical data classification tasks. For example, the introduction of two-dimensional dilated convolution into quantum networks has significant advantages in feature extraction and large-scale context information capture through quantum dilated convolution operations, which improves the performance of such networks in processing time series data and image data. However, such networks are mainly used for classification tasks of static data and do not involve the dynamic features of more complex time series prediction. The second is one-dimensional convolution. The one-dimensional quantum convolutional neural network is applied to time series prediction. For example, through the one-dimensional QCNN architecture suitable for time series data, its potential in feature extraction and prediction is demonstrated. In general, the two directions mainly focus on the performance comparison with the classical CNN and the advantages of quantum computing applied to classification tasks.

[0007] The existing quantum recurrent networks (QRNNs) mainly include the following three directions: the first is to introduce quantum bits to represent network weights; the second is to use quantum optimization algorithms to optimize the performance of classical networks; the third is through bidirectional design or integration with convolutional networks such as CNN. However, as data-driven modeling becomes increasingly complex, especially for multi-step time series prediction, the prediction performance of such networks is still limited.

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

[0009] The present invention proposes a new multi-step time series prediction method based on quantum bidirectional recurrent network with causal convolution, aiming to improve the performance of multi-step time series prediction and optimize the industrial production process and production efficiency according to the prediction results of multi-step time series.

[0010] The present invention proposes a multi-step time series prediction method based on a quantum bidirectional recurrent network with causal convolution, and the multi-step time series prediction method comprises the following steps:

[0011] S1. Obtain time series data;

[0012] S2. Establishing a quantum causal convolutional network based on time series perception, taking the time series data as the input of the quantum causal convolutional network for information extraction, and obtaining time series state information and time series feature information;

[0013] S3, establishing a quantum bidirectional cyclic network, taking the timing state information and the timing feature information as inputs of the quantum bidirectional cyclic network to perform multi-step timing prediction, and obtaining a multi-step prediction value.

[0014] Preferably, the quantum causal convolution network includes a quantum causal convolution layer based on multiple layers of time series dimensions, a quantum squeezing excitation layer, and a variational quantum circuit;

[0015] The quantum causal convolution layer and the quantum squeezing excitation layer constitute a residual block, which 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.

[0016] Preferably, the quantum causal convolution layer includes a quantum expansion causal convolution layer, a weight normalization layer, a ReLU layer and a discard layer; wherein the quantum expansion causal convolution layer is used to extract the time dependency in the time series data through superposition processing and expansion processing of quantum states.

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

[0018] S21, stacking 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;

[0019] S22, dividing the second time series data into a plurality of time state information according to the dimension, and using the plurality of time state information as the input of the variational quantum circuit to calculate and obtain the time series state information;

[0020] S23, inputting the timing state information as weight information into the quantum squeezing excitation layer for squeezing processing to obtain residual block information;

[0021] S24. Perform calculation according to the residual block information and the second time series data to obtain the time series feature information.

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

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

[0024] S31, processing the time series state information and the time series feature information as inputs of the forward cycle unit, and obtaining hidden layer state information of all time steps in the time series state information and the time series feature information;

[0025] S32, updating the hidden layer state information through a multi-head attention mechanism based on a sliding window, and performing multi-step prediction on the future hidden layer state information to obtain forward multi-step hidden layer state information;

[0026] S33, setting the multiplication element of the hidden layer state in the reverse cyclic unit according to the hidden layer state information, taking the time series state information and the time series feature information as the input of the reverse cyclic unit, updating based on the multi-head attention mechanism of the sliding window, and performing multi-step prediction on the future hidden layer information to obtain reverse multi-step hidden layer state information;

[0027] S34. Calculate according to the forward multi-step hidden layer state information and the reverse multi-step hidden layer state information to obtain the multi-step prediction value.

[0028] Compared with the prior art, the present invention uses a quantum causal convolutional network based on timing perception. The quantum causal convolutional network includes quantum causal convolutional layers with multiple layers of timing dimensions and residual blocks composed of quantum squeezing excitation mechanism layers. It can capture longer time dependencies in a shallower network, and with the advantages of quantum computing, it can quickly capture and process long-term dependencies, causal relationships, and time sequence correlations between data. At the same time, the timing state information is extracted through variational quantum circuits and fed back to the residual blocks, thereby realizing a quantum causal convolutional network with timing perception capabilities; through the quantum bidirectional recurrent network guided by the attention mechanism, the timing state information and timing feature information are integrated to enhance the expression of timing information, effectively improving the ability to process complex time-varying relationships, and using the multi-head attention mechanism to guide the updating of important hidden information of the bidirectional recurrent unit, capture and integrate important information with long time spans, and effectively improve the performance of multi-step timing prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The present invention will be described in detail below in conjunction with the accompanying drawings. The above and other aspects of the present invention will become clearer and easier to understand through the detailed description made in conjunction with the following drawings. In the accompanying drawings:

[0030] Figure 1 It is a flowchart of a multi-step time series prediction method based on a quantum bidirectional recurrent network of causal convolution provided by an embodiment of the present invention;

[0031] Figure 2 It is a schematic diagram of the structure of a quantum causal convolutional network and a quantum bidirectional recurrent network provided by an embodiment of the present invention;

[0032] Figure 3 It is a flowchart of the quantum causal convolution layer provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0034] Please refer to Figure 1-Figure 3 The present invention provides a multi-step time series prediction method based on a quantum bidirectional recurrent network with causal convolution, and the multi-step time series prediction method comprises the following steps:

[0035] S1. Obtain time series data;

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

[0037] S2. Establishing a quantum causal convolutional network based on time series perception, taking the time series data as the input of the quantum causal convolutional network for information extraction, and obtaining time series state information and time series feature information;

[0038] In an embodiment of the present invention, the quantum causal convolution network includes a quantum causal convolution layer based on multiple layers of time series dimensions, a quantum squeezing excitation layer, and a variational quantum circuit;

[0039] The quantum causal convolution layer and the quantum squeezing excitation layer constitute a residual block, which 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.

[0040] The quantum causal convolution layer includes a quantum expansion causal convolution layer, a weight normalization layer, a ReLU layer and a discard layer; wherein the quantum expansion causal convolution layer is used to extract the time dependency in the time series data through superposition processing and expansion processing of quantum states.

[0041] Specifically, the single-layer quantum causal convolution layer (TQCC) in the residual block is consistent with the quantum causal convolution layer of the last layer of the multi-layer quantum causal convolution mentioned above, in order to achieve channel transformation and keep the residual connection dimension consistent. The quantum squeeze excitation layer (QSE_TI) is mainly composed of a squeeze operation with temporal state information feedback and a quantum excitation layer.

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

[0043] S21. Perform stacking 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.

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

[0045] For the low-level time quantum causal convolution, the expansion factor d takes the default value of 1, which represents the one-dimensional data interval between the input qubits and controls the receptive field of the convolution. As the number of layers increases, the receptive field becomes larger. In order to obtain a linear and steadily growing receptive field, the present invention adopts the expansion factor d to increase 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] In addition, when the expansion factor d is determined, the corresponding padding size is also determined as (k-1)*d, where k is the number of qubits of the variational 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, clipping operation clip = padding is used to ensure that the output of each layer is the same length as the input signal. In quantum computing, data can be represented as quantum states |ψ>, which can be operated 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, that is, the quantum filter, which can be expressed as a quantum gate acting on the input quantum state: |ψ y >=U|ψ x >; d, k, U[i] represent the dilation factor, kernel size, and weight of quantum gate operation, respectively.

[0051] The variational quantum circuit of the quantum convolution filter Qfilter in the present invention uses H, Ry, and Rz quantum gates to perform quantum encoding on the data in the encoding layer, wherein for each element of the input, θ i,1 =arctan(x i )and 2N rotation angles are generated by the N-dimensional input vector and used as inputs of the Ry and Rz quantum gates respectively.

[0052] For the variable layer, the strong entanglement variable layer is used. Assuming there are N quantum bits and L layers of strong entanglement, the mathematical description can be in is the L-th layer of single-qubit rotation gates, which can be expressed as the tensor product of the rotation gates on each qubit: Strong embedding is reflected in the fact that it first passes through the revolving gate operation and then the CNOT gate (Controlled-NOT gate). If it passes through the CNOT gate first, the complexity may be limited. Since the entanglement structure of the quantum state is fixed in the initial stage, the subsequent revolving gate can only be adjusted on this fixed entanglement structure, which may limit the expressive power of the circuit, especially when it is necessary to capture more complex timing patterns. For the measurement layer, each quantum filter is measured using the Pauli Z operator, and the measurement results are added to obtain the output of the quantum convolution filter.

[0053] S22. Divide the second time series data into multiple time state information according to the dimension, and use the multiple time state information as the input of the variational quantum circuit to calculate and obtain the time series state information.

[0054] Specifically, the time-series phase variational quantum circuit is not only the key to the quantum causal convolutional network to achieve the ability of time perception, but also can enhance the expression of time information for the subsequent attention-guided quantum bidirectional recurrent network and improve the ability to process complex time relations. The specific implementation method is as follows:

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

[0056] S23, inputting the timing state information as weight information into the quantum squeezing excitation layer for squeezing processing to obtain residual block information.

[0057] S24. Perform calculation according to the residual block information and the second time series data to obtain the time series feature information.

[0058] The temporal state information is generated by the above-mentioned temporal stage quantum circuit, and is fed back as the weight information of the 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 variational quantum circuit in the quantum convolution filter;

[0059] Finally, the weight obtained by the excitation is applied to each channel of the input feature to adjust the weight of each channel. As a mechanism to enhance the model's attention in processing channels or feature dimensions, the quantum squeeze excitation layer (QSE_TI) can not only integrate the characteristics of quantum computing, but also adjust the importance between different channels by integrating temporal state information, thereby better capturing important information.

[0060] S3, establishing a quantum bidirectional cyclic network, taking the timing state information and the timing feature information as inputs of the quantum bidirectional cyclic network to perform multi-step timing prediction, and obtaining multi-step prediction values.

[0061] In an embodiment of the present 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 a candidate hidden state.

[0062] Specifically, the mathematical calculation formulas for the reset gate, update gate, and candidate hidden state in the forward recurrent unit and the reverse recurrent unit are as follows:

[0063] The mathematical formula for the reset gate is described as follows:

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

[0065] Among them, Global_Info t Represents the global information of the current time step t; VQC1 is a variational quantum circuit; ⊙ represents element-by-element multiplication.

[0066] The mathematical calculation formula of the update gate is described as follows:

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

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

[0069]

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

[0071]

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

[0073] S31. Process the time series state information and the time series feature information as inputs of the forward cyclic unit to obtain hidden layer state information of all time steps in the time series state information and the time series feature information.

[0074] S32, updating the hidden layer state information through a multi-head attention mechanism based on a sliding window, and performing multi-step prediction on the future hidden layer state information to obtain forward multi-step hidden layer state information.

[0075] Specifically, the forward recurrent unit takes the time series state information and takes out the state information corresponding to the first time step in the time window as the multiplication element of the hidden state h0.

[0076] The hidden information H of all time steps obtained by the forward recurrent unit F =[h1,h2,...,h T ] is updated by the multi-head attention mechanism, and the updated terminal hidden layer information h is taken out final After the forward loop unit acts, the hidden layer information is not only used as the data input of the forward loop unit, but also as the input of the hidden state. The output is the predicted hidden layer information output of the next step, which can be described as h new =QCell([h final ,h final ]).

[0077] On this basis, in order to realize the attention-guided bidirectional network, all hidden layer information is concatenated H'=[h'1,h'2,...,h final ,h new ], and select the hidden layer information H”=[h'2,...,h final ,h new ], that is, the multi-head attention mechanism and the Add&LayerNorm layer; if you want to further predict the second step in the future, you also take out the updated terminal hidden layer information as the input of the forward loop unit, and the output is the predicted hidden layer information output of the next step. And so on, the future multi-step hidden layer information output of the forward loop unit is obtained. The specific mathematical description is as follows:

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

[0079] By calculation Get the single-head attention weight output, the mathematical description is as follows:

[0080] Multi-head attention calculates the attention weight of each head separately and concatenates them, MultiHead(Q,K,V)=Concat(head1,...,head h )Wo, and finally update the hidden layer information through 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 out from the updated hidden state as the input of the forward cycle unit of the prediction block for the next step in the future, and the recursion is continued to obtain the multi-step prediction value.

[0081] S33. The multiplication element of the hidden layer state in the reverse cyclic unit is set according to the hidden layer state information, the timing state information and the timing feature information are used as the input of the reverse cyclic unit, and the multi-head attention mechanism based on the sliding window is updated, and the future hidden layer information is predicted in multiple steps to obtain the reverse multi-step hidden layer state information.

[0082] Specifically, the initial window hidden layer information obtained by the update without sliding is inverted and used as the multiplication element of the hidden state ht of each time step of the reverse recurrent unit in turn; in addition, the output of the aforementioned quantum causal convolutional network - the global information of the temporal features is also used as the input of the reverse recurrent unit. The subsequent operations are the same as those of the forward network, so what is obtained is the future multi-step hidden layer information output of the reverse recurrent unit. This process is consistent with the forward recurrent unit.

[0083] S34. Calculate according to the forward multi-step hidden layer state information and the reverse multi-step hidden layer state information to obtain the multi-step prediction value.

[0084] Specifically, all the hidden information output by the forward loop unit and the reverse loop unit are cascaded and added, and input into the feedforward linear layer to obtain the final output of the overall model, that is, the predicted value of multiple steps in the future. The quantum bidirectional recurrent network guided by the attention mechanism integrates the global information of the time series features and the time series state information obtained by the aforementioned quantum causal convolutional network, and treats the forward loop unit and the reverse loop unit as non-independent individuals. Through the guidance of the attention module, the network can better capture and integrate important information over a long time span, so as to ultimately improve the model's ability to handle complex time series relationships and complex nonlinear data.

[0085] For a better understanding, take multivariate multi-step time series prediction as an example. Given the input time series data X t , whose dimension is (batchsize,seq,inputdim), then the output multi-step prediction value output has a dimension of (batchsize,pre_step).

[0086] In the time series seq dimension, after the stacking of time series quantum causal convolution layers, the expansion factor d of the first layer is 1, which increases by 1 layer by layer; the filter size k is equal to the number of quantum bits wires, which is a hyperparameter; the stride length stride is 1 to ensure that the causal relationship between all elements is captured; the padding size is (k-1)*d, and the padding size is equal to the clip size, which is also to ensure that future information is not leaked, ensuring the realization of causal convolution. After stacking 4 layers, the dimensions obtained are (batchsize, seq, final_channels), but the number of channels will change after linear transformation, which is also a hyperparameter.

[0087] After the first quantum causal convolution layer acts, the second time series data with the data dimension of (batchsize, seq, qubit_numbers) is obtained. The number of channels is transformed to be consistent with the number of qubits of the staged quantum circuit. At this time, the second time series data is sequentially divided into seq current time state information with the dimension of (batchsize, qubit_numbers), which are successively used as the input of the staged quantum circuit. The quantum circuits between different time steps influence each other in sequence through quantum middle path measurement. At this time, the output obtained is the time series state information with the dimension of (seq, batchsize, qubit_numbers). After the linear layer transformation, the output data with the dimension of (seq, batchsize, hidden_dim) is obtained to match the input dimension of the subsequent network.

[0088] Similarly, after the quantum causal convolution layer is applied to the time series seq dimension of the time series data, the number of channels is consistent with that of the last quantum causal convolution layer, ensuring the consistency of the output dimension of the residual block; on this basis, it passes through the quantum squeezing excitation mechanism layer, in which the above-mentioned time series state information is input into the squeezing operation as feedback weight information to form a weighted global average pooling layer, and the important information in the quantum time series causal convolution structure is continuously updated as the network is optimized. By adding the residual block information to the output (batchsize, seq, final_channels) obtained in the first step, the global information output of the time series feature of the quantum causal convolution network based on time series perception is obtained.

[0089] In the forward recurrent unit, during the operation corresponding to time step t, QGRUcells(x t ,h t-1 ) t ,h t-1 They are Global_Info, TI_state[t-1]⊙h' t-1, the corresponding dimensions are (batchsize, seq, final_channels), (batchsize, hidden_dim), h' t-1 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 of all time steps F =[h1,h2,...,h T ].

[0090] Define the following process as process A, pass all time step hidden layer state information through the multi-head attention mechanism, and take out the terminal hidden layer information h' T After the forward cycle unit, the output is the hidden layer information output of the next step, which can be described as h new =QCell([h' T ,h' T ]), whose dimension is (batchsize, hidden_dim). In order to accurately predict the second step in the future, the hidden layer information is updated through the multi-head attention mechanism based on the sliding window, that is, the new hidden layer information h new Combined with H, we get H'=[h2,...,h T ,h new ], and then through the multi-head attention mechanism and Add&LayerNorm layer update, and take out the terminal hidden layer information at this time and pass it through QCell to get the new hidden layer information for predicting the second step. If predicting the next N steps, repeat process A N times to get N h new,backward , after cascading, it is the output data of the forward quantum network, with a dimension of (N, batchsize, hidden_dim).

[0091] Take out the hidden layer information H corresponding to the initial window without sliding from the updated hidden layer state N , that is, H N =[h 1N ,h 2N ,...,h TN ], and use this as the multiplication element of the hidden state of the reverse recurrent unit, that is, in the reverse recurrent unit, during the operation of the corresponding t time step, QGRUcells(x t ,h t-1 ) t ,h t-1 They are Global_Info, H N [t-1]⊙h' t-1,backwards , the corresponding dimensions are (batchsize, seq, final_channels), (batchsize, hidden_dim), h' t-1,backwardsis the hidden state initialized by the reverse recurrent unit. At this time, the reverse recurrent unit output is also obtained as the hidden state information H of all time steps B =[h1,h2,...,h T ].

[0092] In the reverse cycle unit, process A is repeated N times, and the obtained N predicted hidden state information h new,backward With the above N h new,forward Add and connect to the feedforward connection network FFN, that is, the input data dimension is (batchsize, N, hidden_dim) and the output dimension is (batchsize, N). The mathematical description is y pre =W2·ReLU(W1x+b1)+b2. This achieves multi-variable multi-step prediction output.

[0093] Among them, the operation process of the forward recurrent unit and the reverse recurrent unit at the t time step is divided into four stages: resetting the gate, updating the gate and calculating the new candidate hidden state, and updating the hidden state.

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

[0095] The second stage: update gate controls the current hidden state h t is how much information from the previous hidden state is retained and how much information from the new candidate hidden state is retained. Here, the form of the formula is similar to the reset gate, but the update gate z t Has different effects when updating hidden states. t Determines the current hidden state h t Is more to keep from h t-1 information, or adopt more new candidate hidden states.

[0096] Phase 3: The new candidate hidden state combines the current input information and the previous hidden state (the influence of which is controlled by the reset gate) to generate a potential new hidden state for the current time step, which combines the current input and historical information. Combines the global information Global_Info of the current time step and the previous hidden state h adjusted by the reset gate t-1 .

[0097] The fourth stage: Combine the previous hidden state and the new candidate hidden state to update the hidden state of the current time step. Specifically, use the update gate z t To update the hidden state h of the current time step tt The update formula of the hidden state is This weighted summation approach ensures that the model can smoothly transition to a new hidden state, making full use of historical information and current input information.

[0098] Compared with the prior art, the present invention uses a quantum causal convolutional network based on timing perception. The quantum causal convolutional network includes quantum causal convolutional layers with multiple layers of timing dimensions and residual blocks composed of quantum squeezing excitation mechanism layers. It can capture longer time dependencies in a shallower network, and with the advantages of quantum computing, it can quickly capture and process long-term dependencies, causal relationships, and time sequence correlations between data. At the same time, the timing state information is extracted through variational quantum circuits and fed back to the residual blocks, thereby realizing a quantum causal convolutional network with timing perception capabilities; through the quantum bidirectional recurrent network guided by the attention mechanism, the timing state information and the timing feature information are integrated to enhance the expression of the timing information, effectively improving the ability to process complex time-varying relationships, and using the multi-head attention mechanism to guide the updating of the hidden layer important information of the bidirectional recurrent unit, capturing and integrating long-time span important information, effectively improving the performance of multi-step timing prediction, so as to optimize the industrial production process and production efficiency according to the prediction results of the multi-step timing.

[0099] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0100] The embodiments of the present invention are described above in conjunction with the accompanying drawings. What is disclosed is only the preferred embodiment of the present invention. However, the present invention is not limited to the above-mentioned specific implementation manner. The above-mentioned specific implementation manner is only illustrative rather than restrictive. Under the enlightenment of the present invention, ordinary technicians in this field can also make many forms and equivalent changes without departing from the scope of protection of the purpose of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A multi-step time series prediction method based on quantum bidirectional recurrent network with causal convolution, characterized in that: The multi-step time series prediction method comprises the following steps: S1. Obtain time series data; S2. Establishing a quantum causal convolutional network based on time series perception, taking the time series data as the input of the quantum causal convolutional network for information extraction, and obtaining time series state information and time series feature information; S3, establishing a quantum bidirectional cyclic network, taking the timing state information and the timing feature information as inputs of the quantum bidirectional cyclic network to perform multi-step timing prediction, and obtaining multi-step prediction values.

2. The multi-step time series prediction method based on quantum bidirectional recurrent network based on causal convolution as claimed in claim 1, characterized in that: The quantum causal convolution network includes a quantum causal convolution layer based on multiple layers of time series dimensions, a quantum squeezing excitation layer, and a variational quantum circuit; The quantum causal convolution layer and the quantum squeezing excitation layer constitute a residual block, which 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.

3. The multi-step time series prediction method based on quantum bidirectional recurrent network based on causal convolution as claimed in claim 2, characterized in that: The quantum causal convolution layer includes a quantum expansion causal convolution layer, a weight normalization layer, a ReLU layer and a discard layer; wherein the quantum expansion causal convolution layer is used to extract the time dependency in the time series data through superposition processing and expansion processing of quantum states.

4. The multi-step time series prediction method based on quantum bidirectional recurrent network based on causal convolution as claimed in claim 2, characterized in that: Step S2 includes the following sub-steps: S21, stacking 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 a plurality of time state information according to the dimension, and using the plurality of time state information as the input of the variational quantum circuit to calculate and obtain the time series state information; S23, inputting the timing state information as weight information into the quantum squeezing excitation layer for squeezing processing to obtain residual block information; S24. Perform calculation according to the residual block information and the second time series data to obtain the time series feature information.

5. The multi-step time series prediction method based on quantum bidirectional recurrent network based on causal convolution as claimed in claim 1, characterized in that: The quantum bidirectional recurrent network comprises a forward recurrent unit and a reverse recurrent unit, wherein the forward recurrent unit and the reverse recurrent unit comprise a reset gate, an update gate and a candidate hidden state.

6. The multi-step time series prediction method based on quantum bidirectional recurrent network based on causal convolution as claimed in claim 5, characterized in that: Step S3 includes the following sub-steps: S31, processing the time series state information and the time series feature information as inputs of the forward cycle unit, and obtaining 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 the future hidden layer state information to obtain forward multi-step hidden layer state information; S33, setting the multiplication element of the hidden layer state in the reverse cyclic unit according to the hidden layer state information, taking the time series state information and the time series feature information as the input of the reverse cyclic unit, updating based on the multi-head attention mechanism of the sliding window, and performing multi-step prediction on the future hidden layer information to obtain reverse multi-step hidden layer state information; S34. Calculate according to the forward multi-step hidden layer state information and the reverse multi-step hidden layer state information to obtain the multi-step prediction value.

Citation Information

Patent Citations

  • Time sequence prediction method based on neural network

    CN117371594A

  • Network security situation prediction method for optimizing TCAN-BiGRU based on SSA and IQPSO

    CN117768164A

  • Oil well yield prediction method and system based on hybrid neural network

    CN118365183A

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

    CN118607715A

Cited By

  • Parallelization-based device state prediction method for cyclic network

    CN120277847A

  • Solar acousto-optic equipment group cooperative control optimization method and system based on Internet of Things

    CN120722752A

  • Solar sound and light device group cooperative control optimization method and system based on internet of things

    CN120722752B