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

Through machine learning models, key information is extracted from weather warning text and combined with a streaming knowledge graph library to query user terminal equipment to generate personalized text messages, solving the problem that users find it difficult to understand the impact range of weather warnings and achieving accurate and full coverage early warning services.

CN119938901AInactive Publication Date: 2025-05-06PUBLIC METEOROLOGICAL SERVICE CENT OF CHINA METEOROLOGICAL ADMINISTRATION
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202510429382.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-05-06
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the existing weather warning services, it is difficult for users to accurately understand the scope and level of the warning, resulting in a low effect on the warning service.

Method used

The machine learning model is used to extract the warning-affected area, the warning effect time and warning matters from the weather warning text, and query the user terminal equipment in the streaming knowledge graph library to generate personalized service text messages.

Benefits of technology

Accurate early warning services and full coverage of the areas affected by weather warnings have been achieved, and the accuracy of early warning services has been improved, helping users better understand and respond to weather warnings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938901A_ABST
    Figure CN119938901A_ABST
Patent Text Reader

Abstract

The invention provides a weather early warning method and device, electronic equipment and a storage medium. The method comprises the following steps: extracting an early warning influence area, early warning effective time and early warning items from a weather early warning text by using a machine learning model; user terminal equipment in the early warning influence area is inquired in a pre-constructed streaming knowledge graph database; and generating a personalized service short message according to the terminal equipment data, the early warning effective time and the early warning item, wherein the personalized service short message is used for early warning weather in the early warning influence area. The early warning influence area, the early warning effective time and the early warning matter are extracted from the weather early warning text by using the machine learning model, and the personalized service short message of the user terminal equipment in the early warning influence area is generated, so that the condition that the current weather early warning service is inaccurate is improved, the accurate early warning service and full coverage of the influence area are realized, and the user experience is improved. And the accuracy of the early warning service is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical fields of weather warning, text semantic analysis and text extraction, and in particular to a weather warning method, device, electronic device and storage medium. Background Art

[0002] At present, most of the weather warning services in a certain place are provided by publishing a file or a text on the warning service platform. The text content needs to be analyzed manually to evaluate the impact. Users who do not have weather and geographical knowledge have difficulty interpreting the accuracy of the warning. Here is an example of an airport. For example, the warning text displayed on a service platform of an airport may be "There are precipitation clouds 0 to 30 kilometers west of Airport A, moving eastward at a speed of 50 kilometers per hour. It is expected to have an impact from 18:35 to 19:00 (lasting 25 minutes) on the 29th, Beijing time. The whole area of ​​this airport will mainly show moderate showers." In the actual practice process, it was found that users were not very clear about the specific impact range and impact level of the warning based on the text, and they were even less clear about how to prevent it, which made the warning service less effective. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a weather warning method, device, electronic device and storage medium for improving the problem of inaccurate weather warning services.

[0004] The embodiment of the present application provides a weather warning method, including: using a machine learning model to extract the warning impact area, warning effective time, and warning items from the weather warning text; querying the user terminal devices in the warning impact area in the pre-built streaming knowledge graph library; generating a personalized service SMS based on the user terminal device, the warning effective time, and the warning items, and the personalized service SMS is used to warn the weather in the warning impact area. In the implementation process of the above scheme, by using a machine learning model to extract the warning impact area, the warning effective time, and the warning items from the weather warning text, personalized service SMS are provided to users in the warning impact area, which improves the current inaccurate weather warning service, realizes accurate warning service and full coverage of the affected area, and improves the accuracy of the warning service.

[0005] Optionally, in an embodiment of the present application, the machine learning model is a multi-task joint learning named entity recognition MTL-NER model; using the machine learning model to extract the warning impact area, warning effective time and warning items from the weather warning text, including: using the encoding layer in the MTL-NER model to encode the warning text to obtain word vector semantic features; using the decoding layer in the MTL-NER model to decode the word vector semantic features to obtain the warning impact area, warning effective time and warning items. In the implementation process of the above scheme, by using the multi-task joint learning named entity recognition (MTL-NER) model to jointly learn multiple tasks (i.e., identify the warning impact area, warning effective time and warning items), the feature representation of the encoding layer can be shared, so as to more effectively capture the complex semantic relationship features in the text. Compared with training multiple models separately to process each task, the MTL-NER model can share feature representations between tasks, so that the model can more accurately capture the subtle differences and related information in the text. This sharing mechanism helps to improve the recognition accuracy of each task, thereby improving the entity extraction accuracy of the MTL-NER model in different scenarios. In addition, the warning text is encoded through the encoding layer, and the text information is converted into word vector semantic features, so that the model can better understand the contextual information of the text, and these semantic features are further converted into specific entity recognition results through the decoding layer, so as to accurately extract the warning affected area, warning effective time and warning items. This layered processing method effectively improves the processing efficiency of the model and enhances the model's ability to understand complex text structures.

