CN111983729A - Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium - Google Patents

Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium Download PDF

Info

Publication number
CN111983729A
CN111983729A CN202010842345.7A CN202010842345A CN111983729A CN 111983729 A CN111983729 A CN 111983729A CN 202010842345 A CN202010842345 A CN 202010842345A CN 111983729 A CN111983729 A CN 111983729A
Authority
CN
China
Prior art keywords
weather phenomenon
current
weather
data
distance 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
CN202010842345.7A
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 CN202010842345.7A priority Critical patent/CN111983729A/en
Publication of CN111983729A publication Critical patent/CN111983729A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01WMETEOROLOGY
    • G01W1/00Meteorology
    • G01W1/10Devices for predicting weather conditions

Landscapes

  • Environmental & Geological Engineering (AREA)
  • Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Atmospheric Sciences (AREA)
  • Biodiversity & Conservation Biology (AREA)
  • Ecology (AREA)
  • Environmental Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for determining a weather phenomenon, a computer device, and a storage medium. The method comprises the following steps: acquiring current distance data between the current-time detection equipment and a reference object; generating characteristic data corresponding to the current distance data; predicting the weather phenomenon according to the characteristic data to generate an initial prediction result of the weather phenomenon corresponding to the current moment; and determining the current weather phenomenon based on the initial prediction result of the weather phenomenon. By adopting the method, the timeliness of data processing can be improved.

