CN113159426A - Weather type similarity judgment method and device, electronic equipment and readable storage medium - Google Patents

Weather type similarity judgment method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113159426A
CN113159426A CN202110447452.4A CN202110447452A CN113159426A CN 113159426 A CN113159426 A CN 113159426A CN 202110447452 A CN202110447452 A CN 202110447452A CN 113159426 A CN113159426 A CN 113159426A
Authority
CN
China
Prior art keywords
cosine distance
weather
data
vector
weight
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
CN202110447452.4A
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.)
3Clear Technology Co Ltd
Original Assignee
3Clear 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 3Clear Technology Co Ltd filed Critical 3Clear Technology Co Ltd
Priority to CN202110447452.4A priority Critical patent/CN113159426A/en
Publication of CN113159426A publication Critical patent/CN113159426A/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
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • 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/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/067Enterprise or organisation modelling

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Human Resources & Organizations (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Economics (AREA)
  • Physics & Mathematics (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Databases & Information Systems (AREA)
  • Tourism & Hospitality (AREA)
  • Operations Research (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Quality & Reliability (AREA)
  • Remote Sensing (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Educational Administration (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a weather type similarity judgment method, a weather type similarity judgment device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: acquiring first data of the first meteorological element data in a prediction time period and second data of the first meteorological element data in a designated historical time period; converting the spatial features of the first data into a first vector and converting the spatial features of the second data into a second vector; calculating a first cosine distance of the first vector and the second vector; determining the similarity between the first weather pattern and the second weather pattern according to the first cosine distance; wherein the first weather pattern corresponds to a predicted time period and the second weather pattern corresponds to a specified historical time period. The method and the device solve the problem that in the prior art, the weather type similarity judgment accuracy is low because only the correlation of one-dimensional meteorological element data is considered for judging the weather type similarity. And the weather type similarity is judged based on the multidimensional variable data, the weather type characteristics are considered more comprehensively, and the accuracy of judging the weather type similarity is increased.

Description

Weather type similarity judgment method and device, electronic equipment and readable storage medium
Technical Field
The invention relates to the technical field of environmental monitoring, in particular to a weather type similarity judgment method and device, electronic equipment and a readable storage medium.
Background
In recent years, our country has paid more and more attention to the judgment of weather types. By comparing the current meteorological elements with the historical meteorological elements, the weather type of a future period of time can be predicted by utilizing the historical weather type. The traditional technical approach for judging weather type similarity is to compare historical weather types according to forecaster experience and carry out subjective analysis, but summary of the historical similar weather types is lacked during research, and analysis results have great individual difference.
At present, a method for calculating weather type similarity is to convert multidimensional meteorological element data containing longitude and latitude information into one-dimensional data, and then obtain a correlation coefficient, wherein the highest correlation is regarded as the highest similarity, and the weather types are the most similar, so that the objectivity of a research result is greatly improved, and the difference between multiple analysis results is small. However, in the prior art, the method for calculating the weather-type similarity only uses the way of calculating the correlation coefficient R to find the similarity.
Aiming at the problem that in the prior art, the weather type similarity is judged only by considering the correlation of one-dimensional meteorological element data, so that the judgment accuracy of the weather type similarity is low, an effective solution is not provided.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, an electronic device, and a computer-readable storage medium for determining weather type similarity, so as to solve the problem in the prior art that the accuracy of determining weather type similarity is low because only the correlation of one-dimensional meteorological element data is considered in determining weather type similarity.
Therefore, the embodiment of the invention provides the following technical scheme:
in a first aspect of the present invention, a method for determining weather-type similarity is provided, including:
acquiring first data of first meteorological element data in a prediction time period and second data of the first meteorological element in a designated historical time period;
converting the spatial features of the first data into a first vector and converting the spatial features of the second data into a second vector;
calculating a first cosine distance of the first vector and the second vector;
determining the similarity between a first weather pattern and the second weather pattern according to the first cosine distance; wherein the first weather type corresponds to the predicted time period and the second weather type corresponds to the specified historical time period.
Optionally, calculating the first cosine distance of the first vector and the second vector comprises:
calculating the first cosine distance by the following formula:
Figure BDA0003037401070000021
vectors A and B respectively represent the first weather element data and the historical first weather element data of the prediction period, S1F (A, B), cos (θ) represents the first cosine distance, Ak、BkRepresenting the kth components of vectors a and B, respectively, and n representing the number of components of vectors a and B. Optionally, after calculating the first cosine distance of the first vector and the second vector, the method further comprises:
acquiring third data of second meteorological element data in the prediction time period and fourth data of the second meteorological element data in the appointed historical time period; wherein the second meteorological element data comprises one or more meteorological element data;
converting the spatial feature of the third data into a third vector, and converting the spatial feature of the fourth data into a fourth vector;
calculating a second cosine distance of the third vector and the fourth vector;
assigning a first weight to the first cosine distance and a second weight to the second cosine distance;
determining a first integrated cosine distance for each meteorological element data according to the first cosine distance, the second cosine distance, the first weight and the second weight by the following formula;
Figure BDA0003037401070000031
∑xv=1,
xvrepresenting the first weight, the second weight, S11A first integrated cosine distance representing the 11 th region, m being the type of meteorological element data, SVRepresenting the first cosine distance and the second cosine distance, v representing the v meteorological element, v is belonged to [1, m ∈];
And determining the similarity between the first weather pattern and the second weather pattern according to the first comprehensive cosine distance.
Optionally, the method further comprises:
dividing a research area into M rows and N columns of areas according to the longitude and latitude; wherein M and N are positive integers;
acquiring a first comprehensive cosine distance of each region in the research region;
assigning a weight to the first integrated cosine distance of each region;
determining a second comprehensive cosine distance according to the first comprehensive cosine distance of each area and the weight of the first comprehensive cosine distance of each area by the following formula;
Figure BDA0003037401070000032
∑yij=1,
yijfirst integrated cosine distance representing each regionA weight of distance, S represents the second integrated cosine distance, SijA first integrated cosine distance, i ∈ [1, M ], representing the ij region],j∈[1,N];
And determining the similarity of the first weather type and the second weather type according to the first comprehensive cosine distance and the second comprehensive cosine distance.
In a second aspect of the present invention, there is provided a weather-type similarity determination apparatus, including:
the first acquisition module is used for acquiring first data of first meteorological element data in a prediction time period and second data of the first meteorological element data in a designated historical time period;
the first conversion module is used for converting the spatial characteristics of the first data into a first vector and converting the spatial characteristics of the second data into a second vector;
a first calculation module, configured to calculate a first cosine distance between the first vector and the second vector;
the first determining module is used for determining the similarity between a first weather pattern and the second weather pattern according to the first cosine distance; wherein the first weather type corresponds to the predicted time period and the second weather type corresponds to the specified historical time period.
Optionally, the first calculating module is further configured to calculate the first cosine distance by the following formula:
Figure BDA0003037401070000041
vectors A and B respectively represent the first weather element data and the historical first weather element data of the prediction period, S1F (A, B), cos (θ) represents the first cosine distance, Ak、BkRepresenting the kth components of vectors a and B, respectively, and n representing the number of components of vectors a and B. Optionally, the apparatus further comprises:
the second acquisition module is used for acquiring third data of second meteorological element data in the prediction time period and fourth data of the second meteorological element data in the designated historical time period; wherein the second meteorological element data comprises one or more meteorological element data;
the second conversion module is used for converting the spatial feature of the third data into a third vector and converting the spatial feature of the fourth data into a fourth vector;
a second calculating module, configured to calculate a second cosine distance of the third vector and the fourth vector;
a first distribution module, configured to distribute a first weight to the first cosine distance and a second weight to the second cosine distance;
a second determining module, configured to determine a first integrated cosine distance for each meteorological element data according to the first cosine distance, the second cosine distance, the first weight, and the second weight through the following formula;
Figure BDA0003037401070000051
∑xv=1,
xvrepresenting the first weight, the second weight, S11A first integrated cosine distance representing the 11 th region, m being the type of meteorological element data, SVRepresenting the first cosine distance and the second cosine distance, v representing the v meteorological element, v is belonged to [1, m ∈];
And the third determining module is used for determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance.
Optionally, the apparatus further comprises:
the dividing module is used for dividing the research area into M rows and N columns of areas according to the longitude and latitude; wherein M and N are positive integers;
a third obtaining module, configured to obtain a first integrated cosine distance of each of the study regions;
a second assigning module for assigning a weight to the first integrated cosine distance of each region;
the fourth determining module is used for determining a second comprehensive cosine distance according to the weight of the first comprehensive cosine distance of each area and the first comprehensive cosine distance of each area through the following formula;
Figure BDA0003037401070000061
∑yij=1,
yija weight representing a first integrated cosine distance of each region, S represents the second integrated cosine distance, SijA first integrated cosine distance, i ∈ [1, M ], representing the ij region],j∈[1,N];
And the fifth determining module is used for determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance and the second comprehensive cosine distance.
In a third aspect of the present invention, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the processor, and the instructions are executable by the at least one processor to cause the at least one processor to execute the weather type similarity determination method according to any one of the first aspect.
In a fourth aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the method for determining weather type similarity is implemented as described in any one of the first aspect.
The technical scheme of the embodiment of the invention has the following advantages:
the embodiment of the invention provides a weather type similarity judgment method, a weather type similarity judgment device, electronic equipment and a readable storage medium, wherein the method comprises the following steps: acquiring first data of the first meteorological element data in a prediction time period and second data of the first meteorological element data in a designated historical time period; converting the spatial features of the first data into a first vector and converting the spatial features of the second data into a second vector; calculating a first cosine distance of the first vector and the second vector; determining the similarity between the first weather pattern and the second weather pattern according to the first cosine distance; wherein the first weather pattern corresponds to a predicted time period and the second weather pattern corresponds to a specified historical time period. The embodiment of the invention solves the problem that the weather type similarity judgment accuracy is low because only the correlation of one-dimensional meteorological element data is considered in the weather type similarity judgment in the prior art. In the embodiment of the invention, the weather type similarity is judged based on the multidimensional variable data, the weather type characteristics are considered more comprehensively, and the accuracy of judging the weather type similarity is increased.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of a weather-type similarity determination method according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a determination result of the most similar weather type to that of the most similar weather type in north Heibei 2020, 1 month and 2 days according to an embodiment of the present invention;
FIG. 3 is a block diagram of a weather-type similarity determination apparatus according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
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 only a part of the embodiments of the present application, and not all of the 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.
In the description of the present application, it is to be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like indicate orientations or positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the referenced device or element must have a particular orientation, be constructed in a particular orientation, and be operated, and thus should not be considered as limiting the present application. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality" means two or more unless specifically limited otherwise.
In this application, the word "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for the purpose of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes are not set forth in detail in order to avoid obscuring the description of the present application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
It should be noted that, although a logical order is shown in the flowcharts, in some cases, the steps shown or described may be performed in an order different from the order shown.
In addition, the technical features involved in the different embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In this embodiment, an embodiment of a weather-type similarity determining method is provided, which can be used in a weather-type prediction system, and fig. 1 is a flowchart of a weather-type similarity determining method according to an embodiment of the present invention, as shown in fig. 1, the flowchart includes the following steps:
step S101, acquiring first data of the first meteorological element data in a prediction time period and second data of the first meteorological element in a designated historical time period. Specifically, the first data may be downloaded through a network or obtained through meteorological prediction model calculation. The second data is derived from a self-built database or from historical weather data downloaded over a network. The meteorological element may be a potential height, an isobaric surface temperature, or a wind speed, and the weather pattern is described by the meteorological element.
Step S102, converting the spatial feature of the first data into a first vector, and converting the spatial feature of the second data into a second vector. Specifically, the weather type is a multidimensional structure having time-space information, and thus it is complicated to determine the similarity of multiple dimensions. The spatial features of the first data and the second data are converted into vectors, so that the weather type similarity can be judged more conveniently, and the weather type similarity can be calculated through a vector algorithm.
Step S103, a first cosine distance between the first vector and the second vector is calculated.
Step S104, determining the similarity between the first weather type and the second weather type according to the first cosine distance; the first weather type corresponds to the predicted time period, and the second weather type corresponds to the designated historical time period. Specifically, the similarity of the first data and the second data represented by the cosine distance can fully consider the spatial correlation of the weather types, so that the judgment on the similarity of the weather types is more accurate. The larger the first cosine distance is, the higher the similarity between the first data and the second data is, that is, the higher the similarity between the first weather type and the second weather type is. According to the research purpose, in the research area, the meteorological element data which can represent the weather type most is selected as first data, for example, the research purpose is to predict rainfall conditions in a time period, therefore, the atmospheric humidity data in the prediction time period is selected as the first data, the historical atmospheric humidity data is selected as second data, therefore, the cosine distance between the atmospheric humidity data in the prediction time period and the historical atmospheric humidity data is calculated, and the similarity between the first weather type and the second weather type is represented by the cosine distance. The rainfall can be represented by the atmospheric humidity, namely, the similarity between the atmospheric humidity and the historical atmospheric humidity in the prediction period is equivalent to the similarity between the first weather type and the second weather type.
Through the steps, because only the correlation of one-dimensional meteorological element data is considered in the prior art for judging weather type similarity, the embodiment of the invention represents the similarity of the meteorological elements by converting the spatial features of the meteorological elements into vectors and calculating the cosine distance between the vectors, thereby improving the accuracy of judgment. The problem that in the prior art, the weather type similarity judgment accuracy is low due to the fact that only the correlation of one-dimensional meteorological element data is considered in the weather type similarity judgment is solved. In the embodiment of the invention, the weather type similarity is judged based on the multidimensional variable data, so that the judgment accuracy is improved.
Step S103 above involves calculating a first cosine distance of the first vector and the second vector, which, in an alternative embodiment,
the first cosine distance is calculated by the following formula:
Figure BDA0003037401070000101
vectors A and B respectively represent the first weather element data and the historical first weather element data of the prediction period, S1F (A, B), cos (θ) represents the first cosine distance, Ak、BkDenotes the kth component of vectors A and B, respectively, n denotes the vectorNumber of components of A and B. Specifically, the cosine value between two vectors can be derived by using the euclidean dot product formula:
A·B=|A||B|cosθ,
therefore, the cosine similarity between the two vectors can be obtained simply through the operation according to the vectors, and the accuracy of judging the weather similarity is improved because the vectors have the spatial characteristic.
To illustrate the conversion of the spatial characteristics of the meteorological elements into vectors, in an alternative embodiment, the first meteorological element is wind speed. The wind speed of any point in space can be wind blowing along the weft direction, wind blowing from the west to the east is set as the weft positive direction, wind blowing along the warp direction in the same way is set, wind blowing from the south to the north is set as the weft positive direction, and a rectangular coordinate system can be established based on the method. The magnitude of the wind blowing along the weft direction is u, and the magnitude of the wind blowing along the warp direction is v, so that a vector wind speed F representing a certain point in the space can be obtained through a parallelogram rule. Therefore, u and v are both components of F, i.e. Fk
The above step S103 involves calculating a first cosine distance of the first vector and the second vector, and after the above step S103, in an alternative embodiment, third data of the second meteorological element data in the prediction period and fourth data of the second meteorological element data in the designated historical period are acquired. Wherein the second meteorological element data comprises one or more meteorological element data. Specifically, in order to obtain higher accuracy of judging the weather similarity, a second meteorological element capable of representing the weather type is added. Meanwhile, the types of the first meteorological element and the second meteorological element are determined through similarity judgment of different weather types. For example, if the studied weather type is sand storm, the first meteorological element and the second meteorological element are wind, potential height, air humidity, etc.; the weather type is atmosphere pollution, and the first meteorological element and the second meteorological element are respectively PM2.5、SO2And CO, etc.
Spatial features of the third data are converted into a third vector, and spatial features of the fourth data are converted into a fourth vector. And calculating a second cosine distance of the third vector and the fourth vector. A first weight is assigned to the first cosine distance and a second weight is assigned to the second cosine distance. And determining a first comprehensive cosine distance for each meteorological element data according to the first cosine distance, the second cosine distance, the first weight and the second weight through the following formula.
Figure BDA0003037401070000121
∑xv=1,
xvRepresenting the first weight, the second weight, S11A first integrated cosine distance representing the 11 th region, m being the type of meteorological element data, SVRepresenting the first cosine distance and the second cosine distance, v representing the v meteorological element, v is belonged to [1, m ∈]. Specifically, v is a positive integer. According to the experience coefficient conventionally used in the meteorological field, weights are given to different meteorological elements. Because different meteorological elements have different degrees of influence on the weather types, the similarity of the weather types is more comprehensively and accurately described by increasing the weight of the meteorological elements. Since the second meteorological element data may include one or more meteorological element data, the calculated second cosine distance correspondingly includes one or more cosine distances, and the second weight correspondingly includes one or more weight coefficients.
And determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance, thereby effectively improving the judgment accuracy. The larger the first integrated cosine distance is, the higher the similarity between the third data and the fourth data is, that is, the higher the similarity between the first weather type and the second weather type is. Specifically, the similarity between the first weather pattern and the second weather pattern is determined according to the first cosine distance, but some weather patterns need to consider various weather elements such as atmospheric pollution, so that the first data can be predicted time period PM2.5 data, and the second data can be historical PM2.5 data; the third data is data of CO or SO2 in a prediction time period, the fourth data is data of historical CO or SO2, cosine distances of PM2.5, CO and SO2 are calculated, and a first comprehensive cosine distance is obtained through a weighted summation mode. Since the atmospheric pollution can be represented by meteorological elements such as PM2.5, CO, and SO2, the similarity between the predicted time period PM2.5, CO, and SO2 and the historical PM2.5, CO, and SO2 is equivalent to the similarity between the first weather pattern and the second weather pattern.
In an alternative embodiment, the study area is divided into M rows and N columns of areas according to the longitude and latitude; wherein M and N are positive integers. By dividing the whole research area, the circulation characteristics of weather type in a small-scale area are considered.
First integrated cosine distances for respective ones of the regions of interest are obtained. Assigning a weight to the first integrated cosine distance of each region; specifically, weights are assigned according to attention degrees of different regions, so that more accurate judgment of weather type similarity of the attention regions can be obtained.
And determining a second comprehensive cosine distance according to the first comprehensive cosine distance of each area and the weight of the first comprehensive cosine distance of each area by the following formula.
Figure BDA0003037401070000131
∑yij=1,
yijA weight representing a first integrated cosine distance of each region, S represents the second integrated cosine distance, SijA first integrated cosine distance, i ∈ [1, M ], representing the ij region],j∈[1,N]. Wherein i, j are integers.
And determining the similarity of the first weather pattern and the second weather pattern according to the first comprehensive cosine distance and the second comprehensive cosine distance, and fully considering the influence of the meteorological field distribution difference in the local spatial range on the research area.
To further illustrate the weather type similarity determination method, in an optional embodiment, when the weather type similarity determination is performed on the predicted weather type, the second integrated cosine distances are calculated for all historical weather data downloaded from the built-in database or from the network or the weather data in recent years, so that a plurality of second integrated cosine distances can be obtained, and the date represented by the largest second integrated cosine distance and the weather type are obtained by comparing and sorting the second integrated cosine distances. Meanwhile, a plurality of databases can be established according to different research weather types or a total database can be established according to experience for the self-established database. As shown in fig. 2, by the judgment of the similarity of the weather type and the predicted weather type in recent years, the date when the most similar weather type to that of 1 month 2 days of 2020 in north river province is obtained is 2019-01-07, and the second integrated cosine distance is 0.86, that is, the similarity coefficient is 0.86.
In this embodiment, a weather-type similarity determining apparatus is further provided, and the apparatus is used to implement the foregoing embodiments and preferred embodiments, and the description of which is already given is omitted. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
The present embodiment provides a weather-type similarity determination apparatus, as shown in fig. 3, including:
a first acquiring module 31, configured to acquire first data of the first meteorological element data in a prediction period and second data of the first meteorological element in a specified historical period;
a first conversion module 32 for converting the spatial features of the first data into first vectors and converting the spatial features of the second data into second vectors;
a first calculating module 33, configured to calculate a first cosine distance between the first vector and the second vector;
a first determining module 34, configured to determine similarity between a first weather pattern and a second weather pattern according to the first cosine distance; wherein the first weather type corresponds to the predicted time period and the second weather type corresponds to the specified historical time period.
Optionally, the first calculating module in the apparatus is configured to calculate the first cosine distance by the following formula:
Figure BDA0003037401070000151
vectors A and B respectively represent the first weather element data and the historical first weather element data of the prediction period, S1F (A, B), cos (θ) represents the first cosine distance, Ak、BkRepresenting the kth components of vectors a and B, respectively, and n representing the number of components of vectors a and B. Optionally, the apparatus further comprises:
the second acquisition module is used for acquiring third data of the second meteorological element data in a prediction time period and fourth data of the second meteorological element data in the appointed historical time period; wherein the second meteorological element data comprises one or more meteorological element data;
the second conversion module is used for converting the spatial feature of the third data into a third vector and converting the spatial feature of the fourth data into a fourth vector;
the second calculation module is used for calculating a second cosine distance between the third vector and the fourth vector;
the first distribution module is used for distributing a first weight to the first cosine distance and distributing a second weight to the second cosine distance;
a second determining module, configured to determine a first integrated cosine distance for each meteorological element data according to the first cosine distance, the second cosine distance, the first weight, and the second weight through the following formula;
Figure BDA0003037401070000152
∑xv=1,
xvrepresenting the first weight, the second weight, S11A first integrated cosine distance representing the 11 th region, m being the type of meteorological element data, SVRepresenting the first cosine distance and the second cosine distance, v representing the v weatherElement, v ∈ [1, m ]];
And the third determining module is used for determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance.
Optionally, the apparatus further comprises:
the dividing module is used for dividing the research area into M rows and N columns of areas according to the longitude and latitude; wherein M and N are positive integers;
a third obtaining module, configured to obtain a first integrated cosine distance of each of the research regions;
a second assigning module for assigning a weight to the first integrated cosine distance of each region;
the fourth determining module is used for determining a second comprehensive cosine distance according to the weight of the first comprehensive cosine distance of each area and the first comprehensive cosine distance of each area through the following formula;
Figure BDA0003037401070000161
∑yij=1,
yija weight representing a first integrated cosine distance of each region, S represents the second integrated cosine distance, SijA first integrated cosine distance, i ∈ [1, M ], representing the ij region],j∈[1,N];
And the fifth determining module is used for determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance and the second comprehensive cosine distance.
The weather-type similarity determination apparatus in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices capable of providing the above-described functions.
Further functional descriptions of the modules are the same as those of the corresponding embodiments, and are not repeated herein.
An embodiment of the present invention further provides an electronic device, which has the weather-type similarity determining apparatus shown in fig. 3.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an electronic device according to an alternative embodiment of the present invention, and as shown in fig. 4, the electronic device may include: at least one processor 401, such as a CPU (Central Processing Unit), at least one communication interface 403, memory 404, and at least one communication bus 402. Wherein a communication bus 402 is used to enable connective communication between these components. The communication interface 403 may include a Display (Display) and a Keyboard (Keyboard), and the optional communication interface 403 may also include a standard wired interface and a standard wireless interface. The Memory 404 may be a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. The memory 404 may optionally be at least one memory device located remotely from the processor 401. Wherein the processor 401 may be combined with the apparatus described in fig. 3, the memory 404 stores an application program, and the processor 401 calls the program code stored in the memory 404 for performing any of the above-mentioned method steps.
The communication bus 402 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 402 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 4, but this does not indicate only one bus or one type of bus.
The memory 404 may include a volatile memory (RAM), such as a random-access memory (RAM); the memory may also include a non-volatile memory (english: non-volatile memory), such as a flash memory (english: flash memory), a hard disk (english: hard disk drive, abbreviated: HDD) or a solid-state drive (english: SSD); the memory 404 may also comprise a combination of memories of the kind described above.
The processor 401 may be a Central Processing Unit (CPU), a Network Processor (NP), or a combination of a CPU and an NP.
The processor 401 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a field-programmable gate array (FPGA), a General Array Logic (GAL), or any combination thereof.
Optionally, the memory 404 is also used to store program instructions. Processor 401 may invoke program instructions to implement the weather-type similarity determination method as illustrated in the embodiment of fig. 1 of the present application.
The embodiment of the invention also provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the weather type similarity judgment method in any method embodiment. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD) or a Solid State Drive (SSD), etc.; the storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.

