A meteorological data prediction method and device, a storage medium and an electronic device

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

Patent Information

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

AI Technical Summary

Technical Problem

这类模型属于数值天气预报方法,而气象数据复杂度高,即使依赖于超级计算机的处理能力,也需要数个小时才能提供预测结果,在气象变化快速的环境下,传统的天气预报方法无法实现短时气象预测

Benefits of technology

[0029]Based on the above technical solution, this invention can obtain a sequence of meteorological data maps from multiple moments before the predicted moment. By inputting the meteorological data map sequence into a quantum-classical hybrid Unet model, which includes quantum convolutional layers, the quantum convolutional layers can encode the meteorological data map into qubits for quantum state evolution, obtaining a quantum convolutional feature map. This feature map is then convolved and sampled multiple times with the classical sampling layer to obtain a meteorological feature map of the region to be predicted at the predicted moment. Compared to the classical convolutional layers in the classical Unet model, the quantum convolutional layers can effectively reduce the number of parameters, lower computational complexity, and accelerate computation. Furthermore, quantum parallel computing can also speed up the processing of the initial dataset. Thus, the meteorological data map at the predicted moment can be determined based on the meteorological feature map, improving the speed of meteorological forecasting and realizing short-term meteorological forecasting.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118504721B_ABST
    Figure CN118504721B_ABST
Patent Text Reader

Abstract

The application discloses a meteorological data prediction method and device, a storage medium and an electronic device, and relates to the technical field of quantum computing. The method comprises the following steps: acquiring a meteorological data graph sequence of multiple time points before a to-be-predicted time point, each time point corresponding to one meteorological data graph in a meteorological feature graph sequence; each meteorological data graph comprises meteorological data of each sub-region in a to-be-predicted region; inputting the meteorological data graph sequence into a pre-trained quantum-classical hybrid Unet model to obtain a predicted meteorological feature graph of the to-be-predicted region at the to-be-predicted time point; and determining a predicted meteorological data graph of the to-be-predicted region at the to-be-predicted time point according to the predicted meteorological feature graph. Short-time meteorological data prediction can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of quantum computing technology, and in particular relates to a meteorological data prediction method, device, storage medium and electronic device. Background Technology

[0002] A quantum computer is a physical device that performs high-speed mathematical and logical operations, stores and processes quantum information in accordance with the laws of quantum mechanics. When a device processes and calculates quantum information and runs quantum algorithms, it is a quantum computer. Because of its ability to process mathematical problems more efficiently than ordinary computers—for example, reducing the time to crack RSA keys from hundreds of years to hours—quantum computers have become a key technology under research.

[0003] Weather forecasting can guide daily life and production, helping to avoid losses caused by extreme weather events. This includes essential sectors such as agriculture, transportation, and international business. Therefore, rapid and accurate weather forecasting is of paramount importance.

[0004] Traditional weather forecasting methods rely on prior knowledge, such as the thermodynamic properties of the atmosphere, the statistical distribution of data, and ensemble learning of multiple models with different initial conditions. These models belong to numerical weather prediction methods. However, meteorological data is highly complex, and even with the processing power of supercomputers, it takes several hours to provide forecast results. In environments with rapidly changing weather, traditional weather forecasting methods cannot achieve short-term weather prediction. Summary of the Invention

[0005] The purpose of this invention is to provide a meteorological data forecasting method, apparatus, storage medium, and electronic device, aimed at achieving short-term weather forecasting.

[0006] To achieve the above objectives, a first aspect of the present invention provides a meteorological data prediction method, the method comprising:

[0007] Obtain a sequence of meteorological data maps for multiple times preceding the time to be predicted, with each time corresponding to a meteorological data map in the meteorological feature map sequence; each meteorological data map includes meteorological data for each sub-region within the region to be predicted;

[0008] The meteorological data map sequence is input into a pre-trained quantum-classical hybrid Unet model to obtain a predicted meteorological feature map of the region to be predicted at the predicted time. The quantum-classical hybrid Unet model includes a quantum convolutional layer and a classical sampling layer. The quantum convolutional layer is used to encode the meteorological data map into qubits for quantum state evolution to obtain a quantum convolutional feature map. The classical sampling layer and the quantum convolutional layer perform multiple feature sampling and convolution on the quantum convolutional feature map to obtain the predicted meteorological feature map.

[0009] Based on the predicted meteorological feature map, a predicted meteorological data map of the area to be predicted at the predicted time is determined.

