Weather early warning method and device, electronic equipment and storage medium

By combining positioning data and air pressure data to collaboratively determine target altitude data, the problem of low accuracy in weather warnings in existing technologies has been solved, enabling highly accurate weather warnings in uninhabited areas or areas with poor signal, and reducing the false alarm rate.

CN121366472APending Publication Date: 2026-01-20BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410962433.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-17
Publication Date
2026-01-20

AI Technical Summary

Technical Problem

In existing technologies, electronic devices using barometric pressure data have low accuracy when issuing weather warnings, resulting in a high rate of false alarms for abnormal weather and an inability to accurately predict weather conditions in uninhabited areas or areas with poor signal.

Method used

By combining location data and air pressure data, the target altitude data is determined collaboratively. The changing trends of altitude and air pressure data are used to judge the possibility of abnormal weather, filter out false alarms caused by location movement, and improve the accuracy of early warning.

Benefits of technology

It reduces the false alarm rate of abnormal weather warnings and improves the accuracy of weather warnings, especially in uninhabited areas or areas with poor signal, ensuring user safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121366472A_ABST
    Figure CN121366472A_ABST
Patent Text Reader

Abstract

The invention provides a weather early warning method and device, electronic equipment and a storage medium, and the method comprises the steps: obtaining the first air pressure data collected by the electronic equipment at at least one moment and the positioning data of the electronic equipment, determining the target altitude data at the moment according to the positioning data and / or the first air pressure data at the moment for each moment, and transmitting the target altitude data to the electronic equipment; and performing weather early warning according to the target altitude data and the first air pressure data at the at least one moment, and cooperatively determining the target altitude data at each moment based on the air pressure data and the positioning data, thereby improving the accuracy of altitude data determination. And abnormal weather early warning is carried out cooperatively based on the at least one target altitude data and / or the at least one first air pressure data, so that the misjudgment rate of abnormal weather early warning is reduced, and the early warning accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a weather warning method and device, electronic equipment and storage medium. BACKGROUND

[0002] With the improvement of people's living standards and the support of the state, outdoor sports are no longer a favorite sport for a small number of people, and more and more people are engaged in outdoor sports.

[0003] Most users in the outdoor circle will pay attention to the change of weather in the activity, but in the unpopulated area or the area with poor signal, it is impossible to check the weather online, or the weather forecast cannot accurately predict the weather in some local areas. Therefore, it is particularly important for the electronic device to have the function of monitoring and warning abnormal weather.

[0004] In related technologies, when the electronic device performs weather warning, it is usually based on air pressure data to perform weather warning, which has the problem of low accuracy. SUMMARY

[0005] The present application aims to at least solve one of the technical problems in the related art to some extent.

[0006] To this end, the present application provides a weather warning method and device, electronic equipment and storage medium, which cooperates to perform abnormal weather warning based on at least one positioning data and at least one first air pressure data, reduces the misjudgment rate of abnormal weather warning, and improves the accuracy of warning.

[0007] An embodiment of the present application provides a weather warning method, comprising:

[0008] obtaining first air pressure data collected by an electronic device at at least one time and positioning data of the electronic device;

[0009] for each time, determining target altitude data of the time according to the positioning data and / or the first air pressure data of the time;

[0010] performing abnormal weather warning according to the target altitude data and the first air pressure data of the at least one time.

[0011] Another embodiment of the present application provides a weather warning device, comprising:

[0012] an obtaining module, configured to obtain first air pressure data collected by an electronic device at at least one time and positioning data of the electronic device;

[0013] a determining module, configured to, for each time, determine target altitude data of the time according to the positioning data and / or the first air pressure data of the time;

[0014] process the abnormal weather warning according to the target altitude data and the first air pressure data of the at least one time.

[0015] In an aspect of the present application, an electronic device is provided, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to the foregoing aspect when executing the program.

[0016] In an aspect of the present application, a non-transitory computer readable storage medium is provided, which stores a computer program, and the computer program is executable on a processor to implement the method according to the foregoing aspect.

[0017] In an aspect of the present application, a computer program product is provided, which stores a computer program, and the computer program is executable on a processor to implement the method according to the foregoing aspect.

[0018] The weather warning method, device, electronic device and storage medium provided by the present application obtain first air pressure data collected by an electronic device at at least one time and positioning data of the electronic device, for each time, determine target altitude data of the time according to the positioning data and / or the first air pressure data of the time, and perform weather warning according to the target altitude data and the first air pressure data of the at least one time. The target altitude data of each time is determined based on the air pressure data and the positioning data, which improves the accuracy of the determination of the altitude data. The abnormal weather warning is performed based on at least one target altitude data and / or at least one first air pressure data, which reduces the misjudgment rate of the abnormal weather warning and improves the accuracy of the warning.