[0006] Optionally, in an embodiment of the present application, the decoding layer includes: a region extraction decoder, a time extraction decoder and a warning content decoder; the decoding layer in the MTL-NER model is used to decode the semantic features of the word vector to obtain the warning impact area, the warning effective time and the warning items, including: using the region extraction decoder to decode the semantic features of the word vector to obtain the warning impact area; using the time extraction decoder to decode the semantic features of the word vector to obtain the warning effective time; using the warning content decoder to decode the semantic features of the word vector to obtain the warning items. In the implementation process of the above scheme, by introducing the named entity recognition (NER) model of multi-task learning (MTL), and combining the region extraction decoder, the time extraction decoder and the warning content decoder, the word vector semantic features are decoded respectively, and the key elements in the warning information (such as the warning impact area, the warning effective time and the warning items) are accurately extracted. In addition, by jointly training multiple decoding tasks (region, time and content), the model can promote each other and improve the overall decoding performance, and each decoder can better capture the specific patterns of each task on the basis of sharing the underlying features, thereby improving the recognition accuracy of each task. Furthermore, through the joint training of multi-task decoders, the model can compensate through auxiliary information from other tasks when faced with noisy data or partial information missing, thereby enhancing the robustness of the model and reducing the probability of erroneous decoding.

[0007] Optionally, in an embodiment of the present application, querying the user terminal devices in the warning impact area in the pre-built streaming knowledge graph library includes: obtaining geographic zoning data, and querying the geographic administrative region to which the warning impact area belongs in the geographic zoning data; querying the inference rules corresponding to the geographic administrative region in the streaming knowledge graph library; using the rule engine to infer the inference rules corresponding to the geographic administrative region, and obtaining the user terminal devices in the warning impact area. In the implementation process of the above scheme, by obtaining geographic zoning data and querying the geographic administrative region to which the warning impact area belongs, and querying the inference rules corresponding to the geographic administrative region in the streaming knowledge graph library, combined with the rule engine for reasoning, the user terminal devices in the warning impact area can be more accurately screened out. This rule-based reasoning method is more flexible and intelligent than traditional static matching, especially when facing complex geographical distribution and user behavior patterns, it can more effectively identify the affected user terminal devices, thereby improving the errors that may occur in traditional methods, such as blurred boundaries, overlapping areas, etc., and effectively improving the accuracy of locating the geographic administrative region where the user terminal device is located. In addition, since the streaming knowledge graph library can update and process data in real time, it ensures that the division of geographical administrative regions and the update of reasoning rules can reflect the current status in a timely manner, so that the system can quickly respond and filter out the affected user terminal devices when a warning event occurs. Furthermore, since the rule engine can dynamically reason based on real-time input data, the reasoning results in different geographical administrative regions and different warning events are the latest and most accurate. Compared with traditional static systems, the dynamic reasoning method of this rule engine can improve the dynamic and real-time nature of the geographical administrative region where the user terminal device is located.

[0008] Optionally, in an embodiment of the present application, the user terminal devices within the warning impact area are queried in the pre-built streaming knowledge graph library, including: querying the location code corresponding to the impact area in the geographic zoning data table; querying the user terminal device corresponding to the location code in the streaming knowledge graph library, and determining the user terminal device corresponding to the location code as the user terminal device within the warning impact area. In the implementation process of the above scheme, by directly querying the user terminal device corresponding to the location code in the streaming knowledge graph library, the system can complete the query within a few milliseconds, which is crucial for the real-time warning system, ensuring the timely transmission and processing of information, and improving the efficiency of warning the user terminal device. In addition, the direct association of the location code with the user terminal device reduces the possibility of misjudgment, because the traditional warning system may need to use complex algorithms to determine which devices are in the impact area, and this method of associating the location code with the user terminal device through the knowledge graph can directly and accurately locate the affected device, improving the accuracy of warning the user terminal device.

[0009] Optionally, in an embodiment of the present application, after extracting the warning impact area, warning effective time, and warning items from the weather warning text using a machine learning model, it also includes: obtaining the actual weather information of the warning impact area at the warning effective time; comparing the actual weather information of the warning impact area with the weather warning information in the warning items to obtain a comparison result. In the implementation process of the above scheme, the actual weather information of the warning impact area is compared with the weather warning information in the warning items to obtain a comparison result, so as to optimize and train the machine learning model according to the comparison result, thereby improving the accuracy of weather warning using the machine learning model.

[0010] Optionally, in the embodiment of the present application, after generating a personalized service SMS according to the user terminal device, the warning effective time and the warning items, it also includes: sending a personalized service SMS to the user terminal devices in the warning impact area before the warning effective time. In the implementation process of the above scheme, a personalized service SMS based on the warning impact is sent to the people in the warning impact area before the warning effective time, thereby realizing accurate warning service.

[0011] The embodiment of the present application also provides a weather warning device, including: a warning text extraction module, which is used to use a machine learning model to extract the warning impact area, warning effective time and warning matters from the weather warning text; a terminal device query module, which is used to query the user terminal devices within the warning impact area in a pre-built streaming knowledge graph library; a warning SMS generation module, which is used to generate personalized service SMS according to the user terminal device, warning effective time and warning matters, and the personalized service SMS is used to warn the weather in the warning impact area.

[0012] Optionally, in an embodiment of the present application, the machine learning model is a multi-task joint learning named entity recognition MTL-NER model; the weather warning device also includes: a text encoding processing module, which is used to use the encoding layer in the MTL-NER model to encode the warning text to obtain word vector semantic features; a semantic feature decoding module, which is used to use the decoding layer in the MTL-NER model to decode the word vector semantic features to obtain the warning affected area, warning effective time and warning matters.

[0013] Optionally, in an embodiment of the present application, the decoding layer includes: a region extraction decoder, a time extraction decoder and a warning content decoder; the semantic feature decoding module includes: a first decoding processing submodule, which is used to use the region extraction decoder to decode the word vector semantic features to obtain the warning impact area; a second decoding processing submodule, which is used to use the time extraction decoder to decode the word vector semantic features to obtain the warning effective time; a third decoding processing submodule, which is used to use the warning content decoder to decode the word vector semantic features to obtain the warning items.

[0014] Optionally, in an embodiment of the present application, the early warning data analysis module includes: a geographic data query submodule, which is used to obtain geographic zoning data and query the geographic administrative region to which the early warning impact area belongs in the geographic zoning data; an inference rule query submodule, which is used to query the inference rules corresponding to the geographic administrative region in the streaming knowledge graph library; and a terminal device inference submodule, which is used to use a rule engine to infer the inference rules corresponding to the geographic administrative region to obtain user terminal devices within the early warning impact area.

[0015] Optionally, in an embodiment of the present application, the weather warning device also includes: a geocoding query submodule, which is used to query the geocoding corresponding to the affected area in the geographic zoning data table; a location code display submodule, which is used to query the user terminal device corresponding to the location code in the streaming knowledge graph library, and determine the user terminal device corresponding to the location code as the user terminal device within the warning affected area.

[0016] Optionally, in an embodiment of the present application, the service SMS generation module includes: a user role acquisition submodule, used to obtain the user role corresponding to the user terminal device; an SMS template search submodule, used to search for the SMS template corresponding to the user role in the SMS service template library; an SMS template filling submodule, used to fill the warning effective time and warning items into the SMS template to obtain a personalized service SMS.

[0017] Optionally, in an embodiment of the present application, the weather warning service device for the affected area also includes: a weather real-time information acquisition module, which is used to obtain the weather real-time information of the warning affected area when the warning takes effect; a comparison result acquisition module, which is used to compare the weather real-time information of the warning affected area with the weather warning information in the warning matters to obtain a comparison result, and the comparison result is used to train the machine learning model.

[0018] Optionally, in an embodiment of the present application, the weather warning service device for the affected area further includes: a warning content sending module, which is used to send warning items to the warning affected area before the warning takes effect.

[0019] An embodiment of the present application further provides an electronic device, including: a processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method described above is performed.

[0020] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method described above is executed.

[0021] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and in part will become apparent from the description, or will be understood by implementing the embodiments of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0023] Figure 1 A schematic diagram of a weather warning method according to an embodiment of the present invention is shown; Figure 2 A schematic diagram of the structure of a weather warning device provided in an embodiment of the present application is shown; Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0024] To make the purpose, technical scheme and advantages of the embodiment of the present application clearer, the technical scheme in the embodiment of the present application will be clearly and completely described below in conjunction with the drawings in the embodiment of the present application. It should be understood that the drawings in the embodiment of the present application only serve the purpose of explanation and description, and are not used to limit the protection scope of the embodiment of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in the embodiment of the present application shows the operation implemented according to some embodiments of the embodiment of the present application. It should be understood that the operation of the flowchart can be implemented out of order, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the embodiment of the present application, or remove one or more operations from the flowchart.

[0025] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all embodiments. The components of the embodiments of the present application generally described and shown in the accompanying drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the embodiments of the present application claimed, but merely represents the selected embodiments of the embodiments of the present application.

[0026] It is understandable that the "first" and "second" in the embodiments of the present application are used to distinguish similar objects. Those skilled in the art will understand that the words "first" and "second" do not limit the quantity and execution order, and the words "first" and "second" do not necessarily limit the difference. In the description of the embodiments of the present application, the term "and / or" is merely a description of the association relationship of the associated objects, indicating that there may be three relationships, such as A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the related objects before and after are in an "or" relationship. The term "multiple" refers to more than two (including two), and similarly, "multiple groups" refers to more than two groups (including two groups).

[0027] It should be noted that the weather warning method provided in the embodiment of the present application can be executed by an electronic device, where the electronic device refers to a device terminal having the function of executing a computer program or the above-mentioned server, such as a smart phone, a personal computer, a tablet computer, a personal digital assistant or a mobile Internet device. A server refers to a device that provides computing services through a network, such as an x86 server and a non-x86 server, and the non-x86 server includes a mainframe, a minicomputer and a UNIX server.

[0028] The following introduces the application scenarios to which the weather warning method is applicable. The application scenarios here include but are not limited to: the weather warning method can be used to improve the regional warning software systems of airports, coal mines, shopping malls, etc. In the specific practice process, the warning method can also be used to perform text mining and extraction on the warning text, so as to obtain the extracted and output warning impact area, warning effective time, and warning matters. It is understandable that since the warning texts issued in various usage scenarios are different, not only the text format is different, but also the substantive content of the text is different. Therefore, the weather warning method can be used to extract the unified format of the warning impact area, warning effective time, and warning matters from the warning texts in different formats.

[0029] See also Figure 1 The flowchart of the weather warning method provided by the embodiment of the present application is shown; the implementation method of the above weather warning method may include: Step S110: Use a machine learning model to extract the warning impact area, warning effective time and warning items from the weather warning text.

[0030] Weather warning text refers to the text for weather warning issued by various terminal institutions (such as airport terminal areas) through electronic devices. The warning text may include: warning impact area, warning effective time and warning items. The warning effective time may be abstract time words such as "daytime", "tomorrow" or "next 8 hours". You can use the application program interface (API) to obtain weather warning text, and of course you can also use data collection software to collect weather warning text. For example, you can use Wireshark to collect warning text in text format.