[0010] Optionally, the quantum convolutional layer is used to traverse the meteorological data map, select a preset number of meteorological data multiple times, and perform quantum feature convolution on the preset number of meteorological data to obtain a quantum convolutional feature map.

[0011] Optionally, the quantum convolutional layer includes a predetermined number of qubits, a quantum state encoding layer, a parameter-dependent layer, and a quantum state measurement layer; the predetermined number of meteorological data points correspond one-to-one with the predetermined number of qubits.

[0012] The quantum state encoding layer is used to encode the preset number of meteorological data into the preset number of qubits. The parametric layer is used to perform quantum state evolution on the preset number of qubits after encoding. The quantum state measurement layer is used to measure the expected value of the preset number of qubits after quantum state evolution to obtain the quantum convolution feature map.

[0013] Optionally, the quantum state encoding layer includes a first quantum logic gate, which includes at least one of the following: an RX gate, an RY gate, and a first RZ gate;

[0014] The quantum state encoding layer is used to determine a preset number of rotation parameters based on the preset number of meteorological data, and the first quantum logic gate is used to perform quantum state encoding on each corresponding qubit based on the preset number of rotation parameters.

[0015] Optionally, the parametric layering includes a second RZ gate, a third RZ gate acting on each qubit, and a CNOT gate acting on adjacent qubits.

[0016] Optionally, the meteorological data in each meteorological data chart is normalized using the following formula:

[0017]

[0018] X k ={X1 k , ..., X T k};k∈1,....,d;T=T in +T out .

[0019] Among them, X k This represents the meteorological data of the k-th sub-region in the meteorological data map, where d represents the spatial dimension of the region to be predicted, and T represents multiple times before the time to be predicted. in Indicates the input time window, T outThis indicates the output time window.

[0020] Optionally, the quantum-classical hybrid Unet model is trained using the following loss function:

[0021]

[0022] Among them, T outMN This represents the input time window, M and N represent the spatial dimensions of the region to be predicted, t, k, and l represent the summation index, and y represents the summation index. t,k,l This represents the actual meteorological data at time t. This represents the predicted meteorological data at time t.

[0023] A second aspect of the present invention provides a meteorological data forecasting device, the device comprising:

[0024] The acquisition module is used to acquire a sequence of meteorological data maps for multiple times before the time to be predicted, with each time corresponding to a meteorological data map in the meteorological feature map sequence; each meteorological data map includes meteorological data for each sub-region within the region to be predicted.

[0025] An input module is used to input the meteorological data map sequence into a pre-trained quantum-classical hybrid Unet model to obtain a predicted meteorological feature map of the region to be predicted at the time to be predicted. The quantum-classical hybrid Unet model includes a quantum convolutional layer and a classical sampling layer. The quantum convolutional layer is used to encode the meteorological data map into qubits for quantum state evolution to obtain a quantum convolutional feature map. The classical sampling layer and the quantum convolutional layer perform multiple feature sampling and convolution on the quantum convolutional feature map to obtain the predicted meteorological feature map.

[0026] The determination module is used to determine the predicted meteorological data map of the area to be predicted at the time to be predicted based on the predicted meteorological feature map.

[0027] A third aspect of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps of the method described in any one of the first aspects above when running.

[0028] A fourth aspect of the present invention 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 of the method described in any of the first aspects above.

[0029] Based on the above technical solution, this invention can obtain a sequence of meteorological data maps from multiple moments before the predicted moment. By inputting the meteorological data map sequence into a quantum-classical hybrid Unet model, which includes quantum convolutional layers, the quantum convolutional layers can encode the meteorological data map into qubits for quantum state evolution, obtaining a quantum convolutional feature map. This feature map is then convolved and sampled multiple times with the classical sampling layer to obtain a meteorological feature map of the region to be predicted at the predicted moment. Compared to the classical convolutional layers in the classical Unet model, the quantum convolutional layers can effectively reduce the number of parameters, lower computational complexity, and accelerate computation. Furthermore, quantum parallel computing can also speed up the processing of the initial dataset. Thus, the meteorological data map at the predicted moment can be determined based on the meteorological feature map, improving the speed of meteorological forecasting and realizing short-term meteorological forecasting. Attached Figure Description

[0030] Figure 1 This is a hardware structure block diagram of a computer terminal for a meteorological data forecasting method according to an exemplary embodiment;

[0031] Figure 2 This is a flowchart illustrating a meteorological data forecasting method according to an exemplary embodiment;

[0032] Figure 3 This is a meteorological data graph illustrated according to an exemplary embodiment;

