CN115759413A - Meteorological prediction method and device, storage medium and electronic equipment - Google Patents

Meteorological prediction method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN115759413A
CN115759413A CN202211456103.XA CN202211456103A CN115759413A CN 115759413 A CN115759413 A CN 115759413A CN 202211456103 A CN202211456103 A CN 202211456103A CN 115759413 A CN115759413 A CN 115759413A
Authority
CN
China
Prior art keywords
quantum
meteorological
convolution
time
weather prediction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211456103.XA
Other languages
Chinese (zh)
Inventor
请求不公布姓名
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Origin Quantum Computing Technology Co Ltd
Original Assignee
Origin Quantum Computing Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Origin Quantum Computing Technology Co Ltd filed Critical Origin Quantum Computing Technology Co Ltd
Priority to CN202211456103.XA priority Critical patent/CN115759413A/en
Publication of CN115759413A publication Critical patent/CN115759413A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application provides a weather prediction method, a weather prediction device, a storage medium and an electronic device, wherein the weather prediction method comprises the following steps: acquiring an initial data set, wherein the initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas; acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set; and inputting the quantum convolution characteristic graphs corresponding to the former D time dimensions into a pre-trained prediction neural network, and outputting weather prediction characteristics corresponding to each target area at the time point to be predicted. The quantum convolution is used for replacing the part with high computation complexity in the classical neural network in the classical LSTM, and partial acceleration of network computation is realized, so that the efficiency of feature extraction and data processing is improved, and the efficiency of meteorological prediction is further improved.

Description

