Extreme weather early warning information distribution method and device, electronic equipment and storage medium
By extracting key fields from weather data to generate early warning information entities and using a store-region mapping library for matching, the problems of information overload, lack of accuracy and scalability in existing technologies are solved, enabling accurate distribution of early warning information to enterprise stores and improving emergency response speed and system intelligence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-22
- Publication Date
- 2026-03-13
AI Technical Summary
Existing methods for distributing weather warning information suffer from information overload and interference, lack of accuracy and targeting, low levels of automation and intelligence, and poor scalability, making it impossible to achieve precise delivery to enterprise stores.
By extracting key fields from weather data to generate early warning information entities, and using a store-region mapping library for matching, the early warning information can be distributed in a targeted manner to ensure that the information is only delivered to the relevant stores.
It enables accurate delivery of early warning information, improves the emergency response speed of stores, reduces information interference, enhances the automation and intelligence of the system, and strengthens the scalability of the system.
Smart Images

Figure CN121661782A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of early warning information distribution technology, and in particular to a method, device, electronic device, and storage medium for distributing extreme weather early warning information. Background Technology
[0002] With global climate change and the increasing frequency of extreme weather events, various industries, especially chain enterprises with a large number of offline stores such as retail, catering, and services, are facing serious threats. Timely acquisition of accurate extreme weather warnings and rapid dissemination to store managers in affected areas are crucial for guiding stores to take preventative measures, ensuring the safety of personnel and property, and minimizing operational losses.
[0003] Currently, official meteorological agencies release early warning information to the public through their websites (such as weather.com.cn).
[0004] However, for corporate management, the existing methods of obtaining information are clearly inadequate: managers need to actively and frequently check websites and manually filter information related to their own stores. This process is inefficient, prone to omissions, and cannot be responded to in a timely manner outside of working hours.
[0005] To address the aforementioned issues, existing technology proposes a weather warning data collection system based on a simple timed web crawler, the implementation of which is as follows:
[0006] 1. Use Python's requests library to periodically (e.g., once per hour) access the webpage http: / / www.weather.com.cn / alarm / alarm_list.shtml.
[0007] 2. Use an HTML parsing library (such as BeautifulSoup) to parse the webpage content and extract the text information from the alert list.
[0008] 3. Send all the extracted warning information to a large group or email list that includes all store managers in one go, without discrimination, through internal corporate communication tools or email.
[0009] However, the above method has the following problems:
[0010] 1. Information Overload and Interference: The number of warning messages nationwide is enormous, but each store only cares about the warnings in its local area. The current solution pushes all information to all store managers, causing severe information overload. A large amount of irrelevant information interferes with the store managers' work, causing important warnings to be ignored.
[0011] 2. Lack of precision and targeting: It is impossible to associate early warning information with specific store locations, and it is impossible to achieve precise "one-to-one" or "one-to-many" push notifications, thus weakening the guiding significance of the defense guidelines.
[0012] 3. Low level of automation and intelligence: Although the entire process has achieved automatic data collection, the key link in information distribution still relies on manual screening (store managers find relevant warnings themselves), which is essentially "semi-automated". There is room for improvement in response speed and processing efficiency.
[0013] 4. Poor scalability: When the number of enterprise stores increases or multiple early warning data sources need to be connected, the existing architecture is difficult to scale smoothly, resulting in high management and maintenance costs. Summary of the Invention
[0014] This invention provides a method, device, electronic device, and storage medium for distributing extreme weather warning information, which solves the technical problems of existing weather warning distribution methods, such as information overload interference, lack of accuracy and targeting, low degree of automation and intelligence, and poor scalability.
[0015] This invention provides a method for distributing extreme weather warning information, comprising:
[0016] Collect weather data from a preset URL at regular intervals;
[0017] Key fields are extracted from the weather data, and warning information entities are generated using the key fields;
[0018] Obtain the store-region mapping library;
[0019] Match the warning information entity with the store-region mapping database to determine several stores corresponding to the warning information entity;
[0020] The warning information entity is distributed to the store.
[0021] Optionally, the step of extracting key fields from the weather data and generating a warning information entity using the key fields includes:
[0022] Extract the warning type, warning level, issuing area, warning content, detailed content, and defense guidelines from the weather data;
[0023] The warning type, warning level, issuing region, issuing content, detailed content, and defense guidelines are converted into structured data, and the structured data is merged to generate a warning information entity.
[0024] Optionally, the step of matching the early warning information entity with the store-region mapping database to determine the plurality of stores corresponding to the early warning information entity includes:
[0025] Read the issuing region field from the warning information entity;
[0026] Match the published region field in the store-region mapping library to obtain several stores corresponding to the published region field.
[0027] Optionally, the step of distributing the early warning information entity to the store includes:
[0028] The warning information entity is filled into a preset message template to generate the final alarm information;
[0029] Determine the store manager's terminal corresponding to the store;
[0030] The final alarm information is sent to the store manager's terminal.
[0031] The present invention also provides an extreme weather warning information distribution device, comprising:
[0032] The weather data acquisition module is used to periodically collect weather data from a preset URL;
[0033] The early warning information entity generation module is used to extract key fields from the weather data and generate early warning information entities using the key fields;
[0034] The store-region mapping library acquisition module is used to acquire the store-region mapping library;
[0035] The matching module is used to match the early warning information entity with the store-region mapping database to determine several stores corresponding to the early warning information entity;
[0036] The distribution module is used to distribute the warning information entity to the store.
[0037] Optionally, the early warning information entity generation module includes:
[0038] The key field extraction submodule is used to extract warning type, warning level, issuing region, issuing content, detailed content and defense guidelines from the weather data;
[0039] The early warning information entity generation submodule is used to convert the early warning type, the early warning level, the issuing region, the issuing content, the detailed content and the defense guidelines into structured data, and merge the structured data to generate early warning information entities.
[0040] Optionally, the matching module includes:
[0041] The publishing region field reading submodule is used to read the publishing region field from the warning information entity;
[0042] The store determination submodule is used to match the published region field in the store-region mapping library to obtain several stores corresponding to the published region field.
[0043] Optionally, the distribution module includes:
[0044] The final alarm information generation submodule is used to fill the warning information entity into a preset message template to generate the final alarm information;
[0045] The store manager terminal determination submodule is used to determine the store manager terminal corresponding to the store.
[0046] The distribution submodule is used to send the final alarm information to the store manager terminal.
[0047] The present invention also provides an electronic device, the device comprising a processor and a memory:
[0048] The memory is used to store program code and transmit the program code to the processor;
[0049] The processor is used to execute the extreme weather warning information distribution method as described above, according to the instructions in the program code.
[0050] The present invention also provides a computer-readable storage medium for storing program code for executing the extreme weather warning information distribution method as described in any of the preceding claims.
[0051] As can be seen from the above technical solutions, the present invention has the following advantages: The present invention discloses an extreme weather warning information distribution method, and specifically discloses: collecting weather data from a preset URL at regular intervals; extracting key fields from the weather data and generating warning information entities using the key fields; obtaining a store-region mapping library; matching the warning information entity with the store-region mapping library to determine several stores corresponding to the warning information entity; and distributing the warning information entity to the stores.
[0052] This invention extracts key fields from weather data and uses these fields to generate early warning information entities, enabling precise identification of these entities. By matching these entities with a pre-defined store-region mapping database, it achieves targeted distribution of early warning information, avoiding information interference. Simultaneously, it pushes early warning information and defense guidelines to relevant stores for accurate delivery, thereby improving the stores' emergency response speed. Attached Figure Description
[0053] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 A flowchart illustrating the steps of an extreme weather warning information distribution method provided in this embodiment of the invention;
[0055] Figure 2 A flowchart illustrating the steps of an extreme weather warning information distribution method according to another embodiment of the present invention;
[0056] Figure 3 This is a structural block diagram of an extreme weather warning information distribution device provided in an embodiment of the present invention. Detailed Implementation
[0057] This invention provides a method, apparatus, electronic device, and storage medium for distributing extreme weather warning information, which addresses the technical problems of existing weather warning distribution methods, such as information overload interference, lack of accuracy and targeting, low degree of automation and intelligence, and poor scalability.
[0058] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0059] Please see Figure 1 , Figure 1 This is a flowchart illustrating the steps of an extreme weather warning information distribution method provided in an embodiment of the present invention.
[0060] The present invention provides a method for distributing extreme weather warning information, which may specifically include the following steps:
[0061] Step 101: Collect weather data from a preset URL at regular intervals;
[0062] In this embodiment of the invention, a timer scheduler (such as using the APScheduler library) can be built into the data acquisition engine to collect weather data published on the official meteorological website at a preset period, such as once per hour or more frequently.
[0063] In its implementation, the data acquisition engine can use the Python requests library to send an HTTP GET request to the official weather website (e.g., http: / / www.weather.com.cn / alarm / alarm_list.shtml), analyze the corresponding API (http: / / product.weather.com.cn / alarm / grepalarm_cn.php), and parse the data to extract specific logic as follows:
[0064] text = response.text.encode('latin1').decode('utf-8')
[0065] result = json.loads(text.split("var alarminfo=")[1][:-1])
[0066] This allows us to extract standardized JSON data as the weather data to be collected.
[0067] Step 102: Extract key fields from weather data and use the key fields to generate early warning information entities;
[0068] After collecting weather data in JSON format, it can be further parsed to extract key fields and form a structured early warning information entity.
[0069] Step 103: Obtain the store-region mapping library;
[0070] In this embodiment of the invention, a store-region mapping database can be established, which records the unique code (such as store ID) of each store and its complete administrative region (such as xx city xx district xx street) in the form of a database table or configuration file.
[0071] Step 104: Match the early warning information entity with the store-region mapping database to determine the number of stores corresponding to the early warning information entity;
[0072] The system matches the alert information entity containing key fields with the store-region mapping database, searches the store-region mapping database for the key fields representing the region contained in the alert information entity, and then queries one or more stores located in that region based on the region information.
[0073] After querying all the stores corresponding to the entities with warning information, a "push task list" can be generated, which indicates which stores each warning message entity needs to be sent to.
[0074] Step 105: Distribute the warning information to the stores.
[0075] After generating the push task list, the warning information entities can be pushed to the corresponding stores according to the mapping relationship on the task push list.
[0076] This invention extracts key fields from weather data and uses these fields to generate early warning information entities, enabling precise identification of these entities. By matching these entities with a pre-defined store-region mapping database, it achieves targeted distribution of early warning information, avoiding information interference. Simultaneously, it pushes early warning information and defense guidelines to relevant stores for accurate delivery, thereby improving the stores' emergency response speed.
[0077] Please see Figure 2 , Figure 2 A flowchart illustrating the steps of an extreme weather warning information distribution method according to another embodiment of the present invention. Specifically, it may include the following steps:
[0078] Step 201: Collect weather data from a preset URL at regular intervals;
[0079] In this embodiment of the invention, a timer scheduler (such as using the APScheduler library) can be built into the data acquisition engine to collect weather data published on the official meteorological website at a preset period, such as once per hour or more frequently.
[0080] In its implementation, the data acquisition engine can use the Python requests library to send an HTTP GET request to the official weather website (e.g., http: / / www.weather.com.cn / alarm / alarm_list.shtml), analyze the corresponding API (http: / / product.weather.com.cn / alarm / grepalarm_cn.php), and parse the data to extract specific logic as follows:
[0081] text = response.text.encode('latin1').decode('utf-8')
[0082] result = json.loads(text.split("var alarminfo=")[1][:-1])
[0083] This allows us to extract standardized JSON data as the weather data to be collected.
[0084] Step 202: Extract the warning type, warning level, issuing area, warning content, detailed content, and defense guidelines from the weather data;
[0085] Step 203: Convert the warning type, warning level, issuing region, issuing content, detailed content and defense guidelines into structured data, and merge the structured data to generate warning information entities;
[0086] In this embodiment of the invention, key fields include warning type, warning level, issuing region, issuing time, detailed content, and defense guidelines.
[0087] Warning types: heavy rain, strong winds, etc.
[0088] Warning levels: Blue, Yellow, Orange, Red.
[0089] Release area: accurate to province, city, district / county.
[0090] Release time: accurate to the minute.
[0091] Detailed information and defense guidelines: Data is collected based on the actual situation published on the website.
[0092] Step 204: Obtain the store-region mapping library;
[0093] In this embodiment of the invention, a store-region mapping database can be established, which records the unique code (such as store ID) of each store and its complete administrative region (such as xx city xx district xx street) in the form of a database table or configuration file.
[0094] Step 205: Match the early warning information entity with the store-region mapping database to determine the number of stores corresponding to the early warning information entity;
[0095] The system matches the alert information entity containing key fields with the store-region mapping database, searches the store-region mapping database for the key fields representing the region contained in the alert information entity, and then queries one or more stores located in that region based on the region information.
[0096] In one example, the step of matching the warning information entity with the store-region mapping library to determine the number of stores corresponding to the warning information entity may specifically include the following sub-steps:
[0097] S51, Read the issuing region field from the early warning information entity;
[0098] S52 matches the published region field in the store-region mapping library to obtain several stores corresponding to the published region field.
[0099] In the implementation, the publishing region field can be read first from the warning information entity. Then, the matching logic is executed in the store-region mapping library: it is determined whether the publishing region has an inclusion or intersection relationship with the region to which the store belongs in the store-region mapping library. For example, a warning message entity with the publishing region of "City A, District B" will match all stores belonging to any street under "District B".
[0100] Step 206: Distribute the warning information to the stores.
[0101] After generating the push task list, the warning information entities can be pushed to the corresponding stores according to the mapping relationship on the task push list.
[0102] In one example, the step of distributing the alert information entity to stores may specifically include the following sub-steps:
[0103] S61, fill the warning information entity into the preset message template to generate the final alarm information;
[0104] S62, determine the store manager's terminal corresponding to the store;
[0105] S63 will send the final alarm information to the store manager's terminal.
[0106] In its implementation, after receiving the "push task list", the precise distribution engine performs the following operations for each task in the list:
[0107] 1. Message Template Rendering: Based on the preset message template, the key information (warning type, warning level, issuing region, issuing time, detailed content and defense guidelines) in the "warning message entity" is filled in to generate a final alarm message with a standardized format and clear content.
[0108] 2. Channel routing and sending: By calling the API of the enterprise's internal system, the rendered final alarm message is sent to the corresponding APP on the store manager's terminal of the corresponding store, or notified via SMS.
[0109] This invention extracts key fields from weather data and uses these fields to generate early warning information entities, enabling precise identification of these entities. By matching these entities with a pre-defined store-region mapping database, it achieves targeted distribution of early warning information, avoiding information interference. Simultaneously, it pushes early warning information and defense guidelines to relevant stores for accurate delivery, thereby improving the stores' emergency response speed.
[0110] Please see Figure 3 , Figure 3 This is a structural block diagram of an extreme weather warning information distribution device provided in an embodiment of the present invention.
[0111] This invention provides an extreme weather warning information distribution device, which may specifically include the following modules:
[0112] Weather data acquisition module 301 is used to periodically collect weather data from a preset URL;
[0113] The early warning information entity generation module 302 is used to extract key fields from weather data and generate early warning information entities using the key fields;
[0114] Store-Region Mapping Library Acquisition Module 303 is used to acquire the store-region mapping library;
[0115] Matching module 304 is used to match the early warning information entity with the store-region mapping library to determine the number of stores corresponding to the early warning information entity;
[0116] The distribution module 305 is used to distribute the warning information entities to stores.
[0117] In this embodiment of the invention, the early warning information entity generation module 302 includes:
[0118] The key field extraction submodule is used to extract warning type, warning level, issuing region, issuing content, detailed content and defense guidelines from weather data;
[0119] The early warning information entity generation submodule is used to convert early warning type, early warning level, issuing region, issuing content, detailed content and defense guidelines into structured data, and merge the structured data to generate early warning information entities.
[0120] In this embodiment of the invention, the matching module 304 includes:
[0121] The Region Field Reading Submodule is used to read the Region Field from the warning information entity;
[0122] The store determination submodule is used to match the published region field in the store-region mapping library to obtain several stores corresponding to the published region field.
[0123] In this embodiment of the invention, the distribution module 305 includes:
[0124] The final alarm information generation submodule is used to fill the warning information entity into the preset message template and generate the final alarm information;
[0125] The store manager terminal determination submodule is used to determine the store manager terminal corresponding to a store.
[0126] The distribution submodule is used to send the final alarm information to the store manager's terminal.
[0127] This invention also provides an electronic device, which includes a processor and a memory:
[0128] The memory is used to store program code and transfer the program code to the processor;
[0129] The processor is used to execute the extreme weather warning information distribution method of this invention according to the instructions in the program code.
[0130] This invention also provides a computer-readable storage medium for storing program code for executing the extreme weather warning information distribution method of this invention.
[0131] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0132] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0133] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0134] Embodiments of the present invention are described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0135] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0136] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0137] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0138] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0139] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0140] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for distributing extreme weather warning information, characterized in that, include: Collect weather data from a preset URL at regular intervals; Key fields are extracted from the weather data, and warning information entities are generated using the key fields; Obtain the store-region mapping library; Match the warning information entity with the store-region mapping database to determine several stores corresponding to the warning information entity; The warning information entity is distributed to the store.
2. The method according to claim 1, characterized in that, The step of extracting key fields from the weather data and generating a warning information entity using the key fields includes: Extract the warning type, warning level, issuing area, warning content, detailed content, and defense guidelines from the weather data; The warning type, warning level, issuing region, issuing content, detailed content, and defense guidelines are converted into structured data, and the structured data is merged to generate a warning information entity.
3. The method according to claim 1, characterized in that, The step of matching the early warning information entity with the store-region mapping database to determine the number of stores corresponding to the early warning information entity includes: Read the issuing region field from the warning information entity; Match the published region field in the store-region mapping library to obtain several stores corresponding to the published region field.
4. The method according to claim 1, characterized in that, The step of distributing the early warning information entity to the store includes: The warning information entity is filled into a preset message template to generate the final alarm information; Determine the store manager's terminal corresponding to the store; The final alarm information is sent to the store manager's terminal.
5. An extreme weather warning information distribution device, characterized in that, include: The weather data acquisition module is used to periodically collect weather data from a preset URL; The early warning information entity generation module is used to extract key fields from the weather data and generate early warning information entities using the key fields; The store-region mapping library acquisition module is used to acquire the store-region mapping library; The matching module is used to match the early warning information entity with the store-region mapping database to determine several stores corresponding to the early warning information entity; The distribution module is used to distribute the warning information entity to the store.
6. The apparatus according to claim 5, characterized in that, The early warning information entity generation module includes: The key field extraction submodule is used to extract warning type, warning level, issuing region, issuing content, detailed content and defense guidelines from the weather data; The early warning information entity generation submodule is used to convert the early warning type, the early warning level, the issuing region, the issuing content, the detailed content and the defense guidelines into structured data, and merge the structured data to generate early warning information entities.
7. The apparatus according to claim 5, characterized in that, The matching module includes: The publishing region field reading submodule is used to read the publishing region field from the warning information entity; The store determination submodule is used to match the published region field in the store-region mapping library to obtain several stores corresponding to the published region field.
8. The apparatus according to claim 5, characterized in that, The distribution module includes: The final alarm information generation submodule is used to fill the warning information entity into a preset message template to generate the final alarm information; The store manager terminal determination submodule is used to determine the store manager terminal corresponding to the store. The distribution submodule is used to send the final alarm information to the store manager terminal.
9. An electronic device, characterized in that, The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the extreme weather warning information distribution method according to any one of claims 1-4 according to the instructions in the program code.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium is used to store program code for executing the extreme weather warning information distribution method according to any one of claims 1-4.