[0033] Figure 4 This is a schematic diagram illustrating the convolution of meteorological data by a quantum convolutional layer according to an exemplary embodiment;

[0034] Figure 5 This is a schematic diagram of the quantum variational line plot of a quantum convolutional layer according to an exemplary embodiment;

[0035] Figure 6 This is a block diagram illustrating a weather forecasting device according to an exemplary embodiment. Detailed Implementation

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

[0037] The present invention first provides a meteorological data prediction method, which can be applied to electronic devices, such as computer terminals, specifically ordinary computers, quantum computers, etc.

[0038] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for a meteorological data forecasting method, according to an exemplary embodiment. For example... Figure 1As shown, a computer terminal may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing a quantum circuit-based meteorological data prediction method are also shown. Optionally, the computer terminal may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the computer terminal described above. For example, the computer terminal may also include components that are more complex than those described above. Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / modules corresponding to the meteorological data prediction method in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to a computer terminal via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider for the computer terminal. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0041] It's important to note that a true quantum computer has a hybrid structure, comprising two main parts: a classical computer responsible for performing classical computations and control, and a quantum device responsible for running quantum programs to achieve quantum computation. A quantum program is a sequence of instructions written in a quantum language such as QRunes that can run on a quantum computer, supporting operations on quantum logic gates and ultimately enabling quantum computing. Specifically, a quantum program is a sequence of instructions that operates on quantum logic gates according to a specific timing order.

[0042] In practical applications, due to limitations in the development of quantum device hardware, quantum computing simulations are often required to verify quantum algorithms, quantum applications, and so on. Quantum computing simulation is the process of simulating the execution of a quantum program corresponding to a specific problem using a virtual architecture (i.e., a quantum virtual machine) built with the resources of a regular computer. Typically, it is necessary to construct a quantum program corresponding to a specific problem. The quantum program referred to in this embodiment of the invention is a program written in a classical language that represents qubits and their evolution, wherein qubits, quantum logic gates, etc., related to quantum computing all have corresponding classical code representations.

[0043] Quantum circuits, also known as quantum logic circuits, are a manifestation of quantum programming and are the most commonly used general-purpose quantum computing model. They represent circuits that operate on qubits under an abstract concept. They consist of qubits, circuits (timelines), and various quantum logic gates. Finally, the results are often read out through quantum measurement operations.

[0044] Unlike traditional circuits that use metal wires to transmit voltage or current signals, in quantum circuits, the circuits can be seen as being connected by time. That is, the state of a quantum bit evolves naturally over time, following the instructions of the Hamiltonian operator until it encounters a logic gate and is operated on.

[0045] A quantum program corresponds to a single quantum circuit. The quantum program described in this invention refers to this single quantum circuit, where the total number of qubits in the single quantum circuit is the same as the total number of qubits in the quantum program. This can be understood as follows: a quantum program can consist of a quantum circuit, measurement operations on the qubits within the quantum circuit, registers storing the measurement results, and control flow nodes (jump instructions). A single quantum circuit can contain dozens, hundreds, or even thousands of quantum logic gate operations. The execution of a quantum program is the process of executing all the quantum logic gates in a specific timing order. It should be noted that the timing order refers to the chronological sequence in which individual quantum logic gates are executed.

[0046] It's important to note that in classical computing, the most basic unit is the bit, and the most fundamental control mode is the logic gate. Circuit control can be achieved through combinations of logic gates. Similarly, the way to process qubits is through quantum logic gates. Quantum logic gates enable the evolution of quantum states and are the foundation of quantum circuits. Quantum logic gates include single-qubit gates, such as the Hadamard gate (H gate), Pauli-X gate (X gate, Pauli X gate), Pauli-Y gate (Y gate, Pauli Y gate), Pauli-Z gate (Z gate, Pauli Z gate), RX gate (RX rotation gate), RY gate (RY rotation gate), RZ gate (RZ rotation gate), etc.; and multi-qubit quantum logic gates, such as the CNOT gate, CR gate, iSWAP gate, Tofoli gate, etc. Quantum logic gates are generally represented using unitary matrices, which are not only matrix forms but also operations and transformations. Generally, the effect of a quantum logic gate on a quantum state is calculated by left-multiplying the unitary matrix by the vector corresponding to the right vector of the quantum state. For example, the vector corresponding to the right vector |0> of the quantum state can be... The vector corresponding to the right vector of the quantum state |1> can be

[0047] See Figure 2 , Figure 2 This is a flowchart illustrating a meteorological data forecasting method according to an exemplary embodiment, the method comprising:

[0048] S201. Obtain a sequence of meteorological data maps for multiple times prior to the time to be predicted.

[0049] Each moment corresponds to a meteorological data map in the meteorological feature map sequence; each meteorological data map includes meteorological data for each sub-region within the area to be predicted.

[0050] In this embodiment of the invention, meteorological data may include data such as air pressure, temperature, wind speed, and humidity.

[0051] The time to be predicted is the time when meteorological forecasting is required. The first few times can be the first 10 times. The specific time selection can be set according to the actual application. This embodiment of the invention does not make specific limitations on the number and selection method of the first few times.

[0052] For example, if the time to be predicted is 6:00 on February 2, 2023, then the preceding times can be 10 times such as 0:00, 3:00, 6:00, 9:00, 12:00, 5:00, 18:00, 21:00 on February 1, 2023, and 0:00 and 3:00 on February 2, 2022.

[0053] The area to be predicted is the geographical area where meteorological forecasting is required. In this embodiment of the invention, the area to be predicted can be divided into multiple sub-regions according to longitude and latitude, and the real-time meteorological data of each sub-region at each moment can be recorded to obtain the meteorological data map of the area to be predicted at each moment.

[0054] like Figure 3 As shown, Figure 3 As an exemplary meteorological data map provided in this embodiment of the invention, assuming that the area to be predicted includes 9 sub-regions, the meteorological data X of the 9 sub-regions at each moment can be recorded. 1 To X 9 X 1 To X 9 Fill to Figure 3 The corresponding sub-region in the meteorological data map shown yields the following results: Figure 3 The image shows meteorological data for the area to be predicted; if meteorological data for the area to be predicted is recorded at multiple times, multiple images can be obtained, such as... Figure 3 The meteorological data map shown is the meteorological data map sequence.

[0055] Meteorological data charts can be mathematically represented as {X} 1 , ..., X k ..., X d} where X represents meteorological data, d is the spatial sequence number, and represents the spatial dimension; T represents the time dimension, and t represents the step size of the meteorological data sequence. The area to be predicted can be represented as a spatial grid with an area of ​​xy, where each cell in the spatial grid contains a meteorological data X. i k This represents the meteorological data value in the k-th grid at time i, where i∈{tT} in , ..., tT in +j,...,t}, where t represents the first time dimension before the time point to be predicted, j represents the time step, and T in This indicates the size of the time window corresponding to multiple moments before the time point to be predicted.

[0056] S202. Input the meteorological data map sequence into the pre-trained quantum classical hybrid Unet model to obtain the predicted meteorological feature map of the area to be predicted at the time to be predicted.

[0057] The predicted meteorological feature map includes the predicted meteorological features of each sub-region within the area to be predicted. The quantum-classical hybrid Unet model includes a quantum convolutional layer and a classical sampling layer. The quantum convolutional layer is used to encode the meteorological data map into qubits for quantum state evolution to obtain the quantum convolutional feature map. The classical sampling layer and the quantum convolutional layer perform multiple feature sampling and convolution on the quantum convolutional feature map to obtain the predicted meteorological feature map.

[0058] Specifically, the classical sampling layer includes a classical downsampling layer and a classical upsampling layer. The quantum convolution feature map first undergoes multiple convolutions and downsamplings in the quantum convolution layer and the classical downsampling layer, and then undergoes multiple convolutions and upsamplings in the quantum convolution layer and the classical upsampling layer to obtain the meteorological feature map.

[0059] The quantum-classical hybrid Unet model in this embodiment of the invention is an encoder-decoder structure. The multi-layer quantum convolutional layer and the classical downsampling layer can be regarded as the encoder part, and the multi-layer quantum convolutional layer and the classical upsampling layer can be regarded as the decoder.

[0060] The number of quantum convolutional layers, classical downsampling layers, and classical upsampling layers in the aforementioned quantum-classical hybrid Unet model can be set according to the actual scenario.

[0061] For example, the encoder can be configured to connect one classical downsampling layer to every two quantum convolutional layers, and the corresponding decoder can also be configured to connect one classical upsampling layer to every two quantum convolutional layers.

[0062] In this embodiment of the invention, the output of the quantum classical hybrid Unet model can be represented as Y. i Y i This represents the predicted meteorological feature map corresponding to the i-th prediction time point, including the predicted meteorological features of each sub-region at the i-th time point. The dimension of the output tensor can be defined as Y∈R. M*N For any target value at time t, it can be defined as Y. t ∈R M*N M*N defines the spatial dimension.