Meteorological prediction method and device, storage medium and electronic equipment
Technical Field
The present application relates to the quantum field, and in particular, to a weather prediction method, apparatus, storage medium, and electronic device.
Background
Weather prediction is of great importance because it affects the daily activities in the basic areas of agriculture, transportation and international business. Predicting the precipitation rate, the risk of flood occurrence, or the likelihood of hurricane occurrence makes it possible to save human lives and save human existing resources.
Traditional weather forecasting methods rely on priors, such as the thermodynamic properties of the atmosphere, statistical distribution of data, or ensemble learning involving multiple models with different initial conditions. Such models belong to the numerical weather forecast (NWP) method and generally rely on the processing power of a supercomputer. Numerical models are becoming more and more complex and their demand for high computing power is increasing. Obtaining results from these models can require hours of waiting, which limits their ability to provide operable predictions.
Therefore, how to complete the rapid real-time accurate weather prediction becomes a problem that those skilled in the art pay attention to.
Disclosure of Invention
It is an object of the present application to provide a weather prediction method, apparatus, storage medium and electronic device to at least partially improve the above problems.
In order to achieve the above purpose, the embodiments of the present application employ the following technical solutions:
in a first aspect, an embodiment of the present application provides a weather prediction method, where the method includes:
acquiring an initial data set, wherein the initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas;
acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set;
and inputting the quantum convolution characteristic graphs corresponding to the former D time dimensions into a pre-trained prediction neural network, and outputting weather prediction characteristics corresponding to each target area at the time point to be predicted.
In a second aspect, an embodiment of the present application provides a weather prediction apparatus, including:
the information acquisition unit is used for acquiring an initial data set, wherein the initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas;
the processing unit is used for acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set;
the processing unit is further used for inputting the quantum convolution characteristic graphs corresponding to the previous D time dimensions into the pre-trained prediction neural network and outputting the weather prediction characteristics corresponding to each target area at the time point to be predicted.
In a third aspect, the present application provides a storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the method described above.
In a fourth aspect, an embodiment of the present application provides an electronic device, where the electronic device includes: a processor and memory for storing one or more programs; the one or more programs, when executed by the processor, implement the methods described above.
Compared with the prior art, the weather prediction method, the weather prediction device, the storage medium and the electronic device provided by the embodiment of the application comprise: acquiring an initial data set, wherein the initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas; acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set; and inputting the quantum convolution characteristic graphs corresponding to the former D time dimensions into a pre-trained prediction neural network, and outputting weather prediction characteristics corresponding to each target area at the time point to be predicted. The quantum convolution is used for replacing the part with high computation complexity in the classical neural network in the classical LSTM, and partial acceleration of network computation is realized, so that the efficiency of feature extraction and data processing is improved, and the efficiency of meteorological prediction is further improved.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and it will be apparent to those skilled in the art that other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a weather prediction method according to an embodiment of the present disclosure;
FIG. 3 is a schematic grid diagram of a meteorological feature set provided in an embodiment of the present application;
fig. 4 is a schematic diagram illustrating the substeps of S103 according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a quantum convolution layer according to an embodiment of the present application;
fig. 6 is a second schematic structural diagram of a quantum convolution layer provided in the embodiment of the present application;
FIG. 7 is a schematic diagram illustrating the substeps of S103-2 provided in the embodiments of the present application;
FIG. 8 is a schematic flow chart of a weather prediction method according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of a predictive neural network provided in an embodiment of the present application;
fig. 10 is a schematic diagram of the elements of the weather prediction device according to the embodiment of the present application.
In the figure: 102-a processor; 104-a memory; 106-a transmission device; 108-input-output devices; 201-an information acquisition unit; 202-processing unit.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some embodiments of the present application, but not all embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations.
Thus, the following detailed description of the embodiments of the present application, as presented in the figures, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In contrast to physical models of Numerical Weather Prediction (NWP), deep learning models can provide results within minutes of receiving data, take advantage of large data aggregated in years, and make accurate predictions using less costly models. Aiming at the problems of high meteorological data complexity, high real-time environment change uncertainty and high short-time meteorological prediction difficulty, the method develops the research of a complex real-time quantum meteorological prediction technology so as to solve the problem of rapid real-time accurate prediction of the meteorology, and accelerates the calculation of a machine learning model by virtue of the parallel calculation advantages of quantum calculation so as to improve the meteorological prediction efficiency.
The application provides a ConvLSTM model based on mixed quantum classical, and the problem of space-time sequence prediction on a large-scale data set can be solved by virtue of the parallelism of quantum computation. In the mixed quantum classical ConvLSTM model, a quantum convolution product is used for replacing a part with high computational complexity in a classical neural network in the classical LSTM, partial acceleration of network computation is realized, and therefore the efficiency of feature extraction and data processing is improved. By adopting a mixed quantum classical ConvLSTM algorithm, the parameter number of the model can be effectively reduced, the calculation complexity is reduced, and the calculation speed is accelerated. The method comprises the steps of firstly processing an input meteorological data sequence by adopting a mixed quantum classical ConvLSTM model, converting data into a quantum state through a quantum line, accelerating the processing speed of the meteorological data through quantum parallel computation, and extracting the intrinsic characteristic relation among space-time sequence data by using quantum convolution. For the ConvLSTM model architecture of the overall mixed quantum classical, different gates process operations and establish or learn the dependency relationship of a proper space-time sequence. Then, through quantum optimization operation of a parameter displacement method, iterative optimization is carried out on the mixed quantum classical neural network model, iterative updating of meteorological network model parameters is achieved, and meteorological prediction accuracy is further improved.
The embodiment of the application firstly provides a meteorological prediction method, and the method can be applied to electronic equipment, such as a computer terminal, specifically a common computer, a quantum computer and the like.
This will be described in detail below by way of example as it would run on a computer terminal. Fig. 1 is a block diagram illustrating a hardware configuration of a computer terminal of a weather prediction method according to an exemplary embodiment. As shown in fig. 1, the computer terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing a quantum wire based weather prediction method, and optionally, may further include a transmission device 106 for communication function and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration and is not intended to limit the structure of the computer terminal. For example, the computer terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store software programs and modules of application software, such as program instructions/modules corresponding to the weather prediction method in the embodiment of the present application, and the processor 102 executes various functional applications and data processing by executing the software programs and modules stored in the memory 104, so as to implement the method described above. 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 examples, the memory 104 can further include memory located remotely from the processor 102, which can be connected to a computer terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the computer terminal. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
It should be noted that a true quantum computer is a hybrid structure, which includes two major components: one part is a classic computer which is responsible for executing classic calculation and control; the other part is quantum equipment which is responsible for running a quantum program to further realize quantum computation. The quantum program is a string of instruction sequences which can run on a quantum computer and are written by a quantum language such as a Qrun language, so that the support of the operation of the quantum logic gate is realized, and the quantum computation is finally realized. In particular, a quantum program is a sequence of instructions that operate quantum logic gates in a time sequence.
In practical applications, due to the limited development of quantum device hardware, quantum computation simulation is usually required to verify quantum algorithms, quantum applications, and the like. The quantum computing simulation is a process of realizing the simulation operation of a quantum program corresponding to a specific problem by means of a virtual architecture (namely a quantum virtual machine) built by resources of a common computer. In general, it is necessary to build quantum programs for a particular problem. The quantum program referred to in the embodiments of the present application is a program written in a classical language for characterizing a qubit and its evolution, where the qubit, a quantum logic gate, and the like related to quantum computation are all represented by corresponding classical codes.
A quantum circuit, which is an embodiment of a quantum program and also a weighing sub-logic circuit, is the most common general quantum computation model, and represents a circuit that operates on a quantum bit under an abstract concept, and the circuit includes the quantum bit, a circuit (timeline), and various quantum logic gates, and finally, a result is often read through a quantum measurement operation.
Unlike conventional circuits that are connected by metal lines to pass either voltage or current signals, in quantum circuits, the lines can be viewed as being connected by time, i.e., the state of a qubit evolves naturally over time, in the process being operated on as indicated by the hamiltonian until a logic gate is encountered.
A quantum program corresponds to an overall quantum circuit as a whole, and the quantum program refers to the overall quantum circuit, wherein the total number of quantum bits in the overall quantum circuit is the same as the total number of quantum bits of the quantum program. It can be understood that: a quantum program may consist of quantum wires, measurement operations for quantum bits in the quantum wires, registers to hold measurement results, and control flow nodes (jump instructions), and a quantum wire may contain tens to hundreds or even thousands of quantum logic gate operations. The execution process of the quantum program is a process executed for all the quantum logic gates according to a certain time sequence. It should be noted that timing is the time sequence in which the single quantum logic gate is executed.
It should be noted that in the classical calculation, the most basic unit is a bit, and the most basic control mode is a logic gate, and the purpose of the control circuit can be achieved through the combination of the logic gates. Similarly, the way qubits are handled is quantum logic gates. The quantum state can be evolved by using quantum logic gates, which are the basis for forming quantum circuits, including single-bit quantum logic gates, such as Hadamard gates (H gates, hadamard gates), pauli-X gates (X gates, pauli X gates), pauli-Y gates (Y gates, pauli Y gates), pauli-Z gates (Z gates, pauli Z gates), RX gates (RX swing gates), RY gates (RY swing gates), RZ gates (RZ swing gates), and the like; multi-bit quantum logic gates such as CNOT gates, CR gates, iSWAP gates, toffoli gates, and the like. Quantum logic gates are typically represented using unitary matrices, which are unitaryThe matrix is not only in the form of a matrix, but also an operation and transformation. The function of a general quantum logic gate on a quantum state is calculated by multiplying a unitary matrix by a vector corresponding to a quantum state right vector. For example, a quantum state right vector |0>The corresponding vector may be
Figure BDA0003953349550000081
Quantum state right vector |1>The corresponding vector may be
Figure BDA0003953349550000082
Referring to FIG. 2, FIG. 2 is a flow chart illustrating a weather prediction method according to an exemplary embodiment. As shown in fig. 2, the weather prediction method includes: s101, S103, and S104 are specifically described as follows.
S101, acquiring an initial data set.
The initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas.
Alternatively, the meteorological parameters may be temperature, humidity, wind speed, and barometric pressure, among others.
For example, when the time point to be predicted is 6 of 2022/08/02, the corresponding first D time dimensions may be 0, 3, 6, 9, 12, 5, 18, 21, and 0 and 3 of 2022/08/01, respectively.
In an alternative embodiment, after obtaining the weather prediction characteristics corresponding to the time point to be predicted (e.g. 6 of 2022/08/02), the weather prediction characteristics can be used as the prediction basis for the subsequent time point. For example, the predicted temperature value at 6 o ' clock 2022/08/02 is inserted at the end of the input step length, and the input temperature value at 0 o ' clock 2022/08/01 is deleted, so that the temperature value at 9 o ' clock 2022/08/02 can be predicted at 3 o ' clock, 6 o ' clock, 9 o ' clock, 12 o ' clock, 15 o ' clock, 18 o ' clock, 21 o ' clock, and 0 o ' clock, 3 o ' clock, and 6 o ' clock 2022/08/02 of the new input data 2022/08/01; and the like, thereby completing the prediction of the temperature values of the last ten time steps by the first ten time steps input.
Alternatively, the target area may be understood as a reference point. For example, the region to be predicted may be divided into a plurality of target regions in terms of longitude and latitude, and the center point of each target region may be used as the coordinate information of the target region. As such, the region to be predicted includes a plurality of target regions arranged in a grid.
Referring to fig. 3, fig. 3 is a schematic grid diagram of a meteorological feature set according to an embodiment of the present application. As shown in FIG. 3, the meteorological feature set includes a plurality of target areas, such as A1, A2, A3 … A13, etc. The meteorological features corresponding to the target area may be meteorological features at longitude and latitude coordinates of a central point corresponding to the target area, or may be comprehensive meteorological features in the whole target area.
Optionally, the meteorological feature set in the first D time dimensions may be represented as: multiple space-time sequences { X 1 ,…,X k ,…,X d Where D = D is the number of sequences, i.e. the latitude in time, each X k ∈R M×N×T M and N define the spatial dimensions, respectively longitude and latitude, and T defines the temporal dimension. For example, an example of a spatio-temporal input sequence, where T defines a time window. At each time step t, there is a spatial grid with area xy. Each cell represents the value of one region at time t.
Figure BDA0003953349550000091
Represents the meteorological features corresponding to the kth target area at the ith time latitude, i e { T-T in ,…,t-T in + j, …, T }, T representing the first time dimension before the time point to be predicted, j representing the time step, T in And the time window size corresponding to D time dimensions before the time point to be predicted is shown.
S103, acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set.
Optionally, quantum state code conversion is performed on the meteorological feature set in each time dimension through the quantum convolution layer to obtain a quantum convolution feature map corresponding to each time dimension, where the quantum convolution feature map includes quantum states corresponding to each target region in the time dimension, that is, intrinsic feature relations among meteorological feature data in the time dimension. The parallel computation of a quantum network is utilized to accelerate the processing speed of meteorological feature data, and the quantum convolution is used to extract the intrinsic feature relation among the time-space sequence data.
And S104, inputting the quantum convolution feature maps corresponding to the former D time dimensions into a pre-trained prediction neural network, and outputting weather prediction features corresponding to each target area at the time point to be predicted.
Alternatively, the output of the predictive neural network may be described as Y i Where i e { T + j, …, T + T out },T out Indicating the output time window size, Y i And characterizing the predicted meteorological feature set corresponding to the ith predicted time point, wherein the predicted meteorological feature set comprises the predicted meteorological features corresponding to the ith predicted time point of each target area. The dimension of the output tensor can be defined as Y ∈ R M×N×T For any target value at time t, Y can be defined t ∈R M×N
Alternatively, the predictive neural network may be a classical ConvLSTM model network. The quantum convolution feature map comprises intrinsic feature relations among meteorological feature data in a time dimension. And inputting the quantum convolution characteristic graphs corresponding to the previous D time dimensions into a pre-trained prediction neural network, wherein the prediction neural network can output weather prediction characteristics corresponding to each target area at the time point to be predicted.
To sum up, a weather prediction method provided in the embodiment of the present application includes: acquiring an initial data set, wherein the initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas; acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set; and inputting the quantum convolution characteristic graphs corresponding to the former D time dimensions into a pre-trained prediction neural network, and outputting weather prediction characteristics corresponding to each target area at the time point to be predicted. The quantum convolution is used for replacing the part with high computation complexity in the classical neural network in the classical LSTM, and partial acceleration of network computation is realized, so that the efficiency of feature extraction and data processing is improved, and the efficiency of meteorological prediction is further improved.
Optionally, on the basis of fig. 2, for the content in S103, a possible implementation manner is further provided in the embodiment of the present application, please refer to fig. 4, where S103 includes: s103-1, S103-2 and S103-3, as described below.
S103-1, determining a convolution object combination from the meteorological feature set according to a preset rule.
Wherein the convolution object combination includes meteorological features of the n target areas.
With continued reference to fig. 3, the quantum convolutional layer includes n quantum bits, and assuming that n is equal to 4, a convolution object combination can be determined from the meteorological feature set based on the longitude and latitude information corresponding to the target region, where the convolution object combination includes the meteorological features of 4 target regions. For example, A1, A2, A7, and A8 in fig. 3 may be combined as convolution objects, A2, A3, A8, and A9 may be combined as convolution objects, and so on.
S103-2, respectively processing the n meteorological features in each convolution object combination based on the quantum convolution layer to obtain corresponding output quantum states.
Optionally, the quantum state coding is performed on the n meteorological features in each convolution object combination based on the quantum convolution layer, so as to obtain an output quantum state corresponding to each convolution object combination.
S103-3, determining a quantum convolution characteristic diagram corresponding to a time dimension based on the output quantum states corresponding to the convolution object combination.
Optionally, the quantum convolution feature map corresponding to the time dimension is determined based on the output quantum states corresponding to all convolution object combinations. For example, arranging according to the corresponding longitude and latitude coordinates to obtain the quantum convolution characteristic diagram.
Referring to fig. 5, fig. 5 is a schematic view illustrating a structure of a quantum convolutional layer provided in an embodiment of the present application. As shown in fig. 5, the quantum convolutional layer includes a quantum state encoding unit (encoding) and a variable quantum unit (variable circuit), and the quantum state encoding unit and the variable quantum unit are sequentially arranged.
And the quantum state coding unit is used for coding the n meteorological features in the convolution object combination to corresponding quantum states.
And the variation quantum unit is used for associating quantum state information of the quantum bit and extracting meteorological features carried by the quantum state information as an output quantum state.
Alternatively, a filter of 2*2 size is constructed using n (e.g., 4) qubits, quantum encoding uses an angular encoding approach to introduce meteorological features (e.g., four pixel values) of 4 target regions into RX, RY, or RZ, applying a combination of rotation and entanglement gates to the qubits after encoding, and at the end of the quantum convolution layer, performing qubit measurements, with the results stored in an output signature.
It should be noted that, when performing qubit measurement, any one of the qubits may be selected for measurement.
On the basis of fig. 5, an optional implementation manner is provided in the embodiment of the present application for the specific structure of the quantum convolution layer, please refer to fig. 6, and fig. 6 is a second schematic structural diagram of the quantum convolution layer provided in the embodiment of the present application. As shown in fig. 6, the quantum state encoding unit includes n RY gates, which act on n qubits, respectively.
On the basis of fig. 6, for the content in S103-2, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 7, where S103-2 includes: S103-2A and S103-2B are specifically described below.
S103-2A, adjusting rotation control parameters in the n RY gates according to the n meteorological features in the convolution object combination.
Alternatively, n meteorological features are respectively used as rotation control parameters in n RY doors, which respectively correspond to theta in FIG. 6 1 、θ 2 、θ 3 And theta 4 . And then the n meteorological features can be subjected to quantum state coding.
S103-2B, counting the output quantum states of the variation quantum units to obtain a quantum convolution characteristic diagram corresponding to each time dimension.
With continued reference to fig. 6, the variational quantum unit includes a first RZ gate, a CNOT gate and a second RZ gate acting on the quantum wires in sequence.
Wherein the first RZ gate is arranged before the second RZ gate and the CNOT gate is arranged between the first RZ gate and the second RZ gate.
Optionally, the quantum system is measured to obtain a series of classical expected values. Similar to the classical convolutional layer, each expected value is mapped to a different channel of a single output pixel. Iterating the same process over different regions, the full input image may be scanned, producing an output object that will be constructed into a multi-channel image. The measurement is designed only once, and a single-channel image (namely a quantum convolution characteristic diagram) is obtained, and the size of the single-channel image is the same as that of an original image (namely a grid image corresponding to a meteorological characteristic set in a time dimension).
In order to facilitate the quantum convolutional layer processing, the embodiment of the present application further provides a possible implementation manner, please refer to fig. 8, after S101, the weather prediction method further includes: s102 is specifically described as follows.
And S102, normalizing the initial data set.
Optionally, the initial data set is defined as follows:
Figure BDA0003953349550000131
wherein L is the total time step.
The input series has different units and scales, so normalization is needed. Optionally, the data normalization is calculated as:
Figure BDA0003953349550000132
Figure BDA0003953349550000133
k∈1,…,d,T=T in +T out
optionally, the normalized meteorological feature set is subjected to quantum state encoding processing by a quantum convolutional layer.
In an alternative embodiment, the predictive neural network is a neural network trained to converge based on an objective loss function for predicting meteorological features.
The target loss function may be:
Figure BDA0003953349550000141
wherein the content of the first and second substances,
Figure BDA0003953349550000142
expressed as the predicted value at time k x l t, yt, k, l are the actual values at time k x l t.
During the training of the predictive neural network, each experimental data set is divided into D test 、D train And D validation Three parts. In a numerical weather forecast, the target value Y is continuous. Thus, the task is regression. Furthermore, since there is a target for each input data, learning is supervised.
Referring to fig. 9, fig. 9 is a schematic structural diagram of a predictive neural network according to an embodiment of the present disclosure. As shown in FIG. 9, each ConvLSTM cell has an input X 1 ,…,X t (wherein,
Figure BDA0003953349550000143
cell output S 1 ,…,S t Hidden state H 1 ,…,H t And is provided with an input door i t Forgetting door f t And an output gate o t . The update equations for each gate in ConvLSTM are as follows:
i t =σ(W xi *X t +W hi *H t-1 +b i );
f t =σ(W xf *X t +W hf *H t-1 +b f );
o t =σ(W xo *X t +W ho *H t-1 +b 0 );
Figure BDA0003953349550000144
Figure BDA0003953349550000145
Figure BDA0003953349550000146
wherein, σ and
Figure BDA0003953349550000147
sigmoid function and element multiplication, respectively, represent convolution operations. W xi ,W hi ,b i Respectively represent the input via the input gate i t Time-to-input data, weight and bias term for hidden state, W xf ,W hf ,b f Respectively show passing through forget gate f t Time-to-input data, weight and bias term for hidden state, W xo ,W ho ,b o Respectively representing the pass-through output gate o t Time-to-input data, weight and bias term for hidden state, W xs ,W hs ,b s Respectively representing weights and bias terms for input data, hidden states when calculating the current output state.
In the present application, by using quantum convolution instead of classical convolution, processing efficiency is improved.
Referring to fig. 10, fig. 10 is a diagram of a weather prediction apparatus provided in an embodiment of the present application, and optionally, the weather prediction apparatus is applied to the electronic device described above.
The weather prediction device includes: an information acquisition unit 201 and a processing unit 202.
The information acquiring unit 201 is configured to acquire an initial data set, where the initial data set includes meteorological feature sets in D time dimensions before a time point to be predicted, and the meteorological feature sets include meteorological features corresponding to respective target areas.
And the processing unit 202 is configured to obtain a quantum convolution feature map corresponding to each time dimension based on the quantum convolution layer and the meteorological feature set.
The processing unit 202 is further configured to input the quantum convolution feature maps corresponding to the previous D time dimensions into the pre-trained prediction neural network, and output weather prediction features corresponding to each target area at the time point to be predicted.
Alternatively, the information acquisition unit 201 may execute S101 described above, and the processing unit 202 may execute S102, S103, and S104 described above.
It should be noted that, the weather prediction apparatus provided in this embodiment may execute the method flows shown in the above method flow embodiments to achieve the corresponding technical effects. For the sake of brevity, the corresponding contents in the above embodiments may be referred to where not mentioned in this embodiment.
The embodiment of the application also provides a storage medium, wherein the storage medium stores computer instructions and a program, and the computer instructions and the program execute the weather prediction method of the embodiment when being read and run. The storage medium may include memory, flash memory, registers, or a combination thereof, etc.
The following provides an electronic device, such as a computer terminal, specifically, a general computer, a quantum computer, and the like. The electronic device shown in fig. 1 can implement the weather prediction method described above.
The above description is only a preferred embodiment of the present application and is not intended to limit the present application, and various modifications and changes may be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
It will be evident to those skilled in the art that the present application is not limited to the details of the foregoing illustrative embodiments, and that the present application may be embodied in other specific forms without departing from the spirit or essential attributes thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the application being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein. Any reference sign in a claim should not be construed as limiting the claim concerned.

Claims (10)

1. A weather prediction method, the method comprising:
acquiring an initial data set, wherein the initial data set comprises meteorological feature sets in D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas;
acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set;
and inputting the quantum convolution characteristic graphs corresponding to the former D time dimensions into a pre-trained prediction neural network, and outputting weather prediction characteristics corresponding to each target area at the time point to be predicted.
2. The weather prediction method of claim 1, wherein the step of obtaining the quantum convolution feature map corresponding to each time dimension based on the quantum convolution layer and the weather feature set comprises:
determining a convolution object combination from the meteorological feature set according to a preset rule, wherein the convolution object combination comprises meteorological features of n target areas;
respectively processing n meteorological features in each convolution object combination based on the quantum convolution layer to obtain corresponding output quantum states;
and determining a quantum convolution characteristic diagram corresponding to the time dimension based on the output quantum state corresponding to the convolution object combination.
3. The weather prediction method as claimed in claim 2, wherein the quantum convolution layer comprises a quantum state encoding unit and a variational quantum unit, and the quantum state encoding unit and the variational quantum unit are arranged in sequence;
the quantum state encoding unit is used for encoding n meteorological features in the convolution object combination onto corresponding quantum states;
and the variation quantum unit is used for correlating quantum state information of the quantum bit and extracting meteorological features carried by the quantum state information as an output quantum state.
4. The weather prediction method as claimed in claim 3, wherein the quantum state encoding unit includes n RY gates, the n RY gates respectively operate on n quantum bits, and the step of respectively processing the n weather features in each convolution object combination based on the quantum convolution layer to obtain the corresponding output quantum state comprises:
adjusting rotation control parameters in the n RY gates according to n meteorological features in the convolution object combination;
and counting the output quantum states of the variation quantum units to obtain a quantum convolution characteristic diagram corresponding to each time dimension.
5. The weather forecasting method of claim 3, wherein the variational quantum unit includes a first RZ gate, a CNOT gate, and a second RZ gate that act on the quantum wire in sequence.
6. The weather prediction method as claimed in claim 1, wherein after the obtaining the initial data set, the method further comprises:
and carrying out normalization processing on the initial data set.
7. The weather prediction method of claim 1, wherein the predictive neural network is a neural network trained to converge based on an objective loss function for predicting weather features.
8. A weather prediction apparatus, characterized in that the apparatus comprises:
the information acquisition unit is used for acquiring an initial data set, wherein the initial data set comprises meteorological feature sets under D time dimensions before a time point to be predicted, and the meteorological feature sets comprise meteorological features corresponding to all target areas;
the processing unit is used for acquiring a quantum convolution characteristic diagram corresponding to each time dimension based on the quantum convolution layer and the meteorological characteristic set;
the processing unit is further used for inputting the quantum convolution characteristic graphs corresponding to the previous D time dimensions into the pre-trained prediction neural network and outputting the weather prediction characteristics corresponding to each target area at the time point to be predicted.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-7.
10. An electronic device, comprising: a processor and memory for storing one or more programs; the one or more programs, when executed by the processor, implement the method of any of claims 1-7.
CN202211456103.XA 2022-11-21 2022-11-21 Meteorological prediction method and device, storage medium and electronic equipment Pending CN115759413A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211456103.XA CN115759413A (en) 2022-11-21 2022-11-21 Meteorological prediction method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211456103.XA CN115759413A (en) 2022-11-21 2022-11-21 Meteorological prediction method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN115759413A true CN115759413A (en) 2023-03-07

Family

ID=85333709

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211456103.XA Pending CN115759413A (en) 2022-11-21 2022-11-21 Meteorological prediction method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115759413A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400430A (en) * 2023-03-23 2023-07-07 本源量子计算科技(合肥)股份有限公司 Meteorological data prediction method and device, storage medium and electronic device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090164435A1 (en) * 2007-12-20 2009-06-25 Routt Thomas J Methods and systems for quantum search, computation and memory
CN112862090A (en) * 2021-01-22 2021-05-28 南开大学 Air temperature forecasting method based on deep space-time neural network
US20210383189A1 (en) * 2018-10-05 2021-12-09 President And Fellows Of Harvard College Quantum convolutional neural networks
CN114219076A (en) * 2021-12-15 2022-03-22 北京百度网讯科技有限公司 Quantum neural network training method and device, electronic device and medium
CN114240000A (en) * 2021-12-31 2022-03-25 北京工业大学 Air quality prediction method based on space-time graph convolution network
CN114792378A (en) * 2021-03-30 2022-07-26 合肥本源量子计算科技有限责任公司 Quantum image identification method and device
CN114821217A (en) * 2021-06-28 2022-07-29 合肥本源量子计算科技有限责任公司 Image identification method and device based on quantum classical hybrid neural network
CN115144934A (en) * 2022-06-29 2022-10-04 合肥本源量子计算科技有限责任公司 Weather prediction method based on variational quantum line and related equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090164435A1 (en) * 2007-12-20 2009-06-25 Routt Thomas J Methods and systems for quantum search, computation and memory
US20210383189A1 (en) * 2018-10-05 2021-12-09 President And Fellows Of Harvard College Quantum convolutional neural networks
CN112862090A (en) * 2021-01-22 2021-05-28 南开大学 Air temperature forecasting method based on deep space-time neural network
CN114792378A (en) * 2021-03-30 2022-07-26 合肥本源量子计算科技有限责任公司 Quantum image identification method and device
CN114821217A (en) * 2021-06-28 2022-07-29 合肥本源量子计算科技有限责任公司 Image identification method and device based on quantum classical hybrid neural network
CN114219076A (en) * 2021-12-15 2022-03-22 北京百度网讯科技有限公司 Quantum neural network training method and device, electronic device and medium
CN114240000A (en) * 2021-12-31 2022-03-25 北京工业大学 Air quality prediction method based on space-time graph convolution network
CN115144934A (en) * 2022-06-29 2022-10-04 合肥本源量子计算科技有限责任公司 Weather prediction method based on variational quantum line and related equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘超;何正友;杨健维;: "基于量子神经网络的电网故障诊断算法", 电网技术, no. 09, 5 May 2008 (2008-05-05) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116400430A (en) * 2023-03-23 2023-07-07 本源量子计算科技(合肥)股份有限公司 Meteorological data prediction method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
Wu et al. Evolving RBF neural networks for rainfall prediction using hybrid particle swarm optimization and genetic algorithm
CN111784041B (en) Wind power prediction method and system based on graph convolution neural network
CN115144934B (en) Meteorological prediction method based on variable component sub-line and related equipment
CN112532746B (en) Cloud edge cooperative sensing method and system
WO2022077767A1 (en) Traffic flow prediction method and apparatus, computer device, and readable storage medium
KR102308751B1 (en) Method for prediction of precipitation based on deep learning
CN114792378B (en) Quantum image recognition method and device
CN114330935B (en) New energy power prediction method and system based on multiple combination strategies integrated learning
CN111027672A (en) Time sequence prediction method based on interactive multi-scale recurrent neural network
CN112180471B (en) Weather forecasting method, device, equipment and storage medium
CN111461445B (en) Short-term wind speed prediction method and device, computer equipment and storage medium
CN114821217A (en) Image identification method and device based on quantum classical hybrid neural network
CN115759413A (en) Meteorological prediction method and device, storage medium and electronic equipment
CN113484882B (en) GNSS sequence prediction method and system of multi-scale sliding window LSTM
Anh et al. Effect of gradient descent optimizers and dropout technique on deep learning LSTM performance in rainfall-runoff modeling
CN116011681A (en) Meteorological data prediction method and device, storage medium and electronic device
CN115018212B (en) Power generation water consumption prediction analysis method and system and cloud platform
CN116403019A (en) Remote sensing image quantum identification method and device, storage medium and electronic device
CN116011682A (en) Meteorological data prediction method and device, storage medium and electronic device
CN114764619A (en) Convolution operation method and device based on quantum circuit
CN111402042B (en) Data analysis and display method for stock market big disk shape analysis
CN115271076A (en) Construction method and device of quantum circuit corresponding to Bayesian network
CN116400430A (en) Meteorological data prediction method and device, storage medium and electronic device
CN114819171B (en) Quantum convolution operation realization method and device
CN117574285A (en) Index generating system and related device thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination