A weather prediction method, device, medium and electronic device

CN117148359BActive Publication Date: 2026-09-15ORIGIN QUANTUM COMPUTING TECH (HEFEI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311198405.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2026-09-15
Estimated Expiration
2043-09-15

Smart Images

  • Figure CN117148359B_ABST
    Figure CN117148359B_ABST
Patent Text Reader

Abstract

The application discloses a meteorological prediction method and device, a medium and an electronic device. The method comprises the following steps: inputting meteorological radar echo maps of multiple time nodes before a to-be-predicted time node into a quantum motion perception network, and running the quantum motion perception network to obtain a meteorological radar echo map of the to-be-predicted time node. The quantum motion perception network comprises an attention module and a fusion module. Parameters of a quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of the multiple time nodes before the to-be-predicted time node. A meteorological prediction result of the to-be-predicted time node is determined based on the meteorological radar echo map of the to-be-predicted time node. The accuracy of meteorological prediction can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of quantum computing technology, and in particular to a weather forecasting method, device, medium and electronic device. Background Technology

[0002] When radar emits electromagnetic waves in the form of pulses and encounters precipitation, some of the energy is reflected back, forming an echo. Weather radar echo maps show information such as the time and intensity of the reflected electromagnetic waves. By analyzing historical weather radar echo maps, future weather conditions, such as precipitation, wind direction, and wind speed, can be predicted.

[0003] Currently, machine learning methods have been widely applied in the field of weather forecasting. By utilizing classic neural network models such as recurrent neural networks, long short-term memory networks, and generative adversarial networks, weather forecasting can be achieved to a certain extent.

[0004] However, in existing meteorological forecasting network models, the forecast results at the current time point only depend on the meteorological radar echo map input at the current time point, and cannot perceive meteorological changes over a longer period of time. This results in the model's poor ability to express motion information (evolution trend, movement path, or speed of precipitation bodies or clouds), and low accuracy of meteorological forecasts.

[0005] Application content

[0006] The purpose of this application is to provide a weather forecasting method, apparatus, medium, and electronic device, aimed at improving the accuracy of weather forecasting.

[0007] One embodiment of this application provides a weather forecasting method, the method comprising:

[0008] The meteorological radar echo maps of multiple time points before the time point to be predicted are input into the quantum motion sensing network, and the quantum motion sensing network is run to obtain the meteorological radar echo map of the time point to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time points before the time point to be predicted.

[0009] The meteorological forecast result for the time node to be predicted is determined based on the meteorological radar echo map of the time node to be predicted.

[0010] Optionally, the step of inputting meteorological radar echo images from multiple time points preceding the time point to be predicted into a quantum motion sensing network, and running the quantum motion sensing network to obtain the meteorological radar echo image of the time point to be predicted, includes:

[0011] Feature extraction is performed on the meteorological radar echo images of multiple time points before the time point to be predicted to obtain the 0th spatial state of multiple time points before the time point to be predicted.

[0012] The 0th spatial state of multiple time nodes before the time node to be predicted is input into the attention module and the fusion module and run to obtain the final spatial state of multiple time nodes before the time node to be predicted.

[0013] The final spatial state of multiple time points before the time point to be predicted is decoded to obtain the meteorological radar echo map of the time point to be predicted.

[0014] Optionally, the step of inputting the 0th spatial state of multiple time nodes preceding the time node to be predicted into the attention module and the fusion module and running them to obtain the final spatial state of multiple time nodes preceding the time node to be predicted includes:

[0015] The spatial state of the 0th time node of the i-th time node and the time and spatial states of the time nodes before the i-th time node are input into the attention module and the fusion module and run to obtain the final spatial state of the i-th time node. The initial value of i is 1, and the time and spatial states of the time nodes before the 1st time node are preset values.

[0016] Let i = i + 1, then return to the execution step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the time nodes before the i-th time node into the attention module and the fusion module and run it;

[0017] When i = I, the execution is terminated. The final spatial state of the i-th time node obtained in each execution is the final spatial state of multiple time nodes before the time node to be predicted, where I is the number of time nodes before the time node to be predicted.

[0018] Optionally, the step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the preceding time nodes into the attention module and fusion module and running them to obtain the final spatial state of the i-th time node includes:

[0019] The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node, with the initial value of j being 1.

[0020] Let j = j + 1, then return to the execution step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the time nodes preceding the i-th time node into the attention module and fusion module and run them;

[0021] After executing a preset number of times, the j-th spatial state of the i-th time node obtained from the last execution is the final spatial state of the i-th time node.

[0022] Optionally, the step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes into the attention module and fusion module and running them to obtain the j-th time state and j-th spatial state of the i-th time node includes:

[0023] The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and run to obtain the j-th aggregated time state of the i-th time node.

[0024] The j-th aggregated time state and j-1 spatial state of the i-th time node, and the j-1 spatial state of the preceding time nodes of the i-th time node are input into the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node.

[0025] Optionally, the quantum variational convolution circuit includes an encoding circuit and a variational circuit. The encoding circuit includes a first single quantum logic gate acting on each qubit. The variational circuit includes a sub-circuit acting on every two qubits. The sub-circuit includes a second single quantum logic gate, a third single quantum logic gate, and a multi-quantum logic gate acting on each qubit. The parameters of the second single quantum logic gate are determined based on training. The variational circuit is used to perform variational quantum encoding on the qubits.

[0026] Optionally, in the quantum variational convolution circuit included in the attention module, the encoding layer is used to load the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes into the qubit, and the parameters of the first single quantum logic gate are determined based on the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes.

[0027] Optionally, in the quantum variational convolution circuit included in the fusion module, the encoding layer is used to load the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node into the qubit, and the parameters of the first single quantum logic gate are determined based on the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node.

[0028] Optionally, the time nodes preceding the i-th time node include the (i-τ)-th to (i-1)-th time nodes, where τ is a preset value and 1 < τ. <i。

[0029] Optionally, the quantum motion sensing network further includes an encoder and a decoder. The encoder is used to extract features from the weather radar echo maps of multiple time nodes before the time node to be predicted, to obtain the 0th spatial state of the multiple time nodes before the time node to be predicted. The decoder is used to decode the final spatial state of the multiple time nodes before the time node to be predicted, to obtain the weather radar echo map of the time node to be predicted. Both the encoder and the decoder include the quantum variational convolution circuit.

[0030] Optionally, after obtaining the j-th time state and the j-th spatial state of the i-th time node, the method further includes: adding the j-th spatial state of the i-th time node and the (j-1)-th spatial state of the i-th time node to obtain a new j-th spatial state of the i-th time node.

[0031] Another embodiment of this application provides a weather forecasting device, the device comprising:

[0032] The running module is used to input the meteorological radar echo maps of multiple time nodes before the time node to be predicted into the quantum motion sensing network, and run the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time nodes before the time node to be predicted.

[0033] The determination module is used to determine the meteorological forecast result for the time node to be predicted based on the meteorological radar echo map of the time node to be predicted.

[0034] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.

[0035] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.

[0036] This application provides a quantum motion sensing network. It utilizes an attention module to process spatial and temporal states to obtain an aggregated temporal state, and a fusion module further processes the spatial and aggregated temporal states, enabling the quantum motion sensing network to effectively represent motion information over a longer period. Simultaneously, this application constructs parametric quantum logic gates in a quantum variational convolution circuit based on a variational quantum algorithm. Benefiting from the quantum superposition and quantum entanglement properties of quantum states, it provides more powerful computational capabilities compared to traditional methods and can iteratively update the parameters of the parametric quantum logic gates, thereby accurately modeling motion information. Compared to existing weather forecasting networks, the weather forecasting method provided in this application significantly improves the accuracy of weather forecasting. Attached Figure Description

[0037] Figure 1 A hardware structure block diagram of a computer terminal for a weather forecasting method provided in an embodiment of this application;

[0038] Figure 2 A flowchart illustrating a weather forecasting method provided in this application embodiment;

[0039] Figure 3 An exemplary schematic diagram of a quantum variational convolution circuit provided in an embodiment of this application;

[0040] Figure 4 An exemplary schematic diagram of a variational circuit provided in an embodiment of this application;

[0041] Figure 5 A flowchart illustrating another weather forecasting method provided in this application embodiment;

[0042] Figure 6 This is a schematic diagram of the structure of a weather forecasting device provided in an embodiment of this application; Detailed Implementation

[0043] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0044] Figure 1This is a network block diagram of a weather forecasting system provided in an embodiment of this application. The weather forecasting system may include a network 110, a server 120, a wireless device 130, a client 140, storage 150, a classical computing unit 160, a quantum computing unit 170, and may also include additional memory, a classical processor, a quantum processor, and other devices not shown.