[0019] Additional aspects and advantages of the present application will be made apparent by the following description and the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS

[0020] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description, taken in conjunction with the accompanying drawings, in which:

[0021] Figure 1 A flowchart of a weather warning method provided by an embodiment of the present application;

[0022] Figure 2 A flowchart of another weather warning method provided by an embodiment of the present application;

[0023] Figure 3 A flowchart of another weather warning method provided by an embodiment of the present application;

[0024] Figure 4 A structural schematic diagram of a weather warning device provided by an embodiment of the present application is shown in the figure.

[0025] Figure 5 A block diagram of an electronic device provided by an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0026] Embodiments of the present application are described in detail below, examples of which are shown in the accompanying drawings, in which the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the accompanying drawings are exemplary and are intended to explain the present application, and cannot be understood as limiting the present application.

[0027] The weather warning method, device, electronic device and storage medium of the embodiments of the present application are described below with reference to the accompanying drawings.

[0028] Figure 1 A flowchart of a weather warning method provided by an embodiment of the present application is shown in the figure.

[0029] The embodiments of the present disclosure are exemplified by the weather warning method being configured in a weather warning device, which can be applied to any electronic device, so that the electronic device can perform a weather warning function.

[0030] The electronic device can be any device with computing capability, for example, a mobile terminal, a mobile terminal such as a mobile phone, a tablet computer, a personal digital assistant, a wearable device, etc. hardware device with various operating systems, touch screens and / or display screens.

[0031] As shown in the figure, the method can include the following steps: Figure 1

[0032] Step 101, obtaining first air pressure data collected by an electronic device at at least one time and positioning data of the electronic device.

[0033] As an implementation manner, the first air pressure data at each time is collected by an air pressure gauge, and the type of the air pressure gauge is not limited in the present embodiment.

[0034] As an implementation manner, the positioning data of the electronic device at each time is obtained by a global navigation satellite system (GNSS) or a network, a base station, etc. The positioning data can be screened according to signal quality, i.e. the GNSS data is screened according to horizontal dilution of precision and horizontal accuracy, so as to improve the quality of the positioning data. The positioning data includes three-dimensional position (longitude, latitude, height) and time information of the electronic device. The height can be altitude data.​

[0035] It should be understood that the positioning data and the first air pressure data can be filtered to filter out interference signals and improve signal quality.

[0036] In step 102, for each time, target altitude data of the time is determined according to the positioning data and / or the first air pressure data of the time.

[0037] In an implementation of the embodiment of the application, for each of the plurality of times, second standard air pressure data corresponding to a position in the positioning data of the time is obtained, wherein the positioning data of the time includes a position (longitude and latitude) of the electronic device, and the standard air pressure data of a region corresponding to the position where the electronic device is located is obtained through a network where the electronic device is located, and is referred to as second standard air pressure data. Further, the first altitude value of the time is determined according to the first air pressure data and the second standard air pressure data of the time, and the first altitude value of the time is taken as the target altitude data of the time.

[0038] The first altitude value H1 can be determined by the following method:

[0039]

[0040] P1 is the first air pressure data of the time, and P 0_2 is the second standard air pressure data of the time. It should be noted that 5.256 is

[0041] Therefore, the altitude data can be determined according to the first air pressure data of the time. Since the positioning data also includes the altitude data, the altitude data determined based on the air pressure data and the altitude data in the positioning data cooperatively determine the target altitude data of the time, and the accuracy of the determination of the altitude data is improved.

[0042] ​In another implementation manner of the embodiment of the application, the altitude data can be determined according to the first air pressure data of the moment. Since the positioning data also includes the altitude data, in one scenario, if the accuracy of the altitude data determined based on the first air pressure data of the moment is greater than a first threshold, and the accuracy of the altitude data included in the positioning data of the moment is less than a second threshold, wherein the first threshold is greater than the second threshold, that is, if the accuracy of the altitude data determined based on the first air pressure data of the moment is higher, and the accuracy of the altitude data included in the positioning data is lower, the altitude data determined by the first air pressure data of the moment is taken as the target altitude data of the moment. In another scenario, if the accuracy of the altitude data determined based on the first air pressure data of the moment is less than the second threshold, and the accuracy of the altitude data included in the positioning data of the moment is greater than the first threshold, wherein the first threshold is greater than the second threshold, that is, if the accuracy of the altitude data determined based on the first air pressure data of the moment is lower, and the accuracy of the altitude data included in the positioning data is higher, the altitude data in the positioning data of the moment is taken as the target altitude data of the moment, thereby improving the accuracy of the determination of the altitude data.

