A knowledge graph construction method suitable for multi-disaster emergency treatment
By constructing a disaster domain named entity recognition model and entity relationship extraction, the problem of inconsistent knowledge graph reasoning in multi-disaster emergency response is solved, a clear multi-disaster contingency plan is generated, and automatic processing and path conflict resolution are realized when multiple disasters occur simultaneously.
Patent Information
- Application Number
- CN202211343243.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-01-09
- Estimated Expiration
- 2042-10-31
AI Technical Summary
When multiple disasters occur simultaneously, existing emergency knowledge graphs inevitably lead to inconsistent reasoning and contradictory plans, and are unable to effectively handle overlapping or contradictory paths caused by new disasters.
A named entity recognition model for disaster domains is constructed. By crawling corpora and using BERT and Bi-LSTM models to identify disaster entities, entity relationships are extracted. The cosine similarity matching algorithm and entity classification model are used to analyze path contradictions between the new disaster map and the old map, and an updated disaster map is generated.
It enables the automatic processing of knowledge graphs when multiple disasters occur simultaneously, identifies and resolves path conflicts, generates clear multi-disaster contingency plans, and ensures the consistency and effectiveness of handling measures.
Smart Images

Figure CN115905556B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of information technology, and in particular to a knowledge graph construction method suitable for multi-disaster emergency handling. BACKGROUND
[0002] Multiple disasters occur simultaneously in an area from time to time. For example, a stampede caused by an earthquake is accompanied by a fire. The occurrence of disasters often involves the alternation between various disasters, such as a typhoon often accompanied by rain, and a typhoon often accompanied by lightning or a fire caused by a blown-out power line. An emergency knowledge graph is a knowledge graph that reasons and judges countermeasures according to disaster factors. For example: typhoon -> power pole falls -> power line short circuit -> fire -> fire extinguishing, and for example: typhoon -> heavy rain -> flood -> send a ship to rescue. An emergency knowledge graph should be able to handle multiple disasters simultaneously. However, according to the knowledge points in the graph, the occurrence of one disaster may lead to the occurrence of two different disasters. Moreover, the two emergency disasters are mutually exclusive, and there is both a flood and a fire. However, it is indeed possible that two disasters may occur simultaneously. How to ensure that the reasoning of the knowledge graph does not reason out two inconsistent handling methods when multiple disasters occur simultaneously, resulting in a contradictory handling plan after reasoning. This is the focus of the present application. Therefore, through the reasoning of the knowledge graph, there will be some emergency measures that are interrelated. On the other hand, disasters often occur suddenly, such as a never-before-seen epidemic that may lead to new disaster predictions and problems in some areas, such as venues. Many emergency events are related. Therefore, the knowledge graph construction process also has an interactive process. Because the occurrence of new disasters may also lead to new overlaps or new contradictions in the previously constructed paths. Therefore, the construction of various graphs is not isolated, but parallel and interactive. SUMMARY
[0003] The present application provides a knowledge graph construction method suitable for multi-disaster emergency handling, mainly comprising:
[0004] According to disaster news data, a named entity recognition model for the disaster domain is constructed, and the named entity recognition model for the disaster domain is constructed according to the disaster news data, specifically comprising: using Python crawler to crawl corpus, constructing disaster domain corpus for named entity recognition model for disaster domain, using disaster domain corpus to train named entity recognition model for disaster domain; disaster entity relationship extraction is performed from disaster information, multi-disaster entity association recognition is realized, and a new disaster graph is constructed, the disaster entity relationship extraction is performed from the disaster information, the multi-disaster entity association recognition is realized, and the new disaster graph is constructed, specifically comprising: identifying the multi-disaster entity associated with the original disaster entity, obtaining the correlation degree of the original disaster entity, determining the relationship between the multi-disaster entities, and constructing a new disaster graph; determine whether the new disaster is in the old graph, extract the reasoning path in the new disaster graph and the old graph, the determination whether the new disaster is in the old graph, the reasoning path in the new disaster graph and the old graph is extracted, specifically comprising: building an old graph for disaster, using cosine similarity matching algorithm, obtaining the correlation between new disaster and existing disaster in the old graph, obtaining the disaster related to the new disaster type in the old graph according to the correlation, obtaining the reasoning path of the disaster matched successfully in the old graph and the reasoning path of the new disaster in the new disaster graph; analyze whether there is path contradiction in the reasoning path in the new disaster graph and the old graph, and mark new knowledge that does not appear in the new disaster graph, the analysis whether there is path contradiction in the reasoning path in the new disaster graph and the old graph, and the marking new knowledge that does not appear in the new disaster graph, specifically comprising: constructing an entity classification data set for training a disaster entity classification model, and analyzing whether there is path contradiction in the knowledge stored in the new disaster graph and the old graph; according to the analysis result, the knowledge in the old graph is used to realize the reuse generation of the new disaster graph; according to the updated new disaster graph, the new disaster plan processing sequence is analyzed.
[0005] Further optionally, the named entity recognition model for the disaster domain is constructed according to the disaster news data, and the named entity recognition model for the disaster domain is constructed according to the disaster news data, specifically comprising:
[0006] The corpus is obtained by using Python crawler, and the disaster domain corpus is constructed for the named entity recognition model for the disaster domain, specifically comprising:
[0007] First, search the disaster news of each place by using the search engine, and obtain the retrieved disaster news by using the Python web crawler; there is information unrelated to disaster in the obtained disaster news, which needs to be manually processed to remove the information unrelated to disaster in the news, and each news is split into multiple sentences; each sentence is used as a data, and each word in each data is labeled by using BIO sequence labeling method and used as a label of each data, a disaster domain corpus is constructed, and the data in the disaster domain corpus is divided into a training set and a test set according to a predetermined proportion.
[0008] The disaster domain-oriented named entity recognition model is trained by using the disaster domain corpus, and specifically includes the following steps.
[0009] Data in the training set of the disaster domain corpus are input into a BERT pre-training model to obtain embedded representations of the input data, and the obtained embedded representations are encoded by using a Bi-LSTM (Bidirectional Long Short-Term Memory Network). Then, the encoded representations are input into a CRF (Conditional Random Field) to obtain the labels of each word in each piece of data. The parameters in the model are continuously optimized by using a back propagation technique, and the model is tested by using data in a test set. Through continuous iteration of the model, the accuracy of the model in the test set reaches a preset threshold, and a disaster domain-oriented named entity recognition model is obtained, and the model parameters corresponding to the model are saved.
[0010] Further, the disaster entity relationship extraction from the disaster information, the multi-disaster entity correlation recognition, and the construction of a new disaster graph include the following steps.
[0011] The multi-disaster entity associated with the original disaster entity is identified, and the correlation degree with the original disaster entity is obtained, specifically including the following steps.
[0012] One or more disaster entities existing in the disaster information are identified by using the trained disaster domain-oriented named entity recognition model, and these identified disaster entities are referred to as original disaster entities. Each original disaster entity existing in the disaster information is searched by using a search engine to obtain a plurality of web pages related to the original disaster entity. The disaster entity recognition is performed on the disaster text information in each web page by using the disaster domain-oriented named entity recognition model. The plurality of disaster entities just identified are considered to be associated with the original disaster entity, but the correlation degrees of the plurality of disaster entities with the original disaster entity are different. The number of times each disaster entity just identified appears is counted, and the number of times each disaster entity just identified appears is considered to be an important indicator of the correlation degree with the original disaster entity. The disaster entity just identified and the corresponding number of times are stored in the form of a key-value pair, specifically in the form of "disaster entity name just identified-number of times corresponding". According to a set threshold, when the number of times the disaster entity name just identified appears is greater than or equal to the set threshold, the disaster entity is considered to be strongly associated with the original disaster entity, and the multi-disaster entity associated with the original disaster entity is determined. These disaster entities are saved in the database document "disaster associated entity". When the number of times is less than the set threshold, the disaster entity is considered to be not associated with the original disaster entity, and the disaster entity is discarded.
[0013] The relationship between the multi-disaster entities is determined, and a new disaster graph is constructed, specifically including the following steps.
[0014] From the database document "Disaster-Related Entities", multiple disaster entities related to the original entity are retrieved. From each returned webpage, information or news related to various aspects of the original disaster entity is obtained, including information related to multiple disaster entities. Based on the set relationship types: disaster risk assessment, solutions, causes, and precursors, Python regular expressions are used to match sentences in the disaster information that simultaneously contain the original disaster entity and the set relationship types. From the successfully matched sentences, the values corresponding to each relationship type are extracted, i.e., the subject or object in the successfully matched sentences, forming triples related to the new disaster and saving them. Specifically, the triples are in the form of "new disaster name, relationship type, value corresponding to the relationship type", forming a new disaster map.
[0015] Further, optionally, the step of determining whether a new disaster is in the old map, and extracting the reasoning path from the new disaster map and the old map, includes:
[0016] The construction of the old map for disaster types specifically includes:
[0017] Enter "disaster" into a search engine, visit websites related to "disaster," obtain various disaster names, and store them in the database document "Disaster Name Directory." Use Python programming to traverse the "Disaster Name Directory," using each record as a keyword. Use a Python web crawler to access the corresponding webpages, extract the text paragraphs, and store them in the database document "Disaster Webpage Introduction." Based on the defined relation types: disaster risk assessment, solutions, causes, and precursors, use a disaster-domain-oriented named entity recognition model and Python regular expressions to identify the disaster name in each record of the "Disaster Webpage Introduction" database document, and match sentences that simultaneously contain disaster entities and defined relation types. Extract the corresponding values for each relation type from the successfully matched sentences, i.e., the subject or object of the successfully matched sentences, forming old graph triples, which are then saved. The specific triple form is "disaster name, relation type, value corresponding to the relation type," forming the old graph.
[0018] The method utilizes a cosine similarity matching algorithm to obtain the correlation between the new disaster and existing disasters in the previous old map. Based on the correlation, it retrieves disasters in the old map that are related to the new disaster type. Specifically, this includes:
[0019] The Python programming is used to traverse the triples in the whole old graph, obtain all disaster names in the old graph, and save them in the database under the name of "old graph disaster name". The old graph refers to the knowledge graph constructed by the enterprise according to the disaster types before the present, which stores the information of disasters. However, the old graph does not necessarily store the information or knowledge of new disasters, and the disaster plan service of the new disaster may not be completed; the new disaster name recognized by the named entity recognition model in the disaster domain is matched with each disaster name saved in the "old graph disaster name" using a cosine similarity matching algorithm,
[0020]
[0021] In the formula, Ai and Bi represent the new disaster name and the disaster name in the "old graph disaster name", respectively. The matching value of the new disaster and the existing disaster in the old graph is obtained, and is saved in the document "new and old disaster name matching value" in the database in the form of "new disaster name old graph disaster name matching value". When the matching value is greater than a preset threshold, it is proved that the recognized new disaster or the disaster similar to the new disaster type has been saved in the old graph, that is, the old graph stores the related knowledge of the corresponding disaster. When the matching value is less than the preset threshold, it is proved that the recognized new disaster has never appeared in the old graph or the existing disaster type in the old graph has too low correlation with the new disaster type;
[0022] The reasoning path of the disaster matched with the new disaster in the old graph and the reasoning path of the new disaster in the new disaster graph are obtained, and specifically include:
[0023] For the disaster matched with the new disaster in the old graph, first, all triples of the recognized new disaster are obtained from the new disaster graph, and are saved in the database under the name of "new disaster graph reasoning path". Secondly, the Python programming is used to perform similarity matching on the disaster name matched with the new disaster and the first entity of all triples in the old graph using a cosine similarity matching algorithm. When the matching is successful, the triple in which the first entity is located is saved in the document named "old graph reasoning path", and the document is saved in the database. When all existing disasters in the old graph fail to match the new disaster, all triples of the recognized new disaster are directly obtained from the new disaster graph, saved in the database under the name of "new disaster graph reasoning path", and the document "old graph reasoning path" in the database is empty. Each triple in the document "new disaster graph reasoning path" saved in the database is stored in the form of "new disaster name, relationship type, and value corresponding to the relationship type".
[0024] Further optionally, the analysis of whether the reasoning paths in the new disaster graph and the old graph exist path contradiction includes:
[0025] The construction entity classification data set is used for training a disaster entity classification model, and specifically comprises:
[0026] Python programming is used to traverse each triple in the old graph, extract triples with the relationship type of "cause", and remove the head entity and tail entity of the extracted triples. The result after removing is saved to the "old graph entity name" document in the database. The entities stored in the document "old graph entity name" are used to construct entity pairs, which are labeled according to whether the entities are mutually exclusive. The specific form is "entity name, entity name, label", and an entity classification data set is obtained. The data set is divided into a training set and a test set according to a preset threshold. The entity pairs in the training set are input into the disaster entity classification model based on BERT, and the disaster entity classification model is trained through continuous iteration and back propagation. The data in the test set is tested on the disaster entity classification model. When the accuracy reaches the preset threshold, the training is stopped, and the parameters of the disaster entity classification model at this time are saved.
[0027] The analysis of whether there is a path contradiction between the knowledge stored in the new disaster graph and the old graph comprises:
[0028] The triples with the relationship type of "cause" are extracted from the database "new disaster graph reasoning path" and "old graph reasoning path" documents respectively, and saved to the database "new disaster graph causes disaster" and "old graph causes disaster" documents. Each triple in the database documents "new disaster graph causes disaster" and "old graph causes disaster" is traversed, and the tail entity in the triple is obtained using Python regular expression matching, and stored in the database documents "new disaster graph tail entity" and "old graph tail entity" respectively. Each entity in "new disaster graph tail entity" is constructed into an entity pair with each entity in "old graph tail entity", and the entity pair is input into the trained disaster entity classification model. When the output result of the model is positive, it means that the reasoning path of the new disaster in "new disaster graph causes disaster" and "old graph causes disaster" is the same, and there is no path contradiction phenomenon. At this time, the "old graph causes disaster" document is labeled with the same path label for the current triple. When the output result of the model is negative, it means that the reasoning path of the new disaster in "new disaster graph causes disaster" and "old graph causes disaster" is contradictory, i.e. the disaster caused by the new disaster is mutually exclusive in the new disaster graph and the old graph. At this time, the "old graph causes disaster" document is labeled with the path contradiction label for the current triple, and the entity pair at this time is saved to the database document "mutually exclusive disaster phenomenon" in the form of "entity name, entity name". The database documents "new disaster graph causes disaster" and "old graph causes disaster" are updated.
[0029] Further optionally, the reusing generation of the new disaster graph according to the analysis result and the knowledge in the old graph comprises:
[0030] The Python programming is used to traverse each data in the database document "old graph causes disaster", for the data with the same label of the annotation path, there is no path contradiction phenomenon in the reasoning path of the new disaster in the new disaster graph and the old graph, the tail entity of the triple in the old graph is directly reused in the new disaster graph, that is, the corresponding tail entity is obtained from the triple data, and is stored in the new disaster graph in the form of "new disaster name, causes, tail entity", and this data is deleted in the document "old graph causes disaster", to generate an updated new disaster graph, for the data with the contradictory label of the annotation path, there is path contradiction phenomenon in the reasoning path of the new disaster in the new disaster graph and the old graph, that is, the disaster phenomena caused by the new disaster in the two disaster graphs are contradictory and mutually exclusive, at this time, the tail entity of the triple in the old graph is reused in the new disaster graph, and is stored in the new disaster graph in the form of "new disaster name, causes, tail entity", and an additional triple is added to show that the tail entity obtained is from the contradictory path, the triple is in the form of "tail entity, source, contradictory path", the knowledge not contained in the new disaster graph before is supplemented, the reusing generation of the new disaster graph is realized, and the updated new disaster graph is obtained.
[0031] Further optionally, the reusing generation of the new disaster graph according to the analysis result and the knowledge in the old graph comprises:
[0032] The updated new disaster graph is searched, all triples with the head entity as the new disaster name and the relationship as "solution" and "causes" are obtained, in all the obtained triples, the disaster phenomena corresponding to the "causes" relationship may be mutually exclusive disaster phenomena, that is, the two disaster phenomena rarely appear at the same time in real life, such as "typhoon" and "fire" phenomena, whether the disaster phenomena come from the contradictory path is determined by using the "source" relationship in the new disaster graph, the disaster from the contradictory path has particularity and should be processed preferentially in the preplan, the disaster phenomenon that has not been processed is referred to as a residual disaster phenomenon, that is, the disaster phenomenon not from the contradictory path; the value corresponding to the "dangerousness evaluation" relationship is "high", "medium" and "low", which represents the degree of disaster brought by the disaster phenomenon to people or nature, the higher the dangerousness, the more it should be processed preferentially, the dangerousness evaluation related knowledge of the residual disaster phenomenon is obtained from the old graph, the residual disaster phenomena are sorted according to the degree of dangerousness evaluation, and the disaster arrangement order obtained is the disaster preplan processing order, so that the new disaster preplan is formulated.
[0033] The technical scheme provided by the embodiment of the application can include the following beneficial effects:
[0034] The present application analyzes the reasoning contradiction formed by the disaster knowledge graph, and according to the development of things, directly identifies the path of new disasters and old knowledge graph, and finally forms a clear one. When multiple disasters occur at the same time, the contradictions and overlapping paths that may occur in the knowledge graph reasoning and plan formation process are automatically processed and sorted out to construct a multi-disaster knowledge graph. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 A flowchart of a knowledge graph construction method suitable for multi-disaster emergency treatment according to the present application.
[0036] Figure 2 A schematic diagram of a knowledge graph construction method suitable for multi-disaster emergency treatment according to the present application.
[0037] Figure 3 Another schematic diagram of a knowledge graph construction method suitable for multi-disaster emergency treatment according to the present application. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical scheme and advantages of the present application clearer, the present application will be described in detail below in combination with the drawings and specific embodiments.
[0039] Figure 1 A flowchart of a knowledge graph construction method suitable for multi-disaster emergency treatment according to the present application. As shown in Figure 1 The present application can include the following steps:
[0040] Step 101, according to the disaster news data, construct a named entity recognition model for disaster domain.
[0041] Use Python crawler to crawl corpus, and construct disaster domain corpus library for named entity recognition model for disaster domain.
[0042] First, search engines are used to search for disaster-related news in various places, and Python web crawlers are used to obtain the retrieved disaster-related news. The obtained disaster-related news contains information unrelated to disasters, and the obtained disaster-related news needs to be manually processed to remove information unrelated to disasters in the news and split each news into multiple sentences. Each sentence is used as a data, and each character in each data is labeled using the BIO sequence labeling method and used as a label for each data. A disaster domain corpus is constructed, and the data in the disaster domain corpus is divided into a training set and a test set according to a predetermined ratio. For example, the Baidu search engine is used to search for "disaster-related news in Yunnan Province", and the Python web crawler technology is used to crawl disaster-related news about Yunnan Province from the returned page. The obtained disaster-related news is divided into multiple sentences using a period as a delimiter by using a Python regular expression program. Since the split sentences may be unrelated to disasters, such as "we must take precautions against such disasters", in order to obtain high-quality disaster domain training data, the split sentences need to be manually processed, such as removing sentences unrelated to disasters and supplementing sentences lacking a subject or object. For example, a data in the disaster domain corpus is "a sudden landslide debris flow natural disaster occurred in Yunnan Province", and the corresponding label of the data obtained by using the BIO sequence labeling method is "O-O-O-O-O-B-I-I-I-I-O-O-O-O". For example, the manually constructed disaster domain corpus is divided into a training set and a test set according to an 8:2 ratio.
[0043] A disaster domain-oriented named entity recognition model is trained using the disaster domain corpus.
[0044] The data in the training set of the disaster domain corpus is input into the BERT pre-training model to obtain an embedded representation of the input data, and the obtained embedded representation is encoded using Bi-LSTM, i.e., a bidirectional long short-term memory network. Then, the encoded representation is input into CRF, i.e., a conditional random field, to obtain the label of each character in each data. The parameters in the model are continuously optimized using the backpropagation technique, and the model is tested using the data in the test set. Through continuous iteration of the model, the correct rate of the model in the test set reaches a predetermined threshold, a disaster domain-oriented named entity recognition model is obtained, and the corresponding model parameters of the model are saved. For example, the data "Yunnan landslide causes many people to lose contact" in the training set is input into the BERT pre-training model and then into the Bi-LSTM, and the obtained embedded representation is (2, 5, 1, 8). The embedded representation is input into the CRF to obtain the label "O-O-B-I-I-O-O-O-O-O-O" of each character in the data. The correct rate of the disaster domain-oriented named entity recognition model in the test is set to 95.
[0045] Step 102, disaster entity relationship extraction is performed from disaster information, multi-disaster entity association identification is realized, and a new disaster atlas is constructed.
[0046] The multi-disaster entity associated with the original disaster entity is identified, and the association degree with the original disaster entity is obtained.
[0047] The trained disaster domain-oriented named entity recognition model is used to identify one or more disaster entities in the disaster information, and these identified disaster entities are called original disaster entities; a search engine is used to search each original disaster entity in the disaster information, to obtain a plurality of web pages related to the original disaster entity, and the disaster domain-oriented named entity recognition model is used to identify disaster entities in each web page, and the plurality of identified disaster entities are considered to be associated with the original disaster entities, but their association degrees with the original disaster entities are different, the number of occurrences of each identified disaster entity is counted, the number of occurrences of the identified disaster entity is considered as an important indicator of the association degree with the original disaster entity, the identified disaster entity and the corresponding number of occurrences are stored in the form of key-value pairs, and the specific form is "identified disaster entity name-corresponding number of occurrences"; according to a set threshold value, when the number of occurrences of the identified disaster entity name is greater than or equal to the set threshold value, the disaster entity is considered to be strongly associated with the original disaster entity, the associated multiple disaster entities are determined, and the disaster entities are saved to the database document "disaster associated entities"; when the number of occurrences is less than the set threshold value, the disaster entity is considered to be not associated with the original disaster entity, and the disaster entity is discarded.For example, if the input text is "a plague was caused after a major earthquake," a disaster-domain-oriented named entity recognition model can identify the disaster names "major earthquake" and "plague" in the text. In this case, "major earthquake" and "plague" are called the original disaster entities. Searching for "major earthquake" using the Baidu search engine yields multiple web pages related to earthquakes: Webpage 1 and Webpage 2. The disaster text information obtained from Webpage 1 is: "Earthquakes can cause fires, floods, and may also cause secondary disasters such as tsunamis. Fires are more likely to cause more serious consequences. Strong earthquakes occurring on the seabed or in coastal areas can cause huge waves called tsunamis. Strong earthquakes occurring on land can cause secondary disasters such as landslides and collapses. Before an earthquake, there may be changes in the ground that can only be measured by instruments, such as ground deformation. Human organs can also detect earthquake precursors, such as the rise and fall of well water, turbidity, and animal... Abnormal behavior, etc. When an earthquake occurs, it is essential to take shelter nearby and evacuate to a safe place immediately after the tremor. Earthquakes are a highly dangerous natural disaster and should be taken seriously. Therefore, the disaster entities newly identified on webpage 1 are: fire, flood, tsunami, landslide, and collapse. At the same time, the number of occurrences of disaster entities associated with the original disaster entity "major earthquake" is counted, namely "fire-2", "flood-1", "tsunami-2", "landslide-1", and "collapse-1". The threshold for the occurrence of associated disaster entities is set to 2. Since only "tsunami" occurs more than or equal to 2 times, "tsunami" and "fire" are considered to be disasters strongly associated with "earthquake". At this time, the multi-disaster associated entities of the original disaster entity "major earthquake" are "tsunami" and "fire", and "fire-2" and "tsunami-2" are saved to the database document "disaster associated entities".
[0048] Clarify the relationships between multiple disaster entities and construct a new disaster map.
[0049] From the database document "disaster-related entities", get the multi-disaster entities related to the original entity, get the aspect information or news related to the original disaster entity from each returned web page, which also includes the related information of multi-disaster entities, according to the set relationship type: disaster risk assessment, solution, cause, precursor, use python regular expression to match the sentence containing the original disaster entity and the set relationship type from the disaster information; Extract the corresponding value of each relationship type from the matching successful sentence, that is, the subject or object in the matching successful sentence, to form a triple about the new disaster and save it, the specific triple form is "new disaster name, relationship type, relationship type corresponding value", to form a new disaster graph; For example, the matching successful sentence from the web page is "earthquake can cause fire, flood, and may also cause secondary disasters such as tsunamis", and the triple extracted from the sentence is: (earthquake, cause, tsunami), (earthquake, cause, fire), (earthquake, cause, flood); The matching successful sentence is "before the earthquake, ground deformation and other changes that can be measured by instruments may occur, people's organs can also detect earthquake precursors, such as well water level, animals behave abnormally, etc.", and the triple extracted from the sentence is: (earthquake, precursor, ground deformation), (earthquake, precursor, well water level); The matching successful sentence is "when an earthquake occurs, you should avoid it nearby, and quickly evacuate to a safe place after the earthquake", and the triple extracted is: (earthquake, solution, nearby the epicenter to avoid and quickly evacuate to a safe place after the earthquake); From the matching successful sentence "earthquake is a natural disaster with high risk, which should be paid attention to", the triple extracted is: (earthquake, risk assessment, high); The triples extracted from each matching successful sentence form a new disaster graph and are saved to the database.
[0050] Step 103, determine whether the new disaster is in the old graph, and extract the reasoning path of the new disaster graph and the old graph.
[0051] Build an old graph for disaster type.
[0052] Enter "disaster" into a search engine, visit websites related to "disaster," obtain various disaster names, and store them in the database document "Disaster Name Directory." Use Python programming to traverse the "Disaster Name Directory," using each record as a keyword, and use a Python web crawler to access the corresponding webpages, extracting text paragraphs and storing them in the database document "Disaster Webpage Introduction." Based on the defined relation types: disaster risk assessment, solutions, causes, and precursors, use a disaster-domain-oriented named entity recognition model and Python regular expressions to identify the disaster names in each record of the "Disaster Webpage Introduction" database document, and match sentences that simultaneously contain disaster entities and defined relation types. Extract the corresponding values for each relation type from the successfully matched sentences, i.e., the subject or object of the successfully matched sentences, forming old graph triples, which are then saved. The specific triple form is... The old graph is constructed using the structure "disaster name, relation type, and value corresponding to the relation type". For example, by entering "disaster" into the Baidu search engine, the disaster names "earthquake" and "mudslide" are obtained and stored in the database document "Disaster Name Directory". Using web crawling technology, the relevant Baidu Encyclopedia entries are accessed through the keyword "earthquake", and information related to "earthquake" is crawled, such as "Earthquakes can cause fires, floods, and may also cause secondary disasters such as tsunamis. Humans must pay attention to this", which is also stored in the database document "Disaster Webpage Introduction". Using the disaster domain-oriented named entity recognition model and Python regular expressions, the disaster names "fire", "flood", and "tsunami" are obtained. The sentence that is successfully matched according to the relation type "causes" is "Earthquakes can cause fires, floods, and may also cause secondary disasters such as tsunamis". The triples "earthquake, causes, fire", "earthquake, causes, flood", and "earthquake, causes, tsunami" are obtained. These three triples constitute the old graph.
[0053] Using the cosine similarity matching algorithm, the correlation between the new disaster and existing disasters in the old map is obtained, and the disasters in the old map that are related to the new disaster type are obtained based on the correlation.
[0054] Using Python programming, the triples in the entire old disaster knowledge graph are traversed to obtain all disaster names in the old graph. These names are then stored in a database as "Old Graph Disaster Names." The old graph refers to the knowledge graph that the enterprise has built based on previous disaster types, storing disaster information. However, the old graph may not necessarily contain information or knowledge about new disasters, and disaster preparedness services for new disasters may not be available. The new disaster names identified by the disaster domain-oriented named entity recognition model are then matched with each disaster name stored in the "Old Graph Disaster Names" using a cosine similarity matching algorithm.
[0055]
[0056] Wherein Ai and Bi in the formula respectively represent the new disaster name and the disaster name in the "old atlas disaster name", the matching value of the new disaster and the existing disaster in the old atlas is obtained, and is saved in the document "new and old disaster name matching value" in the database in the form of "new disaster name old atlas disaster name matching value"; when the matching value is greater than the preset threshold value, it proves that the identified new disaster or the disaster similar to the new disaster type has been saved in the old atlas, that is, the old atlas saves the related knowledge of the corresponding disaster, and when the matching value is less than the preset threshold value, it proves that the identified new disaster has never appeared in the old atlas or the disaster type in the old atlas is too low in relevance to the new disaster type;
[0057] The old atlas saves some related information of the disaster, and some disaster names are necessarily saved, for example, the triples in the old atlas are (heavy rain, cause, flood disaster) and (collapse, precursor, falling phenomenon), and the disaster names "heavy rain" and "collapse" are obtained through Python programming and saved in the "old atlas disaster name" document in the database; for example, the new disaster name identified in the named entity recognition model for the disaster domain is "earthquake", and the cosine similarity matching algorithm is used to match "earthquake" with the texts "heavy rain" and "collapse" in the "old atlas disaster name" document to obtain the corresponding matching values of 0.3 and 0.91 respectively, and they are saved in the database, so the information saved in the database document "new and old disaster name matching value" is (earthquake, heavy rain, 0.3), (earthquake, collapse, 0.91), and the preset threshold value in the matching is set to 0.9, so "earthquake" matches successfully with "collapse" in the document, although the old atlas does not directly save the related knowledge of "earthquake", but according to the matching value, the disaster highly similar to the "earthquake" disaster type in the old atlas can be obtained, and when constructing the "earthquake" knowledge graph, the knowledge of the highly similar disaster in the old atlas can be referred to, and since the matching value between "earthquake" and "heavy rain" is lower than 0.9, they fail to match.
[0058] The reasoning path of the disaster matching successfully with the new disaster in the old atlas and the reasoning path of the new disaster in the new disaster atlas are obtained.
[0059] For disasters that match successfully in the old atlas with the new disaster, first, get all the triples of the identified new disaster from the new disaster atlas, save them in the database under the name of "new disaster atlas reasoning path", second, use Python programming to match the disaster name that matches successfully with the new disaster with the first entity of all triples in the old atlas using cosine similarity matching algorithm, when the matching is successful, save the triple of the first entity in the document named "old atlas reasoning path", at the same time, save the document in the database; When the existing disasters in the old atlas all fail to match with the new disaster, directly get all the triples of the identified new disaster from the new disaster atlas, save them in the database under the name of "new disaster atlas reasoning path", and the document "old atlas reasoning path" in the database is empty; Store each triple in the document "new disaster atlas reasoning path" saved in the database in the form of "new disaster name, relationship type, value corresponding to relationship type"; When the identified new disaster name is "heavy rain", and the triple in the new disaster atlas is (heavy rain, precursor, cloud cover), (heavy rain, cause, mudslide), use cosine similarity matching algorithm to match the new disaster atlas with the text in the document "old atlas disaster name" using cosine similarity, since the matching value of "flood disaster" and "heavy rain" is greater than the specified preset threshold, "flood disaster" matches successfully, for the matched "flood disaster", save all triples in the new disaster atlas and the triples of "flood disaster" in the old atlas in the "new disaster atlas reasoning path" and "old atlas reasoning path" documents in the database respectively; The specific form of each triple in the database document "new disaster atlas reasoning path" is "(heavy rain, cause, mudslide)".
[0060] Step 104, analyze whether there is path contradiction between the reasoning paths in the new disaster atlas and the old atlas, and mark the new knowledge that does not appear in the new disaster atlas.
[0061] Construct an entity classification data set for training a disaster entity classification model.
[0062] The Python programming is used to traverse each triple in the old graph, extract triples with the relationship type of "cause", and remove the head entity and tail entity of the extracted triples. The results after removing the duplicates are saved to the "old graph entity name" document in the database. The entities stored in the document "old graph entity name" are used to construct entity pairs, and are labeled according to whether the entities are mutually exclusive. The specific form is "entity name, entity name, label". The entity classification dataset is obtained, and the dataset is divided into a training set and a test set according to a preset threshold. The entity pairs in the training set are input into the disaster entity classification model based on BERT, and the disaster entity classification model is trained through continuous iteration and back propagation. The disaster entity classification model is tested with the data in the test set. When the accuracy reaches the preset threshold, the training is stopped, and the parameters of the disaster entity classification model at this time are saved. For example, the triples stored in the old graph are (heavy rain, cause, flood disaster), (heavy rain, cause, fire), (collapse, precursor, falling phenomenon), and (collapse, cause, debris flow). The contents saved in the database document "old graph entity name" are "heavy rain", "flood disaster", and "fire". The entity pairs are formed by "heavy rain" and other disaster names, and the entity pairs are labeled, such as (heavy rain, flood disaster, 0) and (heavy rain, fire, 1). Label 0 indicates that the entities are not mutually exclusive, and label 1 indicates that the entities are mutually exclusive. Similarly, the entity pairs are formed by "flood disaster" and other disaster names, and the corresponding labels are labeled, obtaining data (flood disaster, fire, 1). Therefore, there are 3 data in the entity classification dataset. The entity classification dataset is divided into a training set and a test set according to a ratio of 8:2, and the threshold of the accuracy is set to 95%.
[0063] It is analyzed whether there is a path contradiction between the knowledge stored in the new disaster graph and the old graph.
[0064] Extract the triples with the relationship type of "cause" from the database "New Disaster Atlas Inference Path" and "Old Atlas Inference Path" documents, respectively, and save them to the database "New Disaster Atlas Cause Disaster" and "Old Atlas Cause Disaster" documents; traverse each triple in the database documents "New Disaster Atlas Cause Disaster" and "Old Atlas Cause Disaster", use Python regular expression matching to get the tail entity in the triple, and store it in the database documents "New Disaster Atlas Tail Entity" and "Old Atlas Tail Entity", respectively. Each entity in "New Disaster Atlas Tail Entity" is matched with each entity in "Old Atlas Tail Entity" to form an entity pair, which is input into the trained disaster entity classification model. When the output result of the model is positive, it means that the inference path of the new disaster in "New Disaster Atlas Cause Disaster" and "Old Atlas Cause Disaster" is the same, and there is no path contradiction phenomenon. At this time, the "Old Atlas Cause Disaster" document is labeled with the same path label for the current triple. When the output result of the model is negative, it means that the inference path of the new disaster in "New Disaster Atlas Cause Disaster" and "Old Atlas Cause Disaster" is contradictory, that is, the disaster caused by the new disaster is mutually exclusive in the new disaster atlas and the old atlas. At this time, the "Old Atlas Cause Disaster" document is labeled with the path contradiction label for the current triple, and the entity pair at this time is saved to the database document "Mutually Exclusive Disaster Phenomenon" in the form of "entity name, entity name". The database documents "New Disaster Atlas Cause Disaster" and "Old Atlas Cause Disaster" are updated; for example, the triples stored in the "New Disaster Atlas Inference Path" and "Old Atlas Inference Path" documents are (heavy rain, precursor, cloud cover) and (heavy rain, precursor, cloud cover), respectively.
[0065] For example, the tail entity of the triple (rainstorm, cause, mudslide) in the "New Disaster Atlas Cause Disaster" and the tail entity of the triple (flood disaster, cause, collapse) in the "Old Atlas Cause Disaster" are input into the disaster entity classification model, and the output result is positive class, indicating that the tail entities of the triples in the "New Disaster Atlas Cause Disaster" and the "Old Atlas Cause Disaster" are not mutually exclusive phenomena, and there is no reasoning path contradiction between the two atlases. At this time, the triple (flood disaster, cause, collapse) in the document "Old Atlas Cause Disaster" is labeled with the label "0", and is stored in the form of "(flood disaster, cause, collapse) 0" in the document "Old Atlas Cause Disaster". For example, the tail entity of the triple (rainstorm, cause, mudslide) in the "New Disaster Atlas Cause Disaster" and the tail entity of the triple (flood disaster, cause, fire) in the "Old Atlas Cause Disaster" are input into the disaster entity classification model, and the output result is negative class, indicating that the tail entities of the triples in the "New Disaster Atlas Cause Disaster" and the "Old Atlas Cause Disaster" are mutually exclusive phenomena. At this time, the triple (flood disaster, cause, fire) in the document "Old Atlas Cause Disaster" is labeled with the label "1", and is stored in the form of "(flood disaster, cause, fire) 1" in the document "Old Atlas Cause Disaster". The form of "mudslide, fire" is saved to the database document "Mutually Exclusive Disaster Phenomenon", and the triple marked with "1" indicates that there is a contradiction in the reasoning path of the triple in the new disaster atlas and the old atlas. For example, the tail entity of the triple (rainstorm, cause, mudslide) in the "New Disaster Atlas Cause Disaster" and the tail entity of the triple (flood disaster, cause, fire) in the "Old Atlas Cause Disaster" are input into the disaster entity classification model, and the output result is negative class, indicating that the tail entities of the triples in the "New Disaster Atlas Cause Disaster" and the "Old Atlas Cause Disaster" are mutually exclusive phenomena. At this time, the triple (flood disaster, cause, fire) in the document "Old Atlas Cause Disaster" is labeled with the label "1", and is stored in the form of "(flood disaster, cause, fire) 1" in the document "Old Atlas Cause Disaster". The form of "mudslide, fire" is saved to the database document "Mutually Exclusive Disaster Phenomenon", and the triple marked with "1" indicates that there is a contradiction in the reasoning path of the triple in the new disaster atlas and the old atlas. For example, the tail entity of the triple (rainstorm, cause, mudslide) in the "New Disaster Atlas Cause Disaster" and the tail entity of the triple (flood disaster, cause, fire) in the "Old Atlas Cause Disaster" are input into the disaster entity classification model, and the output result is negative class, indicating that the tail entities of the triples in the "New Disaster Atlas Cause Disaster" and the "Old Atlas Cause Disaster" are mutually exclusive phenomena. At this time, the triple (flood disaster, cause, fire) in the document "Old Atlas Cause Disaster" is labeled with the label "1", and is stored in the form of "(flood disaster, cause, fire) 1" in the document "Old Atlas Cause Disaster". The form of "mudslide, fire" is saved to the database document "Mutually Exclusive Disaster Phenomenon", and the triple marked with "1" indicates that there is a contradiction in the reasoning path of the triple in the new disaster atlas and the old atlas.
[0066] Step 105, according to the analysis result, the knowledge in the old atlas is used to realize the reuse generation of the new disaster atlas.
[0067] The Python programming is used to traverse each data in the database document "old atlas leads to disaster". For the data with the same label of the annotation path, the reasoning path of the new disaster in the new disaster atlas and the old atlas does not exist path contradiction phenomenon. The new disaster atlas directly reuses the tail entity of the triple in the old atlas, that is, the corresponding tail entity is obtained from the triple data, and is stored in the new disaster atlas in the form of "new disaster name, leads to, tail entity". Meanwhile, this data is deleted from the document "old atlas leads to disaster", and the updated new disaster atlas is generated. For the data with the contradictory label of the annotation path, the reasoning path of the new disaster in the new disaster atlas and the old atlas exists path contradiction phenomenon, that is, the disaster phenomenon caused by the new disaster in the two disaster atlases is mutually contradictory and mutually exclusive. At this time, the new disaster atlas reuses the tail entity of the triple in the old atlas, and stores it in the new disaster atlas in the form of "new disaster name, leads to, tail entity". Then, an additional triple is added to show that the tail entity just obtained is obtained from the contradictory path. The triple is in the form of "tail entity, source, contradictory path", which supplements the knowledge not contained in the new disaster atlas before, realizes the reuse generation of the new disaster atlas, and obtains the updated new disaster atlas. For example, the new disaster name is "heavy rain", and the data in the document "old atlas leads to disaster" is "(flood disaster, leads to, collapse) 0" and "(flood disaster, leads to, fire) 1". For the data "(flood disaster, leads to, fire) 1", the label "1" indicates that the disaster phenomenon "heavy rain" caused by the old atlas is contradictory to the disaster phenomenon caused by the new disaster atlas. In order to realize the reuse of as much knowledge as possible in the old atlas and generate a new disaster atlas with more use value, the tail entity "fire" of the triple data in the old atlas is reused first, and the triple "(heavy rain, leads to, fire)" is constructed and stored in the new disaster atlas. In order to show that the disaster phenomenon "fire" is obtained from the contradictory path, the triple "fire, source, contradictory path" is added in the new disaster atlas. At this time, the reuse of the knowledge in the old atlas in the new disaster atlas is successful. For the data "(flood disaster, leads to, collapse) 0", the label "0" indicates that there is no contradiction between the disaster phenomenon "collapse" and the disaster obtained by the reasoning path of "heavy rain" in the new disaster atlas. Therefore, the new disaster atlas can directly reuse the triple knowledge in the old atlas, obtain the tail entity "collapse" of the triple in the old atlas first, and then construct the triple "(heavy rain, leads to, collapse)" and store it in the new disaster atlas. Through the reuse of the knowledge in the old atlas, the missing information in the new disaster atlas is supplemented, and the data "(flood disaster, leads to, collapse) 0" is deleted from the document "old atlas leads to disaster".
[0068] In step 106, the new disaster plan processing order is analyzed according to the updated new disaster atlas.
[0069] Retrieving the updated new disaster graph, the head entity is the new disaster name, and the relationship is all triples of "solution" and "cause". In all the triples obtained, the "cause" relationship corresponds to the mutually exclusive disaster phenomena between the disaster phenomena, that is, two disaster phenomena rarely occur at the same time in real life, such as "typhoon" and "fire" phenomena. Using the "source" relationship in the new disaster graph to determine whether the disaster phenomenon comes from a contradictory path. The disaster from the contradictory path has speciality, which should be processed first in the plan. The disaster phenomenon that has not been processed is called the remaining disaster phenomenon, that is, the disaster phenomenon that is not from the contradictory path. The value corresponding to the "hazard assessment" relationship is "high", "medium", and "low", which represents the degree of disaster that the disaster phenomenon brings to people or nature. The higher the risk, the higher the priority of processing and preparing the processing plan. From the old graph, obtain the knowledge related to the hazard assessment of the remaining disaster phenomenon, and sort the remaining disaster phenomenon according to the degree of hazard assessment. The disaster arrangement order obtained is the order of disaster processing plan. For example, the triples obtained by retrieving the new disaster graph are (earthquake, cause, tsunami), (earthquake, cause, landslide), (earthquake, cause, fire), (earthquake, solution, stay near the epicenter and quickly evacuate to a safe place after the earthquake), (fire, source, contradictory path). Since "fire" is a disaster phenomenon from a contradictory path, that is, the "fire" phenomenon and the other tail entities corresponding to the "cause" relationship "tsunami" and "landslide" have mutual exclusivity. In addition, the risk of mutually exclusive disaster phenomena may be unpredictable, so "fire" should be processed first in the processing plan. The processing order of "fire" is first. At this time, the disaster phenomena that have not been processed are "tsunami" and "landslide", so "tsunami" and "landslide" are the remaining disaster phenomena. From the old graph, query the knowledge of the remaining disaster phenomena "landslide" and "tsunami", and get the corresponding hazard assessment as "medium" and "high", respectively. That is, the damage caused by the tsunami disaster to nature may be greater than that caused by the landslide disaster. Therefore, the processing order of "tsunami" and "landslide" in the processing plan is second and third, respectively. The processing plan for the tsunami disaster should be prepared first, and then the processing plan for the landslide should be prepared. Thus, the processing plan order when an earthquake occurs is fire, tsunami, and landslide.
Claims
1. A method for constructing a knowledge graph applicable to multi-disaster emergency response, characterized in that, The method includes: Based on disaster news data, a named entity recognition model for disaster domains is constructed. Specifically, this includes: using Python web crawlers to crawl corpora, constructing a disaster domain corpus for the named entity recognition model for disaster domains, and using the disaster domain corpus to train the named entity recognition model for disaster domains. Extracting disaster entity relationships from disaster information to identify multiple disaster entity associations and construct a new disaster map specifically includes: identifying multiple disaster entities associated with the original disaster entities, obtaining the degree of association with the original disaster entities, clarifying the relationships between the multiple disaster entities, and constructing a new disaster map; To determine whether a new disaster exists in the old disaster map, the inference path between the new disaster map and the old disaster map is extracted. Specifically, this involves: constructing an old disaster map categorized by disaster type; using a cosine similarity matching algorithm to obtain the correlation between the new disaster and existing disasters in the old disaster map; identifying disasters in the old disaster map related to the new disaster type based on the correlation; and for disasters that successfully match the new disaster in the old disaster map, firstly, retrieving all triples of the identified new disaster from the new disaster map and storing them in a database under the name "New Disaster Map Inference Path"; and secondly, using Python programming to process the names of disasters that successfully match the new disaster. The system uses a cosine similarity matching algorithm to perform similarity matching with the first entity of all triples in the old disaster map. When a match is successful, the triple containing the first entity is saved in a document named "Old Disaster Map Inference Path" and the document is also saved in the database. When all existing disasters in the old disaster map fail to match with the new disaster, all triples of the identified new disaster are directly retrieved from the new disaster map and saved in the database named "New Disaster Map Inference Path". The document "Old Disaster Map Inference Path" in the database is empty. Each triple in the document "New Disaster Map Inference Path" saved in the database is stored in the form of "New Disaster Name, Relation Type, Value Corresponding to Relation Type". The analysis of whether there are path contradictions in the reasoning paths between the new disaster map and the old map, and the annotation of new knowledge not appearing in the new disaster map, specifically includes: constructing an entity classification dataset to train a disaster entity classification model, and analyzing whether there are path contradictions in the knowledge stored in the new disaster map and the old map; Based on the analysis results, the knowledge in the old disaster maps is used to generate new disaster maps; based on the updated disaster maps, the processing sequence of the new disaster response plan is analyzed.
2. The method according to claim 1, wherein, The method of using Python web crawlers to crawl corpora and constructing a disaster domain corpus for named entity recognition models targeting disaster domains specifically includes: First, search for disaster news from various regions using search engines, and then use Python web crawlers to retrieve the disaster news. However, some of the retrieved disaster news contains irrelevant information, so it needs to be manually processed to remove this irrelevant information and break each news article down into multiple sentences. Each sentence is treated as a data point, and each character in each data point is labeled using BIO sequence labeling, which serves as the tag for each data point. A disaster domain corpus is then constructed, and the data in the disaster domain corpus is divided into training and testing sets according to a predefined ratio. The training of a disaster-domain-oriented named entity recognition model using a disaster domain corpus specifically includes: Data from the disaster domain corpus training set is input into the BERT pre-trained model to obtain embedded representations of the input data. Bi-LSTM (Bidirectional Long Short-Term Memory) is used to encode these embedded representations. The encoded representations are then input into a CRF (Conditional Random Field) to obtain the annotations for each character in each data point. Backpropagation is used to continuously optimize the parameters in the model. The model is tested using data from the test set. Through continuous iteration, the model's accuracy on the test set reaches a preset threshold, resulting in a disaster domain-oriented named entity recognition model. The model parameters are then saved.
3. The method according to claim 1, wherein, The process of identifying multiple disaster entities associated with the original disaster entity and obtaining the degree of association with the original disaster entity specifically includes: A disaster domain-oriented named entity recognition model, trained using this model, is used to identify one or more disaster entities within the disaster information. These identified entities are referred to as original disaster entities. A search engine is then used to search for each original disaster entity within the disaster information, resulting in multiple web pages related to those entities. The disaster domain-oriented named entity recognition model is then used to identify disaster entities within the disaster text information on each web page. The newly identified disaster entities are considered to be associated with the original disaster entities, but their degree of association varies. The frequency of each newly identified disaster entity is counted, and this frequency is considered as a percentage of the original disaster entity's association with the original disaster entity. An important indicator of the correlation between the original disaster entities is stored in key-value pairs, along with the number of times each newly identified disaster entity appears. Specifically, the format is "newly identified disaster entity name - corresponding number of appearances". Based on a set threshold, when the number of appearances of a newly identified disaster entity name is greater than or equal to the set threshold, this disaster entity is considered to be strongly correlated with the original disaster entity. Multiple disaster entities associated with the original disaster entity are identified and saved in the database document "Disaster-related entities". When the number of appearances is less than the set threshold, this disaster entity is considered to be uncorrelated with the original disaster entity and is discarded. The process of clarifying the relationships between multiple hazard entities and constructing a new hazard map specifically includes: From the database document "Disaster-Related Entities", multiple disaster entities related to the original entity are retrieved. From each returned webpage, information or news related to various aspects of the original disaster entity is obtained, including information related to multiple disaster entities. Based on the set relationship types: disaster risk assessment, solutions, causes, and precursors, Python regular expressions are used to match sentences in the disaster information that simultaneously contain the original disaster entity and the set relationship types. From the successfully matched sentences, the values corresponding to each relationship type are extracted, i.e., the subject or object in the successfully matched sentences, forming triples related to the new disaster and saving them. Specifically, the triples are in the form of "new disaster name, relationship type, value corresponding to the relationship type", forming a new disaster map.
4. The method according to claim 1, wherein, The construction of the old map for disaster types specifically includes: Enter "disaster" into a search engine, visit websites related to "disaster," obtain various disaster names, and store them in the database document "Disaster Name Directory." Use Python programming to traverse the "Disaster Name Directory," using each record as a keyword. Use a Python web crawler to access the corresponding webpages, extract the text paragraphs, and store them in the database document "Disaster Webpage Description." Based on the defined relation types: disaster risk assessment, solutions, causes, and precursors, use a disaster-domain-oriented named entity recognition model and Python regular expressions to identify the disaster names in each record of the "Disaster Webpage Description" database document, and match sentences that simultaneously contain disaster entities and defined relation types. Extract the corresponding values for each relation type from the successfully matched sentences, i.e., the subject or object of the successfully matched sentences, forming old graph triples, which are then saved. The specific triple form is "disaster name, relation type, value corresponding to the relation type," forming the old graph. The method utilizes a cosine similarity matching algorithm to obtain the correlation between the new disaster and existing disasters in the previous old map. Based on the correlation, it identifies disasters in the old map that are related to the new disaster type. Specifically, this includes: Using Python programming, the triples in the entire old disaster knowledge graph are traversed to obtain all disaster names in the old graph. These names are then stored in a database as "Old Graph Disaster Names." The old graph refers to the knowledge graph that the enterprise has built based on previous disaster types, storing disaster information. However, the old graph may not necessarily contain information or knowledge about new disasters, and disaster preparedness services for new disasters may not be available. The new disaster names identified by the disaster domain-oriented named entity recognition model are then matched with each disaster name stored in the "Old Graph Disaster Names" using a cosine similarity matching algorithm. In the formula, Ai and Bi represent the new disaster name and the disaster name in the "old map disaster name" respectively. The matching value between the new disaster and the existing disasters in the old map is obtained and stored in the database document "New and Old Disaster Name Matching Value" in the form of "New Disaster Name Matching Value in Old Map". When the matching value is greater than the preset threshold, it proves that the identified new disaster or a disaster similar to the new disaster type has been stored in the old map, that is, the old map contains relevant knowledge of the corresponding disaster. When the matching value is less than the preset threshold, it proves that the identified new disaster has never appeared in the old map or the existing disaster types in the old map have too low correlation with the new disaster type.
5. The method according to claim 1, wherein, The analysis examines whether there are contradictions in the reasoning paths between the new and old disaster maps, and identifies new knowledge not present in the new disaster map, including: The construction of the entity classification dataset, used to train the disaster entity classification model, specifically includes: Using Python programming, we traverse each triple in the old graph, extract triples with the relation type "cause", and remove duplicates from the first and last entities of the extracted triples. The deduplicated results are then saved to the "Old Graph Entity Name" document in the database. Entity pairs are constructed using entities stored in the document "Old Graph Entity Names". Entities are then labeled based on whether they are mutually exclusive, in the form of "entity name, entity name, label", resulting in an entity classification dataset. The dataset is then divided into training and test sets according to a preset threshold. The entity pairs in the training set are input into a BERT-based disaster entity classification model. The model is trained through iterative learning and backpropagation. The model is then tested using data from the test set. Training stops when the accuracy reaches a preset threshold, and the parameters of the disaster entity classification model are saved at this point. The analysis of whether there are path contradictions between the knowledge stored in the new disaster map and the old map specifically includes: Triples with the relation type "cause" are extracted from the "New Disaster Map Inference Path" and "Old Disaster Map Inference Path" documents in the database, and saved to the "New Disaster Map Causes Disaster" and "Old Disaster Map Causes Disaster" documents in the database, respectively. Each triple in the "New Disaster Map Causes Disaster" and "Old Disaster Map Causes Disaster" documents is traversed, and the tail entities in the triples are obtained using Python regular expressions. These tail entities are stored in the "New Disaster Map Tail Entities" and "Old Disaster Map Tail Entities" documents, respectively. Each entity in the "New Disaster Map Tail Entities" is paired with each entity in the "Old Disaster Map Tail Entities" to form an entity pair. These entity pairs are then input into a trained disaster entity classification model. When the model output is positive, it indicates that the new disaster... The reasoning paths for "New Disaster Map Causes Disaster" and "Old Disaster Map Causes Disaster" are the same, and there is no path contradiction. In this case, the current triple in the document "Old Disaster Map Causes Disaster" is labeled with the same path. When the model output is negative, it indicates that the reasoning paths for the new disaster in "New Disaster Map Causes Disaster" and "Old Disaster Map Causes Disaster" are contradictory. That is, the disasters caused by the new disaster are mutually exclusive in the new disaster map and the old disaster map. In this case, the current triple in the document "Old Disaster Map Causes Disaster" is labeled with the path contradiction, and the entity pair is saved to the database document "Mutual Exclusive Disaster Phenomena" in the form of "Entity Name, Entity Name", thereby updating the documents "New Disaster Map Causes Disaster" and "Old Disaster Map Causes Disaster" in the database.
6. The method according to claim 1, wherein, The process of reusing and generating new disaster maps based on the analysis results and knowledge from old maps includes: Using Python programming, we iterate through each data entry in the database document "Old Map Causes Disasters". For data with the same path label, there is no path contradiction in the inference path of the new disaster in both the new and old disaster maps. The new disaster map directly reuses the tail entity of the triples in the old map, that is, it obtains the corresponding tail entity from the triple data and stores it in the form of "new disaster name, causing, tail entity" in the new disaster map. At the same time, this data entry is deleted from the document "Old Map Causes Disasters", generating an updated new disaster map. For data with path contradiction labels, the new disaster in the new map... There is a path contradiction in the reasoning paths between the disaster map and the old map. That is, the disaster phenomena caused by the new disaster in the two disaster maps are contradictory and mutually exclusive. In this case, the new disaster map first reuses the tail entity of the triple in the old map and stores it in the form of "new disaster name, cause, tail entity". Then, an additional triple is added to indicate that the tail entity just obtained is obtained from the contradictory path. The triple is in the form of "tail entity, source, contradictory path". This supplements the knowledge not included in the previous new disaster map, realizes the reuse and generation of the new disaster map, and obtains the updated new disaster map.
7. The method according to claim 1, wherein, The analysis of the new disaster response plan's processing sequence based on the updated disaster map includes: The updated disaster map is retrieved, yielding all triples with the new disaster name as the primary entity and the relationships "solution" and "cause". Among these triples, multiple disaster phenomena corresponding to the "cause" relationship may be mutually exclusive, meaning that the two disaster phenomena rarely occur simultaneously in real life. The "source" relationship in the new disaster map is used to determine whether a disaster phenomenon originates from a contradictory path. Disasters originating from contradictory paths have special characteristics and are given priority in emergency response. Unresolved disaster phenomena are referred to as residual disaster phenomena, i.e., those not originating from contradictory paths. The "hazard assessment" relationship corresponds to values of "high", "medium", and "low", indicating the degree of harm a disaster phenomenon brings to people or nature. Higher hazard levels should be prioritized for handling, and emergency response plans should be developed accordingly. Knowledge related to the hazard assessment of residual disaster phenomena is obtained from the old map. Based on the degree of hazard assessment, the residual disaster phenomena are ranked, and the resulting disaster ranking order is the order of disaster response plan handling, thereby formulating a new disaster response plan.
Citation Information
Patent Citations
Knowledge graph construction method based on disaster scene
CN109992672A
Disaster scene information fusion method and device based on knowledge graph
CN110008355A