[0045] Network 110 is a medium used to provide communication links between various devices and computers connected together within a weather forecasting system, including but not limited to the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. The connection method can be wired, wireless communication links, or fiber optic cables.

[0046] Server 120, wireless device 130, and client 140 are conventional data processing systems that may contain data and application programs or software tools that perform conventional computational processes. Client 140 may be a personal computer or a network computer, so the data may also be provided by server 120. Wireless device 130 may be a smartphone, tablet, laptop, smart wearable device, etc. Storage unit 150 may include database 151, which can be configured to store data such as qubit parameters, quantum logic gate parameters, quantum circuits, and quantum programs.

[0047] The classical computing unit 160 (quantum computing unit 170) may include a classical processor 161 (quantum processor 171) for processing classical data (quantum data) and a memory 162 (memory 172) for storing classical data (quantum data). The classical data (quantum data) may be a boot file, an operating system image, and an application program 163 (application program 173). The application program 163 (application program 173) may be used to implement the quantum algorithm compiled according to the weather forecasting method provided in the embodiments of this application.

[0048] Any data or information stored or generated in the classical computing unit 160 (quantum computing unit 170) can also be configured to be stored or generated in another classical (quantum) processing system in a similar manner, and any application executed therein can also be configured to be executed in another classical (quantum) processing system in a similar manner.

[0049] It should be noted that a true quantum computer has a hybrid structure, which includes at least... Figure 1 The system consists of two main parts: the classical computing unit 160, which is responsible for performing classical calculations and control; and the quantum computing unit 170, which is responsible for running quantum programs to achieve quantum computing.

[0050] The aforementioned classical computing unit 160 and quantum computing unit 170 can be integrated into a single device or distributed across two different devices. For example, a first device including the classical computing unit 160 runs a classical computer operating system, providing quantum application development tools and services, as well as the storage and network services required for quantum applications. Users develop quantum programs using the quantum application development tools and services on the second device, and send these quantum programs to a second device including the quantum computing unit 170 via the network services. The second device runs a quantum computer operating system, which parses and compiles the quantum program's code into instructions that the quantum processor 170 can recognize and execute. The quantum processor 170 then implements the quantum algorithm corresponding to the quantum program based on these instructions.

[0051] The computing units of the classic processor 161 within the classic computing unit 160 are based on CMOS transistors on a silicon chip. These computing units are not limited by time or coherence; that is, they are available at any time without time constraints. Furthermore, the number of such computing units in a silicon chip is sufficient; currently, a single classic processor 161 contains tens of thousands of computing units. Given this sufficient number and the fixed selectable computing logic of the CMOS transistors (e.g., AND logic), computational performance is achieved by combining a large number of CMOS transistors with a limited set of logic functions during operation.

[0052] In the quantum computing unit 170, the basic computing unit of the quantum processor 171 is the qubit. The input of a qubit is limited by coherence and coherence time; that is, a qubit is limited by its usage time and is not always available. Making full use of qubits within their available usage time is a key challenge in quantum computing. Furthermore, the number of qubits in a quantum computer is one of the representative indicators of its performance. Each qubit performs computational functions through on-demand configured logical functions. Given the limited number of qubits and the diverse logical functions available in quantum computing, such as Hadamard gates (H gates), Pauli-X gates (X gates), Pauli-Y gates (Y gates), Pauli-Z gates (Z gates), X gates, RY gates, RZ gates, CNOT gates, CR gates, iSWAP gates, Tofoli gates, etc., quantum computing requires combining a limited number of qubits with diverse logical function combinations to achieve computational effects.

[0053] Based on these differences, the design of classical logic functions applied to CMOS transistors and the design of quantum logic functions applied to qubits are significantly and fundamentally different. The design of classical logic functions applied to CMOS transistors does not need to consider the individuality of CMOS transistors. For example, the representation of a CMOS transistor in a silicon chip is its individual identifier, location, and usable time of each CMOS transistor. Therefore, classical algorithms composed of classical logic functions only express the operational relationship of the algorithm, not the algorithm's dependence on individual CMOS transistors.

[0054] Quantum logic functions applied to qubits need to consider the individuality of each qubit, such as its position within the quantum chip, its relationship with surrounding qubits, and the duration of its usable time. Therefore, quantum algorithms composed of quantum logic functions not only express the computational relationships within the algorithm but also its dependence on the individual qubits.

[0055] For example:

[0056] Quantum Algorithm 1: H1, H2, CNOT(1,3), H3, CNOT(2,3);

[0057] Quantum Algorithm 2: H1, H2, CNOT(1,2), H3, CNOT(2,3);

[0058] Where 1 / 2 / 3 represent three sequentially connected qubits Q1, Q2, Q3 or interconnected qubits Q1, Q2, Q3, respectively;

[0059] An exemplary explanation of how quantum algorithms are affected by the coherence time of qubits is as follows:

[0060] Define the execution time of a single-qubit logic gate as t, and the execution time of two single-qubit logic gates operating on adjacent qubits as 2t; then:

[0061] When Q1, Q2, and Q3 are interconnected, the computation of Quantum Algorithm 1 requires 6t, which is divided into 4 time periods. The duration of each time period is t, 2t, t, and 2t, respectively. The operations performed in each time period are: H1, H2; CNOT(1,3); H3; CNOT(2,3);

[0062] The computation of Quantum Algorithm 1 requires 5t, which is divided into 3 time periods. The duration of each time period is t, 2t, and 2t respectively. The operations performed in each time period are: H1, H2, H3; CNOT(1,2); CNOT(2,3);

[0063] When Q1, Q2, and Q3 are connected sequentially, Quantum Algorithm 1 needs to be equivalent to: H1, H2; swap(1,2), CNOT(2,3), swap(1,2); H3; CNOT(2,3). The computation of the equivalent Quantum Algorithm 1 requires 10t, divided into 4 time periods, with each time period requiring durations of t, 6t, t, and 2t respectively. The operations performed in each time period are: H1, H2; swap(1,2), CNOT(2,3), swap(1,2); H3; CNOT(2,3).

[0064] Therefore, the application of quantum logic functions in the design of qubits (including the design of whether qubits are used and the design of the efficiency of each qubit) is key to improving the computational performance of quantum computers and requires special design. This is the unique characteristic of quantum algorithms implemented based on quantum logic functions, and is fundamentally and significantly different from classical algorithms implemented based on classical logic functions. The aforementioned design considerations for qubits are technical problems that ordinary computing devices do not need to consider or address. Based on this, this application proposes a weather forecasting method and related apparatus for implementing weather forecasting in quantum computing, aiming to improve the accuracy of weather forecasting.

[0065] See Figure 2 , Figure 2 A flowchart illustrating a weather forecasting method provided in this application embodiment may include the following steps:

[0066] S201, input the meteorological radar echo maps of multiple time nodes before the time node to be predicted into the quantum motion sensing network, and run the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time nodes before the time node to be predicted.

[0067] A weather radar echo map is an image that displays the electromagnetic waves reflected back from objects detected by radar. Radar emits pulsed electromagnetic waves. When these pulses encounter precipitation (raindrops, snowflakes, and hail, etc.), most of the energy continues forward, while a small portion is reflected back—these reflected waves are called echoes. These waves are converted into signals and displayed as an image on a radar screen; this image is called a weather radar echo map. The weather radar echo map displays information such as the time, intensity, and azimuth of the electromagnetic waves reflected back from objects detected by the radar. Based on the weather radar echo map, corresponding weather conditions, such as precipitation, wind direction, and wind speed, can be obtained.