[0031] It is understandable that the above process of extracting the warning impact area, warning effective time and warning items can be regarded as the process of text structuring, that is, the process of extracting structured data from unstructured warning text. After the text is structured, the various element information (such as the impact area, effective time and warning items) can be orderly structured and expressed according to the preset format (such as the same space-time reference format). Assume that the weather warning text is "The Meteorological Observatory of City B issued a red warning for heavy rain at 18:00 on July 20, 2023: It is expected that from 20:00 on the 20th to 08:00 on the 21st, HD, CY, FT and other areas will experience heavy rain with a cumulative rainfall of 200 mm. Please stop outdoor work and guard against flash floods and geological disasters." The above-extracted warning affected areas, warning effective time and warning items can be as follows: Warning effective time: ["18:00 on July 20, 2023", "20:00 on the 20th to 08:00 on the 21st"]; Warning affected areas: ["HD area", "CY area", "FT area"]; Warning items: ["Stop outdoor work", "Prevent flash floods and geological disasters"].

[0032] There are many ways to implement the text structuring in the above step S110. For example, it can be extracted by deep learning, or it can be extracted by machine learning statistics or rule matching. Therefore, the implementation of the above step S110 will be described in detail below.

[0033] Step S120: Query the user terminal devices within the warning impact area in the pre-built streaming knowledge graph library.

[0034] The above-mentioned knowledge graph repository is a system or database for storing, managing and querying knowledge graph data, such as Neo4j, which can be used to store and query knowledge graph data, while the streaming knowledge graph repository refers to a knowledge graph repository where data is processed in a continuous, real-time manner, rather than in the form of batches or static files. Among them, the above-mentioned knowledge graph is a data model that represents knowledge in the form of a graph structure, in which nodes represent entities or concepts, and edges represent the relationship between entities.

[0035] User Terminal Equipment (UTE) is a hardware device used by users to receive, send or process information, such as smartphones, laptops, smart TVs, smart watches, etc.

[0036] Step S130: Generate a personalized service SMS according to the user terminal device, warning effective time and warning items. The personalized service SMS is used to warn the weather in the warning affected area.

[0037] In the implementation process of the above solution, the warning affected area, warning effective time and warning items are extracted from the weather warning text by using a machine learning model, and the warning affected area, warning effective time and warning items are output, which improves the situation of weather warning through script programs, thereby effectively improving the efficiency of weather warnings and enhancing the application effect of warnings.

[0038] As a first optional implementation of the above step S110, a multi-task joint learning named entity recognition (MTL-NER) model may be used to extract the warning impact area, warning effective time and warning items. This implementation may include: Step S111: Use the encoding layer in the MTL-NER model to encode the warning text to obtain word vector semantic features.

[0039] It is understandable that the function of the encoding layer in the MTL-NER model is to convert the input text sequence into a continuous vector sequence, which can be regarded as the "digital representation" of the text. The encoding layer is usually based on a neural network architecture, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), a gated recurrent unit (GRU), or a Transformer model. These encoding layers can learn the contextual relationship in the text and generate a high-dimensional vector for each word. These vectors contain not only the semantic information of the word itself, but also its meaning in a specific context.

[0040] The implementation method of the above step S111 is, for example: first, the warning text is segmented or word-by-word, and converted into an input format acceptable to the model. For example, Chinese text usually requires word segmentation, while English text can be directly segmented by space. Then, the preprocessed text is input into the encoding layer of the MTL-NER model, which can be a pre-trained language model built based on BERT, RoBERTa, LSTM, GRU, Transformer, etc. This encoding layer will generate corresponding vector representations word by word according to the context of the input text. These vectors are usually high-dimensional (such as 768 dimensions or 1024 dimensions) and can capture the semantics and contextual information of the vocabulary. Finally, the encoding layer outputs word vector semantic features, and each word vector represents the semantic features of the corresponding vocabulary in the input text.

[0041] The above encoding layer is shared by three tasks, namely, the three decoders for generating the warning impact area, the warning effective time, and the warning items. Therefore, it can effectively understand the time-place-event relationship in the warning content, so that time recognition, area recognition, and warning content recognition can help each other. Therefore, this MTL-NER model is superior to the traditional model in terms of semantic understanding ability and multi-task collaboration. In the specific practice process, the above-mentioned hierarchical shared encoder can set different learning rates for the shared encoding layer and task decoder to avoid excessive updating of the encoding layer parameters and improve the recognition accuracy. This hierarchical shared encoder setting can effectively extract the common semantic features of the text, thereby enhancing the universality of different tasks such as time, place, and warning content.

[0042] Step S112: Use the decoding layer in the MTL-NER model to decode the semantic features of the word vector to obtain the warning impact area, warning effective time and warning items.

[0043] The decoding layer in the above step S112 may include: a region extraction decoder (Region Decoder), a time extraction decoder (Time Decoder) and a warning content decoder (Warning Decoder); the above implementation method of using the decoding layer in the MTL-NER model to decode the semantic features of the word vector may include: Step S112a: Use the region extraction decoder to decode the semantic features of the word vector to obtain the warning impact area.

[0044] An implementation method of the above-mentioned step S112a, for example: a Span annotation method can be used to directly predict the starting and ending positions of the regional entity, rather than relying on a place name database to predict the warning impact area. This Span annotation method can handle fuzzy areas well, such as mapping "Beijing North" to the northern administrative district of Beijing.