Claims (10)

1. A weather type similarity judgment method is characterized by comprising the following steps:
acquiring first data of first meteorological element data in a prediction time period and second data of the first meteorological element in a designated historical time period;
converting the spatial features of the first data into a first vector and converting the spatial features of the second data into a second vector;
calculating a first cosine distance of the first vector and the second vector;
determining the similarity between a first weather pattern and the second weather pattern according to the first cosine distance; wherein the first weather type corresponds to the predicted time period and the second weather type corresponds to the specified historical time period.
2. The weather-type similarity determination method according to claim 1, wherein calculating the first cosine distance of the first vector and the second vector comprises:
calculating the first cosine distance by the following formula:
Figure FDA0003037401060000011
vectors A and B respectively represent the first weather element data and the historical first weather element data of the prediction period, S1F (A, B), cos (θ) represents the first cosine distance, Ak、BkRepresenting the kth components of vectors a and B, respectively, and n representing the number of components of vectors a and B.
3. The weather-type similarity determination method according to claim 1, wherein after calculating the first cosine distance between the first vector and the second vector, the method further comprises:
acquiring third data of second meteorological element data in the prediction time period and fourth data of the second meteorological element data in the appointed historical time period; wherein the second meteorological element data comprises one or more meteorological element data;
converting the spatial feature of the third data into a third vector, and converting the spatial feature of the fourth data into a fourth vector;
calculating a second cosine distance of the third vector and the fourth vector;
assigning a first weight to the first cosine distance and a second weight to the second cosine distance;
determining a first integrated cosine distance for each meteorological element data according to the first cosine distance, the second cosine distance, the first weight and the second weight by the following formula;
Figure FDA0003037401060000021
∑xv=1,
xvrepresenting the first weight, the second weight, S11A first integrated cosine distance representing the 11 th region, m being the type of meteorological element data, SVRepresenting the first cosine distance and the second cosine distance, v representing the v meteorological element, v is belonged to [1, m ∈];
And determining the similarity between the first weather pattern and the second weather pattern according to the first comprehensive cosine distance.
4. The weather-type similarity determination method according to claim 3, further comprising:
dividing a research area into M rows and N columns of areas according to the longitude and latitude; wherein M and N are positive integers;
acquiring a first comprehensive cosine distance of each region in the research region;
assigning a weight to the first integrated cosine distance of each region;
determining a second comprehensive cosine distance according to the first comprehensive cosine distance of each area and the weight of the first comprehensive cosine distance of each area by the following formula;
Figure FDA0003037401060000031
∑yij=1,
yija weight representing a first integrated cosine distance of each region, S represents the second integrated cosine distance, SijA first integrated cosine distance, i ∈ [1, M ], representing the ij region],j∈[1,N];
And determining the similarity of the first weather type and the second weather type according to the first comprehensive cosine distance and the second comprehensive cosine distance.
5. A weather-type similarity determination device, comprising:
the first acquisition module is used for acquiring first data of first meteorological element data in a prediction time period and second data of the first meteorological element data in a designated historical time period;
the first conversion module is used for converting the spatial characteristics of the first data into a first vector and converting the spatial characteristics of the second data into a second vector;
a first calculation module, configured to calculate a first cosine distance between the first vector and the second vector;
the first determining module is used for determining the similarity between a first weather pattern and the second weather pattern according to the first cosine distance; wherein the first weather type corresponds to the predicted time period and the second weather type corresponds to the specified historical time period.
6. The weather-type similarity determination apparatus according to claim 5, wherein the first calculation module is further configured to calculate the first cosine distance by using the following formula:
Figure FDA0003037401060000032
vectors A and B respectively represent the first weather element data and the historical first weather element data of the prediction period, S1F (A, B), cos (theta) represents the first cosine distance,Ak、Bkrepresenting the kth components of vectors a and B, respectively, and n representing the number of components of vectors a and B.
7. The weather-type similarity determination apparatus according to claim 5, further comprising:
the second acquisition module is used for acquiring third data of second meteorological element data in the prediction time period and fourth data of the second meteorological element data in the designated historical time period; wherein the second meteorological element data comprises one or more meteorological element data;
the second conversion module is used for converting the spatial feature of the third data into a third vector and converting the spatial feature of the fourth data into a fourth vector;
a second calculating module, configured to calculate a second cosine distance of the third vector and the fourth vector;
a first distribution module, configured to distribute a first weight to the first cosine distance and a second weight to the second cosine distance;
a second determining module, configured to determine a first integrated cosine distance for each meteorological element data according to the first cosine distance, the second cosine distance, the first weight, and the second weight through the following formula;
Figure FDA0003037401060000041
∑xv=1,
xvrepresenting the first weight, the second weight, S11A first integrated cosine distance representing the 11 th region, m being the type of meteorological element data, SVRepresenting the first cosine distance and the second cosine distance, v representing the v meteorological element, v is belonged to [1, m ∈];
And the third determining module is used for determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance.
8. The weather-type similarity determination apparatus according to claim 7, further comprising:
the dividing module is used for dividing the research area into M rows and N columns of areas according to the longitude and latitude; wherein M and N are positive integers;
a third obtaining module, configured to obtain a first integrated cosine distance of each of the study regions;
a second assigning module for assigning a weight to the first integrated cosine distance of each region;
the fourth determining module is used for determining a second comprehensive cosine distance according to the weight of the first comprehensive cosine distance of each area and the first comprehensive cosine distance of each area through the following formula;
Figure FDA0003037401060000051
∑yij=1,
yija weight representing a first integrated cosine distance of each region, S represents the second integrated cosine distance, SijA first integrated cosine distance, i ∈ [1, M ], representing the ij region],j∈[1,N];
And the fifth determining module is used for determining the similarity between the first weather type and the second weather type according to the first comprehensive cosine distance and the second comprehensive cosine distance.
9. An electronic device, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to cause the at least one processor to perform the weather-type similarity determination method of any one of claims 1-4.
10. A computer-readable storage medium having computer instructions stored thereon, wherein the instructions, when executed by a processor, implement the weather-type similarity determination method according to any one of claims 1 to 4.
CN202110447452.4A 2021-04-25 2021-04-25 Weather type similarity judgment method and device, electronic equipment and readable storage medium Pending CN113159426A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110447452.4A CN113159426A (en) 2021-04-25 2021-04-25 Weather type similarity judgment method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110447452.4A CN113159426A (en) 2021-04-25 2021-04-25 Weather type similarity judgment method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113159426A true CN113159426A (en) 2021-07-23