[0063] S203. Determine the predicted meteorological data map of the area to be predicted at the time to be predicted based on the predicted meteorological characteristic map.

[0064] In one implementation, after S203, the first meteorological data map in the meteorological data map sequence can be deleted, and the predicted meteorological data map at the time to be predicted can be used as the last meteorological data map in the meteorological data map sequence to obtain an updated meteorological data map. The updated meteorological data map is then input into the quantum classical hybrid Unet model to obtain the predicted meteorological data map at the next time after the time to be predicted. By analogy, the predicted meteorological data maps at multiple times after the time to be predicted can be predicted.

[0065] Continuing with the example in S201, we can input the meteorological data maps for nine times on February 1, 2023 (3:00, 6:00, 9:00, 12:00, 5:00, 18:00, 21:00) and February 2, 2022 (0:00, 3:00), as well as the predicted meteorological data map for 6:00 on February 2, 2023, into the quantum classical hybrid Unet model. This will yield the predicted meteorological data map for 9:00 on February 2, 2023. Similarly, we can predict the predicted meteorological data maps for multiple times after the time to be predicted.

[0066] Based on the above technical solution, this invention can obtain a sequence of meteorological data maps from multiple moments before the predicted moment. By inputting the meteorological data map sequence into a quantum-classical hybrid Unet model, which includes quantum convolutional layers, the quantum convolutional layers can encode the meteorological data map into qubits for quantum state evolution, obtaining a quantum convolutional feature map. This feature map is then convolved and sampled multiple times with the classical sampling layer to obtain a meteorological feature map of the region to be predicted at the predicted moment. Compared to the classical convolutional layers in the classical Unet model, the quantum convolutional layers can effectively reduce the number of parameters, lower computational complexity, and accelerate computation. Furthermore, quantum parallel computing can also speed up the processing of the initial dataset. Thus, the meteorological data map at the predicted moment can be determined based on the meteorological feature map, improving the speed of meteorological forecasting and realizing short-term meteorological forecasting.

[0067] In another embodiment of this disclosure, since the units and scales of meteorological data collected in actual application scenarios may differ, in order to avoid such differences affecting the final prediction results, the meteorological data in each meteorological data map can be normalized. Specifically, normalization can be performed using the following formula:

[0068]

[0069] A meteorological data chart sequence can be defined as D; {{X i 1 , ..., X i d} t i=t -Tin, {Y j} j=t+1 t+Tout} t=Tin L-Tout X k ={X1 k , ..., X T k};k∈1,....,d;T=T in +T out .

[0070] Where L is the total time step, Xk This represents the meteorological data of the k-th sub-region in the meteorological data map, where d represents the spatial dimension of the region to be predicted, and T represents multiple times before the time to be predicted. in Indicates the input time window, T out This indicates the output time window.

[0071] Thus, by normalizing the meteorological data in each meteorological data map using the above normalization formula, the final predicted meteorological data map for the time to be predicted can be more accurate.

[0072] In another embodiment of the present invention, the above-mentioned quantum convolutional layer is used to traverse the meteorological data map, select a preset number of meteorological data multiple times, and perform quantum feature convolution on the preset number of meteorological data to obtain a quantum convolutional feature map.

[0073] For example, from Figure 3 Select X 1 X 2 X 4 X 5 Perform quantum feature convolution; select X 2 X 3 X 5 X 6 Perform quantum feature convolution; select X 4 X 5 X 7 X 8 Perform quantum feature convolution; select X 5 X 6 X 8 X 9 Perform quantum feature convolution; combine the results of each quantum feature convolution into the same image to obtain the quantum convolution feature map.

[0074] The quantum convolutional layer includes a predetermined number of qubits, a quantum state encoding layer, a parameter-variable layer, and a quantum state measurement layer.

[0075] Specifically, the quantum state encoding layer is used to encode a preset number of meteorological data into a preset number of qubits, the parametric layer is used to perform quantum state evolution on the preset number of qubits after encoding, and the quantum state measurement layer is used to measure the expected value of the preset number of qubits after quantum state evolution to obtain a quantum convolution feature map.

[0076] In this embodiment of the invention, the number of qubits included in the quantum convolutional layer is the same as the number of meteorological data selected by the quantum convolutional layer each time, and a preset number of qubits and a preset number of meteorological data correspond one-to-one.