[0068] Variable quantum circuits (VFDs) are quantum circuits composed of parameterized quantum logic gates. When solving a problem, the solution space is represented by a VFD, and the variables of the problem are represented by the parameters of the quantum logic gates. By adjusting these parameters, a highly tunable quantum circuit is constructed, allowing the circuit to transform the input data in different ways, thus handling a variety of problems. Furthermore, unlike traditional quantum circuits, VFDs use variational optimization algorithms to find the optimal parameters that minimize the problem's loss, thereby obtaining an approximate solution and significantly improving computational efficiency.

[0069] Quantum variational convolution circuits are variational quantum circuits used to perform convolution operations.

[0070] The structure and parameters of the motion sensing network, attention module, fusion module, and quantum variational convolution circuit will be described below.

[0071] In one embodiment of this application, before inputting the meteorological radar echo maps of multiple time nodes before the time node to be predicted into the quantum motion sensing network, it is necessary to preprocess the meteorological radar base data of multiple time nodes before the time node to be predicted, so as to obtain the meteorological radar echo maps of multiple time nodes before the time node to be predicted.

[0072] Weather radar baseline data refers to data acquired from weather radar equipment. This data contains crucial information such as echo range, intensity, and trends, and can be obtained from local meteorological bureaus and other organizations. Various methods can be used to preprocess weather radar baseline data to obtain weather radar echo maps. For example, quality control can be performed on the data, and it can be interpolated to Cartesian coordinates to create an electromagnetic wave propagation height correction map. This can be encapsulated in a Python meteorology class. After instantiating this class, the baseline data storage information can be obtained by calling predefined attributes and methods. Finally, standard meshing is performed to obtain the weather radar echo map.

[0073] It should be noted that this application does not limit the preprocessing method for meteorological radar base data, and the method should be set according to the actual situation. The above-mentioned method provided in the embodiments of this application is only a preferred option.

[0074] S202, determine the meteorological forecast result for the time node to be predicted based on the meteorological radar echo map of the time node to be predicted.

[0075] Useful information can be extracted from the weather radar echo map of the time point to be predicted, thus determining the weather forecast results for that time point. For example, when predicting precipitation, the gradual change from blue to purple represents an increase in echo intensity, and a gradual increase in rainfall intensity. Generally speaking, the area corresponding to the blue echo indicates that the local area will be covered by precipitation clouds, but there will be no rain; the area covered by the green echo indicates that there may be light rain; the area covered by the yellow to red echo may have moderate to heavy rain; and the area corresponding to the purple echo has the highest precipitation intensity, and this area may have heavy rain or torrential rain, possibly accompanied by severe weather such as thunderstorms, strong winds, or even hail.

[0076] This application does not restrict the method for determining the meteorological forecast result of the time node to be predicted based on the meteorological radar echo map of the time node to be predicted, and the method should be selected according to the actual situation.

[0077] In one embodiment of this application, the step of inputting meteorological radar echo maps of multiple time points preceding the time point to be predicted into a quantum motion sensing network, and running the quantum motion sensing network to obtain the meteorological radar echo map of the time point to be predicted, includes:

[0078] Feature extraction is performed on the meteorological radar echo images of multiple time points before the time point to be predicted to obtain the 0th spatial state of multiple time points before the time point to be predicted.

[0079] The 0th spatial state of multiple time nodes before the time node to be predicted is input into the attention module and the fusion module and run to obtain the final spatial state of multiple time nodes before the time node to be predicted.

[0080] The final spatial state of multiple time points before the time point to be predicted is decoded to obtain the meteorological radar echo map of the time point to be predicted.

[0081] Feature extraction refers to the process of selecting and extracting the most discriminative and informative features from raw data to describe and represent the data. The goal of feature extraction is to simplify and improve subsequent data analysis and model building processes by reducing the dimensionality of data and retaining key information.

[0082] Decoding refers to the process of transforming the output of a model into an understandable result or inferring the original input.

[0083] Temporal state includes cell state. Cell state is an internal state used to store and transmit information in neural networks such as Recurrent Neural Networks (RNNs), Long Short-Term Memory (LSTM) networks, Spatiotemporal Long Short-Term Memory (ST-LSTM) networks, and Quantum Motion Sensing Networks. It is a key component of Quantum Motion Sensing Networks, used to solve long-term dependency problems and control the flow of information. Cell state is updated at each time point and cyclically passed to the next. The definition and update process of cell state enables LSTM networks to more effectively capture and remember long-term dependencies.

[0084] Attention weights are weights used in a task to measure the importance of different input information to the task outcome. In machine learning and deep learning, attention mechanisms are widely used to process sequential or image data to improve model performance and accuracy. By using attention weights, models can selectively focus on important information when processing input data, thereby improving model performance and effectiveness.

[0085] Aggregated temporal states refer to a unified temporal representation obtained by merging or summarizing multiple consecutive temporal states. In sequence models (such as quantum motion sensing networks), each time node or location generates several data points. Merging these data representations into a global representation allows for a better capture of overall temporal information over a period of time. There are various methods for merging or summarizing temporal states, commonly including summation, averaging, maximum maximization, and weighted averaging. The specific merging or summarizing method depends on the requirements of the task and the model.

[0086] In one embodiment of this application, the step of inputting the 0th spatial state of multiple time nodes preceding the time node to be predicted into the attention module and the fusion module and running them to obtain the final spatial state of multiple time nodes preceding the time node to be predicted includes:

[0087] The spatial state of the 0th time node of the i-th time node and the time and spatial states of the time nodes before the i-th time node are input into the attention module and the fusion module and run to obtain the final spatial state of the i-th time node. The initial value of i is 1, and the time and spatial states of the time nodes before the 1st time node are preset values.

[0088] Let i = i + 1, then return to the execution step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the time nodes before the i-th time node into the attention module and the fusion module and run it;

[0089] When i = I, the execution is terminated. The final spatial state of the i-th time node obtained in each execution is the final spatial state of multiple time nodes before the time node to be predicted, where I is the number of time nodes before the time node to be predicted.

[0090] Spatial state includes cellular state and hidden state. Hidden state is an encoded representation of past information in neural networks such as recurrent neural networks (RNN), long short-term memory (LSTM) networks, spatiotemporal long short-term memory (ST-LSTM) networks, and quantum motion perception networks when processing sequential data. It contains the model's memory of past input data and a summary of the processing results.

[0091] It should be noted that, in the embodiments of this application, the cell states included in the temporal state and the cell states included in the spatial state belong to different memory streams. The "temporal state" and "spatial state" referred to in this application can be referred to the description of related memories in the spatiotemporal long short-term memory (ST-LSTM) network.

[0092] In one embodiment of this application, the step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the preceding time nodes into the attention module and the fusion module and running them to obtain the final spatial state of the i-th time node includes:

[0093] The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node, with the initial value of j being 1.

[0094] Let j = j + 1, then return to the execution step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the time nodes preceding the i-th time node into the attention module and fusion module and run them;

[0095] After executing a preset number of times, the j-th spatial state of the i-th time node obtained from the last execution is the final spatial state of the i-th time node.

[0096] In one embodiment of this application, the step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes into the attention module and the fusion module and running them to obtain the j-th time state and j-th spatial state of the i-th time node includes:

[0097] The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and run to obtain the j-th aggregated time state of the i-th time node.

[0098] The j-th aggregated time state and j-1 spatial state of the i-th time node, and the j-1 spatial state of the preceding time nodes of the i-th time node are input into the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node.

[0099] In one embodiment of this application, the time nodes preceding the i-th time node include the (i-τ)-th to (i-1)-th time nodes, where τ is a preset value and 1 < τ. <i。

[0100] The following example illustrates a specific method for inputting meteorological radar echo maps from multiple time points preceding the time point to be predicted into a quantum motion sensing network, and then running the quantum motion sensing network to obtain the meteorological radar echo map of the time point to be predicted.

[0101] In this embodiment, the weather radar echo map includes four time points before the time point to be predicted, and the value of τ is 2.