Family

ID=76870542

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110447452.4A Pending CN113159426A (en) 2021-04-25 2021-04-25 Weather type similarity judgment method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN113159426A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115629431A (en) * 2022-12-22 2023-01-20 成都数之联科技股份有限公司 Water vapor content prediction method, device, equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508046A (en) * 2011-11-11 2012-06-20 广东电网公司深圳供电局 Real-time lightning stroke prewarning method and device for outdoor electric equipment
CN105469163A (en) * 2015-12-08 2016-04-06 国家电网公司 Similar day selection method used for photovoltaic power station power prediction
CN109389238A (en) * 2017-08-14 2019-02-26 中国电力科学研究院 A kind of short-term load forecasting method and device based on ridge regression
CN109978262A (en) * 2019-03-27 2019-07-05 新奥数能科技有限公司 The selection method and device of similar day for photovoltaic power prediction
CN110866630A (en) * 2019-09-27 2020-03-06 兰州大方电子有限责任公司 Historical similarity weather analysis method
CN111638564A (en) * 2020-05-27 2020-09-08 中国水利水电科学研究院 Rainfall forecasting method, device, equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508046A (en) * 2011-11-11 2012-06-20 广东电网公司深圳供电局 Real-time lightning stroke prewarning method and device for outdoor electric equipment
CN105469163A (en) * 2015-12-08 2016-04-06 国家电网公司 Similar day selection method used for photovoltaic power station power prediction
CN109389238A (en) * 2017-08-14 2019-02-26 中国电力科学研究院 A kind of short-term load forecasting method and device based on ridge regression
CN109978262A (en) * 2019-03-27 2019-07-05 新奥数能科技有限公司 The selection method and device of similar day for photovoltaic power prediction
CN110866630A (en) * 2019-09-27 2020-03-06 兰州大方电子有限责任公司 Historical similarity weather analysis method
CN111638564A (en) * 2020-05-27 2020-09-08 中国水利水电科学研究院 Rainfall forecasting method, device, equipment and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115629431A (en) * 2022-12-22 2023-01-20 成都数之联科技股份有限公司 Water vapor content prediction method, device, equipment and medium