[0043] In step 103, the abnormal weather warning is performed according to the target altitude data and the first air pressure data of at least one moment.

[0044] In the embodiment of the application, based on the target altitude data of at least one moment, the altitude change condition or trend in the corresponding period can be determined, for example, whether to increase rapidly or decrease rapidly. And based on the at least one first air pressure data, whether the air pressure changes rapidly in the corresponding period can also be determined, for example, the air pressure drops sharply, which usually means that the storm is coming soon. In the embodiment of the application, the possibility of abnormal weather occurrence is judged according to the trend of altitude change and the trend of air pressure change, and part of the movement scenarios can be filtered, for example, the movement scenarios of climbing a mountain or downhill, in which the altitude data will increase or decrease rapidly, and the air pressure data will also change greatly. In these scenarios, the possibility of abnormal weather occurrence is small, and no warning prompt is needed, thereby improving the accuracy of the warning prompt. Wherein, the abnormal weather usually refers to severe weather, for example, storm, blizzard, etc.

[0045] Wherein, at least one moment corresponds to a period of time, for example, half an hour, 1 hour, 2 hours or 4 hours, etc.

[0046] In the weather warning method of the embodiment of the present application, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired, for each time, the target altitude data of the time is determined according to the positioning data and / or the first air pressure data of the time, and the weather warning is performed according to the target altitude data and the first air pressure data of at least one time. The target altitude data of each time is determined based on the air pressure data and the positioning data, the accuracy of the determination of the altitude data is improved, the misjudgment rate of the abnormal weather warning is reduced based on the at least one target altitude data and / or the at least one first air pressure data, and the accuracy of the warning is improved.

[0047] Based on the above embodiment, Figure 2 The flowchart of another weather warning method provided by the embodiment of the present application is shown in FIG. 2, which comprises the following steps: Figure 2 As shown in FIG. 2, the method comprises the following steps:

[0048] In step 201, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired.

[0049] In step 201, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired.

[0050] In step 202, for each time, the second altitude value of the first historical time before the time is acquired.

[0051] The first historical time is any historical time before the time, and as an example, the first historical time is the previous time of the time.

[0052] In step 203, the second altitude value is corrected to determine the target corrected altitude value of the time.

[0053] In the embodiment of the present application, the user will not have a large displacement in a short time, that is, the air pressure data may not have a large change, and there is a problem of low accuracy in directly calculating the altitude data according to the air pressure data. In the embodiment of the present application, the historical determined altitude data is corrected to determine the altitude data of the current time. Since the correction is made on the historical altitude data, the accuracy is improved. Therefore, for each time, the altitude value of the previous historical time is corrected to improve the accuracy. The following two correction methods are used for illustration:

[0054] As an implementation manner, the second air pressure data collected at the first historical moment is acquired, and a first altitude correction value is determined according to a difference between the first air pressure data and the second air pressure data and a set first mapping relationship, wherein the first mapping relationship includes a mapping relationship between the difference of each measured air pressure data and the altitude correction value, and is set based on an experience value. Further, the second altitude value is corrected according to the first altitude correction value to obtain a first corrected altitude value, that is, the first altitude correction value and the second altitude value are superimposed to obtain the first corrected altitude value, and the target corrected altitude value is determined according to the first corrected altitude value. As an implementation manner, the first corrected altitude value is taken as the target corrected altitude value.

[0055] As another implementation manner, an area where the electronic device is located is determined according to the position in the positioning data at the first historical moment, the size of the area can be set based on the requirement of accuracy, the first standard air pressure data of the area corresponding to the position is acquired through the network, and the second standard air pressure data corresponding to the position is acquired according to the position in the positioning data at the moment. A second altitude correction value is determined according to a difference between the first standard air pressure data and the second standard air pressure data and a set second mapping relationship, wherein the second mapping relationship includes a mapping relationship between the difference of each standard air pressure data and the altitude correction value, and is set based on an experience value. Further, the second altitude value is corrected according to the second altitude correction value to obtain a second corrected altitude value, and the target corrected altitude value is determined according to the second corrected altitude value. As an implementation manner, the second corrected altitude value is taken as the target corrected altitude value.

[0056] The second air pressure data can be determined according to the calculation method of the first air pressure data, which will not be described here. It should be noted that the first air pressure data, the second air pressure data, and the third air pressure data and the fourth air pressure data in the subsequent steps are used to identify different air pressure data.

[0057] In step 204, the target altitude value at the moment is determined according to the target corrected altitude value at the moment and the altitude value in the positioning data at the moment.