[0102] Feature extraction is performed on the meteorological radar echo images of the 1st to 4th time nodes before the predicted time node to obtain the 0th spatial state of the 1st to 4th time nodes before the predicted time node.

[0103] The first time state of the 0th time node, the 0th spatial state of the 0th time node, and the 0th spatial state of the 1st time node are input into the attention module and run to obtain the first aggregated time state of the 1st time node. The first time state of the 0th time node and the 0th spatial state of the 0th time node are preset values.

[0104] The first aggregated time state of the first time node, the 0th spatial state of the 0th time node, and the 0th spatial state of the first time node are input into the fusion module and run to obtain the first time state and the first spatial state of the first time node.

[0105] The second time state of the 0th time node, the first spatial state of the 0th time node, and the first spatial state of the 1st time node are input into the attention module and run to obtain the second aggregated time state of the 1st time node. The second time state of the 0th time node and the first spatial state of the 0th time node are preset values.

[0106] The second aggregated time state of the first time node, the first spatial state of the 0th time node, and the first spatial state of the 1st time node are input into the fusion module and run to obtain the second time state of the first time node and the second spatial state of the 1st time node.

[0107] The third time state of the 0th time node, the second spatial state of the 0th time node, and the second spatial state of the 1st time node are input into the attention module and run to obtain the third aggregated time state of the 1st time node. The third time state of the 0th time node and the second spatial state of the 0th time node are preset values.

[0108] The third aggregated time state of the first time node, the second spatial state of the 0th time node, and the second spatial state of the first time node are input into the fusion module and run to obtain the third time state of the first time node and the third spatial state of the first time node.

[0109] The first time state of the 0th time node, the first time state of the 1st time node, the 0th spatial state of the 0th time node, the 0th spatial state of the 1st time node, and the 0th spatial state of the 2nd time node are input into the attention module and run to obtain the first aggregated time state of the 2nd time node.

[0110] The first aggregated time state of the second time node, the 0th spatial state of the 0th time node, the 0th spatial state of the first time node, and the 0th spatial state of the second time node are input into the fusion module and run to obtain the first time state of the second time node and the first spatial state of the second time node.

[0111] The second time state of the 0th time node, the second time state of the 1st time node, the first spatial state of the 0th time node, the first spatial state of the 1st time node, and the first spatial state of the 2nd time node are input into the attention module and run to obtain the second aggregated time state of the 2nd time node.

[0112] The second aggregated time state of the second time node, the first spatial state of the 0th time node, the first spatial state of the 1st time node, and the first spatial state of the 2nd time node are input into the fusion module and run to obtain the second time state and the second spatial state of the second time node.

[0113] The third time state of the 0th time node, the third time state of the 1st time node, the second spatial state of the 0th time node, the second spatial state of the 1st time node, and the second spatial state of the 2nd time node are input into the attention module and run to obtain the third aggregated time state of the 2nd time node.

[0114] The third aggregated time state of the second time node, the second spatial state of the 0th time node, the second spatial state of the 1st time node, and the second spatial state of the 2nd time node are input into the fusion module and run to obtain the third time state and the third spatial state of the second time node.

[0115] The third time state of the 0th time node, the third time state of the 1st time node, the second spatial state of the 0th time node, the second spatial state of the 1st time node, and the second spatial state of the 2nd time node are input into the attention module and run to obtain the third aggregated time state of the 2nd time node.

[0116] The third aggregated time state of the second time node, the second spatial state of the 0th time node, the second spatial state of the 1st time node, and the second spatial state of the 2nd time node are input into the fusion module and run to obtain the third time state and the third spatial state of the second time node.

[0117] The first time state of the first time node, the first time state of the second time node, the zeroth spatial state of the first time node, the zeroth spatial state of the second time node, and the zeroth spatial state of the third time node are input into the attention module and run to obtain the first aggregated time state of the third time node.

[0118] The first aggregated time state of the third time node, the 0th spatial state of the first time node, the 0th spatial state of the second time node, and the 0th spatial state of the third time node are input into the fusion module and run to obtain the first time state and the first spatial state of the third time node.

[0119] The second time state of the first time node, the second time state of the second time node, the first spatial state of the first time node, the first spatial state of the second time node, and the first spatial state of the third time node are input into the attention module and run to obtain the second aggregated time state of the third time node.

[0120] The second aggregated time state of the third time node, the first spatial state of the first time node, the first spatial state of the second time node, and the first spatial state of the third time node are input into the fusion module and run to obtain the third time state of the third time node and the second spatial state of the second time node.

[0121] The third time state of the first time node, the third time state of the second time node, the second spatial state of the first time node, the two spatial states of the second time node, and the second spatial state of the third time node are input into the attention module and run to obtain the third aggregated time state of the third time node.

[0122] The third aggregated time state of the third time node, the second spatial state of the first time node, the two spatial states of the second time node, and the second spatial state of the third time node are input into the fusion module and run to obtain the third time state and the third spatial state of the third time node.

[0123] The first time state of the second time node, the first time state of the third time node, the zeroth spatial state of the second time node, the zeroth spatial state of the third time node, and the zeroth spatial state of the fourth time node are input into the attention module and run to obtain the first aggregated time state of the fourth time node.

[0124] The first aggregated time state of the fourth time node, the 0th spatial state of the second time node, the 0th spatial state of the third time node, and the 0th spatial state of the fourth time node are input into the fusion module and run to obtain the first time state and the first spatial state of the fourth time node.

[0125] The second time state of the second time node, the second time state of the third time node, the first spatial state of the second time node, the first spatial state of the third time node, and the first spatial state of the fourth time node are input into the attention module and run to obtain the second aggregated time state of the fourth time node.

[0126] The second aggregated time state of the fourth time node, the first spatial state of the second time node, the first spatial state of the third time node, and the first spatial state of the fourth time node are input into the fusion module and run to obtain the second time state and the second spatial state of the fourth time node.

[0127] The third time state of the second time node, the third time state of the third time node, the second spatial state of the second time node, the second spatial state of the third time node, and the second spatial state of the fourth time node are input into the attention module and run to obtain the third aggregated time state of the fourth time node.

[0128] The third aggregated time state of the fourth time node, the second spatial state of the second time node, the second spatial state of the third time node, and the second spatial state of the fourth time node are input into the fusion module and run to obtain the third time state of the fourth time node and the third spatial state of the fourth time node.

[0129] Decode the third spatial state of the first time node, the third spatial state of the second time node, the third spatial state of the third time node, and the third spatial state of the fourth time node to obtain the meteorological radar echo map of the time node to be predicted.

[0130] In one embodiment of this application, the quantum variational convolution circuit includes an encoding circuit and a variational circuit. The encoding circuit includes a first single quantum logic gate acting on each qubit. The variational circuit includes a sub-circuit acting on every two qubits. The sub-circuit includes a second single quantum logic gate, a third single quantum logic gate, and a multi-quantum logic gate acting on each qubit. The parameters of the second single quantum logic gate are determined based on training. The variational circuit is used to perform variational quantum encoding on the qubits.

[0131] A single quantum logic gate is a quantum logic gate used in quantum circuits to operate a single quantum bit. It includes Hadamard gates, phase gates, single quantum rotation gates, etc. Single quantum logic gates can be used to realize the state transformation of a single quantum bit and to realize the basic operations and algorithms in quantum computing.

[0132] Multiple quantum logic gates are quantum logic gates used in quantum circuits to operate multiple qubits. They include CRX, CRY, CRZ, CNOT gates, SWAP gates, Tooffoli gates, etc. Multiple quantum logic gates can not only be used to realize the state transformation of a single qubit, but also to realize the control and interaction between multiple qubits.

[0133] The variable quantum coding refers to the use of variable quantum circuits to encode the quantum state of the loaded qubits. The variable quantum circuits have been described above and will not be repeated here.

[0134] In one embodiment of this application, the attention module includes a quantum variational convolution circuit in which the encoding layer is used to load the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes into the qubit. The parameters of the first single quantum logic gate are determined based on the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes.

[0135] In one embodiment of this application, the quantum variational convolution circuit included in the fusion module has an encoding layer for loading the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node into the qubit. The parameters of the first single quantum logic gate are determined based on the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node.

[0136] See Figure 3 , Figure 3 An exemplary schematic diagram of a quantum variational convolution circuit provided in this application. Figure 3 The quantum variational convolution circuit shown includes four qubits and comprises an encoding circuit, a variational circuit U(β), and a measurement layer, which act sequentially on the four qubits. The measurement layer is used to measure the qubits to obtain their quantum states.

[0137] The encoding circuit includes:

[0138] The first single quantum logic gates RY(θ1) and RZ(α1) operate on the first qubit, the first single quantum logic gates RY(θ2) and RZ(α2) operate on the second qubit, the first single quantum logic gates RY(θ3) and RZ(α3) operate on the third qubit, and the first single quantum logic gates RY(θ4) and RZ(α4) operate on the fourth qubit.

[0139] In the encoding circuit included in the attention module, the parameters θ1 of the first single quantum logic gate RY(θ1), α1 of the first single quantum logic gate RZ(α1), θ2 of the first single quantum logic gate RY(θ2), α2 of the first single quantum logic gate RZ(α2), θ3 of the first single quantum logic gate RY(θ3), α3 of the first single quantum logic gate RZ(α3), θ4 of the first single quantum logic gate RY(θ4), and α4 of the first single quantum logic gate RZ(α4) are all determined based on a portion of the pixels in the (j-1)th spatial state of the i-th time node, a portion of the pixels in the j-th time state of the preceding time nodes, and a portion of the pixels in the (j-1)th spatial state of the preceding time nodes.

[0140] In the encoding circuit included in the fusion module, the parameters θ1 of the first single quantum logic gate RY(θ1), α1 of the first single quantum logic gate RZ(α1), θ2 of the first single quantum logic gate RY(θ2), α2 of the first single quantum logic gate RZ(α2), θ3 of the first single quantum logic gate RY(θ3), α3 of the first single quantum logic gate RZ(α3), θ4 of the first single quantum logic gate RY(θ4), and α4 of the first single quantum logic gate RZ(α4) are all determined based on a portion of the pixels of the aggregated time state of the i-th time node, a portion of the pixels of the (j-1)-th spatial state of the i-th time node, and a portion of the pixels of the (j-1)-th spatial state of the time nodes preceding the i-th time node.

[0141] Taking the specific method provided in this application for inputting meteorological radar echo maps of multiple time nodes before the time node to be predicted into a quantum motion sensing network and running the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted as an example, when the first time state of the 0th time node, the first time state of the 1st time node, the 0th spatial state of the 0th time node, the 0th spatial state of the 1st time node, and the 0th spatial state of the 2nd time node are input into the attention module to obtain the first aggregated time state of the 2nd time node, the parameters θ1 and RZ(α1) of the first single quantum logic gate RY(θ1) in the quantum variational convolution circuit included in the attention module are... The parameters α1, θ2, α2, θ3, θ3, α4, θ4, and α4 of the first single quantum logic gate RY(θ2), RZ(α2), RY(θ3), RZ(α3), RY(θ4), and RZ(α4) are all determined based on a subset of pixels in the first time state of the 0th time node, a subset of pixels in the first time state of the 1st time node, a subset of pixels in the 0th spatial state of the 0th time node, a subset of pixels in the 0th spatial state of the 1st time node, and a subset of pixels in the 0th spatial state of the 2nd time node.

[0142] The correspondence between parameters θ1, α1, θ2, α2, θ3, α3, θ4, α4 and a subset of pixels in the first time state, a subset of pixels in the first time state of the first time node, a subset of pixels in the 0th spatial state of the 0th time node, a subset of pixels in the 0th spatial state of the first time node, and a subset of pixels in the 0th spatial state of the 2nd time node is determined based on the number and specific arrangement of pixels in the first time state of the 0th time node, the first time state of the first time node, the 0th spatial state of the 0th time node, the 0th spatial state of the first time node, and the 0th spatial state of the 2nd time node. No restrictions are imposed here.

[0143] When the first aggregated time state of the second time node, the 0th spatial state of the 0th time node, the 0th spatial state of the first time node, and the 0th spatial state of the second time node are input into the fusion module and run, the above parameters are all determined based on a portion of the pixels of the first aggregated time state of the second time node, a portion of the pixels of the 0th spatial state of the 0th time node, a portion of the pixels of the 0th spatial state of the first time node, and a portion of the pixels of the 0th spatial state of the second time node.

[0144] The correspondence between parameters θ1, α1, θ2, α2, θ3, α3, θ4, α4 and the first aggregated time state of the second time node, the 0th spatial state of the 0th time node, the 0th spatial state of the first time node, and the 0th spatial state of the second time node is determined based on the number and specific arrangement of pixels in the first aggregated time state of the second time node, the 0th spatial state of the 0th time node, the 0th spatial state of the first time node, and the 0th spatial state of the second time node, and is not restricted here.

[0145] It should be noted that the attention module and fusion module provided in this application may each include multiple quantum variational convolution circuits. The exemplary schematic diagram of a quantum variational convolution circuit provided in this application only convolves a subset of pixels in the temporal state, spatial state, and aggregated temporal state. In practical applications, an appropriate number of quantum variational convolution circuits should be selected according to requirements and used to convolve a subset of pixels in the temporal state, spatial state, and aggregated temporal state, thereby completing the convolution of all pixels in the temporal state, spatial state, and aggregated temporal state.

[0146] See Figure 4 , Figure 4 This is an exemplary schematic diagram of a variational circuit provided in an embodiment of this application. Figure 4 The variational circuit shown includes a first sub-circuit acting on the first and second qubits, a second sub-circuit acting on the third and fourth qubits, a third sub-circuit acting on the second and third qubits, and a fourth sub-circuit acting on the first and fourth qubits.

[0147] The first sub-circuit includes: a second single quantum logic gate RZ(π / 2) acting on the first qubit, a second single quantum logic gate RZ(-π / 2) acting on the second qubit, a third single quantum logic gate RZ(β1) acting on the first qubit, a third single quantum logic gate RY(β2) acting on the second qubit, a third single quantum logic gate RY(β3) acting on the second qubit, and a multi-quantum logic gate CNOT acting on the first and second qubits; wherein, the parameters β1 of the third single quantum logic gate RZ(β1), β2 of the third single quantum logic gate RY(β2), and β3 of the third single quantum logic gate RY(β3) are all determined based on training.

[0148] The second sub-circuit includes: a second single quantum logic gate RZ(π / 2) acting on the third qubit, a second single quantum logic gate RZ(-π / 2) acting on the fourth qubit, a third single quantum logic gate RZ(β4) acting on the third qubit, a third single quantum logic gate RY(β5) acting on the fourth qubit, a third single quantum logic gate RY(β6) acting on the second qubit, and a multi-quantum logic gate CNOT acting on the first and second qubits; wherein, the parameter β4 of the third single quantum logic gate RZ(β4), the parameter β5 of the third single quantum logic gate RY(β5), and the parameter β6 of the third single quantum logic gate RY(β6) are all determined based on training.

[0149] The third sub-circuit includes: a second single quantum logic gate RZ(π / 2) acting on the second qubit, a second single quantum logic gate RZ(-π / 2) acting on the third qubit, a third single quantum logic gate RZ(β7) acting on the second qubit, a third single quantum logic gate RY(β8) acting on the third qubit, a third single quantum logic gate RY(β9) acting on the third qubit, and a multi-quantum logic gate CNOT acting on the first and second qubits; wherein, the parameter β7 of the third single quantum logic gate RZ(β7), the parameter β8 of the third single quantum logic gate RY(β8), and the parameter β9 of the third single quantum logic gate RY(β9) are all determined based on training.

[0150] The fourth sub-circuit includes: a second single-quantum logic gate RZ(π / 2) operating on the fourth qubit, a second single-quantum logic gate RZ(-π / 2) operating on the first qubit, and a third single-quantum logic gate RZ(β) operating on the fourth qubit. 10 The third single quantum logic gate RY(β) acting on the first qubit 11 The third single quantum logic gate RY(β) acting on the first qubit 12), the CNOT gate, a multi-quantum logic gate acting on the first and second qubits; among which, the third single-quantum logic gate RZ(β) 10 The parameter β) 10 The third single quantum logic gate RY(β) 11 The parameter β) 11 The third single quantum logic gate RY(β) 12 The parameter β) 12 All are determined based on training.

[0151] This application provides a quantum variational convolution circuit including logic gates with variable parameters. By adjusting the parameters in the circuit, prediction errors can be minimized, thereby maximizing the performance of the model. The variational circuit includes sub-circuits operating on every two qubits. Each sub-circuit includes a single quantum logic gate operating on each qubit and multiple quantum logic gates operating on the two qubits. This circuit structure can establish entanglement between qubits, ensuring that entanglement can be established between every two qubits, enhancing the interaction between qubits, and thus better capturing the mutual influence and coupling relationships between different meteorological variables. The single quantum logic gate operating on each qubit can avoid the adverse effects of noise in complex circuits, thereby improving the quality of quantum input feature mapping. For these reasons, the quantum variational convolution circuit provided in this application significantly improves the accuracy of weather forecasting.

[0152] In one embodiment of this application, the quantum motion sensing network further includes an encoder and a decoder. The encoder is used to extract features from the weather radar echo maps of multiple time nodes before the time node to be predicted, to obtain the 0th spatial state of the multiple time nodes before the time node to be predicted. The decoder is used to decode the final spatial state of the multiple time nodes before the time node to be predicted, to obtain the weather radar echo map of the time node to be predicted. Both the encoder and the decoder include the quantum variational convolution circuit.

[0153] The encoder and decoder are two components in the quantum motion sensing network. The encoder extracts features from the input sequence and transforms it into the zeroth spatial state of multiple time points before the time point to be predicted. The decoder decodes the model output into hidden states, which are used as input for the next round of the decoder.

[0154] In one embodiment of this application, the step of extracting features from the meteorological radar echo images of multiple time nodes preceding the time node to be predicted, to obtain the 0th spatial state of the multiple time nodes preceding the time node to be predicted, includes:

[0155] The weather radar echo map of the i-th time node before the time node to be predicted is input into the encoder and run to obtain the 0th spatial state of the i-th time node.

[0156] Let i = i + 1, then return to the step of inputting the weather radar echo map of the i-th time node before the time node to be predicted into the encoder and run it;

[0157] When i = 1, the execution is terminated. The 0th spatial state of the i-th time node obtained in each execution is the 0th spatial state of the multiple time nodes before the time node to be predicted.

[0158] In one embodiment of this application, decoding the final spatial state of multiple time points preceding the time point to be predicted to obtain the weather radar echo map of the time point to be predicted includes:

[0159] The final spatial state and corresponding hidden state of the i-th time node are input into the decoder and run to obtain the hidden state of the (i+1)-th time node. The hidden state of the 1st time node is a preset value.

[0160] Let i = i + 1, then return to the step of inputting the final spatial state and the corresponding hidden state of the i-th time node into the decoder and run it;

[0161] When i = 1, the execution is terminated. The hidden state of the (i+1)th time node obtained in each execution is the meteorological radar echo map of the time node to be predicted.

[0162] Taking the specific method provided in this application for inputting meteorological radar echo maps of multiple time nodes before the time node to be predicted into a quantum motion sensing network and running the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted as an example, when performing feature extraction on the meteorological radar echo map of the second time node before the time node to be predicted to obtain the 0th spatial state of the second time node, the meteorological radar echo map of the second time node before the time node to be predicted can be input into the encoder and run to obtain the 0th spatial state of the second time node output by the encoder.

[0163] Decoding the third spatial state of the first time node, the third spatial state of the second time node, the third spatial state of the third time node, and the third spatial state of the fourth time node yields the meteorological radar echo map of the time node to be predicted. This process may include: inputting the third spatial state and hidden state of the first time node into the decoder and running it to obtain the hidden state of the second time node; inputting the third spatial state and hidden state of the second time node into the decoder and running it to obtain the hidden state of the third time node; inputting the third spatial state and hidden state of the third time node into the decoder and running it to obtain the hidden state of the fourth time node; and inputting the third spatial state and hidden state of the fourth time node into the decoder and running it to obtain the hidden state of the fifth time node.

[0164] The hidden state of the first time node is the weather radar echo map of the first time node to be predicted. The hidden state of the second time node is the weather radar echo map of the second time node to be predicted. The hidden state of the third time node is the weather radar echo map of the third time node to be predicted. The hidden state of the fourth time node is the weather radar echo map of the fourth time node to be predicted.

[0165] In one embodiment of this application, the encoder includes a quantum variational convolution circuit in which the encoding layer is used to load the weather radar echo map of the i-th time node onto the qubit, and the parameters of the first single quantum logic gate are determined based on the weather radar echo map of the i-th time node; the decoder includes a quantum variational convolution circuit in which the encoding layer is used to load the final spatial state of the i-th time node onto the qubit, and the parameters of the first single quantum logic gate are determined based on the final spatial state of the i-th time node.

[0166] See Figure 3Taking the specific method provided in this application for inputting meteorological radar echo images of multiple time nodes before the time node to be predicted into a quantum motion sensing network and running the quantum motion sensing network to obtain the meteorological radar echo image of the time node to be predicted as an example, feature extraction is performed on the meteorological radar echo image of the second time node before the time node to be predicted to obtain the 0th spatial state of the second time node. In the quantum variational convolution circuit included in the encoder, the encoding layer is used to load the 0th spatial state of the second time node into the qubit. The first single quantum logic... The parameters θ1 of gate RY(θ1), α1 of the first single quantum logic gate RZ(α1), θ2 of the first single quantum logic gate RY(θ2), α2 of the first single quantum logic gate RZ(α2), θ3 of the first single quantum logic gate RY(θ3), α3 of the first single quantum logic gate RZ(α3), θ4 of the first single quantum logic gate RY(θ4), and α4 of the first single quantum logic gate RZ(α4) are all determined based on a portion of the pixels in the weather radar echo image of the second time node before the time node to be predicted.

[0167] The correspondence between parameters θ1, α1, θ2, α2, θ3, α3, θ4, α4 and some pixels in the meteorological radar echo image of the second time node before the time node to be predicted is determined based on the number and specific arrangement of pixels in the meteorological radar echo image of the second time node before the time node to be predicted, and no restrictions are imposed here.

[0168] When the third spatial state and hidden state of the first time node are input to the decoder and run to obtain the hidden state of the second time node, the coding layer in the quantum variational convolution circuit included in the decoder is used to load the third spatial state and hidden state of the first time node into the qubit. The parameters θ1 of the first single quantum logic gate RY(θ1), α1 of the first single quantum logic gate RZ(α1), θ2 of the first single quantum logic gate RY(θ2), α2 of the first single quantum logic gate RZ(α2), θ3 of the first single quantum logic gate RY(θ3), α3 of the first single quantum logic gate RZ(α3), θ4 of the first single quantum logic gate RY(θ4), and α4 of the first single quantum logic gate RZ(α4) are all determined based on some pixels in the third spatial state of the first time node and some pixels in the hidden state of the first time node.

[0169] The correspondence between parameters θ1, α1, θ2, α2, θ3, α3, θ4, α4 and some pixels in the third spatial state of the first time node and some pixels in the hidden state of the first time node is determined based on the number and specific arrangement of pixels in the third spatial state of the first time node and pixels in the hidden state of the first time node, and is not restricted here.

[0170] The quantum variational convolution circuits included in the encoder and decoder have the same variational circuit structure as those included in the attention module and fusion module. For details, please refer to [reference needed]. Figure 4 The variational circuit shown here will not be described in detail here.

[0171] It should be noted that the encoder and decoder provided in this application may each include multiple quantum variational convolution circuits. The exemplary schematic diagram of a quantum variational convolution circuit provided in this application only convolves a portion of the pixels in the weather radar echo image, the final spatial state, and the hidden state. In practical applications, an appropriate number of quantum variational convolution circuits should be selected according to requirements and used to convolve a portion of the pixels in the weather radar echo image, the final spatial state, and the hidden state, thereby completing the convolution of all pixels in the weather radar echo image, the final spatial state, and the hidden state.