Similar Documents

Publication Publication Date Title
US11488069B2 (en) Method for predicting air quality with aid of machine learning models
EP3794386B1 (en) Determination of location-specific weather information for agronomic decision support
CN110619605B (en) Parallel meteorological element downscaling method and device, electronic equipment and storage medium
CN109543907B (en) Complex terrain wind resource assessment method and device
Oesting et al. Spatial modeling of drought events using max-stable processes
CN106874602B (en) Meteorological data processing method and device
CN107247690B (en) Estimate the method and service terminal of temperature
CN113253364B (en) Method and device for correcting station wind speed forecast result
CN113204061A (en) Method and device for constructing lattice point wind speed correction model
CN110866630A (en) Historical similarity weather analysis method
CN114078213A (en) Farmland contour detection method and device based on generation of confrontation network
CN113159426A (en) Weather type similarity judgment method and device, electronic equipment and readable storage medium
Vandeskog et al. Quantile based modeling of diurnal temperature range with the five‐parameter lambda distribution
CN115877345A (en) Method and device for supplementing missing data of wind profile radar
CN115759291B (en) Spatial nonlinear regression method and system based on ensemble learning
CN113689526B (en) Method and device for dividing invalid area in map and electronic equipment
CN112699204B (en) Method and device for determining space matching window
CN114386294A (en) Typhoon environment model generation method and device
CN116050554A (en) Scenic spot passenger flow volume prediction method and device, computing equipment and storage medium
Lim et al. Independent component regression for seasonal climate prediction: an efficient way to improve multimodel ensembles
CN117251520B (en) Method and device for identifying biodiversity key region and electronic equipment
CN114898107B (en) Crack re-identification method and device
CN116306038B (en) Vertical layer matching method and device for meteorological mode and assimilation system
CN116128835B (en) Point cloud analysis-based power transmission wire sag measurement method, device and equipment
CN115964602B (en) Vortex scroll center identification method and device, storage medium and electronic equipment

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20210723

RJ01 Rejection of invention patent application after publication