Description

Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for determining a weather phenomenon, a computer device, and a medium.
Background
Microclimate refers to the small-scale climatic features in the near-ground atmosphere and in the upper soil due to some structural features of the underlying surface, which are generally expressed in the numerical values of individual weather phenomena (such as wind, fog, frost, rime, etc.). The micro-meteorology is a magic one, and the change condition of the micro-meteorology cannot be analyzed by a human means basically, so that a new technology is required to be utilized to monitor the meteorological condition in real time, so that corresponding measures can be taken according to the micro-meteorology to avoid or solve the occurrence of accidents, and meanwhile, data support can be provided for meteorological prediction.
In a traditional mode, weather phenomena are monitored and identified by multiple means such as a lightning positioning system, a satellite cloud picture and a weather radar, but because the data of the satellite cloud picture and the weather radar are complex, a final identification result can be obtained only through a complex data processing flow, and therefore the weather phenomena are predicted to lack timeliness.
Disclosure of Invention
In view of the above, it is desirable to provide a weather phenomenon determination method, apparatus, computer device and medium capable of improving the timeliness of weather phenomenon prediction.
A weather phenomenon determination method, the method comprising:
acquiring current distance data between the current-time detection equipment and a reference object;
generating characteristic data corresponding to the current distance data;
predicting the weather phenomenon according to the characteristic data to generate an initial prediction result of the weather phenomenon corresponding to the current moment;
and determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
In one embodiment, generating feature data corresponding to the current distance data includes:
obtaining a plurality of historical distance data of a first number of historical moments before the current moment;
and generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data.
In one embodiment, generating feature data corresponding to current distance data based on a plurality of historical distance data and the current distance data includes:
and determining the average value and the variance of the plurality of historical distance data and the current distance data, and taking the determined average value and variance as the characteristic data corresponding to the current distance data.
In one embodiment, determining the current weather phenomenon before the initial prediction result of the weather phenomenon further includes:
obtaining initial prediction results of weather phenomena at a second number of historical moments before the current moment;
determining a current weather phenomenon based on the initial prediction result of the weather phenomenon, including:
and determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical moments and the initial prediction results of the weather phenomena at the current moment.
In one embodiment, determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical moments and the initial prediction results of the weather phenomena at the current moment includes:
determining the number of the initial weather phenomenon prediction results at the current moment in the initial weather phenomenon prediction results at the second number of historical moments, wherein the initial weather phenomenon prediction results are the number of target weather phenomenon prediction results;
judging whether the number is greater than or equal to a preset threshold value;
when the number is larger than or equal to a preset threshold value, determining that the weather phenomenon at the current moment is a target weather phenomenon;
and when the number is smaller than the preset threshold value, determining that the weather phenomenon at the current moment is a non-target weather phenomenon.
In one embodiment, the weather phenomenon prediction is performed according to the feature data, and the generation of the initial prediction result of the weather phenomenon corresponding to the current time is performed by a pre-trained prediction model, wherein the training mode of the prediction model comprises the following steps:
acquiring distance sample data between the detection equipment and a reference object;
preprocessing the distance sample data to obtain sample characteristic data, and labeling the preprocessed sample characteristic data to obtain labeled sample characteristic data;
inputting the marked sample characteristic data into the constructed initial prediction model, and outputting a corresponding initial prediction result through the initial prediction model;
determining a loss value of the initial prediction model according to the initial prediction result and the label, and updating model parameters of the initial prediction model through the loss value;
and continuing to train the initial prediction model based on the updated model parameters until a trained prediction model is obtained.
A weather phenomenon determination system, comprising: the system comprises a reference object, detection equipment and a server, wherein the detection equipment is spaced from the reference object by a preset distance;
the detection equipment is used for detecting distance data between the detection equipment and a reference object and transmitting the detected distance data to the server;
the server is configured to perform the steps of the method according to any of the above embodiments.
A weather phenomenon determination apparatus, the apparatus comprising:
the current distance data acquisition module is used for acquiring current distance data between the detection equipment and the reference object at the current moment;
the characteristic data generating module is used for generating characteristic data corresponding to the current distance data;
the initial prediction result generation module is used for predicting the weather phenomenon according to the characteristic data and generating an initial prediction result of the weather phenomenon corresponding to the current moment;
and the weather phenomenon determining module is used for determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
A computer device comprising a memory storing a computer program and a processor implementing the steps of any of the methods described above when the processor executes the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of any of the above.
According to the weather phenomenon determination method, the weather phenomenon determination device, the computer equipment and the storage medium, the current distance data between the detection equipment at the current moment and the reference object is obtained, then the characteristic data corresponding to the current distance data is generated based on the obtained current distance data, the weather phenomenon prediction is further carried out according to the characteristic data, the initial prediction result of the weather phenomenon corresponding to the current moment is generated, and the current weather phenomenon is determined based on the initial prediction result of the weather phenomenon. Therefore, the current weather phenomenon can be predicted according to the current distance data between the detection device and the reference object at the current moment, and compared with the weather prediction of satellite cloud pictures and weather radar data, the distance data between the detection device and the reference object is simple, the data processing time for recognizing and predicting can be shortened, and the timeliness of weather phenomenon prediction can be improved.
Drawings
FIG. 1 is a diagram of an application scenario of a weather phenomenon determination method in one embodiment;
FIG. 2 is a schematic flow chart diagram of a weather phenomenon determination method in one embodiment;
FIG. 3 is a flow diagram illustrating the steps of determining a current weather phenomenon in one embodiment;
FIG. 4 is a schematic flow chart diagram illustrating the predictive model training steps in one embodiment;
FIG. 5 is a block diagram showing the structure of a weather phenomenon determination apparatus according to an embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The weather phenomenon determination method provided by the application can be applied to the application environment shown in fig. 1. The detection device 102 communicates with the server 104 through a network, for example, through a network connection line, or through a wireless network. The detection device 102 is installed at a preset distance position of the reference object 106, and collects distance data between the detection device and the reference object 106 in real time and transmits the distance data to the server 104. After the server 104 acquires the current distance data between the current time detection device 102 and the reference object 106, feature data corresponding to the current distance data may be generated based on the current distance data. Further, the server 104 may perform weather phenomenon prediction according to the feature data to generate an initial prediction result of the weather phenomenon corresponding to the current time, and then the server 104 determines the current weather phenomenon based on the initial prediction result of the weather phenomenon. The detection device 102 may be a sensor or other device of various types and capable of detecting distance data in real time and sending the distance data, the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers, and the reference object 106 may be a partition or a wall, which is not limited to this.
In one embodiment, as shown in fig. 2, a weather phenomenon determination method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
step S202, current distance data between the current time detection device and the reference object is acquired.
The weather phenomenon refers to an abnormal weather phenomenon such as raining, snowing or hail, or a normal weather phenomenon, such as sunny, cloudy or cloudy weather.
The detection device is a device for collecting distance data, and can be various types of distance detection devices, for example, a laser range finder.
The reference object is an object used for the detection device to acquire distance data as reference, and can be installed on a plate at a preset distance from the detection device, or a wall at a preset distance from the detection device, and the like.
The preset distance refers to a distance position between the detection device and the reference object, and may be different according to different application scenarios, for example, in one embodiment, the preset distance may be 2 meters.
In this embodiment, the detection device may be installed at a preset distance from the reference object, taking the detection device as a laser range finder as an example, and the laser emitted by the laser range finder is perpendicular to the reference object.
The current distance data is the distance between the detection device and the reference object, the distance is acquired by the detection device, when no obstacle exists between the detection device and the reference object, the current distance data is the preset distance between the detection device and the reference object, and when an obstacle exists between the detection device and the reference object, the current distance data is the distance between the detection device and the reference object. For example, when the current weather is rainy, the current distance data acquired by the detection device refers to the distance between the current acquisition device and a rain point falling between the detection device and the reference object; when the current weather is hail weather, the current distance data acquired by the detection equipment refers to the distance of hail falling between the acquisition equipment at the current moment and the detection equipment and a reference object; similarly, snowing is similar; when the current weather is normal weather, i.e., non-rainy, non-snowy, and non-hail, the current distance data collected by the detection device refers to a distance between the detection device and the reference object.
In this embodiment, the detection device may collect current distance data between the detection device and the reference object at preset time intervals, for example, once every 5 seconds, and send the current distance data to the server in real time, so that the server performs subsequent processing.
Step S204, generating characteristic data corresponding to the current distance data.
The feature data refers to data obtained by preprocessing current distance data, and may be, for example, a pair of average value and variance data.
In this embodiment, the server may process the acquired current distance data according to a preset time interval to generate feature data corresponding to the current distance data.
And step S206, forecasting the weather phenomenon according to the characteristic data, and generating an initial forecasting result of the weather phenomenon corresponding to the current moment.
For example, the initial prediction result of the weather phenomenon may be a probability value, when the probability value is greater than or equal to a preset probability threshold, it may be determined that the weather at the current moment is rainy or hail or snowy, and when the probability value is less than the preset probability threshold, it may be determined that the weather at the current moment is normal, such as sunny weather, cloudy weather, and so on.
In this embodiment, after generating the feature data corresponding to the current distance data, the server performs weather phenomenon prediction through the prediction model to generate a weather phenomenon prediction result corresponding to the current time.
And step S208, determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
In this embodiment, the server may determine that the current weather is an abnormal weather phenomenon such as rain, snow, hail, or the like, or a normal weather phenomenon according to the obtained initial prediction result of the weather phenomenon.
In the weather phenomenon determination method, the current distance data between the current-time detection device and the reference object is acquired, the feature data corresponding to the current distance data is generated based on the acquired current distance data, the weather phenomenon is further predicted according to the feature data, an initial prediction result of the weather phenomenon corresponding to the current time is generated, and the current weather phenomenon is determined based on the initial prediction result of the weather phenomenon. Therefore, the current weather phenomenon can be predicted according to the current distance data between the detection device and the reference object at the current moment, and compared with the weather prediction of satellite cloud pictures and weather radar data, the distance data between the detection device and the reference object is simple, the data processing time for recognizing and predicting can be shortened, and the timeliness of weather phenomenon prediction can be improved. In addition, because the distance data is data between the detection equipment and the reference object, the detection equipment is only equipment for acquiring the distance data, and compared with the method for acquiring satellite cloud pictures and weather radar data, the scheme does not need to erect large-scale detection equipment, and can reduce the consumption of manpower and material resources.
In one embodiment, generating feature data corresponding to the current distance data may include: obtaining a plurality of historical distance data of a first number of historical moments before the current moment; and generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data.
The first number of historical time points refers to a plurality of time points at which distance data are collected within a preset time period before the current time point, for example, a plurality of time points at which historical data are collected within 5 minutes before the current time point. As described above, the server does not collect the distance data once in 5 seconds, and the plurality of historical distance data at the plurality of historical time points is 59 historical distance data before the current distance data.
In this embodiment, after acquiring the current distance data and a plurality of historical distance data at a plurality of historical times before the current time, the server may generate feature data corresponding to the current distance data based on the current distance data and the plurality of historical distance data.
In one embodiment, generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data may include: and determining the average value and the variance of the plurality of historical distance data and the current distance data, and taking the determined average value and variance as the characteristic data corresponding to the current distance data.
With the previous example, after the server obtains 59 pieces of historical distance data and current distance data at the current time, an average value of the historical distance data and the current distance data may be calculated through an average value formula, where the average value calculation formula is shown in formula (1).
Figure BDA0002641892660000071
Wherein d is0~d58May refer to 59 historical distance data, d59Is the current distance data, X, of the current time1Means an average value.
Further, the server may calculate the variance of the plurality of historical distance data and the current distance data by a variance calculation formula, which is shown in formula (2).
Figure BDA0002641892660000072
Wherein, X2Refers to the variance.
In this embodiment, the server obtains the average value X corresponding to the current time1And a methodDifference X2Then, a feature vector X ═ (X) may be generated1,X2) Then, weather phenomenon prediction is performed based on the feature vector X.
In the embodiment, by acquiring a plurality of historical time data of a plurality of times before the current time and calculating the feature data, the obtained feature data corresponding to the current distance data can be combined with information of the plurality of historical distance data, and the accuracy of subsequent prediction based on the feature data can be improved.
In one embodiment, determining the current weather phenomenon before determining the current weather phenomenon based on the initial prediction result of the weather phenomenon may further include: and obtaining initial prediction results of each weather phenomenon at a second number of historical moments before the current moment.
The second number of historical moments refers to a plurality of collection moments before the current moment, and taking the above as an example, the server collects distance data every 5 seconds, and the second number of historical moments refers to a plurality of moments every 5 seconds before the current moment. In the present embodiment, the second number of history times may be 2.
In this embodiment, after obtaining the initial prediction result of the weather phenomenon at the current time, the server may obtain, according to a second predetermined number, the initial prediction results of the weather objects at each time corresponding to a second number of historical times before the current time from the database.
In this embodiment, the determining, by the server, the current weather phenomenon based on the initial weather phenomenon prediction result may include: and determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical moments and the initial prediction results of the weather phenomena at the current moment.
Specifically, the server may determine the current weather phenomenon according to the predicted initial weather phenomenon prediction result at the current time and the initial weather phenomenon prediction results at the second number of historical times.
In one embodiment, referring to fig. 3, determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical time instants and the initial prediction result of the weather phenomenon at the current time instant may include:
step S302, determining the number of the initial weather phenomenon prediction results of the second number of the initial weather phenomenon prediction results at the historical time and the current time, wherein the initial weather phenomenon prediction results are the number of the target weather phenomenon prediction results.
The target weather phenomenon prediction result refers to a weather phenomenon initial prediction result that is a prediction result of the target weather phenomenon, for example, the target weather phenomenon is hail, and the target weather phenomenon prediction result refers to a weather phenomenon initial prediction result that is hail.
In this embodiment, after obtaining the initial prediction results of the weather phenomena corresponding to the second number of historical times before the current time and the initial prediction results of the weather phenomena at the current time, the server may count the number of the initial prediction results of the weather phenomena as the target weather phenomenon prediction results.
In step S304, it is determined whether the number is greater than or equal to a preset threshold.
In this embodiment, when the number of the target weather phenomenon prediction results is used to determine the weather phenomenon at the current time, the preset threshold for determination may also be determined according to the second number. For example, the preset threshold may be half of the second number plus 1, and when the second number is not an integer, the integer value is obtained by a further method, for example, when the second number is 2, the preset threshold may be 2, when the second number is 3, the preset threshold may be 3, when the second number is 4, the preset threshold may be 3, and similarly, when the second number is 10, the preset threshold may be 6.
In this embodiment, the number of the initial weather phenomenon prediction results that are the target weather phenomenon prediction results may be compared with a preset threshold value for determination.
And S306, when the number is larger than or equal to the preset threshold value, determining the weather phenomenon at the current moment as the target weather phenomenon.
Specifically, when the number of the weather phenomenon initial prediction results is greater than or equal to the preset threshold, the server may determine that the weather phenomenon at the current moment is the target weather phenomenon, for example, hail weather, rain weather, or snow weather.
Step S308, when the number is smaller than the preset threshold value, determining that the weather phenomenon at the current moment is a non-target weather phenomenon.
Specifically, when the initial prediction result of the weather phenomenon is that the number of the target weather phenomenon prediction results is smaller than the preset threshold, the server may determine that the weather phenomenon at the current moment is a non-target weather phenomenon, for example, normal weather such as rainy days, sunny days, cloudy days, or cloudy days.
In this embodiment, the server may also determine that the initial weather phenomenon prediction result is the number of the target weather phenomenon prediction results according to the number of the second number of initial weather phenomenon prediction results at the historical time and the number of the total initial weather phenomenon prediction results in the current time, where the initial weather phenomenon prediction result is the number of the target weather phenomenon prediction results, for example, according to the number of the target weather phenomenon prediction results compared with the total number of the initial weather phenomenon prediction results.
In the present embodiment, when the weather phenomenon is determined according to the specific gravity, the preset threshold may be a preset percentage, for example, an empirical value such as 0.7 or 0.8. And then judging the weather phenomenon at the current moment based on the specific gravity and a preset threshold value.
In the above embodiment, by obtaining the initial prediction results of the weather phenomena corresponding to the second number of historical moments before the current moment, determining the initial prediction results of the weather phenomena corresponding to the second number of historical moments and the initial prediction results of the weather phenomena at the current moment, where the initial prediction results of the weather phenomena are the number of the target weather phenomena, and performing threshold value determination, the occurrence of a misjudgment phenomenon caused by a single prediction result can be avoided, and the accuracy of weather prediction can be improved.
In one embodiment, the weather phenomenon prediction is performed according to the feature data, and the generation of the initial prediction result of the weather phenomenon corresponding to the current time is performed by using a pre-trained prediction model, and referring to fig. 4, the training mode of the prediction model may include:
step S402, obtaining distance sample data between the detection device and the reference object.
Specifically, the collection device may collect a plurality of distance data and transmit the distance data to the server as distance sample data for training the prediction model.
And S404, preprocessing the distance sample data to obtain sample characteristic data, and labeling the preprocessed sample characteristic data to obtain labeled sample characteristic data.
In this embodiment, after obtaining a plurality of sample data, the server may pre-process the sample data, for example, as described above, obtain a plurality of sample feature data by averaging and calculating a variance from the distance sample data of 60 adjacent collection times.
Further, the server marks the plurality of sample feature data respectively, for example, when the weather phenomenon corresponding to the moment is a target weather phenomenon, the weather phenomenon is marked as the target weather phenomenon, and when the weather phenomenon corresponding to the moment is a non-target weather phenomenon, the weather phenomenon is marked as the non-target weather phenomenon, so that the marked data is obtained. Specifically, the target weather phenomenon may be labeled as 1, and the non-target weather phenomenon may be labeled as 0.
Step S406, inputting the labeled sample characteristic data into the constructed initial prediction model, and outputting a corresponding initial prediction result through the initial prediction model.
In this embodiment, the server may build an initial predictive model. The initial prediction model may be a prediction function of a logistic regression algorithm, and the functional expression is as shown in formula (3).
Figure BDA0002641892660000101
Wherein, the predicted value hθ(X) is a value indicating that when X is input, that is, characteristic data (X) is input1,x2) When the probability of type 1 is output, i.e. the target day is outputProbability of gas phenomenon. Therefore, for input X, the probability that the output result is 1 is shown in equation (4), and the probability that the output result is 0 is shown in equation (5).
P(y=1/X;θ)=hθ(X) (4)
P(y=0/X;θ)=1-hθ(X) (5)
Wherein y denotes the annotation type.
Therefore, for sample data, the observation probability thereof is as shown in the following equation (6).
P(y/X;θ)=(hθ(X))y(1-hθ(X))1-y (6)
With respect to the formula (6), the above formula (5) is obtained when y is equal to 0, and the above formula (4) is obtained when y is equal to 1.
In this embodiment, the server may input the labeled distance sample data into the constructed initial prediction model, and output a corresponding initial prediction result.
And step S408, determining a loss value of the initial prediction model according to the initial prediction result and the label, and updating the model parameter of the initial prediction model through the loss value.
Specifically, the server may calculate a loss value of the model according to the initial prediction result of the model and the label of the sample feature data obtained from the distance sample data, for example, the loss value may be an L1 loss function or an L2 loss function.
Further, the server updates the model parameters of the initial prediction model according to the loss value, and continues training.
And step S410, continuing to train the initial prediction model based on the updated model parameters until a trained prediction model is obtained.
Following the previous example, for n mutually independent sample data, the joint probability is shown in equation (7).
Figure BDA0002641892660000111
For equation (7), this may also be referred to as a likelihood function of n observation probabilities.
Further, by logarithm calculation of the above equation (7), the following equation (8) can be obtained.
l(θ)=logL(θ)=∑yiloghθ(Xi)+(1-yi)log(1-hθ(Xi)) (8)
In this embodiment, the model is trained, which aims to train parameters of the model, so that the model can obtain an output result corresponding to the input data, for example, the input data is data of a target weather phenomenon, the output result should indicate that the input data is the target weather phenomenon, that is, the output probability should be greater than or equal to a preset threshold, and the output result should indicate that the input data is 1.
In this embodiment, the server may train the model by using a gradient ascent method, i.e., the server continuously iterates the parameter θ in the model1、θ2、θ3Until the value of l (theta) is maximized, at which time the parameter theta1、θ2、θ3The parameters for model training completion are extreme.
In the above embodiment, the accuracy of the initial prediction result of the weather phenomenon can be improved by training the prediction model and predicting the weather phenomenon after the training is completed to generate the initial prediction result of the weather phenomenon corresponding to the current moment, so that the accuracy of the determination of the weather phenomenon can be improved.
It should be understood that although the various steps in the flow charts of fig. 2-4 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-4 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 5, there is provided a weather phenomenon determination apparatus including: a current distance data acquisition module 100, a feature data generation module 200, an initial prediction result generation module 300, and a weather phenomenon determination module 400, wherein:
a current distance data obtaining module 100, configured to obtain current distance data between the detection device and the reference object at the current time.
And a feature data generating module 200, configured to generate feature data corresponding to the current distance data.
And an initial prediction result generation module 300, configured to perform weather phenomenon prediction according to the feature data, and generate an initial prediction result of the weather phenomenon corresponding to the current time.
And a weather phenomenon determination module 400, configured to determine a current weather phenomenon based on the initial prediction result of the weather phenomenon.
In one embodiment, the feature data generation module 200 may include:
the historical distance data acquisition submodule is used for acquiring a plurality of historical distance data of a first number of historical moments before the current moment.
And the characteristic data generation submodule is used for generating characteristic data corresponding to the current distance data based on the plurality of historical distance data and the current distance data.
In one embodiment, the feature data generation submodule is configured to determine a mean and a variance of the plurality of historical distance data and the current distance data, and use the determined mean and variance as feature data corresponding to the current distance data.
In one embodiment, the apparatus may further include:
and a historical initial prediction result obtaining module, configured to, based on the initial weather phenomenon prediction result, obtain, by the weather phenomenon determining module 400, a second number of initial weather phenomenon prediction results at the historical time before the current time before determining the current weather phenomenon.
In this embodiment, the weather phenomenon determination module 400 is configured to determine the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical times and the initial prediction result of the weather phenomenon at the current time.
In one embodiment, the weather phenomenon determination module 400 may include:
and the specific gravity determining submodule is used for determining the number of the initial weather phenomenon prediction results of the second number of historical moments and the number of the target weather phenomenon prediction results in the initial weather phenomenon prediction results of the current moment.
And the judgment submodule is used for judging whether the number is greater than or equal to a preset threshold value.
And the first weather phenomenon determining submodule is used for determining the weather phenomenon at the current moment as the target weather phenomenon when the number is greater than or equal to the preset threshold value.
And the second weather phenomenon determining submodule is used for determining the weather phenomenon at the current moment as a non-target weather phenomenon when the number is smaller than the preset threshold value.
In one embodiment, the initial prediction result generation module 300 performs weather phenomenon prediction according to the feature data, and the generation of the initial prediction result of the weather phenomenon corresponding to the current time is performed by using a pre-trained prediction model.
In this embodiment, the apparatus may further include:
and the model training module is used for training the prediction model.
In this embodiment, the model training module may include:
and the sample data acquisition submodule is used for acquiring distance sample data between the detection equipment and the reference object.
And the preprocessing and labeling submodule is used for preprocessing the distance sample data to obtain sample characteristic data, and labeling the preprocessed sample characteristic data to obtain labeled sample characteristic data.
And the initial prediction result generation submodule is used for inputting the marked sample characteristic data into the constructed initial prediction model and outputting a corresponding initial prediction result through the initial prediction model.
The loss calculation and parameter updating submodule is used for determining a loss value of the initial prediction model according to the initial prediction result and the label and updating the model parameters of the initial prediction model through the loss value;
and the iterative training submodule is used for continuing training the initial prediction model based on the updated model parameters until a trained prediction model is obtained.
For specific definition of the weather phenomenon determination device, see the above definition of the weather phenomenon determination method, which is not described herein again. The respective modules in the weather phenomenon determination apparatus described above may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a weather phenomenon determination system is provided, and referring to fig. 1, may include: a reference object 106, a detection device 102 spaced a preset distance from the reference object 106, and a server 104 connected to the detection device 102.
The preset distance refers to a preset separation distance, and may be an empirical value, for example, 2 meters.
In this embodiment, the reference object is an object for the detection device to acquire distance data as a reference, and may be installed on a board at a preset distance from the detection device, or a wall surface at a preset distance from the detection device.
In the embodiment, the detection device is used for detecting distance data between the detection device and the reference object and transmitting the detected distance data to the server; the server is configured to perform the steps of the method according to any of the above embodiments.
Specifically, the detection device detects distance data of an obstacle to the reference object, for example, when rain is present, the detection device detects distance data of raindrops to the reference object, and when hail is present, the detection device detects distance data of hail to the reference object.
In this embodiment, the detection device is connected to the server through a wireless network or a wired network, and the detection device transmits the detected distance data to the server in real time through the network.
In this embodiment, after the server obtains the distance data, the server performs weather prediction by the above method, and specific contents may refer to the foregoing description, which is not described herein again.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used for storing data such as current distance data, characteristic data and initial prediction results of weather phenomena. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a weather phenomenon determination method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: acquiring current distance data between the current-time detection equipment and a reference object; generating characteristic data corresponding to the current distance data; predicting the weather phenomenon according to the characteristic data to generate an initial prediction result of the weather phenomenon corresponding to the current moment; and determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
In one embodiment, the processor, when executing the computer program, generates feature data corresponding to the current distance data, and may include: obtaining a plurality of historical distance data of a first number of historical moments before the current moment; and generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data.
In one embodiment, the processor, when executing the computer program, generates feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data, and may include: and determining the average value and the variance of the plurality of historical distance data and the current distance data, and taking the determined average value and variance as the characteristic data corresponding to the current distance data.
In one embodiment, the processor, when executing the computer program, may further perform the following steps before determining the current weather phenomenon based on the initial prediction result of the weather phenomenon: and obtaining initial prediction results of each weather phenomenon at a second number of historical moments before the current moment.
In this embodiment, the determining the current weather phenomenon based on the initial prediction result of the weather phenomenon when the processor executes the computer program may include: and determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical moments and the initial prediction results of the weather phenomena at the current moment.
In one embodiment, the determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical time instants and the initial prediction result of the weather phenomenon at the current time instant by the processor when the processor executes the computer program may include: determining the number of the initial weather phenomenon prediction results at the current moment in the initial weather phenomenon prediction results at the second number of historical moments, wherein the initial weather phenomenon prediction results are the number of target weather phenomenon prediction results; judging whether the number is greater than or equal to a preset threshold value; when the number is larger than or equal to a preset threshold value, determining that the weather phenomenon at the current moment is a target weather phenomenon; and when the number is smaller than the preset threshold value, determining that the weather phenomenon at the current moment is a non-target weather phenomenon.
In one embodiment, when the processor executes the computer program, the weather phenomenon prediction is performed according to the feature data, and the generation of the initial prediction result of the weather phenomenon corresponding to the current time is performed by using a pre-trained prediction model, where the training mode of the prediction model may include: acquiring distance sample data between the detection equipment and a reference object; preprocessing the distance sample data to obtain sample characteristic data, and labeling the preprocessed sample characteristic data to obtain labeled sample characteristic data; inputting the marked sample characteristic data into the constructed initial prediction model, and outputting a corresponding initial prediction result through the initial prediction model; determining a loss value of the initial prediction model according to the initial prediction result and the label, and updating model parameters of the initial prediction model through the loss value; and continuing to train the initial prediction model based on the updated model parameters until a trained prediction model is obtained.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring current distance data between the current-time detection equipment and a reference object; generating characteristic data corresponding to the current distance data; predicting the weather phenomenon according to the characteristic data to generate an initial prediction result of the weather phenomenon corresponding to the current moment; and determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
In one embodiment, the computer program when executed by the processor performs generating feature data corresponding to current distance data may include: obtaining a plurality of historical distance data of a first number of historical moments before the current moment; and generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data.
In one embodiment, the computer program when executed by the processor for generating feature data corresponding to current distance data based on a plurality of historical distance data and the current distance data may include: and determining the average value and the variance of the plurality of historical distance data and the current distance data, and taking the determined average value and variance as the characteristic data corresponding to the current distance data.
In one embodiment, the computer program when executed by the processor performs the following steps before determining a current weather phenomenon based on an initial prediction result of the weather phenomenon: and obtaining initial prediction results of each weather phenomenon at a second number of historical moments before the current moment.
In this embodiment, the determining the current weather phenomenon based on the initial prediction result of the weather phenomenon by the computer program when executed by the processor may include: and determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical moments and the initial prediction results of the weather phenomena at the current moment.
In one embodiment, the computer program, when executed by the processor, implements determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical time instants and the initial prediction result of the weather phenomenon at the current time instant, and may include: determining the number of the initial weather phenomenon prediction results at the current moment in the initial weather phenomenon prediction results at the second number of historical moments, wherein the initial weather phenomenon prediction results are the number of target weather phenomenon prediction results; judging whether the number is greater than or equal to a preset threshold value; when the number is larger than or equal to a preset threshold value, determining that the weather phenomenon at the current moment is a target weather phenomenon; and when the number is smaller than the preset threshold value, determining that the weather phenomenon at the current moment is a non-target weather phenomenon.
In one embodiment, the computer program, when executed by the processor, implements weather phenomenon prediction according to the feature data, and the generating of the initial prediction result of the weather phenomenon corresponding to the current time is performed by a pre-trained prediction model, where the training mode of the prediction model may include: acquiring distance sample data between the detection equipment and a reference object; preprocessing the distance sample data to obtain sample characteristic data, and labeling the preprocessed sample characteristic data to obtain labeled sample characteristic data; inputting the marked sample characteristic data into the constructed initial prediction model, and outputting a corresponding initial prediction result through the initial prediction model; determining a loss value of the initial prediction model according to the initial prediction result and the label, and updating model parameters of the initial prediction model through the loss value; and continuing to train the initial prediction model based on the updated model parameters until a trained prediction model is obtained.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A weather phenomenon determination method, characterized in that the method comprises:
acquiring current distance data between the current-time detection equipment and a reference object;
generating characteristic data corresponding to the current distance data;
predicting the weather phenomenon according to the characteristic data to generate an initial prediction result of the weather phenomenon corresponding to the current moment;
and determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
2. The method of claim 1, wherein generating feature data corresponding to the current distance data comprises:
obtaining a plurality of historical distance data of a first number of historical moments before the current moment;
generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data.
3. The method of claim 2, wherein generating feature data corresponding to the current distance data based on the plurality of historical distance data and the current distance data comprises:
and determining the average value and the variance of the plurality of historical distance data and the current distance data, and taking the determined average value and variance as the characteristic data corresponding to the current distance data.
4. The method of claim 1, wherein determining the current weather phenomenon is preceded by determining the current weather phenomenon based on the initial prediction of the weather phenomenon, further comprising:
obtaining initial prediction results of weather phenomena at a second number of historical moments before the current moment;
determining a current weather phenomenon based on the initial weather phenomenon prediction result comprises:
and determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical moments and the initial prediction results of the weather phenomena at the current moment.
5. The method of claim 4, wherein determining the current weather phenomenon according to the initial prediction results of the weather phenomena at the second number of historical time instants and the initial prediction result of the weather phenomenon at the current time instant comprises:
determining the number of the initial weather phenomenon prediction results at the current moment in the initial weather phenomenon prediction results at the second number of historical moments and the initial weather phenomenon prediction results at the current moment, wherein the initial weather phenomenon prediction results are the number of target weather phenomenon prediction results;
judging whether the number is greater than or equal to a preset threshold value;
when the number is equal to or greater than the preset threshold, determining that the weather phenomenon at the current moment is a target weather phenomenon;
and when the number is smaller than the preset threshold value, determining that the weather phenomenon at the current moment is a non-target weather phenomenon.
6. The method of claim 1, wherein the predicting the weather phenomenon according to the feature data and the generating the initial prediction result of the weather phenomenon corresponding to the current time are performed by a pre-trained prediction model, and the training mode of the prediction model comprises:
acquiring distance sample data between the detection equipment and a reference object;
preprocessing the distance sample data to obtain sample characteristic data, and labeling the preprocessed sample characteristic data to obtain labeled sample characteristic data;
inputting the marked sample characteristic data into the constructed initial prediction model, and outputting a corresponding initial prediction result through the initial prediction model;
determining a loss value of the initial prediction model according to the initial prediction result and the label, and updating model parameters of the initial prediction model according to the loss value;
and continuing to train the initial prediction model based on the updated model parameters until a trained prediction model is obtained.
7. A weather phenomenon determination system, comprising: the system comprises a reference object, detection equipment and a server, wherein the detection equipment is spaced from the reference object by a preset distance;
the detection equipment is used for detecting distance data between the detection equipment and the reference object and transmitting the detected distance data to the server;
the server is adapted to perform the steps of the method of any of claims 1 to 6.
8. A weather phenomenon determination apparatus, characterized in that the apparatus comprises:
the current distance data acquisition module is used for acquiring current distance data between the detection equipment and the reference object at the current moment;
the characteristic data generating module is used for generating characteristic data corresponding to the current distance data;
the initial prediction result generation module is used for predicting the weather phenomenon according to the characteristic data and generating an initial prediction result of the weather phenomenon corresponding to the current moment;
and the weather phenomenon determining module is used for determining the current weather phenomenon based on the initial prediction result of the weather phenomenon.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN202010842345.7A 2020-08-20 2020-08-20 Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium Pending CN111983729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010842345.7A CN111983729A (en) 2020-08-20 2020-08-20 Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010842345.7A CN111983729A (en) 2020-08-20 2020-08-20 Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium

Publications (1)

Publication Number Publication Date
CN111983729A true CN111983729A (en) 2020-11-24

Family

ID=73443406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010842345.7A Pending CN111983729A (en) 2020-08-20 2020-08-20 Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium

Country Status (1)

Country Link
CN (1) CN111983729A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110961A (en) * 2021-04-30 2021-07-13 平安国际融资租赁有限公司 Equipment abnormality detection method and device, computer equipment and readable storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007256183A (en) * 2006-03-24 2007-10-04 Tokyo Electric Power Co Inc:The Forecasting system for occurrence of disaster due to typhoon
CN104020510A (en) * 2014-06-23 2014-09-03 中国联合网络通信集团有限公司 Meteorological analysis method and device
CN106291764A (en) * 2016-08-12 2017-01-04 华南师范大学 Based on big data and the method for meteorological forecast of meteorologic analysis field and system
CN107238874A (en) * 2017-05-25 2017-10-10 苏州工业职业技术学院 Based on when scape photo real-time weather detection method and system
CN107703564A (en) * 2017-10-13 2018-02-16 中国科学院深圳先进技术研究院 A kind of precipitation predicting method, system and electronic equipment
CN109031472A (en) * 2017-06-09 2018-12-18 阿里巴巴集团控股有限公司 A kind of data processing method and device for weather prognosis
CN110045441A (en) * 2019-06-04 2019-07-23 北京航天宏图信息技术股份有限公司 Synoptic analysis method and device based on radar echo map
CN111159640A (en) * 2019-11-20 2020-05-15 北京玖天气象科技有限公司 Small rain emptying method, system, electronic equipment and storage medium suitable for grid forecast
CN111242372A (en) * 2020-01-10 2020-06-05 上海眼控科技股份有限公司 Weather radar echo map prediction method and device, computer equipment and storage medium
CN111538112A (en) * 2020-05-07 2020-08-14 上海眼控科技股份有限公司 Precipitation type detection method, system, device, computer equipment and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007256183A (en) * 2006-03-24 2007-10-04 Tokyo Electric Power Co Inc:The Forecasting system for occurrence of disaster due to typhoon
CN104020510A (en) * 2014-06-23 2014-09-03 中国联合网络通信集团有限公司 Meteorological analysis method and device
CN106291764A (en) * 2016-08-12 2017-01-04 华南师范大学 Based on big data and the method for meteorological forecast of meteorologic analysis field and system
CN107238874A (en) * 2017-05-25 2017-10-10 苏州工业职业技术学院 Based on when scape photo real-time weather detection method and system
CN109031472A (en) * 2017-06-09 2018-12-18 阿里巴巴集团控股有限公司 A kind of data processing method and device for weather prognosis
CN107703564A (en) * 2017-10-13 2018-02-16 中国科学院深圳先进技术研究院 A kind of precipitation predicting method, system and electronic equipment
CN110045441A (en) * 2019-06-04 2019-07-23 北京航天宏图信息技术股份有限公司 Synoptic analysis method and device based on radar echo map
CN111159640A (en) * 2019-11-20 2020-05-15 北京玖天气象科技有限公司 Small rain emptying method, system, electronic equipment and storage medium suitable for grid forecast
CN111242372A (en) * 2020-01-10 2020-06-05 上海眼控科技股份有限公司 Weather radar echo map prediction method and device, computer equipment and storage medium
CN111538112A (en) * 2020-05-07 2020-08-14 上海眼控科技股份有限公司 Precipitation type detection method, system, device, computer equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113110961A (en) * 2021-04-30 2021-07-13 平安国际融资租赁有限公司 Equipment abnormality detection method and device, computer equipment and readable storage medium
CN113110961B (en) * 2021-04-30 2022-10-21 平安国际融资租赁有限公司 Equipment abnormality detection method and device, computer equipment and readable storage medium