[0045] Step S112b: Use the time extraction decoder to decode the word vector semantic features to obtain the warning effective time.

[0046] The implementation method of the above-mentioned step S112b, for example: a conditional random field (CRF) model can be used as a time extraction decoder. The sequence modeling capability of the CRF model can capture the boundaries and dependencies of time expressions, improve the problem that traditional methods cannot handle fuzzy time expressions, and effectively complete fuzzy time reasoning, such as mapping "the next few days" to specific dates.

[0047] Step S113c: Use the warning content decoder to decode the semantic features of the word vector to obtain warning items.

[0048] For example, the implementation method of the above step S113c is as follows: a pointer network model can be used as a warning content decoder. In the process of using the pointer network model to decode the word vector semantic features, the pointer network model can directly point to the elements in the input sequence through the attention mechanism, and use the attention mechanism to generate a "pointer" pointing to the elements in the input sequence, and directly predict the start and end positions of the warning content. The decoding of the word vector semantic features by the above pointer network model effectively improves the problem of relying on a fixed output vocabulary or relying on keyword matching to make it difficult to accurately extract warning items. This pointer network model can handle complex semantics, and even if the content length of the context is very long, the warning items can be decoded from the word vector semantic features.

[0049] As a second optional implementation of the above step S110, the CRF layer in the machine learning model can be used to extract the effective time from the warning text. For example, in the field of natural language processing (NLP), the above-mentioned effective time extraction problem can be converted into a sequence labeling problem to solve. Therefore, the CRF layer of the machine learning model that performs well in the named entity recognition (NER) task can be used to extract the effective time of the warning text to obtain the extracted effective time. It can be understood that before using the CRF layer to extract the effective time, the CRF layer in the machine learning model can also be trained. For example, first randomly select 10,000 warning texts in the past year from the historical database as a text corpus, and pre-process the text corpus (for example, remove special characters or format conversion, etc.), then analyze, label and extract the time information features in the text corpus to obtain a feature template, which may include: words, parts of speech, combinations of words and parts of speech, and context features of words, etc. Finally, the feature template is used to train the above-mentioned CRF layer.

[0050] After obtaining the effective time, you can also perform post-processing operations such as merging adjacent time units on the effective time. For example, the merging of adjacent time units here is: the effective time in the first warning item is before 8:30 on the same day, and the effective time in the second warning item is after 8:30 on the same day. When the first warning item and the second warning item need to be merged, they can be directly merged into the whole day of the day. After obtaining the effective time, you can also perform standardization on the effective time to obtain the standardized time. For example, the day can be standardized to the whole day of May 22, 2023.

[0051] Optionally, Bootstrapping in the machine learning model can also be used to extract warning items from the warning text. It is understandable that the warning items in the warning text are closely related to the warning disaster type, and the warning disaster type can usually include: disaster intensity and secondary disasters (i.e., secondary disasters that may be caused, etc.), for example: the rainstorm warning describes "the maximum hourly rainfall is 20 to 50 mm, and landslides, mudslides and other geological disasters are very likely to occur." Therefore, the relationship extraction method of Bootstrapping in the machine learning model can be used to extract the warning items in the warning text. In the above implementation process, by adopting the Bootstrapping weakly supervised learning method, a new warning item extraction model is constructed to improve the accuracy of the extraction results.

[0052] Optionally, the language characteristics, lexical characteristics, syntactic characteristics and semantic characteristics of the warning text in each meteorological disaster service system can be extracted by analyzing the differences in the expression of the warning text in natural language and in each meteorological disaster service system, and the affected area, effective time and warning items can be extracted from the warning text in the meteorological disaster service system based on the language characteristics, lexical characteristics, syntactic characteristics and semantic characteristics.

[0053] In the specific practice process, when training the above-mentioned machine learning model, the sample data can also be annotated according to the language characteristics, vocabulary characteristics, syntactic characteristics and semantic characteristics of the warning text to obtain the annotated data for training the above-mentioned machine learning model. For example: the language structure and semantic expression rules of the relevant element information in the text are analyzed to obtain metadata describing the warning information, and the metadata of the warning information is annotated in the annotation platform system to obtain the annotated data for training the above-mentioned machine learning model.

[0054] As a first optional implementation of the above step S120, the implementation of querying the pre-built streaming knowledge graph library for user terminal devices in the warning impact area may include: Step S121: Acquire geographic division data, and query the geographic division data for the geographic administrative region to which the warning impact area belongs.

[0055] The implementation method of the above step S121 is, for example: obtaining the latest geographic zoning data from relevant government departments, geographic information system (GIS) platforms or authoritative data providers, which data can generally include boundary information of administrative regions such as countries, provinces, cities, districts, counties, and towns. Data format conversion can be performed (such as converting Shapefile data into Geo JSON format). Then, the acquired geographic zoning data is imported into the database of the early warning system, or the data is directly loaded into the GIS platform to ensure that the geographic zoning data is properly stored in the system and can be quickly queried and updated. Then, the geographical scope of the warning impact area (usually expressed in latitude and longitude coordinates or polygons) can be determined based on the early warning information (such as meteorological warnings, geological disaster warnings, etc.), for example, using GIS tools or spatial database query functions, the early warning impact area is spatially matched with the geographic zoning data to determine the administrative region to which the early warning area belongs. Finally, the matching results are output as specific administrative division information, such as provinces, cities, districts and counties, and this information is associated with the early warning content.