[0058] In the embodiment of the application, two altitude values are determined at the same moment, that is, the target corrected altitude value based on the air pressure data and the altitude value in the positioning data, and the target corrected altitude value based on the air pressure data and the altitude value in the positioning data are compared to determine whether the accuracy of the target corrected altitude value based on the air pressure data meets the requirement. If it meets the requirement, the target altitude value at the moment is determined according to the target corrected altitude value at the moment, otherwise, the barometer needs to be calibrated and the air pressure data is measured again, and the altitude value is determined according to the air pressure data measured again, and the target altitude value at the moment is determined according to the re-determined altitude value.

[0059] At step 205, the abnormal weather warning is determined according to the target altitude data at the at least one time and the first air pressure data at the at least one time.

[0060] In an implementation form of the embodiment, the at least one time includes a plurality of times, and the altitude difference between the first time and the last time in the plurality of times is determined according to the target altitude data at the plurality of times, so that the altitude change amount in the time period between the first time and the last time can be determined, i.e., the altitude difference, which indicates the altitude change trend. If the altitude difference is greater than the altitude change threshold, it is considered that the user has a large position movement, for example, the user climbs a mountain or reaches a lower place from a high place, resulting in a large altitude change trend. In the case of a large altitude difference, the air pressure usually also changes greatly, but such change usually does not lead to severe weather. Therefore, in the present application, the case of large air pressure change caused by position movement needs to be filtered out. Thus, the altitude difference is compared with the altitude change threshold, and in response to the altitude difference being less than the altitude change threshold, the air pressure difference between the first time and the last time in the plurality of times is determined according to the first air pressure data at the plurality of times, the warning prompt information of the abnormal weather is determined according to the air pressure difference, and the electronic device is controlled to display the warning prompt information. As an implementation form, the corresponding relationship is obtained, wherein the corresponding relationship includes the air pressure difference and the corresponding relationship of the abnormal weather, the corresponding relationship is queried, the abnormal weather corresponding to the air pressure difference is determined, the warning prompt information of the abnormal weather is generated, and the electronic device is controlled to display the warning prompt information.

[0061] As another implementation form, the air pressure difference is compared with the set air pressure change threshold, and in response to the air pressure difference being greater than the set air pressure change threshold, the warning prompt information of the abnormal weather is determined. For example, the air pressure difference is the air pressure difference in 2 hours, the air pressure difference is 500 Pa, and the set air pressure change threshold is 400 Pa. Since the measured air pressure difference 500 Pa is greater than 400 Pa, it is determined that there is a possibility of a storm, and the warning prompt information of the storm is generated and displayed on the interactive interface of the electronic device to remind the user using the electronic device that the abnormal weather may occur and needs to be transferred to a safe area as soon as possible to improve safety.

[0062] In the embodiment, since the air pressure change caused by the user carrying the electronic device to climb high or downhill does not lead to the occurrence of abnormal severe weather, such a scenario needs to be excluded, so that in the case where the altitude difference is less than the altitude change threshold, it is determined that the air pressure change of the electronic device is not caused by the user climbing high (such as climbing a mountain) or downhill, thereby improving the accuracy of the abnormal weather determination and reducing the misjudgment rate.

[0063] In the weather warning method of the embodiments of the present application, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired, for each time, the target altitude data of the time is determined according to the positioning data and / or the first air pressure data of the time, and the weather warning is performed according to the target altitude data and the first air pressure data of at least one time. The target altitude data of each time is determined based on the air pressure data and the positioning data, which improves the accuracy of the determination of the altitude data. The abnormal weather warning is performed based on at least one target altitude data and / or at least one first air pressure data, which reduces the misjudgment rate of the abnormal weather warning and improves the accuracy of the warning.

[0064] Based on the above embodiments, Figure 3 The flowchart of another weather warning method provided by the embodiments of the present application is shown in FIG. 4, which includes the following steps: Figure 3

[0065] In step 301, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired.

[0066] In step 302, for each time, the second altitude value of the first historical time before the time is acquired.

[0067] In step 303, the second altitude value is corrected to determine the target corrected altitude value of the time.

[0068] In steps 301 to 303, the related explanations and descriptions in the foregoing embodiments can be referred to, and the principles are the same, which will not be described here again.

[0069] In step 304, the altitude change rate is determined according to the target corrected altitude value of the time and the altitude value in the positioning data of the time, and the altitude change rate is compared with the set change rate threshold.

[0070] As an implementation manner, the target corrected altitude value of the time is H1, and the altitude value in the positioning data of the time is H2, then the altitude change rate ΔH = |H1-H2| / H1 is determined, and the altitude change rate ΔH is compared with the set change rate threshold to determine the change of the target corrected altitude value of the time relative to the altitude value in the positioning data of the time. For example, the set altitude change rate threshold is 0.8.

[0071] In step 305, the target corrected altitude value is taken as the target altitude value in response to the altitude change rate being less than or equal to the change rate threshold.

