CN113689026A - Meteorological data prediction method, equipment and storage medium - Google Patents

Meteorological data prediction method, equipment and storage medium Download PDF

Info

Publication number
CN113689026A
CN113689026A CN202110788576.9A CN202110788576A CN113689026A CN 113689026 A CN113689026 A CN 113689026A CN 202110788576 A CN202110788576 A CN 202110788576A CN 113689026 A CN113689026 A CN 113689026A
Authority
CN
China
Prior art keywords
meteorological
meteorological data
matrix
penalty
data
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
CN202110788576.9A
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.)
Shanghai Eye Control Technology Co Ltd
Original Assignee
Shanghai Eye Control 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 Shanghai Eye Control Technology Co Ltd filed Critical Shanghai Eye Control Technology Co Ltd
Priority to CN202110788576.9A priority Critical patent/CN113689026A/en
Publication of CN113689026A publication Critical patent/CN113689026A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/044Recurrent networks, e.g. Hopfield networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/084Backpropagation, e.g. using gradient descent
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/26Government or public services

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Tourism & Hospitality (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Biomedical Technology (AREA)
  • General Engineering & Computer Science (AREA)
  • Molecular Biology (AREA)
  • Mathematical Physics (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Development Economics (AREA)
  • Biophysics (AREA)
  • General Business, Economics & Management (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Game Theory and Decision Science (AREA)
  • Educational Administration (AREA)
  • Primary Health Care (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a meteorological data prediction method, equipment and a storage medium, wherein a historical meteorological data sequence is obtained; inputting the historical meteorological data sequence as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method; and predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence, so that the problem of inaccurate prediction result when meteorological data is predicted in the prior art is solved. The neural network model is trained by adopting a preset training method to obtain a target meteorological network model, and then the historical meteorological data sequence is predicted by the target meteorological network model to obtain a corresponding target meteorological data sequence, so that accurate prediction of meteorological data is realized.

Description

Meteorological data prediction method, equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of meteorological prediction, in particular to a meteorological data prediction method, equipment and a storage medium.
Background
With the development of science and technology, weather forecast is increasingly applied in various fields, such as weather forecast, which can forecast rainfall, temperature, wind speed, visibility, etc. in the coming hours. People are guided to go out, crop planting, industrial production, aviation traffic operation and the like through the prediction of weather elements, so that the weather prediction is closely related to the life of people and is more and more important for people.
However, in the current weather prediction method, the accuracy of the predicted weather is low, and the sudden change part cannot be well predicted. Therefore, great inconvenience is brought to production and life.
Disclosure of Invention
The invention provides a meteorological data prediction method, equipment and a storage medium, which are used for realizing accurate prediction of meteorological data.
In a first aspect, an embodiment of the present invention provides a meteorological data prediction method, where the meteorological data prediction method includes:
acquiring a historical meteorological data sequence;
inputting the historical meteorological data sequence as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method;
and predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence.
In a second aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of meteorological data prediction as described in any one of the embodiments of the invention.
In a third aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements a meteorological data prediction method according to any one of the embodiments of the present invention.
The embodiment of the invention provides a meteorological data prediction method, equipment and a storage medium, wherein a historical meteorological data sequence is obtained; inputting the historical meteorological data sequence as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method; and predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence, so that the problem of inaccurate prediction result when meteorological data is predicted in the prior art is solved. The neural network model is trained by adopting a preset training method to obtain a target meteorological network model, and then the historical meteorological data sequence is predicted by the target meteorological network model to obtain a corresponding target meteorological data sequence, so that accurate prediction of meteorological data is realized.
Drawings
FIG. 1 is a flow chart of a method for predicting meteorological data according to a first embodiment of the present invention;
FIG. 2 is a flowchart of a meteorological data prediction method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a computer device in a third embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. 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.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims.
In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Example one
Fig. 1 is a flowchart of a meteorological data prediction method according to an embodiment of the present invention, where the embodiment is applicable to a meteorological data prediction situation, and the method can be executed by a meteorological data prediction apparatus, and specifically includes the following steps:
and S110, acquiring a historical meteorological data sequence.
In the present embodiment, the historical weather data sequence may be specifically understood as a data sequence formed by a plurality of pieces of historical weather data, and in the present embodiment, the historical weather data sequence is a sequence arranged in a time sequence for more accurately predicting the weather data. The meteorological data may be any one of temperature, wind speed, rainfall, visibility, atmospheric pressure, and the like.
Specifically, historical meteorological data is collected through the data acquisition device in advance, and a suitable data acquisition device can be set according to the type of the historical meteorological data. For example, the cloud images are collected by radar, the cloud images are used as historical meteorological data, the temperature data are collected by a sensor, the temperature data are used as historical meteorological data, and the like, which are not limited in the embodiment of the present invention.
And S120, inputting the historical meteorological data sequence serving as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method.
In this embodiment, the target meteorological network model may be specifically understood as a pre-trained neural network model, and the neural network model in the embodiment of the present application takes a Long Short-Term Memory network (LSTM) model as an example to perform meteorological data prediction.
In the prior art, when model training is performed, taking an LSTM prediction module as an example, during training, a prediction model sequence is input: x [1, T ], outputs the predicted sequence: x [ T +1, T + K ]. And (3) calculating a loss function of the predicted sequence X [ T +1, T + K ] and a real future sequence: the mean square error MSE loss function is commonly used. However, this loss function is not ideal because it is insensitive to amplitude jumps and phase differences. So the trained model cannot accurately predict meteorological data. Aiming at the problem, the embodiment of the application provides a new training method, the loss function in the training process is optimized, the forward propagation and the backward propagation of the loss function are defined through a differentiable Dynamic Time Warping (DTW), and the target meteorological network model obtained through the training in the mode can accurately predict future meteorological data and provide a reliable basis for life and production of people.
The historical meteorological data sequence is used as input data and is input into a trained target meteorological network model, and the target meteorological network model predicts according to the experience learned in the training process and the historical meteorological data sequence.
S130, forecasting the meteorological data according to the output result of the target meteorological network model, and obtaining a target meteorological data sequence corresponding to the historical meteorological data sequence.
In the present embodiment, the target meteorological data sequence may be specifically understood as a meteorological data sequence for predicting the future. The length of the target weather data sequence may be the same as or different from that of the historical weather data sequence, for example, the length of the historical weather data sequence is 10, the length of the target weather data sequence is 5, and the future 5 weather data are predicted according to the 10 historical weather data.
It is to be understood that the historical meteorological data in the historical meteorological data sequence may be meteorological data collected at intervals, for example, collected every 10 minutes, and the historical meteorological data sequence composed of 10 collected historical meteorological data (X1, X2 … … X10) is obtained, and accordingly, the predicted target meteorological data sequence is target meteorological data (X11, X12 … … X15) at a future time.
It should be appreciated that a trained target meteorological network model predicts meteorological data, and the predicted data type is determined by the training data type, i.e. what data is used for training in the training process, and the trained model can predict what data. If various types of data are predicted, a plurality of models can be trained, the training principle is the same, and the difference is that sample data is different. The historical meteorological data in the historical meteorological data sequence is meteorological data collected at the same position.
The embodiment of the invention provides a meteorological data prediction method, which comprises the steps of obtaining a historical meteorological data sequence; inputting the historical meteorological data sequence as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method; and predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence, so that the problem of inaccurate prediction result when meteorological data is predicted in the prior art is solved. The neural network model is trained by adopting a preset training method to obtain a target meteorological network model, and then the historical meteorological data sequence is predicted by the target meteorological network model to obtain a corresponding target meteorological data sequence, so that accurate prediction of meteorological data is realized.
Example two
Fig. 2 is a flowchart of a meteorological data prediction method according to a second embodiment of the present invention. The technical scheme of the embodiment is further refined on the basis of the technical scheme, and specifically mainly comprises the following steps:
s210, adopting the training meteorological data sequence and the corresponding standard meteorological data sequence as a training sample.
In this embodiment, the training meteorological data sequence may be specifically understood as a sequence formed by meteorological data used for model training, and the training meteorological data needs to be acquired in advance; the standard meteorological data sequence can be specifically understood as a sequence formed by actual meteorological data corresponding to training meteorological data.
The meteorological data collected at the same position (for example, the same meteorological station) are arranged in time sequence to form a sequence, and the meteorological data at the moment are historical data. The plurality of sequences form a data set, the data set is divided according to a certain proportion and is divided into a training data set, a testing data set and a verification data set. The data in the training dataset are training samples.
And S220, inputting the training sample into a given meteorological network model to be trained to obtain a predicted meteorological data sequence.
In this embodiment, the meteorological network model to be trained may be specifically understood as an untrained neural network model based on deep learning, and is used for predicting future meteorological data; the predicted meteorological data sequence can be specifically understood as future meteorological data predicted by the meteorological network model to be trained according to the input meteorological data.
And inputting the training samples into the meteorological network model to be trained, and learning the meteorological network model to be trained according to the parameters of each layer of the model to obtain a predicted meteorological data sequence.
And S230, determining an intermediate penalty matrix according to the predicted meteorological data sequence and the standard meteorological data sequence.
In this embodiment, the intermediate penalty matrix may be specifically understood as a matrix in the process of calculating the loss function in the model training process, and is used to represent the error between the predicted meteorological data sequence and the standard meteorological data sequence.
And calculating a numerical value corresponding to a penalty function, a numerical value corresponding to a differentiable function and the like between each predicted meteorological data and each standard meteorological data in the predicted meteorological data sequence and the standard meteorological data sequence, and determining each data item in the intermediate penalty matrix according to the numerical value corresponding to the penalty function and the numerical value corresponding to the differentiable function, thereby determining the intermediate penalty matrix.
As an optional embodiment of this embodiment, this optional embodiment further optimizes determining an intermediate penalty matrix according to the forecasted weather data sequence and the standard weather data sequence as follows:
A. and determining a penalty function value according to the forecast meteorological data in the forecast meteorological data sequence and the standard meteorological data in the standard meteorological data sequence.
In this embodiment, the penalty function values are specifically understood as values calculated according to penalty functions, and the number of penalty function values is related to the length of the forecast weather data sequence and the length of the standard weather data sequence. Penalty functions are a class of constraint functions used to constrain nonlinear programming. And calculating a penalty function value between each piece of predicted meteorological data and each piece of standard meteorological data.
As an optional embodiment of this embodiment, the present optional embodiment further optimizes the determining a penalty function value according to the forecasted weather data in the forecasted weather data sequence and the standard weather data in the standard weather data sequence as follows: determining, for each predicted meteorological data, a distance and a match value to each of the standard meteorological data; and adding each distance and the corresponding matching value to obtain each penalty function value.
In the present embodiment, the matching value may be specifically understood as a numerical value for constraining a phase error between sequences. For each predicted meteorological data, the distance and the matching value of the predicted meteorological data and each standard meteorological data are calculated in turn, and the distance can be calculated in any distance calculation mode, such as Euclidean distance. The matching value is calculated by serial numbers of the predicted weather data and the standard weather data. After each distance and the corresponding matching value are calculated, the distances and the corresponding matching values are added to obtain the corresponding penalty function value.
As an optional embodiment of this embodiment, this optional embodiment further optimizes the determination matching value as: and substituting the predicted serial number of each predicted meteorological data and the standard serial number of each standard meteorological data into a predetermined matching function formula respectively, and calculating to obtain each matching value.
In this embodiment, the predicted serial number may be specifically understood as the number of the predicted meteorological data in the predicted meteorological data sequence; the standard serial number is understood to mean, in particular, the number of standard meteorological data in a standard meteorological data sequence. And substituting the predicted serial number and the standard serial number into a predetermined matching function formula for calculation to obtain a matching value.
Further, the matching function is formulated as:
Figure RE-GDA0003300943630000081
wherein the match (i, j) represents a matching value between the predicted weather data with the predicted serial number i and the standard weather data with the standard serial number j, i is 0,1,2,3 … n, j is 0,1,2,3 … m; k, n, m, length-1 of the predicted meteorological data sequence, and m, length-1 of the standard meteorological data sequence.
In the embodiment of the application, n +1 is the length of the predicted meteorological data sequence X; and m +1 is the length of the standard meteorological data sequence Y. The effect of the matching function is to add a constraint to the phase deviation between the two sequences.
B. A differentiable value is determined based on the predetermined differentiable function formula and the initial differentiable value.
In this embodiment, the initial differentiable value may be specifically understood as an initial value used in the process of computing the differentiable value; the differentiable value is a value calculated in an iterative loop mode, namely, the last differentiable value is needed to be used when the current differentiable value is calculated. The number of differentiable values that ultimately need to be calculated is related to the length of the predicted meteorological data sequence and the length of the standard meteorological data sequence, with the initial differentiable value being a predetermined value. And substituting the initial differentiable value into a differentiable function formula for iterative calculation to obtain each differentiable value.
Further, the differentiable formula is:
ti,j=minγ{ri-1,j-1,ri-1,j,ri,j-1};
wherein, ti,jRepresenting differentiable values corresponding to data items of the ith row and the jth column in the intermediate penalty matrix; min gamma { ri-1,j-1,ri-1,j,ri,j-1Means take the minimum value; gamma is a differentiable parameter; r isi-1,j-1、ri-1,jAnd ri,j-1The data items of corresponding rows and columns in the intermediate penalty matrix are all.
In the prior art, because the loss function is insensitive to amplitude mutation and phase difference, the prediction result is inaccurate, so the loss function is improved by a differentiable dynamic time warping algorithm. Definition of
Figure RE-GDA0003300943630000091
Wherein A is a path matrix; Δ (x, y) is a penalty matrix. Since it is not differentiable, the loss function cannot be directly calculated. The min function is optimized into the following formula:
Figure RE-GDA0003300943630000092
min{a1,...aka in }1…akCorresponding to r in a differentiable formulai-1,j-1,ri-1,j,ri,j-1I.e. by r during the calculationi-1,j-1,ri-1,j,ri,j-1Alternative a1…akThe calculation is carried out, the size of k depends on ri,jThe number of the cells. The above formula realizes the differentiability of the min function, so that the min function can be applied to the calculation of the loss function. When the differentiable value is calculated, the existing min function is optimized to be differentiable, and a differentiable parameter gamma is introduced in the calculation process to be calculated, wherein gamma is a preset value, and can be set to be 0.1 in the embodiment of the application.
C. And determining data items of the intermediate penalty matrix according to the penalty function values and the corresponding micro values and a predetermined intermediate penalty matrix determination formula, and forming the intermediate penalty matrix according to the data items.
In this embodiment, the intermediate penalty matrix determination formula may be specifically understood as a calculation formula for calculating data items in the intermediate penalty matrix. The data items in the embodiment of the present invention refer to the items in the matrix, such as the 2 nd row and 2 nd column items in the matrix.
And substituting the penalty function values and the corresponding differentiable values into an intermediate penalty matrix determination formula respectively, calculating to obtain data items of the intermediate penalty matrix, and forming the intermediate penalty matrix according to the data items. When the penalty function value and the differentiable value are calculated, because the calculation is repeated in a circulating way, the variables i and j are used in the calculation process, and the values i and j are subjected to circulating assignment and are obtained through repeated calculation, so that the values i and j in the assignment process correspondingly represent the positions of the values in the intermediate penalty matrix.
Further, the formula for determining the intermediate penalty matrix is as follows:
ri,j=cost(xi,yj)+ti,j
wherein r isi,jData items in the ith row and the jth column in the intermediate penalty matrix are represented; cost (x)i,yj) Representing predicted meteorological data x in an intermediate penalty matrixiAnd standard meteorological data yjPenalty function values in between; x is the number ofiIndicating the predicted weather data with a predicted sequence number i, yjRepresenting standard meteorological data with a standard serial number j; t is ti,jRepresenting differentiable values corresponding to data items of the ith row and the jth column in the intermediate penalty matrix; r is0,0=0;ri,0=+∞; r0,j=+∞。
In the iteration process, if the iteration is carried out normally, initialization assignment is required, namely an initial value r is given0,0=0;ri,0=+∞;r0,jAnd taking the value of + ∞asa preset initial value to ensure that the loop iteration can be normally carried out. r is0,0=0;ri,0=+∞;r0,jCan be used as initial differentiable value to calculate differentiable value at the same time +∞. Due to r0,0=0; ri,0=+∞;r0,jSince + infinity is an initial value and no calculation is required, all the entries in row 0 and column 0 are determined when the entries of the intermediate penalty matrix are further calculated by calculating a differentiable value, and accordingly, no calculation of a differentiable value is required.
And S240, determining a target loss function and a gradient back-propagation value according to the intermediate penalty matrix.
In this embodiment, the target loss function may be specifically understood as a loss function when the model is reversely propagated, and is used to measure the quality of the model; the gradient back propagation value is understood to be, in particular, the gradient value at which the model propagates in the reverse direction.
When the target loss function is calculated according to the intermediate penalty matrix, one data item is selected from the intermediate penalty matrix as the target loss function because the intermediate penalty matrix comprises a plurality of data items. And calculating each data item in the intermediate penalty matrix to obtain an output matrix, and calculating the output matrix to obtain a gradient back-propagation value.
As an optional embodiment of this embodiment, this optional embodiment further optimizes determining the target loss function according to the intermediate penalty matrix as follows: extracting target data items corresponding to the designated rows and columns in the intermediate penalty matrix; determining the target data item as a target loss function.
In this embodiment, the target data item may be specifically understood as a data item of a specific row and column in the intermediate penalty matrix. And extracting target data items of the appointed rows and columns from the rows and columns of the intermediate penalty matrix, and taking the target data items as a target loss function. The embodiment of the application takes the example of extracting the target data item of [ -2, -2], that is, determining the target data item of the penultimate row and the penultimate column as the target loss function. The objective loss function obtained at this time is optimal.
As an optional embodiment of this embodiment, this optional embodiment further optimizes determining a gradient back-propagation value according to the intermediate penalty matrix as the following steps:
a. and determining an output matrix according to the intermediate penalty matrix and the penalty matrix formed by each penalty function value.
In this embodiment, the penalty matrix is a matrix formed by penalty function values, and the method for determining the penalty function values is the same as that in step a. And calculating each data item in the intermediate punishment matrix and each data in the punishment matrix to obtain an output matrix.
As an optional embodiment of this embodiment, in this optional embodiment, the penalty matrix determination output matrix formed according to the intermediate penalty matrix and each penalty function value is further optimized as:
a1, determining a first parameter according to the intermediate penalty matrix, the penalty matrix and a preset first formula.
a2, determining a second parameter according to the intermediate penalty matrix, the penalty matrix and a preset second formula.
a3, determining a third parameter according to the intermediate penalty matrix, the penalty matrix and a preset third formula.
a4, determining an output matrix according to the first parameter, the second parameter and the third parameter and the predetermined output matrix determination formula.
In this embodiment, the first formula, the second formula, and the third formula are predefined calculation formulas, and the first parameter, the second parameter, and the third parameter are parameters used in calculating the output matrix.
Because the output matrix is a matrix containing a plurality of data items, the determination process of each data item of the output matrix is also a cycle iteration process, the cycle initialization assignment is realized by giving an initialization value, then the first parameter, the second parameter and the third parameter are calculated, and the corresponding data items of the output matrix are obtained by calculation by bringing the first parameter, the second parameter and the third parameter into the output matrix determination formula. In the embodiment of the application, assignment is performed from large to small in a loop, and dual-loop assignment is performed on j from m to 1 and i from n to 1, so that the finally obtained output matrix is n × m data items.
The first formula is expressed as:
Figure RE-GDA0003300943630000121
the second formula is expressed as:
Figure RE-GDA0003300943630000122
the third formula is expressed as:
Figure RE-GDA0003300943630000123
the output matrix determination formula is expressed as: e.g. of the typei,j=ei+1,j*a+ei,j+1*b+ei+1,j+1*c;
Wherein a is a first parameter; b is a second parameter; c is a third parameter; gamma is a differentiable parameter; e.g. of the typei,jThe data items of the ith row and the jth column in the output matrix are input; r isi,jData items in the ith row and the jth column in the intermediate penalty matrix; di+1,j、di,j+1And di+1,j+1Respectively punishing data items of corresponding rows and columns in the matrix; j ═ m, m-1, m-2, …, 1; n, n-1, n-2, …, 1; di,m+1=dn+1,j=0;ei,m+1=en+1,j=0; ri,m+1=rn+1,j=-∞;en+1,m+1=1;rn+1,m+1=rn,m
b. And carrying out differential derivation on the punishment matrix to obtain a differential matrix.
The embodiment of the application provides a formula for carrying out differential derivation on a penalty matrix:
Figure RE-GDA0003300943630000131
where E' is a differential matrix and Δ (x, y) is a penalty matrix.
c. And performing rank conversion on the differential matrix, and multiplying the matrix subjected to rank conversion by the output matrix to obtain a gradient back-propagation value.
The differential matrix is converted into rank to obtain (E')TThen the rank-converted matrix (E')TAnd multiplying the output matrix to obtain a gradient back-propagation value.
And S250, performing back propagation on the meteorological network model to be trained through the target loss function and the gradient back propagation value to obtain the target meteorological network model.
And in the training process of the neural network model, continuously updating and adjusting the parameters of the model by a back propagation method until the output of the model is consistent with the target, and determining the parameters of the model at the moment as the parameters of the target meteorological network model. After the target loss function and the gradient back-propagation value are determined, the meteorological network model to be trained is subjected to back propagation through the target loss function and the gradient back-propagation value, and the target meteorological network model is obtained. The embodiment of the invention does not limit the specific back propagation process and can be set according to specific conditions.
And S260, acquiring a historical meteorological data sequence.
And S270, inputting the historical meteorological data sequence into a target meteorological network model as input data.
And S280, predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence.
After the training of the meteorological network model to be trained is completed through the methods of S210-S250, the trained target meteorological network model is obtained, then, when meteorological data is predicted, the collected historical meteorological data sequence is directly obtained, the historical meteorological data sequence is output to the target meteorological network model, and the target meteorological network model outputs the predicted target meteorological data sequence, so that the prediction of the meteorological data can be realized.
It should be appreciated that the model training method provided in the embodiments of the present application can train any neural network model for predicting meteorological data, regardless of the type of the meteorological data. And aiming at the method for guiding investment decision by using the prediction result of the stock K-line graph in quantitative transaction and predicting and prejudging the equivalent time sequence prediction of the tracks of pedestrians and vehicles in the traffic industry, the model training method provided by the application can be adopted for model training, so that the construction of a corresponding functional model is realized.
The embodiment of the invention provides a meteorological data prediction method, which is used for training a meteorological network model to be trained by providing an optimized loss function to obtain a target meteorological network model. The loss function is optimized by using a differentiable dynamic time warping algorithm, the sensitivity of a prediction result to a mutation part is guaranteed, meanwhile, the phase deviation constraint of a matching function is increased, the phase error is reduced by using a matching point phase dislocation weighting method, and the obtained target meteorological network model prediction result is more accurate by improving the loss function. The problem of inaccurate prediction result when meteorological data are predicted in the prior art is solved, and accurate prediction of the meteorological data is achieved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a computer apparatus according to a third embodiment of the present invention, as shown in fig. 3, the apparatus includes a processor 30, a memory 31, an input device 32, and an output device 33; the number of processors 30 in the device may be one or more, and one processor 30 is taken as an example in fig. 3; the processor 30, the memory 31, the input means 32 and the output means 33 in the device may be connected by a bus or other means, as exemplified by the bus connection in fig. 3.
The memory 31 is a computer-readable storage medium for storing software programs, computer-executable programs, and modules, such as program instructions/modules corresponding to the meteorological data prediction method in the embodiment of the present invention. The processor 30 executes various functional applications of the device and data processing by executing software programs, instructions and modules stored in the memory 31, that is, implements the weather data prediction method described above.
The memory 31 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 31 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 31 may further include memory located remotely from the processor 30, which may be connected to the device 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 input device 32 may be used to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the apparatus. The output device 33 may include a display device such as a display screen.
Example four
A fourth embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, perform a method for meteorological data prediction, the method comprising:
acquiring a historical meteorological data sequence;
inputting the historical meteorological data sequence as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method;
and predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence.
Of course, the storage medium provided by the embodiment of the present invention contains computer-executable instructions, and the computer-executable instructions are not limited to the operations of the method described above, and may also perform related operations in the meteorological data prediction method provided by any embodiment of the present invention.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods according to the embodiments of the present invention.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (12)

1. A meteorological data prediction method, comprising:
acquiring a historical meteorological data sequence;
inputting the historical meteorological data sequence as input data into a predetermined target meteorological network model, wherein the target meteorological network model is trained by adopting a set training method;
and predicting meteorological data according to the output result of the target meteorological network model to obtain a target meteorological data sequence corresponding to the historical meteorological data sequence.
2. The method of claim 1, wherein the step of training the target meteorological network model comprises:
adopting a training meteorological data sequence and a corresponding standard meteorological data sequence as a training sample;
inputting the training sample into a given meteorological network model to be trained to obtain a predicted meteorological data sequence;
determining an intermediate penalty matrix according to the predicted meteorological data sequence and the standard meteorological data sequence;
determining a target loss function and a gradient back-propagation value according to the intermediate penalty matrix;
and performing back propagation on the meteorological network model to be trained through the target loss function and the gradient back propagation value to obtain a target meteorological network model.
3. The method of claim 2, wherein determining an intermediate penalty matrix based on the sequence of forecasted weather data and standard weather data comprises:
determining a penalty function value according to the forecast meteorological data in the forecast meteorological data sequence and the standard meteorological data in the standard meteorological data sequence;
determining a differentiable value according to a predetermined differentiable function formula and an initial differentiable value;
and determining data items of an intermediate penalty matrix according to the penalty function values and the corresponding micro values and a predetermined intermediate penalty matrix determination formula, and forming the intermediate penalty matrix according to the data items.
4. The method of claim 3, wherein determining penalty function values from the forecasted weather data in the sequence of forecasted weather data and the standard weather data in the sequence of standard weather data comprises:
determining, for each predicted meteorological data, a distance and a match value to each of the standard meteorological data;
and adding each distance and the corresponding matching value to obtain each penalty function value.
5. The method of claim 4, wherein determining a match value comprises:
and substituting the predicted serial number of each predicted meteorological data and the standard serial number of each standard meteorological data into a predetermined matching function formula respectively, and calculating to obtain each matching value.
6. The method of claim 5, wherein the matching function is formulated as:
Figure FDA0003160125060000021
wherein the match (i, j) represents a matching value between the predicted weather data with the predicted serial number i and the standard weather data with the standard serial number j, i is 0,1,2,3 … n, j is 0,1,2,3 … m; k, n, m, length-1 of the predicted meteorological data sequence, and m, length-1 of the standard meteorological data sequence.
7. The method of claim 2, wherein determining a target loss function from the intermediate penalty matrix comprises:
extracting target data items corresponding to the designated rows and columns in the intermediate penalty matrix;
determining the target data item as a target loss function.
8. The method of claim 2, wherein determining a gradient back-propagation value from the intermediate penalty matrix comprises:
determining an output matrix according to the intermediate penalty matrix and a penalty matrix formed by each penalty function value;
carrying out differential derivation on the punishment matrix to obtain a differential matrix;
and performing rank conversion on the differential matrix, and multiplying the matrix subjected to rank conversion by the output matrix to obtain a gradient back-propagation value.
9. The method of claim 8, wherein determining an output matrix from the intermediate penalty matrix and a penalty matrix formed from the penalty function values comprises:
determining a first parameter according to the intermediate penalty matrix, the penalty matrix and a preset first formula;
determining a second parameter according to the intermediate penalty matrix, the penalty matrix and a preset second formula;
determining a third parameter according to the intermediate penalty matrix, the penalty matrix and a preset third formula;
and determining an output matrix according to the first parameter, the second parameter and the third parameter in combination with a predetermined output matrix determination formula.
10. The method of claim 9,
the first formula is expressed as:
Figure FDA0003160125060000031
the second formula is expressed as:
Figure FDA0003160125060000032
the third formula is expressed as:
Figure FDA0003160125060000033
the output matrix determination formula is expressed as: e.g. of the typei,j=ei+1,j*a+ei,j+1*b+ei+1,j+1*c;
Wherein a is a first parameter; b is a second parameter; c is a third parameter; gamma is a differentiable parameter; e.g. of the typei,jThe data items of the ith row and the jth column in the output matrix are input; r isi,jData items in the ith row and the jth column in the intermediate penalty matrix; di+1,j、di,j+1And di+1,j+1Respectively punishing data items of corresponding rows and columns in the matrix; j ═ m, m-1, m-2, …, 1; n, n-1, n-2, …, 1; di,m+1=dn+1,j=0;ei,m+1=en+1,j=0;ri,m+1=rn+1,j=-∞;en+1,m+1=1;rn+1,m+1=rn,m
11. A computer device, the device comprising:
one or more processors;
a memory for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the meteorological data prediction method of any one of claims 1-10.
12. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method for meteorological data prediction according to any one of claims 1-10.
CN202110788576.9A 2021-07-13 2021-07-13 Meteorological data prediction method, equipment and storage medium Pending CN113689026A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110788576.9A CN113689026A (en) 2021-07-13 2021-07-13 Meteorological data prediction method, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110788576.9A CN113689026A (en) 2021-07-13 2021-07-13 Meteorological data prediction method, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113689026A true CN113689026A (en) 2021-11-23

Family

ID=78577029

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110788576.9A Pending CN113689026A (en) 2021-07-13 2021-07-13 Meteorological data prediction method, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113689026A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114758311A (en) * 2022-06-14 2022-07-15 北京航空航天大学 Traffic flow prediction method and system based on heterogeneous feature fusion

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190228329A1 (en) * 2017-03-24 2019-07-25 Hitachi, Ltd. Prediction system and prediction method
CN110929963A (en) * 2019-12-16 2020-03-27 深圳智润新能源电力勘测设计院有限公司 Wind speed prediction method, wind speed prediction device, and storage medium
CN111242372A (en) * 2020-01-10 2020-06-05 上海眼控科技股份有限公司 Weather radar echo map prediction method and device, computer equipment and storage medium
CN112215408A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 Rail transit passenger flow volume prediction method and device
CN112308336A (en) * 2020-11-18 2021-02-02 浙江大学 High-speed railway high wind speed limit dynamic disposal method based on multi-step time sequence prediction

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190228329A1 (en) * 2017-03-24 2019-07-25 Hitachi, Ltd. Prediction system and prediction method
CN110929963A (en) * 2019-12-16 2020-03-27 深圳智润新能源电力勘测设计院有限公司 Wind speed prediction method, wind speed prediction device, and storage medium
CN111242372A (en) * 2020-01-10 2020-06-05 上海眼控科技股份有限公司 Weather radar echo map prediction method and device, computer equipment and storage medium
CN112215408A (en) * 2020-09-24 2021-01-12 交控科技股份有限公司 Rail transit passenger flow volume prediction method and device
CN112308336A (en) * 2020-11-18 2021-02-02 浙江大学 High-speed railway high wind speed limit dynamic disposal method based on multi-step time sequence prediction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114758311A (en) * 2022-06-14 2022-07-15 北京航空航天大学 Traffic flow prediction method and system based on heterogeneous feature fusion

Similar Documents

Publication Publication Date Title
CN111563706A (en) Multivariable logistics freight volume prediction method based on LSTM network
US11573541B2 (en) Future state estimation device and future state estimation method
US11704570B2 (en) Learning device, learning system, and learning method
CN104899135A (en) Software defect prediction method and system
KR102308751B1 (en) Method for prediction of precipitation based on deep learning
CN110705115A (en) Meteorological forecasting method and system based on deep belief network
CN114330935B (en) New energy power prediction method and system based on multiple combination strategies integrated learning
Wirthmüller et al. Predicting the time until a vehicle changes the lane using LSTM-based recurrent neural networks
CN113689026A (en) Meteorological data prediction method, equipment and storage medium
WO2018130890A1 (en) Learning apparatus and method for bidirectional learning of predictive model based on data sequence
Tang et al. Prediction about the vessel’s heave motion under different sea states based on hybrid PSO_ARMA model
Manoj et al. FWS-DL: forecasting wind speed based on deep learning algorithms
CN117543544A (en) Load prediction method, device, equipment and storage medium
CN113610665B (en) Wind power generation power prediction method based on multi-delay output echo state network
US20240028960A1 (en) Method for evaluating the performance of a prediction algorithm, and associated devices
CN115471009A (en) Predictive optimized power system planning method
JP6233432B2 (en) Method and apparatus for selecting mixed model
JP7214672B2 (en) Information processing device, information processing method, and computer program
CN114841461A (en) Air quality integration prediction method based on time sequence missing perception and multi-source factor fusion
JP6927161B2 (en) Learning devices, predictors, methods, and programs
Nguyen Continuous observation hidden Markov model
Toubeh et al. Risk-aware planning by confidence estimation using deep learning-based perception
CN111523258B (en) Microseism effective signal first arrival pickup method and system based on MS-Net network
CN113065281B (en) TE process time sequence prediction method based on transfer entropy and long-short-term memory network
Gluhovsky Multinomial least angle regression

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