[0056] Step S122: Query the inference rules corresponding to the geographical administrative regions in the streaming knowledge graph library.

[0057] The implementation method of the above step S122 is, for example: It can be understood that the above streaming knowledge graph library can use technologies such as Apache Kafka and Neo4j Streams, and query the inference rules corresponding to the geographical administrative regions in the Neo4j Streams streaming knowledge graph library through Apache Kafka. In the airport warning service scenario, the above inference rules include impact (typhoon → flight), need to be executed (flood → pumping equipment), and trigger (wind speed> level 12 → stop running). Specifically, add relevant rules such as "heavy fog warning", such as: "heavy fog warning", "impact", ["runway visibility", "flight takeoff and landing"]), "runway visibility <500 meters", "need to be executed", ["start Category II blind landing", "adjust flight interval"]).

[0058] Step S123: Use the rule engine to infer the inference rules corresponding to the geographical administrative area to obtain the user terminal devices within the warning impact area.

[0059] The implementation method of the above step S123 is, for example: a suitable rule engine (such as Drools, Jess, etc.) can be used and configured according to the inference rules found. After the rule engine is configured, the inference rules corresponding to the geographical administrative area can be input into the rule engine to execute the inference process. The rule engine will analyze the user terminal devices in the warning impact area according to the predefined rules. Finally, the result of the inference engine's inference based on the rules is a list of user terminal devices in the warning impact area. These devices can be devices affected by the warning (such as airport equipment, traffic signal equipment, etc.), or devices that need to perform specific operations (such as pumping equipment, power equipment, etc.).

[0060] As a second optional implementation of the above step S120, the implementation of querying the pre-built streaming knowledge graph library for user terminal devices in the warning impact area may include: Step S124: querying the location code corresponding to the affected area in the geographical division data table; The implementation method of the above step S124 is, for example: first, obtain the boundary or range of the affected area, such as longitude and latitude coordinates, polygonal area or other geographical identification, and query the location code corresponding to the affected area in the warning affected area business data table, such as airport service, from the route data table of the airport terminal area, according to the geographical information of the affected area, find the routes that intersect or overlap with the warning area, and extract the location codes (such as route segment ID) corresponding to these routes from the geographical zoning data table. Then, in the route data table, according to the geographical information of the affected area, find the routes that intersect or overlap with the warning area, and extract the location codes (such as route ID) corresponding to these routes. In the runway data table, according to the geographical information of the affected area, find the runways that intersect or overlap with the warning area, and extract the location codes (such as runway ID) corresponding to these runways. Finally, all the found location codes (route, route, runway location codes) are summarized to form a location code list of the affected area.

[0061] Step S125: Query the user terminal device corresponding to the location code in the streaming knowledge graph library, and determine the user terminal device corresponding to the location code as the user terminal device within the warning impact area.

[0062] The implementation of the above step S125 is, for example: in the streaming knowledge graph library, using the location code list, querying the user terminal devices associated with these location codes, these devices may include ground radar, communication equipment, navigation equipment, etc., and further filtering the geographical locations of these terminal devices according to the query results, and confirming whether they are located in the warning impact area. Finally, the determined user terminal devices are summarized to form a list of user terminal devices in the warning impact area.

[0063] As an optional implementation of the above step S130, the above implementation of generating a personalized service SMS according to the user terminal device, the warning effective time and the warning items may include: Step S131: Obtain the user role corresponding to the user terminal device.

[0064] The above weather warning method can be applied in some special scenarios, such as airport warning service scenarios. The above user roles include: staff of passenger companies or airlines, etc. The needs of passenger company staff or airline staff for service SMS are very different. Passenger companies involve passenger placement, itinerary service changes, supplier changes, etc., and airlines involve flight scheduling, passenger comfort, equipment protection and other multi-dimensional issues. Therefore, it is necessary to first obtain the user role corresponding to the user terminal device.

[0065] Step S132: searching for a text message template corresponding to the user role in the text message service template library; The implementation method of the above step S132 is, for example: first, after obtaining the user role corresponding to the receiving user terminal device (for example, a staff member of a customer company or an ordinary user or administrator of an airline company), obtain a pre-configured SMS template library from the SMS service management platform. According to the user role, select the SMS template suitable for the role, and select the most suitable SMS template from the selected templates to ensure that its content is concise and clear, suitable for the transmission of warning information.

[0066] Step S133: Fill the warning effective time and warning items into the SMS template to obtain a personalized service SMS.

[0067] The implementation method of the above step S133 is, for example: after obtaining the effective time of the warning and the specific warning items, fill the effective time of the warning and the warning items into the selected SMS template. For example, if the template is "Dear [user role], the [warning item] you are concerned about will take effect at [warning time], please handle it in time", then fill in the specific user role, warning item and warning time into the corresponding position. After completing the filling, the final personalized service SMS is generated to ensure that the SMS content is accurate and meets the user's expectations.

[0068] As an optional implementation of the above weather warning method, after using a machine learning model to extract the warning impact area, warning effective time and warning items from the weather warning text, it also includes: Step S140: obtaining the actual weather information of the warning-affected area at the warning effective time.

[0069] The implementation methods of the above-mentioned step S140 include: a first acquisition method, receiving real-time weather information (such as temperature information, humidity information and visibility information) sent by other sensors (such as temperature sensors, humidity sensors and photosensors, etc.) in the warning impact area at the warning effective time, and storing the real-time weather information in a file system, database or mobile storage device; a second acquisition method, obtaining real-time weather information (such as temperature information, humidity information and visibility information) in the warning impact area at the warning effective time, specifically for example: obtaining real-time airport information from a file system, database or mobile storage device in a server in the warning impact area.

[0070] Step S150: Compare the actual weather information of the warning affected area with the weather warning information in the warning matters to obtain a comparison result, which is used to train the machine learning model.

[0071] An implementation of the above step S150 is, for example: a pre-trained large model can be used to compare the actual weather information in the warning affected area with the weather warning information in the warning items to determine whether the actual weather information in the warning affected area meets the description of the weather warning information in the warning items. If the actual weather information in the warning affected area does not meet the description of the weather warning information in the warning items, the comparison result that does not meet the description, the actual weather information in the warning affected area, and the weather warning information in the warning items are added to the positive sample training set. Correspondingly, if the actual weather information in the warning affected area meets the description of the weather warning information in the warning items, the comparison result that meets the description, the actual weather information in the warning affected area, and the weather warning information in the warning items are added to the negative sample training set. Then, the positive sample training set and the negative sample training set are used to train the above machine learning model.

[0072] Another implementation of the above-mentioned step S150 is, for example: using an executable program compiled or interpreted by a preset programming language to compare the actual weather information of the warning impact area with the weather warning information in the warning matters for similarity, to obtain a comparison result including the similarity, and then using the similarity and the comparison result as training data, and using the training data to train the machine learning model; wherein, programming languages ​​that can be used are, for example: C, C++, Java, BASIC, JavaScript, LISP, Shell, Perl, Ruby, Python and PHP, etc.

[0073] As an optional implementation of the above weather warning method, after generating a personalized service SMS according to the user terminal device, the warning effective time and the warning items, it may also include: Step S160: before the warning takes effect, a personalized service SMS is sent to user terminal devices in the warning impact area.

[0074] An implementation example of the above step S160 is as follows: before the warning takes effect, the electronic device sends a personalized service SMS to the user terminal devices in the warning impact area via Hyper Text Transfer Protocol (HTTP) or Hyper Text Transfer Protocol Secure (HTTPS).

[0075] See also Figure 2 The structural diagram of the weather warning device provided in the embodiment of the present application is shown; the embodiment of the present application provides a weather warning device 200, including: The warning text extraction module 210 is used to extract the warning impact area, warning effective time and warning items from the weather warning text using a machine learning model.

[0076] The terminal device query module 220 is used to query the user terminal devices within the warning impact area in the pre-built streaming knowledge graph library.

[0077] The service message generation module 230 is used to generate a personalized service message according to the user terminal device, the warning effective time and the warning items. The personalized service message is used to warn the weather in the warning impact area.

[0078] Optionally, in the embodiment of the present application, the machine learning model is a multi-task joint learning named entity recognition MTL-NER model; the weather warning device further includes: The text encoding processing module is used to encode the warning text using the encoding layer in the MTL-NER model to obtain the semantic features of the word vector; The semantic feature decoding module is used to use the decoding layer in the MTL-NER model to decode the semantic features of the word vector to obtain the warning impact area, warning effective time and warning items.

[0079] Optionally, in the embodiment of the present application, the decoding layer includes: a region extraction decoder, a time extraction decoder and a warning content decoder; the semantic feature decoding module includes: The first decoding processing submodule is used to decode the semantic features of the word vector using a region extraction decoder to obtain the warning impact area; The second decoding processing submodule is used to use a time extraction decoder to decode the semantic features of the word vector to obtain the warning effective time; The third decoding processing submodule is used to use the warning content decoder to decode the semantic features of the word vector to obtain warning items.

[0080] Optionally, in an embodiment of the present application, the early warning data analysis module includes: The geographic data query submodule is used to obtain geographic zoning data and query the geographic administrative region to which the warning impact area belongs in the geographic zoning data; The inference rule query submodule is used to query the inference rules corresponding to geographical administrative regions in the streaming knowledge graph library; The terminal device reasoning submodule is used to use the rule engine to infer the reasoning rules corresponding to the geographical administrative area to obtain the user terminal devices in the warning impact area.

[0081] Optionally, in the embodiment of the present application, the weather warning device further includes: A location code query module is used to query the location code corresponding to the impact area in the geographic zoning data table; The terminal device determination module is used to query the user terminal device corresponding to the position code in the streaming knowledge graph library, and determine the user terminal device corresponding to the position code as the user terminal device within the warning impact area.

[0082] Optionally, in an embodiment of the present application, the service SMS generation module includes: A user role acquisition submodule is used to acquire the user role corresponding to the user terminal device; The SMS template search submodule is used to search for the SMS template corresponding to the user role in the SMS service template library; The SMS template filling submodule is used to fill the warning effective time and warning items into the SMS template to obtain personalized service SMS.

[0083] Optionally, in the embodiment of the present application, the weather warning device further includes: Real-time information acquisition module, used to obtain the real-time weather information of the warning-affected area when the warning takes effect; The real-time information comparison module is used to compare the actual weather information of the warning affected area with the weather warning information in the warning matters to obtain comparison results, which are used to train the machine learning model.

[0084] Optionally, in the embodiment of the present application, the weather warning device further includes: The warning event sending module is used to send personalized service text messages to user terminal devices in the warning impact area before the warning takes effect.