[0072] ​In the embodiment of the present application, if the target corrected altitude value obtained based on the air pressure data and the altitude value in the positioning data are relatively small, that is, the altitude change rate is less than or equal to the change rate threshold, it is considered that the target corrected altitude value obtained based on the air pressure data has higher accuracy, and calibration of the air pressure gauge for collecting the at least one first air pressure data is not needed, that is, the target corrected altitude value is taken as the target altitude value.

[0073] In step 306, in response to the altitude change rate being greater than the change rate threshold, calibration of the air pressure gauge for collecting the at least one first air pressure data is performed.

[0074] In the embodiment of the present application, if the target corrected altitude value obtained based on the air pressure data and the altitude value in the positioning data are relatively large, that is, the altitude change rate is greater than the change rate threshold, it is considered that the target corrected altitude value obtained based on the air pressure data has lower accuracy, and calibration of the air pressure gauge for collecting the at least one first air pressure data is needed to improve the accuracy of the air pressure gauge, wherein the calibration method can adopt any calibration method in the prior art, and the embodiment is not limited.

[0075] In step 307, the third air pressure data collected by the calibrated air pressure gauge and the second standard air pressure data at the moment are obtained.

[0076] In step 308, the third altitude value is determined according to the third air pressure data and the second standard air pressure data, and the third altitude value is taken as the target altitude value at the moment.

[0077] In the embodiment of the present application, the third air pressure data is re-collected by the calibrated air pressure gauge, and the second standard air pressure data at the moment is obtained, and the third altitude value at the moment is re-calculated, and the re-calculated third altitude value is taken as the target altitude value, the third altitude value at the moment is re-determined by calibrating the air pressure gauge, and the third altitude value at the moment is taken as the target altitude value at the moment, and the accuracy of the target altitude value determination is improved.

[0078] As an implementation manner, the third altitude value is calculated according to the altitude calculation formula in step 102, which is not repeated here.

[0079] As another implementation manner, the third altitude value is determined by the above steps 201 to 203, that is, the third altitude value is a correction result relative to the historical data, so as to improve the accuracy, and the specific implementation manner is not repeated here.

[0080] In step 309, abnormal weather warning is performed according to the target altitude data at the at least one moment and the first air pressure data.

[0081] In step 309, the related explanation and description in the foregoing embodiments can be referred to, and the principle is the same, which is not repeated here.

[0082] In the weather warning method of the embodiment, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired, for each time, target altitude data of the time is determined according to the positioning data and the first air pressure data of the time, and abnormal weather warning is performed according to the target altitude data and the first air pressure data of the at least one time. The target altitude data of each time is determined based on the air pressure data and the positioning data, which improves the accuracy of the determination of the altitude data. The abnormal weather warning is performed based on the at least one target altitude data and the at least one first air pressure data, which reduces the misjudgment rate of the abnormal weather warning and improves the accuracy of the warning.

[0083] Based on the above embodiment, in the embodiment, if the positioning data cannot be acquired, the altitude data of the corresponding time is directly calculated according to the air pressure data collected by the barometer in the case that the network signal is poor or the positioning module is abnormal. If the positioning data cannot be acquired and the air pressure data also cannot be acquired, the output of the barometer and the altitude data of the last time are maintained, so as to avoid that the electronic device cannot display the air pressure data and / or the altitude data collected at the current time and cannot perform the abnormal weather warning according to the air pressure data and the altitude data collected at the current time.

[0084] To achieve the above embodiment, the embodiment also provides a weather warning device.

[0085] Figure 4 A structural schematic diagram of a weather warning device provided by the embodiment is shown.

[0086] As shown in Figure 4 The device can include:

[0087] The acquisition module 41 is configured to acquire first air pressure data collected by an electronic device at at least one time and positioning data of the electronic device.

[0088] The determination module 42 is configured to, for each time, determine target altitude data of the time according to the positioning data and / or the first air pressure data of the time.

[0089] The processing module 43 is configured to perform abnormal weather warning according to the target altitude data and the first air pressure data of the at least one time.

[0090] Further, in an implementation manner of the embodiment, the determination module 42 is further configured to:

[0091] acquire a second altitude value of a first historical time before the time;

[0092] correct the second altitude value to determine a target corrected altitude value of the time;

[0093] determine the target altitude value of the time according to the target correction altitude value of the time and the altitude value in the positioning data of the time.

[0094] In an implementation manner of the embodiment of the present application, the determining module 42 is further configured to:

[0095] obtain second air pressure data of the first historical time;

[0096] determine a first altitude correction value according to a difference between the first air pressure data and the second air pressure data and a set first mapping relationship;

[0097] correct the second altitude value according to the first altitude correction value to obtain a first correction altitude value;

[0098] determine the target correction altitude value according to the first correction altitude value.

[0099] In an implementation manner of the embodiment of the present application, the determining module 42 is further configured to:

[0100] obtain corresponding first standard air pressure data according to the position in the positioning data of the first historical time;

[0101] obtain corresponding second standard air pressure data according to the position in the positioning data of the time;

[0102] determine a second altitude correction value according to a difference between the first standard air pressure data and the second standard air pressure data and a set second mapping relationship;

[0103] correct the second altitude value according to the second altitude correction value to obtain a second correction altitude value;

[0104] determine the target correction altitude value according to the second correction altitude value.

[0105] In an implementation manner of the embodiment of the present application, the determining module 42 is further configured to:

[0106] determine an altitude change rate according to the target correction altitude value of the time and the altitude value in the positioning data of the time;

[0107] compare the altitude change rate with a set change rate threshold value;

[0108] in response to the altitude change rate being less than or equal to the change rate threshold value, take the target correction altitude value as the target altitude value of the time.

[0109] In an implementation manner of the embodiment of the present application, the determining module 42 is further configured to:

[0110] in response to the altitude change rate being greater than the change rate threshold, calibrating a barometer that collects the at least one first air pressure data;

[0111] obtaining third air pressure data collected by the calibrated barometer and second standard air pressure data of the time point;

[0112] determining a third altitude value according to the third air pressure data and the second standard air pressure data;

[0113] taking the third altitude value as a target altitude value of the time point.

[0114] In an implementation form of the embodiment of the application, the determining module 42 is further configured to:

[0115] obtaining second standard air pressure data corresponding to a position in the positioning data of the time point;

[0116] determining a first altitude value of the time point according to the first air pressure data of the time point and the second standard air pressure data;

[0117] taking the first altitude value of the time point as a target altitude value of the time point.

[0118] In an implementation form of the embodiment of the application, the at least one time point includes a plurality of time points, and the processing module 43 is further configured to:

[0119] determining an altitude difference between a first time point and a last time point in the plurality of time points according to the target altitude values of the plurality of time points;

[0120] in response to the altitude difference being less than an altitude change threshold, determining an air pressure difference between the first time point and the last time point in the plurality of time points according to the first air pressure data of the plurality of time points;

[0121] determining an early warning prompt information of abnormal weather according to the air pressure difference, and controlling the electronic device to display the early warning prompt information.

[0122] In an implementation form of the embodiment of the application, the processing module 43 is further configured to:

[0123] comparing the air pressure difference with a set air pressure change threshold;

[0124] in response to the air pressure difference being greater than the set air pressure change threshold, determining an early warning prompt information of abnormal weather.

[0125] It should be noted that the foregoing explanation and description of the method embodiment are also applicable to the device of this embodiment, which will not be described here.

[0126] In the weather warning device provided by the embodiment of the present application, the first air pressure data collected by the electronic device at at least one time and the positioning data of the electronic device are acquired, for each time, the target altitude data of the time is determined according to the positioning data and / or the first air pressure data of the time, and the weather warning is performed according to the target altitude data and the first air pressure data of at least one time, the target altitude data of each time is determined based on the air pressure data and the positioning data, the accuracy of the determination of the altitude data is improved, and the abnormal weather warning is performed based on at least one target altitude data and / or at least one first air pressure data, the misjudgment rate of the abnormal weather warning is reduced, and the accuracy of the warning is improved.

[0127] To achieve the above-mentioned embodiments, the present application further provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method as described in the foregoing method embodiments.

[0128] To achieve the above-mentioned embodiments, the present application further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the program is executable by a processor to implement the method as described in the foregoing method embodiments.

[0129] To achieve the above-mentioned embodiments, the present application further provides a computer program product having a computer program stored thereon, wherein the computer program is executable by a processor to implement the method as described in the foregoing method embodiments.

[0130] Figure 5 A block diagram of an electronic device provided by an embodiment of the present application is shown. For example, the electronic device 800 can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, and the like.

[0131] Reference Figure 5 The electronic device 800 can include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output (I / O) interface 812, a sensor component 814, and a communication component 816.

[0132] The processing component 802 usually controls overall operations of the electronic device 800, such as operations associated with displaying, making phone calls, data communications, camera operations, and recording operations. The processing component 802 can include one or more processors 820 to execute instructions to complete all or part of steps of the methods described above. In addition, the processing component 802 can include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0133] The memory 804 is configured to store various types of data to support operations of the electronic device 800. Examples of these data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or nonvolatile memory, or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read only memory (EEPROM), erasable programmable read only memory (EPROM), programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, magnetic disc or optical disc.