[0077] like Figure 4 As shown, suppose we need to... Figure 3 X in 1 X 2 X 4 X 5 If four meteorological data points are encoded into four qubits q0, q1, q2, and q3, then the quantum state encoding layer can encode X. 1 Encoded into qubit q0, X 2 Encoded into qubit q1, X 4 Encoded into qubit q2, X 5 Encoded into qubit q3, and then by Figure 4 The parametric layer performs quantum state evolution on the four encoded qubits q0, q1, q2, and q3. The quantum state measurement layer measures the expected value of the quantum state of each qubit, and the four expected values ​​are placed in the same feature map. This process is repeated to obtain the quantum state of each qubit. Figure 3 Meteorological data X 2 X 3 X 5 X 6 Perform quantum feature convolution on meteorological data X 4 X 5 X 7 X 8 Perform quantum feature convolution on meteorological data X 5 X 6 X 8 X 9 Finally obtained Figure 3 Quantum convolution feature map.

[0078] According to the embodiments of the present invention, the meteorological data in the meteorological data map can be encoded one by one into the quantum state of the qubit through the quantum state encoding layer of the quantum convolution layer. The parameter-variable layer of the quantum convolution layer performs quantum evolution on the encoded qubit to obtain the quantum convolution feature map. Compared with the classical convolution layer, the quantum convolution layer provided by the embodiments of the present invention reduces the convolution parameters, thus greatly improving the convolution speed. In addition, with the advantage of quantum parallel computing, the convolution calculation process is also accelerated. Therefore, compared with the classical Unet model, the quantum classical hybrid Unet model can use the quantum convolution layer to greatly accelerate the multiple convolution speed of the quantum convolution feature map, thus greatly accelerating the speed of meteorological data prediction.

[0079] In another embodiment of the present invention, the quantum state encoding layer includes a first quantum logic gate, wherein a preset number of meteorological data and a preset number of qubits correspond one-to-one. The first quantum logic gate includes at least one of the following: RX gate, RY gate, and first RZ gate; the parameter-variable layer includes a second RZ gate, a third RZ gate acting on each qubit, and a CNOT gate acting on adjacent qubits.

[0080] like Figure 5 As shown, Figure 5 This is an exemplary schematic diagram of the variable quantum circuit of the quantum state encoding layer provided in an embodiment of the present invention. Figure 5 The variable quantum circuit shown includes four qubits from q0 to q3. The first quantum logic gate of the quantum state encoding layer is an RY gate acting on each qubit. The parameter-variable layer includes a second RZ gate acting on each qubit, a CONT gate acting on adjacent qubits, and a third RZ gate acting on each qubit. The quantum state measurement layer can perform expected value measurement on the quantum state of each qubit.

[0081] The quantum state encoding layer is used to determine a preset number of rotation parameters based on a preset number of meteorological data. The first quantum logic gate is used to encode the quantum state of each corresponding qubit based on the preset number of rotation parameters.

[0082] In one specific implementation, the quantum state coding layer can obtain rotation parameters based on the inverse trigonometric function value of meteorological data.

[0083] For example, regarding the meteorological data X in the above embodiments... 1 First, we can calculate arctan(X). 1 Then, the first quantum logic gate is used according to the rotation parameter arctan(X). 1 Quantum state encoding is performed on qubit q0.

[0084] In this embodiment of the invention, the parametric layer includes a second RZ gate for each qubit, a CONT gate acting on adjacent qubits, and a third RZ gate. This allows for multiple training iterations of the quantum-classical hybrid Unet model, adjusting the parameters of the second RZ gate, the CNOT gate, and the third RZ gate. This enables the quantum convolutional layer to extract quantum convolutional feature maps more accurately, thereby achieving precise predictions of meteorological data. Furthermore, the CNOT gate acting on adjacent qubits allows the parametric layer to entangle adjacent qubits, enabling the model to establish feature relationships between multiple meteorological data encoded into qubits, thus improving the accuracy of meteorological data predictions.

[0085] Based on the above embodiments, the quantum classical hybrid Unet model provided by this invention is obtained through training using the following loss function:

[0086]

[0087] Among them, T outMN This indicates the output time window, where M and N represent the spatial dimensions of the region to be predicted, t, k, and l represent the summation index, and y represents the summation index. t,k,l This represents the actual meteorological data at time t. This represents the predicted meteorological data at time t.

[0088] During the training of the quantum classical hybrid Unet model, the experimental dataset was divided into a training set D. trina Test set D test and verification set D validation These are used for training, testing, and validating the quantum classical hybrid Unet model, respectively.

[0089] Based on the same inventive concept, embodiments of the present invention also provide a meteorological data prediction device, such as... Figure 6 As shown, the device includes:

[0090] The acquisition module 601 is used to acquire a sequence of meteorological data maps for multiple times before the time to be predicted, with each time time corresponding to a meteorological data map in the meteorological feature map sequence; each meteorological data map includes meteorological data for each sub-region within the area to be predicted.

[0091] The input module 602 is used to input the meteorological data map sequence into the pre-trained quantum-classical hybrid Unet model to obtain the predicted meteorological feature map of the region to be predicted at the time to be predicted. The quantum-classical hybrid Unet model includes a quantum convolutional layer and a classical sampling layer. The quantum convolutional layer is used to encode the meteorological data map into qubits for quantum state evolution to obtain a quantum convolutional feature map. The classical sampling layer and the quantum convolutional layer perform multiple feature sampling and convolution on the quantum convolutional feature map to obtain the predicted meteorological feature map.

[0092] The determination module 603 is used to determine the predicted meteorological data map of the area to be predicted at the time to be predicted based on the predicted meteorological feature map.

[0093] Optionally, the quantum convolutional layer is used to traverse the meteorological data map, select a preset number of meteorological data multiple times, and perform quantum feature convolution on the preset number of meteorological data to obtain a quantum convolutional feature map.

[0094] Optionally, the quantum convolutional layer includes a preset number of qubits, a quantum state encoding layer, a parameter-dependent layer, and a quantum state measurement layer; the preset number of meteorological data points correspond one-to-one with the preset number of qubits.

[0095] The quantum state encoding layer is used to encode a preset number of meteorological data into a preset number of qubits. The parametric layer is used to perform quantum state evolution on the preset number of qubits after encoding. The quantum state measurement layer is used to measure the expected value of the preset number of qubits after quantum state evolution to obtain a quantum convolution feature map.

[0096] Optionally, the quantum state encoding layer includes a first quantum logic gate, which includes at least one of the following: RX gate, RY gate, and first RZ gate;

[0097] The quantum state encoding layer is used to determine a preset number of rotation parameters based on a preset number of meteorological data. The first quantum logic gate is used to encode the quantum state of each corresponding qubit based on the preset number of rotation parameters.

[0098] Optionally, the parametric layering includes a second RZ gate, a third RZ gate acting on each qubit, and a CNOT gate acting on adjacent qubits.

[0099] Optionally, the meteorological data in each meteorological data chart is normalized using the following formula:

[0100]

[0101] X k ={X1 k , ..., X T k};k∈1,....,d;T=T in +T out .

[0102] Among them, X k This represents the meteorological data of the k-th sub-region in the meteorological data map, where d represents the spatial dimension of the region to be predicted, and T represents multiple times before the time to be predicted. in Indicates the input time window, T out This indicates the output time window.

[0103] Optionally, the quantum-classical hybrid Unet model is trained using the following loss function:

[0104]

[0105] Among them, T outMN This represents the input time window, M and N represent the spatial dimensions of the region to be predicted, t, k, and l represent the summation index, and y represents the summation index. t,k,l This represents the actual meteorological data at time t. This represents the predicted meteorological data at time t.

[0106] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0107] Another embodiment of the present invention provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in the above-described meteorological data chart prediction method embodiment when running.

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

[0109] Another embodiment of the present invention 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 the above-described meteorological data map prediction method embodiment.

[0110] 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.

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

[0112] Obtain a sequence of meteorological data maps from multiple times before the time to be predicted, with each time point corresponding to one meteorological data map in the meteorological feature map sequence; each meteorological data map includes meteorological data from each sub-region within the region to be predicted;

[0113] The meteorological data map sequence is input into a pre-trained quantum-classical hybrid Unet model to obtain the predicted meteorological feature map of the region to be predicted at the time to be predicted. The quantum-classical hybrid Unet model includes a quantum convolutional layer and a classical sampling layer. The quantum convolutional layer is used to encode the meteorological data map into qubits for quantum state evolution to obtain a quantum convolutional feature map. The classical sampling layer and the quantum convolutional layer perform multiple feature sampling and convolution on the quantum convolutional feature map to obtain the predicted meteorological feature map.

[0114] Based on the predicted meteorological feature map, determine the predicted meteorological data map of the area to be predicted at the predicted time.

[0115] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.

Claims

1. A meteorological data forecasting method, characterized in that, The method includes: Obtain a sequence of meteorological data maps for multiple times preceding the time to be predicted, with each time corresponding to one meteorological data map in the sequence; each meteorological data map includes meteorological data for each sub-region within the region to be predicted. The meteorological data map sequence is input into a pre-trained quantum-classical hybrid Unet model to obtain the predicted meteorological feature map of the region to be predicted at the time to be predicted. The quantum-classical hybrid Unet model is an encoder-decoder structure. The encoder includes multiple quantum convolutional layers and classical downsampling layers, and the decoder includes multiple quantum convolutional layers and classical downsampling layers. The quantum convolutional feature map first undergoes multiple convolutions and downsamplings of the encoder's quantum convolutional layers and classical downsampling layers, and then undergoes multiple convolutions and upsamplings of the decoder's quantum convolutional layers and classical upsampling layers to obtain the predicted meteorological feature map. The quantum convolutional feature map is obtained by the quantum convolutional layers encoding the meteorological data map sequence into qubits and performing quantum state evolution. Based on the predicted meteorological feature map, a predicted meteorological data map of the area to be predicted at the predicted time is determined.

2. The method according to claim 1, characterized in that, The quantum convolutional layer is used to traverse the meteorological data map, select a preset number of meteorological data multiple times, and perform quantum feature convolution on the preset number of meteorological data to obtain a quantum convolutional feature map.

3. The method according to claim 2, characterized in that, The quantum convolutional layer includes a predetermined number of qubits, a quantum state encoding layer, a parameter-dependent layer, and a quantum state measurement layer; the predetermined number of meteorological data points correspond one-to-one with the predetermined number of qubits. The quantum state encoding layer is used to encode the preset number of meteorological data into the preset number of qubits. The parametric layer is used to perform quantum state evolution on the preset number of qubits after encoding. The quantum state measurement layer is used to measure the expected value of the preset number of qubits after quantum state evolution to obtain the quantum convolution feature map.

4. The method according to claim 3, characterized in that, The quantum state encoding layer includes a first quantum logic gate, which includes at least one of the following: RX gate, RY gate, and first RZ gate; The quantum state encoding layer is used to determine a preset number of rotation parameters based on the preset number of meteorological data, and the first quantum logic gate is used to perform quantum state encoding on each corresponding qubit based on the preset number of rotation parameters.

5. The method according to claim 3, characterized in that, The parametric layering includes a second RZ gate, a third RZ gate acting on each qubit, and a CNOT gate acting on adjacent qubits.

6. The method according to claim 1, characterized in that, The meteorological data in each meteorological data chart is normalized using the following formula: X k ={X1 k ..., X T k }; k∈1, ..., d; T=T in +T out ; in, This represents the meteorological data of the k-th sub-region in the meteorological data map, where d represents the spatial dimension of the region to be predicted, and T represents multiple times before the time to be predicted. in Indicates the input time window, T out This indicates the output time window.

7. The method according to any one of claims 1 to 6, characterized in that, The quantum-classical hybrid Unet model is trained using the following loss function: in, This represents the input time window, M and N represent the spatial dimensions of the region to be predicted, and t, k, and l represent the summation indices. This represents the actual meteorological data at time t. This represents the predicted meteorological data at time t.

8. A meteorological data forecasting device, characterized in that, The device includes: The acquisition module is used to acquire a sequence of meteorological data maps for multiple times before the time to be predicted, with each time corresponding to a meteorological data map in the sequence; each meteorological data map includes meteorological data for each sub-region within the region to be predicted. The input module is used to input the meteorological data map sequence into a pre-trained quantum-classical hybrid Unet model to obtain a predicted meteorological feature map of the region to be predicted at the time to be predicted. The quantum-classical hybrid Unet model is an encoder-decoder structure. The encoder includes multiple quantum convolutional layers and classical downsampling layers, and the decoder includes multiple quantum convolutional layers and classical downsampling layers. The quantum convolutional feature map first undergoes multiple convolutions and downsamplings of the encoder's quantum convolutional layers and classical downsampling layers, and then undergoes multiple convolutions and upsamplings of the decoder's quantum convolutional layers and classical upsampling layers to obtain the predicted meteorological feature map. The quantum convolutional feature map is obtained by the quantum convolutional layers encoding the meteorological data map sequence into qubits and performing quantum state evolution. The determination module is used to determine the predicted meteorological data map of the area to be predicted at the time to be predicted based on the predicted meteorological feature map.

9. 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 7 when it is run.

10. 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 7.

Citation Information

Patent Citations

  • Image recognition system and method based on quantum convolutional neural network

    CN113361664A

  • Entangled light quantum image target identification method based on double-flow feature fusion network

    CN114859624A