Similar Documents

Publication Publication Date Title
US11333796B2 (en) Spatial autocorrelation machine learning-based downscaling method and system of satellite precipitation data
US12050994B2 (en) Systems, methods, and computer readable media for predictive analytics and change detection from remotely sensed imagery
CN113496104B (en) Precipitation prediction correction method and system based on deep learning
US12056936B2 (en) Model generating apparatus, method and program, and prediction apparatus
US11353625B1 (en) Systems and methods for forecasting lightning and severe storms
US8670782B2 (en) Systems and methods for analyzing spatiotemporally ambiguous events
CN110456026B (en) Soil moisture content monitoring method and device
US20170140077A1 (en) Method for assessing efficiency of power generation systems
CN114868043B (en) Method, apparatus, system and computer program product for estimating road surface temperature
CN112697134A (en) Environment sensing method, system and equipment of indoor inspection robot and computer readable storage medium thereof
CN111047088A (en) Prediction image acquisition method and device, computer equipment and storage medium
CN113962465A (en) Precipitation forecasting method, equipment, device and storage medium
CN111291903A (en) Precipitation amount estimation method and device, computer equipment and readable storage medium
Mahrooghy et al. On the use of the genetic algorithm filter-based feature selection technique for satellite precipitation estimation
CN111983729A (en) Weather phenomenon determination method, weather phenomenon determination device, computer equipment and medium
US20220101273A1 (en) Methods and systems for forecasting estimated time of restoration during service interruption
CN114594532A (en) Method and device for predicting cold weather, electronic equipment and computer readable medium
CN112683916A (en) Method and device for identifying missing or mounting error of small hardware fittings of current collecting line tower
CN116736409A (en) Automobile safety early warning method, device, equipment and storage medium
CN116704366A (en) Storm drop zone identification early warning method and device based on transform deep learning model
Karna et al. Temperature Prediction using Regression Model
Rossi et al. Real-time hazard approximation of long-lasting convective storms using emergency data
CN113253275B (en) Rainfall estimation method based on improved RBF neural network
CN115600498A (en) Wind speed forecast correction method based on artificial neural network
CN115169592A (en) Visibility prediction method, device, storage medium and computer 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: 20201124

RJ01 Rejection of invention patent application after publication