[0172] The encoder provided in this application can transform raw meteorological data into a higher-level representation. In weather forecasting, meteorological data is often massive and complex, containing a large number of variables and information. The encoder can transform the raw data into a more compact and meaningful feature representation through a series of transformation and compression operations. This reduces data redundancy and noise, extracts more important features, and thus better captures and understands key information in the meteorological system. The decoder provided in this application can decode the meteorological radar echo map of the time node to be predicted based on the final spatial state output by the fusion module, retaining important information and reducing data redundancy and noise. For these reasons, the encoder and decoder provided in this application significantly improve the accuracy of weather forecasting.

[0173] In one embodiment of this application, after obtaining the j-th time state and the j-th spatial state of the i-th time node, the method further includes: adding the j-th spatial state of the i-th time node and the (j-1)-th spatial state of the i-th time node to obtain a new j-th spatial state of the i-th time node.

[0174] Taking the specific method provided in this application for inputting meteorological radar echo maps of multiple time nodes before the time node to be predicted into a quantum motion sensing network and running the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted as an example, after obtaining the third time state and the third spatial state of the first time node, the third spatial state of the first time node can be added to the second spatial state of the first time node to obtain a new third spatial state of the first time node.

[0175] By adding the spatial state of the current time point to the spatial state of the previous time point, a new spatial state for the current time point can be obtained. This new spatial state of the current time point contains information from past time points, helping the model to better capture dynamic changes and trends in meteorological data. In meteorological forecasting, the time series of meteorological data has a certain degree of correlation and continuity. Adding the spatial state of the current time point to the spatial state of the previous time point allows for the fusion of the spatial states of the current and previous time points, greatly improving the accuracy of meteorological forecasts.

[0176] See Figure 5 , Figure 5 A flowchart illustrating another weather forecasting method provided in this application embodiment is shown below. Figure 5 For example, the flow of another weather forecasting method provided in this application embodiment will be described:

[0177] The meteorological radar echo maps of multiple time points before the time point to be predicted are input into the encoder and run to obtain the 0th spatial state of multiple time points before the time point to be predicted.

[0178] The (j-1)th spatial state of the i-th time node before the time node to be predicted, and the j-th time state and (j-1)th spatial state of the partial time nodes before the i-th time node are input into the attention module and run to obtain the j-th aggregated time state of the i-th time node, i = 1, 2, ..., I, where I is the number of time nodes before the time node to be predicted, and the j-th time state and (j-1)th spatial state of the partial time nodes before the 1st time node are preset values, with the initial value of j being 1;

[0179] Let j = j + 1, and return to the execution step described in "inputting the (j-1)th spatial state of the i-th time node before the time node to be predicted and the j-th time state and (j-1)th spatial state of some time nodes before the i-th time node into the attention module and running it to obtain the j-th aggregated time state of the i-th time node";

[0180] After executing a preset number of times, the j-th spatial state of the i-th time node obtained from the last execution is the final spatial state of the i-th time node;

[0181] Let i = i + 1, and return to the execution step described in "inputting the (j-1)th spatial state of the i-th time node before the time node to be predicted and the j-th time state and (j-1)th spatial state of some time nodes before the i-th time node into the attention module and running it... The j-th spatial state of the i-th time node obtained in the last execution is the final spatial state of the i-th time node", until i = 1, and stop executing this step;

[0182] The final spatial state and hidden state of each time node are input into the decoder in chronological order and run to obtain the hidden state of the next time node corresponding to each execution. The process of "inputting the final spatial state and hidden state of each time node into the decoder in chronological order and running to obtain the hidden state of the next time node corresponding to each execution" is executed I times.

[0183] The hidden state of the next time node after each execution of the corresponding time node is the weather radar echo map of the time node to be predicted.

[0184] The meteorological forecast results for the time point to be predicted are determined based on the meteorological radar echo map of the time point to be predicted.

[0185] See Figure 6 , Figure 6 This is a schematic diagram of the structure of a weather forecasting device provided in an embodiment of this application, and... Figure 6 Corresponding to the process shown, the apparatus includes:

[0186] The running module 601 is used to input the meteorological radar echo maps of multiple time nodes before the time node to be predicted into the quantum motion sensing network, and run the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time nodes before the time node to be predicted.

[0187] The determination module 602 is used to determine the meteorological forecast result for the time node to be predicted based on the meteorological radar echo map of the time node to be predicted.

[0188] Optionally, the step of inputting meteorological radar echo images from multiple time points preceding the time point to be predicted into a quantum motion sensing network, and running the quantum motion sensing network to obtain the meteorological radar echo image of the time point to be predicted, includes:

[0189] Feature extraction is performed on the meteorological radar echo images of multiple time points before the time point to be predicted to obtain the 0th spatial state of multiple time points before the time point to be predicted.

[0190] The 0th spatial state of multiple time nodes before the time node to be predicted is input into the attention module and the fusion module and run to obtain the final spatial state of multiple time nodes before the time node to be predicted.

[0191] The final spatial state of multiple time points before the time point to be predicted is decoded to obtain the meteorological radar echo map of the time point to be predicted.

[0192] Optionally, the step of inputting the 0th spatial state of multiple time nodes preceding the time node to be predicted into the attention module and the fusion module and running them to obtain the final spatial state of multiple time nodes preceding the time node to be predicted includes:

[0193] The spatial state of the 0th time node of the i-th time node and the time and spatial states of the time nodes before the i-th time node are input into the attention module and the fusion module and run to obtain the final spatial state of the i-th time node. The initial value of i is 1, and the time and spatial states of the time nodes before the 1st time node are preset values.

[0194] Let i = i + 1, then return to the execution step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the time nodes before the i-th time node into the attention module and the fusion module and run it;

[0195] When i = I, the execution is terminated. The final spatial state of the i-th time node obtained in each execution is the final spatial state of multiple time nodes before the time node to be predicted, where I is the number of time nodes before the time node to be predicted.

[0196] Optionally, the step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the preceding time nodes into the attention module and fusion module and running them to obtain the final spatial state of the i-th time node includes:

[0197] The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node, with the initial value of j being 1;

[0198] Let j = j + 1, then return to the execution step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the time nodes preceding the i-th time node into the attention module and fusion module and run them;

[0199] After executing a preset number of times, the j-th spatial state of the i-th time node obtained from the last execution is the final spatial state of the i-th time node.

[0200] Optionally, the step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes into the attention module and fusion module and running them to obtain the j-th time state and j-th spatial state of the i-th time node includes:

[0201] The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and run to obtain the j-th aggregated time state of the i-th time node.

[0202] The j-th aggregated time state and j-1 spatial state of the i-th time node, and the j-1 spatial state of the preceding time nodes of the i-th time node are input into the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node.

[0203] Optionally, the quantum variational convolution circuit includes an encoding circuit and a variational circuit. The encoding circuit includes a first single quantum logic gate acting on each qubit. The variational circuit includes a sub-circuit acting on every two qubits. The sub-circuit includes a second single quantum logic gate, a third single quantum logic gate, and a multi-quantum logic gate acting on each qubit. The parameters of the second single quantum logic gate are determined based on training. The variational circuit is used to perform variational quantum encoding on the qubits.

[0204] Optionally, in the quantum variational convolution circuit included in the attention module, the encoding layer is used to load the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes into the qubit, and the parameters of the first single quantum logic gate are determined based on the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes.

[0205] Optionally, in the quantum variational convolution circuit included in the fusion module, the encoding layer is used to load the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node into the qubit, and the parameters of the first single quantum logic gate are determined based on the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node.

[0206] Optionally, the time nodes preceding the i-th time node include the (i-τ)-th to (i-1)-th time nodes, where τ is a preset value and 1 < τ. <i。

[0207] Optionally, the quantum motion sensing network further includes an encoder and a decoder. The encoder is used to extract features from the weather radar echo maps of multiple time nodes before the time node to be predicted, to obtain the 0th spatial state of the multiple time nodes before the time node to be predicted. The decoder is used to decode the final spatial state of the multiple time nodes before the time node to be predicted, to obtain the weather radar echo map of the time node to be predicted. Both the encoder and the decoder include the quantum variational convolution circuit.

[0208] Optionally, after obtaining the j-th time state and the j-th spatial state of the i-th time node, the method further includes: adding the j-th spatial state of the i-th time node and the (j-1)-th spatial state of the i-th time node to obtain a new j-th spatial state of the i-th time node.

[0209] This application also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0210] Specifically, in this embodiment, the storage medium may include, but is not limited to, USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks, and other media capable of storing computer programs.

[0211] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the method embodiments described above.

[0212] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.

[0213] Specifically, in this embodiment, the processor can be configured to perform the following steps via a computer program:

[0214] S1, input the meteorological radar echo maps of multiple time nodes before the time node to be predicted into the quantum motion sensing network, and run the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time nodes before the time node to be predicted.

[0215] S2, determine the meteorological forecast result for the time node to be predicted based on the meteorological radar echo map of the time node to be predicted.

[0216] Specifically, the specific examples in this embodiment can be referred to the examples described in the above embodiments and optional implementations, and will not be repeated here.

[0217] The above description, based on the embodiments shown in the drawings, details the structure, features, and effects of this application. The above description is only a preferred embodiment of this application, but this application does not limit the scope of implementation to what is shown in the drawings. Any changes made in accordance with the concept of this application, or modifications to equivalent embodiments, that do not exceed the spirit covered by the specification and drawings, should be within the protection scope of this application.

Claims

1. A weather forecasting method, characterized in that, The method includes: The meteorological radar echo maps of multiple time points before the time point to be predicted are input into the quantum motion sensing network, and the quantum motion sensing network is run to obtain the meteorological radar echo map of the time point to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time points before the time point to be predicted. The meteorological forecast result for the time node to be predicted is determined based on the meteorological radar echo map of the time node to be predicted. The quantum variational convolution circuit includes an encoding circuit and a variational circuit. The encoding circuit includes a first single quantum logic gate acting on each qubit. The variational circuit includes a sub-circuit acting on every two qubits. The sub-circuit includes a second single quantum logic gate, a third single quantum logic gate, and a multi-quantum logic gate acting on each qubit. The parameters of the second single quantum logic gate are determined based on training. The variational circuit is used to perform variational quantum encoding on the qubits. In the quantum variational convolution circuit included in the attention module, the encoding layer is used to load the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes into the qubit. The parameters of the first single quantum logic gate are determined based on the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes. The initial values ​​of i and j are both 1. In the quantum variational convolution circuit included in the fusion module, the encoding layer is used to load the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node into the qubit. The parameters of the first single quantum logic gate are determined based on the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node.

2. The method as described in claim 1, characterized in that, The step of inputting meteorological radar echo maps from multiple time points preceding the time point to be predicted into a quantum motion sensing network, and running the quantum motion sensing network to obtain the meteorological radar echo map of the time point to be predicted, includes: Feature extraction is performed on the meteorological radar echo images of multiple time points before the time point to be predicted to obtain the 0th spatial state of multiple time points before the time point to be predicted. The 0th spatial state of multiple time nodes before the time node to be predicted is input into the attention module and the fusion module and run to obtain the final spatial state of multiple time nodes before the time node to be predicted. The final spatial state of multiple time points before the time point to be predicted is decoded to obtain the meteorological radar echo map of the time point to be predicted.

3. The method as described in claim 2, characterized in that, The step of inputting the 0th spatial state of multiple time nodes preceding the time node to be predicted into the attention module and the fusion module and running them to obtain the final spatial state of multiple time nodes preceding the time node to be predicted includes: The spatial state of the 0th time node and the time and spatial states of the time nodes before the 1st time node are input into the attention module and the fusion module and run to obtain the final spatial state of the 1st time node. The time and spatial states of the time nodes before the 1st time node are preset values. Let i = i + 1, then return to the execution step of inputting the 0th spatial state of the i-th time node and the temporal and spatial states of the time nodes preceding the i-th time node into the attention module and the fusion module and run it; When i=I, the execution is terminated. The final spatial state of the i-th time node obtained in each execution is the final spatial state of multiple time nodes before the time node to be predicted, where I is the number of time nodes before the time node to be predicted.

4. The method as described in claim 3, characterized in that, The step of inputting the spatial state of the 0th time node and the temporal and spatial states of the preceding time nodes into the attention module and fusion module and running them to obtain the final spatial state of the i-th time node includes: The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node. Let j = j + 1, then return to the execution step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the time nodes preceding the i-th time node into the attention module and fusion module and run them; After executing a preset number of times, the j-th spatial state of the i-th time node obtained from the last execution is the final spatial state of the i-th time node.

5. The method as described in claim 4, characterized in that, The step of inputting the (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes into the attention module and fusion module and running them to obtain the j-th time state and j-th spatial state of the i-th time node includes: The (j-1)th spatial state of the i-th time node and the j-th time state and (j-1)th spatial state of the preceding time nodes are input into the attention module and run to obtain the j-th aggregated time state of the i-th time node. The j-th aggregated time state and j-1 spatial state of the i-th time node, and the j-1 spatial state of the preceding time nodes of the i-th time node are input into the fusion module and run to obtain the j-th time state and j-th spatial state of the i-th time node.

6. The method according to any one of claims 3-5, characterized in that, The time nodes preceding the i-th time node include the first... To the Each time point The default value and .

7. The method as described in claim 2, characterized in that, The quantum motion sensing network further includes an encoder and a decoder. The encoder is used to extract features from the weather radar echo maps of multiple time nodes before the time node to be predicted, to obtain the 0th spatial state of multiple time nodes before the time node to be predicted. The decoder is used to decode the final spatial state of multiple time nodes before the time node to be predicted, to obtain the weather radar echo map of the time node to be predicted. Both the encoder and the decoder include the quantum variational convolution circuit.

8. The method as described in claim 5, characterized in that, After obtaining the j-th time state and j-th spatial state of the i-th time node, the method further includes: adding the j-th spatial state of the i-th time node and the (j-1)-th spatial state of the i-th time node to obtain a new j-th spatial state of the i-th time node.

9. A weather forecasting device, characterized in that, The device includes: The running module is used to input the meteorological radar echo maps of multiple time nodes before the time node to be predicted into the quantum motion sensing network, and run the quantum motion sensing network to obtain the meteorological radar echo map of the time node to be predicted. The quantum motion sensing network includes an attention module and a fusion module. The parameters of the quantum variational convolution circuit in the attention module and the fusion module are determined based on the meteorological radar echo maps of multiple time nodes before the time node to be predicted. The determination module is used to determine the meteorological forecast result for the time node to be predicted based on the meteorological radar echo map of the time node to be predicted. The quantum variational convolution circuit includes an encoding circuit and a variational circuit. The encoding circuit includes a first single quantum logic gate acting on each qubit. The variational circuit includes a sub-circuit acting on every two qubits. The sub-circuit includes a second single quantum logic gate, a third single quantum logic gate, and a multi-quantum logic gate acting on each qubit. The parameters of the second single quantum logic gate are determined based on training. The variational circuit is used to perform variational quantum encoding on the qubits. In the quantum variational convolution circuit included in the attention module, the encoding layer is used to load the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes into the qubit. The parameters of the first single quantum logic gate are determined based on the (j-1)th spatial state of the i-th time node and the j-th and (j-1)th spatial states of the preceding time nodes. The initial values ​​of i and j are both 1. In the quantum variational convolution circuit included in the fusion module, the encoding layer is used to load the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node into the qubit. The parameters of the first single quantum logic gate are determined based on the j-th aggregated time state, the (j-1)-th spatial state of the i-th time node, and the (j-1)-th spatial state of the preceding time nodes of the i-th time node.

10. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 8 when it is run.

11. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Meteorological radar echo map prediction method and device, computer equipment and storage medium

    CN111239739A

  • Meteorological prediction method and device, storage medium and electronic equipment

    CN115759413A