[0134] The power component 806 provides power to various components of the electronic device 800. The power component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 800.

[0135] The multimedia component 808 includes a screen providing an output interface between the electronic device 800 and a user. In some embodiments, the screen can include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes the touch panel, the screen can be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense a touch, a slide, and a gesture on the touch panel. The touch sensor can not only sense a boundary of a touching or a sliding action, but also detect duration and pressure related to the touching or sliding action. In some embodiments, the multimedia component 808 includes a front camera and / or a back camera. The front camera and / or the back camera can receive external multimedia data when the electronic device 800 is in an operating mode, such as a photographing mode or a video mode. Each of the front camera and the back camera can be a fixed optical lens system or have a focal length and optical zoom capability.

[0136] The audio component 810 is configured to output and / or input an audio signal. For example, the audio component 810 includes a microphone (MIC) configured to receive an external audio signal when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signal can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting an audio signal.

[0137] The I / O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which can include a keypad, click wheel, buttons, and so on. The buttons can include, but are not limited to, a home button, a volume button, a start button, and a lock button.

[0138] The sensor component 814 includes one or more sensors for providing status assessments for various aspects of the electronic device 800. For example, the sensor component 814 can detect an open / closed position of the electronic device 800, relative positioning of components, such as a display and a keypad of the electronic device 800, a change in position of the electronic device 800 or a component of the electronic device 800, presence or absence of user contact with the electronic device 800, orientation or acceleration / deceleration / g-force and temperature of the electronic device 800. The sensor component 814 can include an accelerometer, a gyroscope, a geonome, a magnetometer, a pressure sensor or a temperature sensor.

[0139] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 4G, or 5G, or a combination thereof. In an example embodiment, the communication component 816 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In an example embodiment, the communication component 816 can further include a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) techniques, infrared data association (IrDA) techniques, ultra-wideband (UWB) techniques, Bluetooth (BT) techniques, and other techniques.

[0140] In example embodiments, the electronic device 800 can be implemented with one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, micro-controllers, microprocessors, or other electronic elements for performing the above-described methods.

[0141] In exemplary embodiments, a non-transitory computer readable storage medium including instructions, such as the memory 804 including instructions, is also provided, which can be executed by the processor 820 of the electronic device 800 to complete the above method. For example, the non-transitory computer readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.

[0142] In the description of the specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Also, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the person skilled in the art can combine and combine the different embodiments or examples described in the specification and the features of the different embodiments or examples, without contradiction.

[0143] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise explicitly specified.

[0144] Any process or method descriptions in flow charts or described elsewhere herein can be understood as representing code modules, segments, or portions of code that include one or more executable instructions for implementing the specified logic functions (or steps) and / or can be implemented as computer-executable instructions. The various embodiments of the preferred embodiments of the present application include additional implementation examples, in which the order of execution can be changed, additional or fewer steps can be performed, and / or the described functionality can be performed at different times, in different orders, and / or in different ways, as will be appreciated by those skilled in the art.

[0145] The logic and / or steps represented in flow diagrams or otherwise described herein, for example, can be considered as a sequence of instructions to implement logic functions, and can be embodied in any computer-readable medium for use by an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In the context of this specification, a "computer-readable medium" can be any means that can contain, store, communicate, propagate or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can be a machine-readable storage device (e.g., magnetic, optical or other) a machine-readable storage diskette (e.g., floppy disk, optical disk, CD- ROM, etc.), a machine- readable storage card (e.g., PCMCIA card, etc.), a machine-readable storage tape (e.g., magnetic tape, optical tape, etc.), a machine-readable storage medium (e.g., RAM, ROM, etc.), a machine-readable signal (e.g., electrical, optical, etc.), a machine-readable medium (e.g., carrier wave, etc.) or any other suitable medium or means of embodying the program. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a RAM, a ROM, an EPROM, a FLASH memory card, an optical fiber, and a portable compact disc read-only memory (CD-ROM). Additionally, the computer-readable medium can be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and stored in a computer memory.

[0146] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the above embodiments, various steps or methods can be implemented in software or firmware that is stored in memory and executed by a suitable instruction execution system. As such, in some embodiments, the steps or methods can be implemented in hardware such as a special purpose computer, a programmed microprocessor or microcontroller, a microprocessor-based or a microcontroller-based application-specific integrated circuit, a peripheral integrated circuit element, a digital signal processor, a highly-parallelized architecture or other similar or well-known computing devices. In other embodiments, the steps or methods can be implemented in software that is stored in a memory and executed on a suitable instruction execution system. In other embodiments, the steps or methods can be implemented in a combination of both software and hardware.

[0147] Those of skill in the art would understand that information and signals can be represented using any of a variety of technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that can be referenced throughout the above description can be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.

