Target event early warning method and device, electronic equipment and storage medium
By obtaining the occurrence location and warning range of major events, calculating the distance of candidate areas and sorting them, the problem of being alerted after a short distance is solved in the early warning of major events, and a more reasonable and accurate early warning is achieved.
Patent Information
- Application Number
- CN202410656427.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-24
- Publication Date
- 2024-08-30
AI Technical Summary
In early warning of major events, existing technology has not been able to effectively solve the problem of how to reasonably arrange the order of early warning to avoid the situation of being warned later after being close to each other.
By obtaining the target event location and warning range, the candidate area list and user list are obtained, the distance of the candidate areas is calculated and sorted, and users are warned based on the sorted list to ensure that the closest users receive the warning first.
It realizes reasonable early warning based on geographical location, avoids the situation of being early warned after being close to each other, and improves the rationality and accuracy of early warning.
Smart Images

Figure CN118568145A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a target event early warning method, device, electronic equipment and storage medium. Background Art
[0002] With the development of technology, people are becoming more and more accurate in predicting major events. For example, earthquakes are now predicted by setting up seismic monitoring stations to collect various precursor data such as tiny vibration signals in the crust, geomagnetism, geoelectricity, geostress, crust deformation, etc. Therefore, after predicting major events, users need to be warned. Before major events, there may be many people who need to be warned, so how to arrange the order of warnings is very important. Summary of the invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is: a target event early warning method, the method comprising the following steps:
[0004] Get the location of the target event and the warning range of the target event.
[0005] Based on the target event occurrence location and the target event warning range, a candidate area list and a candidate user list corresponding to each candidate area are obtained, wherein the candidate area list includes several candidate areas within the target event warning range, and the candidate user list includes several candidate users within the candidate areas.
[0006] The candidate distance between the target event location and each candidate area is obtained, and all candidate areas are sorted from small to large according to the candidate distance, so as to obtain a sorted area list.
[0007] Based on the sorted area list and the candidate user list corresponding to each candidate area, the candidate users are warned.
[0008] The present invention also provides a target event early warning device, the device comprising:
[0009] The target event acquisition module is used to obtain the location of the target event and the warning range of the target event.
[0010] The candidate area acquisition module is used to acquire a candidate area list and a candidate user list corresponding to each candidate area based on the target event occurrence location and the target event warning range, wherein the candidate area list includes a number of candidate areas within the target event warning range, and the candidate user list includes a number of candidate users within the candidate areas.
[0011] The sorting region acquisition module is used to obtain the target event occurrence location and the candidate distance of each candidate region, and sort all candidate regions from small to large according to the candidate distance, so as to obtain a sorting region list.
[0012] The early warning module is used to warn the candidate users based on the sorted area list and the candidate user list corresponding to each candidate area.
[0013] According to another aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored, and the at least one instruction or the at least one program is loaded and executed by a processor to implement the aforementioned method.
[0014] According to yet another aspect of the present invention, an electronic device is provided, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0015] The present invention has at least the following beneficial effects:
[0016] In summary, the target event occurrence location and the target event warning range are obtained, and based on the target event occurrence location and the target event warning range, a candidate area list and a candidate user list corresponding to each candidate area are obtained, the target event occurrence location and the candidate distance of each candidate area are obtained, and all candidate areas are sorted from small to large according to the candidate distance, so as to obtain a sorted area list, and based on the sorted area list and the candidate user list corresponding to each candidate area, the candidate users are warned. The present invention warns the candidate users based on the geographical location, making the warning more reasonable and avoiding the situation where the distance is close but the warning is given. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 A flowchart of a target event early warning method provided in Embodiment 1 of the present invention;
[0019] Figure 2 This is a flow chart of S200 provided in the first embodiment of the present invention;
[0020] Figure 3 A flowchart of another target event early warning method provided in Embodiment 1 of the present invention;
[0021] Figure 4This is a flow chart of S202 provided in the first embodiment of the present invention;
[0022] Figure 5 A flow chart of a method for obtaining a data collection interval provided in Embodiment 1 of the present invention;
[0023] Figure 6 A schematic diagram of the structure of a target event warning device provided in Embodiment 2 of the present invention;
[0024] Figure 7 A schematic diagram of the structure of a candidate region acquisition module provided in the second embodiment of the present invention;
[0025] Figure 8 A schematic diagram of the structure of another target event warning device provided in Embodiment 2 of the present invention;
[0026] Fig. 9 A schematic diagram of the structure of a graded area warning module provided in Embodiment 2 of the present invention;
[0027] Fig.10 This is a schematic diagram of the structure of a device for obtaining data collection intervals provided in Embodiment 2 of the present invention. DETAILED DESCRIPTION
[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0029] Embodiment 1
[0030] Embodiment 1 of the present invention provides a target event early warning method, such as Figure 1 As shown, the method comprises the following steps:
[0031] S100, obtaining the target event occurrence location and the target event warning range.
[0032] Specifically, the target event can be determined according to actual needs, for example, the target event is an earthquake, a fire, etc.
[0033] Specifically, those skilled in the art know that any method of obtaining the location of an event in the prior art falls within the scope of protection of the present invention. For example, when the target event is an earthquake, the location of the earthquake and the possible affected range can be obtained through real-time earthquake monitoring instruments, and the possible affected range can be used as an earthquake warning range.
[0034] S200, based on the target event occurrence location and the target event warning range, obtain a candidate area list and a candidate user list corresponding to each candidate area, wherein the candidate area list includes several candidate areas within the target event warning range, and the candidate user list includes several candidate users within the candidate areas.
[0035] Specifically, the candidate region is represented by geohash.
[0036] Furthermore, the candidate area is represented by a geohash of 5 characters, that is, the candidate area is represented by geohash 5. The candidate area in the present invention is represented by geohash 5, which is a rectangular area of 10 square kilometers. The location range of many counties is also within 10 square kilometers.
[0037] S300, obtaining the candidate distance between the target event occurrence location and each candidate area, and sorting all candidate areas from small to large according to the candidate distance, thereby obtaining a sorted area list.
[0038] Specifically, obtaining the candidate distance between the target event location and each candidate area specifically includes: obtaining the distance between the target event location and the center of each candidate area as the candidate distance. Specifically, if the sorted area list A = {A1, A2, ..., A i , …, A m}, A i is the i-th sorting region, i ranges from 1 to m, m is the number of candidate regions, where the candidate distance corresponding to the i-th sorting region is less than the candidate distance corresponding to the i+1-th sorting region. i ={A i,1 , A i,2 , …, A i,j , …, A i,ni}, A i,j Yes A i The corresponding candidate user list, i ranges from 1 to ni, ni is A i The number of corresponding candidate users.
[0039] S400: Based on the sorted area list and the candidate user list corresponding to each candidate area, an early warning is issued to the candidate user.
[0040] Specifically, based on the maximum number of warnings per unit time, candidate users are warned in the order of the sorting areas.
[0041] In an exemplary description of the present invention, if the maximum number of warnings per unit time is 500,000 people, the sorted area list A = {A1, A2, A3}, A1 is 200,000 people, A2 is 400,000 people, and A3 is 500,000 people, when issuing warnings, in the first unit time, warnings are issued to the 200,000 people in area A1 and the 300,000 people in area A2; in the second unit time, warnings are issued to the remaining 100,000 people in area A2 and the 400,000 people in area A3; and in the third unit time, warnings are issued to the remaining 100,000 people in area A3.
[0042] In summary, the target event occurrence location and the target event warning range are obtained, and based on the target event occurrence location and the target event warning range, a candidate area list and a candidate user list corresponding to each candidate area are obtained, the target event occurrence location and the candidate distance of each candidate area are obtained, and all candidate areas are sorted from small to large according to the candidate distance, so as to obtain a sorted area list, and based on the sorted area list and the candidate user list corresponding to each candidate area, the candidate users are warned. The present invention warns the candidate users based on the geographical location, making the warning more reasonable and avoiding the situation where the distance is close but the warning is given.
[0043] Specifically, Figure 2 As shown, S200 also includes obtaining a candidate user list corresponding to each candidate area through the following steps:
[0044] S210, obtaining a data collection interval, and collecting location information of candidate users based on the data collection interval.
[0045] Specifically, the data collection interval can be determined according to actual needs; optionally, the data collection interval ranges from 10 minutes to 50 minutes; preferably, the data collection interval is 30 minutes.
[0046] Specifically, the SDK is installed on the personal terminal of the candidate user to collect the location information of the candidate user.
[0047] S220, based on the location information of the candidate users, the candidate users are divided into candidate areas, so as to obtain a candidate user list corresponding to each candidate area. It can be understood that the location information of the candidate users is collected once every data collection interval, and the candidate area in which the candidate users are located is determined based on the location information of the candidate users, so as to generate a candidate user list corresponding to the candidate area.
[0048] It can be understood that the candidate user list is stored in the form of a list. If a candidate user moves from one candidate area to another candidate area, the candidate user is added to the end of the candidate user list corresponding to the other candidate area, thereby realizing the update of the candidate user list of the other candidate area. Therefore, when issuing an early warning, if an early warning is issued in a candidate user list at different unit times, an early warning is issued according to the order of the candidate users in the candidate user list, thereby realizing the preferred early warning of the candidate users who are stably in the candidate area.
[0049] Further, such as Figure 3 As shown, after obtaining the target event location and the candidate distance of each candidate area in S200, the following steps are also included:
[0050] S201, based on the candidate distance, classify the candidate areas into levels, and obtain a level area list, wherein the level area list includes several levels, and any level includes several candidate areas under the level; wherein the distance difference between any two candidate areas under any level is less than a preset distance threshold.
[0051] Specifically, the hierarchical area list C = {C1, C2, ..., C r , …, C s}, C r ={C r,1 , C r,2 , …, C r,g , …, C r,zr}, C r,g is the gth candidate region at the rth level, g ranges from 1 to zr, zr is the number of candidate regions at the rth level, r ranges from 1 to s, s is the number of divided levels.
[0052] S202: Based on the hierarchical area list and the candidate user list corresponding to each candidate area, an early warning is issued to the candidate user.
[0053] Furthermore, if Figure 4 As shown, in S202, based on the hierarchical area list and the candidate user list corresponding to each candidate area, early warning of the candidate user specifically includes:
[0054] S2021, obtain the maximum number of warnings per unit time.
[0055] S2022: If the sum of the number of candidate users corresponding to the candidate areas at any level is greater than the maximum warning number, obtain the ratio of the number of candidate users corresponding to the candidate areas at that level.
[0056] S2023: Based on the maximum number of warnings within a unit time, warnings are issued to candidate users in the candidate area according to the ratio of the number of candidate users corresponding to the candidate areas.
[0057] In summary, based on the candidate distance, the candidate areas are graded, a list of graded areas is obtained, and the maximum number of warnings per unit time is obtained. If the sum of the number of candidate users corresponding to the candidate areas at any level is greater than the maximum number of warnings, the ratio of the number of candidate users corresponding to the candidate areas at that level is obtained. Based on the maximum number of warnings per unit time, the candidate users in the candidate areas are warned according to the ratio of the number of candidate users corresponding to the candidate areas. The present invention warns through the ratio of the number of candidate users corresponding to the candidate areas at the same level, thereby realizing simultaneous warnings for multiple areas. Compared with warnings directly based on distance, this method realizes multi-point touch.
[0058] Further, such as Figure 5 As shown, the present invention also obtains the data collection interval by the following method:
[0059] S001, obtaining a historical area list, wherein the historical area list includes a plurality of historical areas.
[0060] S002, based on the historical area list, combining any two historical areas and marking them as combined areas, thereby obtaining a combined area list.
[0061] S003, based on the combined area list, obtain a usage time list corresponding to any combined area, thereby obtaining a usage time list set, wherein the usage time list includes a plurality of usage times, and the usage time is the time used from a historical area of the combined area to another historical area of the combined area.
[0062] S004, obtaining a data collection interval based on the usage time list set.
[0063] Specifically, in one embodiment of the present invention, an average value of all usage times is obtained, and the average value of all usage times is used as a data collection interval.
[0064] Specifically, in another embodiment of the present invention, the median of all usage times is obtained, and the median of all usage times is used as the data collection interval.
[0065] Furthermore, after S004, the method further includes: obtaining the latest time of moving from one historical area to another historical area, adding the latest time to the usage time list set, thereby updating the data collection interval.
[0066] In summary, a historical area list is obtained, and based on the historical area list, any two historical areas are combined and marked as combined areas, thereby obtaining a combined area list, and based on the combined area list, a usage time list corresponding to any combined area is obtained, thereby obtaining a usage time list set, and based on the usage time list set, a data collection interval is obtained. The present invention obtains the data collection interval based on the historical usage time, thereby obtaining a candidate user list more accurately.
[0067] Embodiment 2
[0068] Embodiment 2 of the present invention provides a target event early warning device, such as Figure 6 As shown, the device comprises:
[0069] The target event acquisition module is used to obtain the target event occurrence location and target event warning range;
[0070] A candidate area acquisition module is used to acquire a candidate area list and a candidate user list corresponding to each candidate area based on the target event occurrence location and the target event warning range, wherein the candidate area list includes a number of candidate areas within the target event warning range, and the candidate user list includes a number of candidate users within the candidate areas;
[0071] A sorting region acquisition module is used to obtain the target event location and the candidate distance of each candidate region, and sort all candidate regions from small to large according to the candidate distance, so as to obtain a sorting region list;
[0072] The early warning module is used to warn the candidate users based on the sorted area list and the candidate user list corresponding to each candidate area.
[0073] In a specific embodiment of the present invention, Figure 7 As shown, the candidate region acquisition module includes:
[0074] The location information acquisition submodule is used to acquire the data collection interval and collect the location information of the candidate user based on the data collection interval.
[0075] The candidate area acquisition submodule is used to obtain location information based on candidate users, divide candidate users into candidate areas, and thus obtain a candidate user list corresponding to each candidate area.
[0076] Specifically, Figure 8 As shown, the device also includes:
[0077] The level area acquisition module is used to classify the candidate areas based on the candidate distances and obtain a level area list, wherein the level area list includes several levels, and any level includes several candidate areas under the level; wherein the difference between any two candidate distances under any level is less than a preset distance threshold.
[0078] The graded area warning module is used to warn candidate users based on the graded area list and the candidate user list corresponding to each candidate area.
[0079] In a specific embodiment of the present invention, Fig. 9 As shown, the level area warning module includes:
[0080] The maximum warning quantity acquisition submodule is used to obtain the maximum number of warnings per unit time.
[0081] The quantity ratio acquisition submodule is used to acquire the quantity ratio of candidate users corresponding to the candidate areas at any level if the sum of the quantity of candidate users corresponding to the candidate areas at that level is greater than the maximum warning quantity.
[0082] The quantity ratio warning submodule is used to issue warnings to candidate users in a candidate area based on the maximum warning quantity in a unit time and the quantity ratio of candidate users corresponding to the candidate area.
[0083] Further, such as Fig.10 As shown, the device also includes:
[0084] The historical area acquisition module is used to acquire a historical area list, wherein the historical area list includes a plurality of historical areas.
[0085] The combined area acquisition module is used to combine any two historical areas based on the historical area list, mark them as combined areas, and thus obtain the combined area list.
[0086] The usage time acquisition module is used to obtain the usage time list corresponding to any combined area based on the combined area list, thereby obtaining a usage time list set, wherein the usage time list includes a plurality of usage times, and the usage time is the time used from a historical area of the combined area to another historical area of the combined area.
[0087] The data collection interval acquisition module acquires the data collection interval based on the usage time list set.
[0088] Specifically, in one embodiment of the present invention, an average value of all usage times is obtained, and the average value of all usage times is used as a data collection interval.
[0089] Specifically, in another embodiment of the present invention, the median of all usage times is obtained, and the median of all usage times is used as the data collection interval.
[0090] Embodiment 3
[0091] Embodiment 3 of the present invention provides a non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the non-transitory computer-readable storage medium, and the at least one instruction or at least one program is loaded and executed by a processor to implement the steps:
[0092] Obtain the location of the target event and the warning range of the target event;
[0093] Based on the target event occurrence location and the target event warning range, a candidate area list and a candidate user list corresponding to each candidate area are obtained, wherein the candidate area list includes a plurality of candidate areas within the target event warning range, and the candidate user list includes a plurality of candidate users within the candidate areas;
[0094] Obtain the candidate distance between the target event location and each candidate area, and sort all candidate areas from small to large according to the candidate distance, so as to obtain a sorted area list;
[0095] Based on the sorted area list and the candidate user list corresponding to each candidate area, the candidate users are warned.
[0096] An embodiment of the present invention further provides an electronic device, comprising a processor and the aforementioned non-transitory computer-readable storage medium.
[0097] Although some specific embodiments of the present invention have been described in detail by way of example, it will be appreciated by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It will also be appreciated by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A target event early warning method, It is characterized in that The method comprises the following steps: Obtain the location of the target event and the warning range of the target event; Based on the target event occurrence location and the target event warning range, a candidate area list and a candidate user list corresponding to each candidate area are obtained, wherein the candidate area list includes a plurality of candidate areas within the target event warning range, and the candidate user list includes a plurality of candidate users within the candidate areas; Obtain the candidate distance between the target event location and each candidate area, and sort all candidate areas from small to large according to the candidate distance, so as to obtain a sorted area list; Based on the sorted area list and the candidate user list corresponding to each candidate area, the candidate users are warned.
2. The target event early warning method according to claim 1, It is characterized in that The method also includes obtaining a list of candidate users corresponding to each candidate area through the following steps: Obtaining a data collection interval, and collecting location information of candidate users based on the data collection interval; Based on the location information of the candidate users, the candidate users are divided into candidate areas, so as to obtain a candidate user list corresponding to each candidate area.
3. The target event early warning method according to claim 1, It is characterized in that Acquiring the candidate distance between the target event occurrence position and each candidate area specifically includes: acquiring the distance between the target event occurrence position and the center of each candidate area as the candidate distance.
4. The target event early warning method according to claim 3, It is characterized in that The candidate region is represented by a geohash.
5. The target event early warning method according to claim 4, It is characterized in that The candidate region is represented by a geohash of 5 characters in length.
6. The target event early warning method according to claim 1, It is characterized in that After obtaining the target event location and the candidate distance of each candidate area, the following steps are also included: Based on the candidate distance, the candidate areas are divided into levels to obtain a level area list, wherein the level area list includes several levels, and any level includes several candidate areas under the level; wherein the distance difference between any two candidate areas under any level is less than a preset distance threshold; Based on the hierarchical area list and the candidate user list corresponding to each candidate area, the candidate users are warned.
7. The target event early warning method according to claim 6, It is characterized in that Based on the hierarchical area list and the candidate user list corresponding to each candidate area, early warning of candidate users specifically includes: Get the maximum number of warnings per unit time; If the sum of the number of candidate users corresponding to the candidate areas at any level is greater than the maximum warning number, the ratio of the number of candidate users corresponding to the candidate areas at this level is obtained; Based on the maximum number of warnings per unit time, warnings are issued to candidate users in the candidate area according to the ratio of the number of candidate users corresponding to the candidate area.
8. A target event early warning device, It is characterized in that The device comprises: The target event acquisition module is used to obtain the target event occurrence location and target event warning range; A candidate area acquisition module is used to acquire a candidate area list and a candidate user list corresponding to each candidate area based on the target event occurrence location and the target event warning range, wherein the candidate area list includes a number of candidate areas within the target event warning range, and the candidate user list includes a number of candidate users within the candidate areas; A sorting region acquisition module is used to obtain the target event location and the candidate distance of each candidate region, and sort all candidate regions from small to large according to the candidate distance, so as to obtain a sorting region list; The early warning module is used to warn the candidate users based on the sorted area list and the candidate user list corresponding to each candidate area.
9. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium. It is characterized in that The at least one instruction or the at least one program is loaded and executed by the processor to implement the target event warning method as described in any one of claims 1-7.
10. An electronic device, It is characterized in that The invention comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 9.