[0085] It should be understood that the device corresponds to the above-mentioned weather warning method embodiment and can execute the various steps involved in the above-mentioned method embodiment. The specific functions of the device can be found in the above description, and the detailed description is appropriately omitted here. The device includes at least one software function module that can be stored in a memory in the form of software or firmware or solidified in the operating system (OS) of the device.

[0086] See also Figure 3 The electronic device 300 provided in the embodiment of the present application includes: a processor 310 and a memory 320, wherein the memory 320 stores machine-readable instructions executable by the processor 310, and when the machine-readable instructions are executed by the processor 310, the above method is executed.

[0087] The embodiment of the present application further provides a computer-readable storage medium 330 , on which a computer program is stored. When the computer program is executed by the processor 310 , the above method is executed.

[0088] Among them, the computer-readable storage medium 330 can be implemented by any type of volatile or non-volatile storage device 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 storage, flash memory, disk or optical disk.

[0089] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0090] In several embodiments provided by the embodiments of the present application, it should be understood that the disclosed device and method can also be implemented in other ways. The device embodiments described above are only schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a part of a module, a program segment or a code, and a part of a module, a program segment or a code includes one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also be different from the order of occurrence marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which is mainly determined by the functions involved.

[0091] In addition, each functional module of each embodiment in the embodiment of the present application can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. In addition, in the description of this specification, the description of reference terms "one embodiment", "some embodiments", "example", "specific example", "some examples", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the embodiment of the present application. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples without contradiction.

[0092] The above description is only an optional implementation manner of the embodiments of the present application, but the protection scope of the embodiments of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or replacements within the technical scope disclosed in the embodiments of the present application, which should be covered within the protection scope of the embodiments of the present application.

Claims

1. A weather warning method, characterized in that: include: Use machine learning models to extract the warning impact area, warning effective time, and warning items from the weather warning text; Querying the user terminal devices in the warning impact area in a pre-built streaming knowledge graph library; A personalized service text message is generated according to the user terminal device, the warning effective time and the warning items, and the personalized service text message is used to warn the weather in the warning impact area.

2. The method according to claim 1, characterized in that The machine learning model is a multi-task joint learning named entity recognition MTL-NER model; the machine learning model is used to extract the warning impact area, warning effective time and warning items from the weather warning text, including: Using the encoding layer in the MTL-NER model to encode the warning text to obtain word vector semantic features; The decoding layer in the MTL-NER model is used to decode the semantic features of the word vector to obtain the warning impact area, the warning effective time and the warning items.

3. The method according to claim 2, characterized in that The decoding layer includes: a region extraction decoder, a time extraction decoder and a warning content decoder; the decoding layer in the MTL-NER model is used to decode the word vector semantic features to obtain the warning impact area, the warning effective time and the warning items, including: Using the region extraction decoder to decode the word vector semantic features to obtain the warning impact area; Using the time extraction decoder to decode the word vector semantic features to obtain the warning effective time; The warning content decoder is used to decode the semantic features of the word vector to obtain the warning items.

4. The method according to claim 1, characterized in that: The step of searching for user terminal devices in the warning impact area in a pre-built streaming knowledge graph library includes: Acquire geographic zoning data, and query the geographic administrative region to which the warning impact area belongs in the geographic zoning data; Querying the inference rules corresponding to the geographical administrative area in the streaming knowledge graph library; A rule engine is used to infer the inference rules corresponding to the geographical administrative area to obtain user terminal devices within the warning impact area.

5. The method according to claim 1, characterized in that The step of searching for user terminal devices in the warning impact area in a pre-built streaming knowledge graph library includes: Querying the location code corresponding to the affected area in the geographic zoning data table; The user terminal device corresponding to the position code is queried in the streaming knowledge graph library, and the user terminal device corresponding to the position code is determined as the user terminal device within the warning impact area.

6. The method according to claim 1, characterized in that The generating of a personalized service SMS according to the user terminal device, the warning effective time and the warning item includes: Obtaining a user role corresponding to the user terminal device; Searching for a text message template corresponding to the user role in a text message service template library; Fill the warning effective time and the warning items into the SMS template to obtain the personalized service SMS.

7. The method according to any one of claims 1 to 6, characterized in that: After extracting the warning impact area, warning effective time and warning items from the weather warning text using the machine learning model, the method further includes: Acquire the weather real-time information of the area affected by the warning at the time when the warning takes effect; The actual weather information of the warning affected area is compared with the weather warning information in the warning matter to obtain a comparison result, and the comparison result is used to train the machine learning model.

8. A weather warning device, characterized in that: include: Warning text extraction module, used to extract the warning impact area, warning effective time and warning items from the weather warning text using machine learning models; A terminal device query module is used to query the user terminal devices in the warning impact area in a pre-built streaming knowledge graph library; The service SMS generation module is used to generate a personalized service SMS according to the user terminal device, the warning effective time and the warning items, and the personalized service SMS is used to warn the weather in the warning impact area.

9. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and when the machine-readable instructions are executed by the processor, the method according to any one of claims 1 to 7 is performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is executed.

Citation Information

Patent Citations

  • Named entity identification method and system

    CN109977402A

  • Meteorological early warning information auditing method and system based on natural language processing

    CN115658853A

  • Dynamic rainfall early warning method based on knowledge graph

    CN115712720A

  • Agrometeorological disaster early warning method and device and storage medium

    CN115903085A

  • Meteorological emergency early warning knowledge base construction method based on knowledge graph

    CN115907011A