[0148] In addition, each of the functional units in the various embodiments of the present application can be integrated in one processing module, or each of the units can be physically present separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer readable storage medium.

[0149] The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it should be understood that the above embodiments are exemplary and should not be construed as limiting the present application, and those skilled in the art can make changes, modifications, replacements and variations to the above embodiments within the scope of the present application.

Claims

1. A weather warning method, characterized in that, The method includes: Acquire first air pressure data collected by the electronic device at at least one moment and the positioning data of the electronic device; For each moment, the target altitude data for that moment is determined based on the positioning data and / or the first air pressure data for that moment; An abnormal weather warning is issued based on the target altitude data and the first air pressure data at at least one time point.

2. The method as described in claim 1, characterized in that, Determining the target altitude data at the time based on the positioning data and the first air pressure data includes: Obtain the second elevation value of the first historical moment prior to the stated moment; The second altitude value is corrected to determine the target corrected altitude value at the specified time. The target altitude value at the specified time is determined based on the target corrected altitude value at the specified time and the altitude value in the positioning data at the specified time.

3. The method as described in claim 2, characterized in that, The step of correcting the second altitude value to determine the target corrected altitude value at the time includes: Obtain the second air pressure data at the first historical moment; Based on the difference between the first air pressure data and the second air pressure data, and the established first mapping relationship, a first altitude correction value is determined; The second altitude value is corrected based on the first altitude correction value to obtain the first corrected altitude value; The target corrected altitude value is determined based on the first corrected altitude value.

4. The method as described in claim 2, characterized in that, The step of correcting the second altitude value to determine the target corrected altitude value at the time includes: Based on the location in the location data of the first historical moment, obtain the corresponding first standard air pressure data; Based on the location in the positioning data at the specified time, obtain the corresponding second standard air pressure data; Based on the difference between the first standard air pressure data and the second standard air pressure data, and the established second mapping relationship, a second altitude correction value is determined; The second altitude value is corrected based on the second altitude correction value to obtain the second corrected altitude value; The target corrected altitude value is determined based on the second corrected altitude value.

5. The method as described in claim 2, characterized in that, Determining the target altitude value at a given time based on the target corrected altitude value at that time and the altitude value in the positioning data at that time includes: The altitude change rate is determined based on the target corrected altitude value at the time and the altitude value in the positioning data at the time. Compare the altitude change rate with the set change rate threshold; In response to the elevation change rate being less than or equal to the change rate threshold, the target corrected elevation value is used as the target elevation value at the time.

6. The method as described in claim 5, characterized in that, The method further includes: In response to the altitude change rate being greater than the change rate threshold, the barometer that collects at least one first air pressure data is calibrated. Acquire the third barometric pressure data collected by the calibrated barometer, and the second standard barometric pressure data at the specified time. The third altitude value is determined based on the third air pressure data and the second standard air pressure data; The third altitude value is taken as the target altitude value at the time.

7. The method as described in claim 1, characterized in that, Determining the target altitude data at the time based on the positioning data and the first air pressure data includes: Obtain the second standard bar pressure data corresponding to the location in the positioning data at the specified time. The first altitude value at the time is determined based on the first air pressure data and the second standard air pressure data at the time. The first altitude value at the specified time is used as the target altitude data at the specified time.

8. The method according to any one of claims 1-7, characterized in that, The at least one moment includes multiple moments, and the abnormal weather warning based on the target altitude data and the first air pressure data at the at least one moment includes: Based on the target altitude data at the multiple time points, determine the altitude difference between the first and last time points among the multiple time points; In response to the altitude difference being less than the altitude change threshold, the pressure difference between the first and last moments among the plurality of moments is determined based on the first air pressure data at the plurality of moments; Based on the air pressure difference, an early warning message for abnormal weather is determined, and the electronic device is controlled to display the early warning message.

9. The method as described in any one of claims 8, characterized in that, Based on the aforementioned pressure difference, early warning information for abnormal weather is determined, including: Compare the pressure difference value with the set pressure change threshold; In response to the pressure difference being greater than the set pressure change threshold, an early warning message for abnormal weather is determined.

10. A weather warning device, characterized in that, The device includes: The acquisition module is used to acquire first air pressure data collected by the electronic device at at least one moment and the positioning data of the electronic device; The determination module is used to determine the target altitude data for each time moment based on the positioning data and / or the first air pressure data at that time moment; The processing module is used to issue an early warning of abnormal weather based on the target altitude data and the first air pressure data at the at least one moment.

11. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, it implements the method as described in any one of claims 1-9.

12. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-9.

13. A computer program product, characterized in that, Includes a computer program, which, when executed by a processor, implements the method of any one of claims 1-9.