Safety emergency dynamic knowledge graph construction method and system

By constructing security emergency dynamic knowledge maps, using multi -tasking learning models to extract event information, solving the problem of dispersion and loose structure in the security emergency field, and realizing the efficient acquisition and management of event information.

CN119357412APending Publication Date: 2025-01-24HEFEI INST FOR PUBLIC SAFETY RES TSINGHUA UNIV

Patent Information

Application Number
CN202411912570.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

In the field of security emergency, event information has spatiotemporal characteristics, and the scenes and risk sources change rapidly. It is difficult for existing technologies to effectively obtain and manage this information, resulting in dispersed information, loose structure, and difficult to obtain.

Method used

Put forward a method and system of safety emergency dynamic knowledge map construction. By obtaining text data of the security emergency knowledge text, the pre -training multi -tasking learning model is used for event extraction to obtain physical information and relations information, and the three -yuan group of data is constructed to build it to build it Dynamic knowledge map.

Benefits of technology

It realizes the structuring of event information, facilitates learning and acquisition, reduces the manual retrieval process, and improves the convenience and efficiency of information acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357412A_ABST
    Figure CN119357412A_ABST
Patent Text Reader

Abstract

The invention discloses a safety emergency dynamic knowledge graph construction method and system, and relates to the technical field of data processing, and the safety emergency dynamic knowledge graph construction method comprises the steps: obtaining text data of a safety emergency knowledge text; performing event extraction on the text data by adopting a pre-trained multi-task learning model to obtain entity information and relation information of a key event described in the text data; wherein the multi-task learning model is a joint task model which is obtained by training a preset neural network model by adopting sample text data and is used for performing entity recognition and relation extraction; and constructing a security emergency dynamic knowledge graph based on triple data formed by the entity information and the relationship information so as to obtain event information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method and system for constructing a safety emergency dynamic knowledge graph. Background Art

[0002] In the field of security emergency response, event information plays an important role. The event information of security events itself contains a large amount of temporal and spatial information. The event scenarios and risk sources change quickly, and different scenarios require different treatment methods. Historical event analysis can help us better understand the events themselves, find out the laws and causes of the events, and take targeted preventive measures to reduce the probability of similar events. Effective event information management can improve the public's perception of risk sources, enhance safety awareness and self-protection capabilities.

[0003] In the field of safety and emergency response, there is a large amount of event information, including a large amount of time and space information. The scenarios and risk sources change quickly, and different scenarios require different disposal methods. In text data such as laws and regulations and event cases, there are often a large number of sentences that lack subjects to express commands or suggestions, such as "highlighting the risk identification results and control measures of elevated warehouses, logistics maintenance operation procedures", "strengthening the closed management of elevated warehouses", etc. There are also a large number of industry terms and professional vocabulary, the recording structure of event information is loose, and the information is scattered in various information sources, making these event information difficult to obtain. Summary of the invention

[0004] The present invention aims to solve one of the technical problems in the related art at least to a certain extent. To this end, one object of the present invention is to propose a method and system for constructing a security emergency dynamic knowledge graph to facilitate the acquisition of event information.

[0005] According to a first aspect of an embodiment of the present invention, a method for constructing a security emergency dynamic knowledge graph is provided, the method comprising: Acquire text data of safety emergency knowledge text; Using a pre-trained multi-task learning model to extract events from the text data, and obtaining entity information and relationship information of key events described in the text data; wherein the multi-task learning model is: a model obtained by training a preset neural network model using sample text data, and used for the joint task of entity recognition and relationship extraction; A safety emergency dynamic knowledge graph is constructed based on the triple data formed by the entity information and relationship information.

[0006] According to a second aspect of an embodiment of the present invention, a system for constructing a security emergency dynamic knowledge graph is provided, the system comprising: Ontology construction and dictionary generation module, used to obtain text data of safety emergency knowledge text; A knowledge extraction module, used to extract events from the text data using a pre-trained multi-task learning model to obtain entity information and relationship information of key events described in the text data; wherein the multi-task learning model is a model obtained by training a preset neural network model using sample text data and used for the joint task of entity recognition and relationship extraction; The knowledge fusion module is used to construct a safety emergency dynamic knowledge graph based on the triple data formed by the entity information and relationship information.

[0007] In the solution provided by the embodiment of the present invention, on the basis of acquiring the text data of the safety emergency knowledge text, a safety emergency dynamic knowledge graph is constructed to integrate the knowledge of various text data sources in the field, and through the safety dynamic emergency knowledge graph, the event information in the text data is structured to facilitate learning and acquisition. In addition, in the process of constructing the safety emergency dynamic knowledge graph, a multi-task learning model is trained and used to replace manual entity recognition and relationship extraction, thereby realizing automatic event extraction, reducing the process of manual retrieval of event information, and facilitating users to obtain event information.

[0008] Among them, the above-mentioned knowledge graph can store the connections between entities and record events with the stored entities, which makes it easy for users to search according to the dynamic knowledge graph and improves convenience.

[0009] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Figure 1 It is a flowchart of a first method for constructing a security emergency dynamic knowledge graph provided by an embodiment of the present invention; Figure 2 is a structural diagram of a multi-task model provided by an embodiment of the present invention; Figure 3 is a schematic diagram of a scenario provided by an embodiment of the present invention; Figure 4 It is a flow chart of a second method for constructing a security emergency dynamic knowledge graph provided by an embodiment of the present invention; Figure 5 It is a structural diagram of a security emergency dynamic knowledge graph construction system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0011] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.

[0012] The following describes the method and system for constructing a security emergency dynamic knowledge graph according to an embodiment of the present invention with reference to the accompanying drawings.

[0013] In one embodiment of the present invention, see Figure 1 , provides a method for constructing a safety emergency dynamic knowledge graph, including the following steps S101-S103.

[0014] S101: Acquire text data of safety emergency knowledge text.

[0015] S102: Use a pre-trained multi-task learning model to extract events from text data to obtain entity information and relationship information of key events described in the text data.

[0016] The multi-task learning model is a model obtained by training a preset neural network model using sample text data and used for the joint task of entity recognition and relationship extraction; S103: Construct a safety emergency dynamic knowledge graph based on triple data formed by entity information and relationship information.

[0017] The above-mentioned text data may include: structured text data, unstructured text data and semi-structured text data; The structured text data is obtained in the following way: Obtaining the original data of safety emergency knowledge text; The ontology structure information of the text data is determined, and structured text data is obtained based on the ontology structure information.

[0018] The original data of safety emergency knowledge texts can be sourced from the safety emergency knowledge system and relevant texts in the field of safety emergency. The safety emergency knowledge system is a pre-sorted and summarized special content, including civil air defense safety, emergency rescue, earthquake disasters, hot work, hazardous chemicals safety, emergency rescue command, special operations, etc. The special content is the original data that has been classified by topic.

[0019] Texts related to the field of safety and emergency may also include related texts that are not classified.

[0020] The sources of unstructured and semi-structured text data can include texts provided by public data sources such as websites and search engines.

[0021] For unstructured and semi-structured text data, data preprocessing can be performed first to remove redundant, missing, and irrelevant characters, and the text data can be segmented according to paragraphs as training data, that is, sample text data.

[0022] The multi-task model performs entity recognition by obtaining the entity type, that is, the model outputs the entity classification as the recognition result after receiving the input, and the relationship information obtained by relationship extraction is the classification of the relationship between the recognized entities.

[0023] The sample text data is data of the same type as the text data. For example, part of the data can be extracted from the acquired text data as sample text data to train the multi-task model.

[0024] Event extraction refers to identifying and extracting key event information from text data and representing it in a structured way, namely, arguments. Figure 3 As shown, the embodiment of the present invention divides events into five element levels: accident scenario layer, risk factor layer, risk avoidance demand layer, knowledge and skills layer, and spatiotemporal information layer. Different events have different event types. For each target event, the argument roles include time, location, scene, environmental information, risk source, personnel information, risk avoidance demand, safety knowledge, emergency skills, etc.

[0025] Event extraction includes two tasks: entity extraction and relationship extraction. The entity extraction task is used to extract trigger words (action entities) and arguments. For example, the arguments are extracted as follows: "factory building", "isoalkane mixture", "fire extinguishing", "electrostatic discharge causing flammable vapor to ignite and burn", "use fire extinguisher to extinguish the fire as soon as possible", "X day X time X minute", "canning workshop"; the relationship extraction task is used to determine the type of relationship between entities. If there is a relationship between the entities represented by two arguments, triple data is formed.

[0026] The safety emergency dynamic knowledge graph is a collection of entities and relationships in multiple triple data. The relationships between entities are stored and connected by recording triple data.

[0027] For example, if both triples contain entity G and have different relationships, then in the knowledge graph, it can be recorded that G has two relationships, and the two relationships are associated with different entities in the two triples respectively.

[0028] In this way, as event information is constantly updated, new text data can be continuously acquired, and new triple data can be generated according to the above steps and added to the safety emergency dynamic knowledge graph to achieve dynamic updates.

[0029] In the solution provided by the embodiment of the present invention, on the basis of acquiring the text data of the safety emergency knowledge text, a safety emergency dynamic knowledge graph is constructed to integrate the knowledge of various text data sources in the field, and through the safety dynamic emergency knowledge graph, the event information in the text data is structured to facilitate learning and acquisition. In addition, in the process of constructing the safety emergency dynamic knowledge graph, a multi-task learning model is trained and used to replace manual entity recognition and relationship extraction, thereby realizing automatic event extraction, reducing the process of manual retrieval of event information, and facilitating users to obtain event information.

[0030] Among them, the above-mentioned knowledge graph can store the connections between entities and record events with the stored entities, which makes it easy for users to search according to the dynamic knowledge graph and improves convenience.

[0031] In one embodiment, ontology structure information can be obtained in the following manner: Determine the scope of the professional field described by the text data; Obtain various ontologies and related terms of each ontology in text data; Define the classes and class hierarchies included in each ontology; Define class relationships and attributes; Design instances of classes and check the completeness and consistency of the ontology.

[0032] When defining the above classes and ontologies, the Protégé tool can be used to establish a security emergency domain ontology library. The security emergency domain ontology library is a database for storing structured ontology structure information.

[0033] From the above embodiments, the scope of professional fields can be indicated by the content of the above knowledge system, such as civil air defense safety, emergency rescue, etc.

[0034] Ontology is a formalized, standardized, and clear description of a shared conceptual model. Entity is a distinguishable object or concept in the real world. Ontology is an abstraction of entity, which has attributes and relationships and is an instance of ontology. For example, if the ontology is "disaster", the entity is "mudslide"; if the ontology is "road", the entity is "two-way road section", etc.

[0035] Specifically, ontology includes elements such as classes, relationships, attributes, functions, and axioms. These elements together constitute the conceptual framework of a domain. In summary, ontology is a framework that defines the concepts and relationships between concepts in a domain. Classes are the basic units used to organize and classify knowledge in an ontology. For example, a simple ontology in the book domain defines classes (books, authors), attributes (writing, publishing), and defines a subclass (novel) that belongs to the class (book). The instantiated entities include: Xiao Ming (an instance of the author), "ABC" (the title of a book, an instance of a novel), and the relationship between entities: writing (Xiao Ming wrote the book "ABC").

[0036] The ontology structure information can record the above elements.

[0037] Based on the correlation between the above elements, a dictionary library can be constructed to store the ontology structure information in the form of a dictionary according to the professional characteristics of the ontology, so that the dictionary library covers various professional terms and contexts in the field of safety and emergency response, so as to improve the efficiency and quality of knowledge graph construction.

[0038] Check the completeness and consistency of the ontology, that is, after designing the instance of the class, use a paragraph to extract some instances, and determine whether the extracted instances reflect the conceptual hierarchy of the ontology.

[0039] In one embodiment, the multi-task model is trained as follows: Input the sample text data into the multi-task model to obtain the entity classification results and relationship classification results output by the multi-task model; Calculate a first loss value of the entity classification result and a second loss value of the relationship classification result, and determine a total loss value based on the first loss value and the second loss value; The model parameters of the multi-task model are adjusted based on the loss value until the training termination condition is reached.

[0040] The multi-task includes two outputs, and both outputs are obtained based on sample text data. The multi-task model implements the parallel execution of two output tasks by sharing the representation layer and the encoding layer. For details, please refer to the network structure of the following embodiment.

[0041] The training termination conditions may include: the multi-task model converges, the number of training times reaches a preset number, etc.

[0042] The following example illustrates the network structure of the multi-task model.

[0043] For example, the multi-task model may include: a representation layer, a coding layer, and a first decoding layer and a second decoding layer; The representation layer is used to extract feature vectors of sample text data; The encoding layer is used to perform context encoding according to the feature vector to obtain the encoding feature; The first decoding layer is used to obtain entity classification results of the encoded features using conditional random fields (CRF); The second decoding layer is used to obtain the relationship classification result of the encoded features using the Softmax function.

[0044] The specific structure of the model is as follows Figure 2 As shown, the shared network in the representation layer and the encoding layer is shared in the processing of entity classification results and relationship classification results. After the sample text data is segmented, the word vector, part-of-speech tag, dependency type and entity tag are used to form the input vector of the segmentation as the feature vector for encoding.

[0045] The BERT (Bidirectional Encoder Representations from Transformers)-BiLSTM (Bidirectional Long Short-Term Memory) model is used as the underlying text feature encoder to contextually encode the input vector to obtain the encoded features.

[0046] In the decoding layer, the first decoding layer performs the entity recognition task, and uses CRF to classify the entity labels according to the encoding features to obtain the entity classification results; the second decoding layer performs the relationship classification task and uses the Softmax function to classify the relationship between entities to obtain the relationship classification results. Loss_1 and Loss_2 are the loss functions of the first decoding layer and the second decoding layer, respectively, and the first loss value and the second loss value are calculated. Loss_grad is the loss function for calculating the total loss value, which can maximize the likelihood function as the goal and use the gradient descent method to iteratively train the model.

[0047] according to Figure 2 In the method shown, the entity recognition task and the relation classification task are jointly learned by utilizing the underlying representation of the shared neural network.

[0048] For entity recognition tasks, the input of the BERT-BiLSTM-CRF model is the word vector of each word in the sample text data obtained by the representation layer. The word vector is pre-trained with word2vec as the initial value and enters the BERT model to extract rich text features and obtain a vector representation after integrating the semantic information of the full text. The vector representation is extracted by the BiLSTM layer to contain the text information for entity classification, generate the encoding features representing the text information, and finally enter the CRF (conditional random fields) layer for decoding to calculate the optimal annotation sequence. Bidirectional long short-term memory network (BiLSTM) is a neural network model that can capture sequence information. The purpose of adding the BiLSTM layer is to better learn the dependencies on the observation sequence before entering the CRF layer. Conditional random field CRF is a probabilistic undirected graph model that solves the conditional probability given a random input variable. The CRF layer is responsible for learning the transition rules between adjacent entity labels and giving prediction results for the combination of all annotation states. The loss function Loss_1 is defined as:

[0049] in, represents the score of the true path, , … is the score of the N possible paths predicted by the model.

[0050] The real path is the label sequence of each word in the actual text, which can be marked in advance. For example, B generally represents the beginning of an entity, I represents the inside of an entity, and O represents a non-entity. The real path of the sentence "A University is in I City" is "B-Organization I-Organization I-Organization I-Organization O B-Location I-Location".

[0051] The model learns the true path and can output entity classifications such as organizations and locations through the optimal annotation sequence.

[0052] In contrast, the denominator in the formula is the score of the N predicted label sequences output by the model.

[0053] By using this loss function for training, the BiLSTM-CRF model will be continuously updated, making the true path score account for an increasing proportion.

[0054] For the relationship classification task, the encoding results of the input sentence by the representation layer and the encoding layer are reused, and the Softmax function is used to classify the relationship between entities. Specifically, the encoding features can be classified and the results of BiLSTM can be converted into classification probabilities. For a set of input values ​​t , the Softmax function assigns a probability value between 0 and 1 to each value. Through the Softmax function, the output values ​​of multiple categories can be converted into a probability distribution in the range [0,1] and the sum is 1. The definition of the Softmax function is given below. Taking the output of the i-th node in 1...C as an example, each node i represents a classification type, and Loss2 is expressed as :

[0055] c represents the number of output nodes, Represents the output value of the i-th node.

[0056] In this case, the node with the largest output value corresponds to the type with the largest probability and can be used as the relationship classification result.

[0057] In one embodiment, the multi-task learning model uses a gradient quantization automatic equalization method to improve the convergence speed and overall performance of the multi-task learning model. In the loss function for calculating the total loss value, Loss_grad, multiple single-task Losses can be linearly added, that is,

[0058] in, is the weight of the loss function of a single task, when i=1, To calculate the first loss value Loss_1, when i=2, Loss_2 is used to calculate the second loss value.

[0059] Preferably, the gradient normalization method is used to dynamically adjust the gradient value of each task in the above i=1 and 2 to prevent the model from being biased towards a task with a larger gradient, resulting in insufficient model learning. Each weight is calculated as follows:

[0060] in, It represents the gradient of the loss value of task i to the weight norm, represents the average normalized gradient value of all tasks at training time t, Indicates that the weights are adjusted within the training time t , represents the relative inverse learning rate of task i, is the preset coefficient.

[0061] The loss function measures the gap between the actual gradient of each task and the target normalized gradient value. For a single task, the following formula is used to calculate the gradient loss to control the gradient of each parameter during back propagation: :

[0062] The meaning of each parameter is the same as in the previous formula and will not be described in detail here.

[0063] When triple data is obtained, entity alignment can also be performed in the following manner.

[0064] Perform entity alignment on the target entity in the triple data and the similar entity in the seed set of pre-aligned entity pairs to obtain an entity alignment result; If the entity alignment result indicates that there is no aligned entity, the triple data is added to the seed set.

[0065] There is at least one triple of entities that have been aligned in the seed set, which serves as a seed for alignment.

[0066] In one embodiment, entity alignment may be performed in the following manner, including: For the target entity, determine similar entities in the seed set; Acquire a first embedding vector based on the structural features of the target entity and the structural features of similar entities, and acquire a second embedding vector based on the attribute features of the target entity and the attribute features of similar entities; When the similarity between the first embedding vector and the second embedding vector is less than a preset similarity threshold, an entity alignment result indicating that no alignment entity exists is obtained; otherwise, the target entity is replaced with the similar entity.

[0067] In one embodiment, the trigger words of the target entity and the trigger words of each entity in the seed set may be uniformly named, and similar entities may be determined based on the similarity between the trigger words of each entity in the entity set and the trigger words of the target entity after the uniform naming.

[0068] The similarity of trigger words can be obtained by performing semantic analysis or calculating the vector similarity of word vectors.

[0069] After calculating the similarity, the above method can be used to perform calculations by selecting entities in the triples containing one or more trigger words with the highest similarity as target entities.

[0070] In this case, the triple of the target entity , triples of similar entities Merge into triplets , and the triple Decomposed into a set of relation triplets and a set of attribute triplets , so, The structural features of the target entity and the structural features of similar entities are included in It contains the attribute features of the target entity and the attribute features of similar entities.

[0071] In one embodiment, the TransE model can be used to learn The structural characteristics of Extract the first embedding vector of structural features, For a triple , define the energy function as ,in For The set of valid relation triples, in The validity of the relations in the tuple can be manually marked, and the triples with valid relations are valid relation triples.

[0072] Score function of TransE model :

[0073] in, is a set of valid triples, For any valid triple, , can have preset coefficient values, For the general The head entity of is replaced with a random entity or the attributes are replaced with a set of triplets generated by random attribute values ​​and used as negative samples.

[0074] In this way, the TransE model can be trained to input the first embedding vector by calculating the score of the scoring function output by the model through the scoring function and adjusting the model parameters based on the score.

[0075] In one embodiment, an LSTM model can be used to learn attribute triples The attribute characteristics, that is, based on A second embedding vector of structural features is extracted.

[0076] Score function of LSTM model for:

[0077] Similar to , is the set of valid triples of attribute triples, is a triple in the set of valid triples, For The negative samples are obtained by replacing the entities in for The energy function of , is the preset coefficient.

[0078] In addition, when adjusting the model parameters, you can also use the above formula , The total score function is obtained, and the model parameters of the above TransE model and LSTM model are adjusted with the goal of minimizing the total score function.

[0079] In one embodiment, the total score function L is:

[0080] in, , Same as above embodiment, It is calculated as follows:

[0081] in, represents the first embedding vector, represents the second embedding vector, Indicates selection , Each head entity in.

[0082] After the first embedding vector and the second embedding vector are transferred into the same vector space, the cosine similarity can be calculated as the similarity between the first embedding vector and the second embedding vector, and the entities with similarity exceeding a threshold are determined to be aligned entities.

[0083] After alignment, synonymous entity or relationship triples can be replaced with triples in the existing seed set to avoid duplicate storage of data; If there is no aligned entity, the triple data is added to the seed set to achieve iterative update of the seed set.

[0084] Unified naming means choosing the same representation for the same entity. For example, if an entity is represented by the full name in triple A and the abbreviation in triple B, after unified naming, the full name is used in both triples. In this way, a unified vector space can be provided for relation embedding. For example, for the triple (entity 1, relationship 1, entity 2), (entity 3, relationship 2, entity 4), after renaming, entity 1 and entity 3 are both called entity G, then relationship 1 and relationship 2 are both recorded under entity G, making the structure in the knowledge graph more accurate.

[0085] The following Figure 4 The illustrated embodiment illustrates the overall process of constructing a security emergency dynamic knowledge graph.

[0086] S1. Construct the ontology structure based on the safety emergency knowledge system and the relevant text characteristics in the safety emergency field, using the Stanford seven-step method.

[0087] The ontology structure construction process here refers to the method of obtaining the ontology structure information in the above-mentioned embodiment.

[0088] S2. Based on the knowledge content in the field of safety and emergency response and combined with professional characteristics, a dictionary database is constructed to cover various professional terms and contexts in the field of safety and emergency response.

[0089] S3. Collect unstructured and semi-structured text data in the field of safety emergency response for training.

[0090] S4. Build a joint learning model of named entity recognition and relationship extraction based on neural network, perform multi-task learning, maximize the likelihood function as the goal, use the gradient descent method, and use the text data in the safety emergency field as input data to iteratively train the joint learning model until the result loss no longer decreases.

[0091] The joint learning model here is the multi-task model in the aforementioned step S102. Loss is the likelihood function.

[0092] S5. Perform event extraction on text data in the field of safety and emergency response, identify and extract key event information from unstructured text, and represent it in a structured manner (arguments).

[0093] S6. Perform multi-source knowledge fusion on the two knowledge graphs generated by the joint learning task and the event extraction task, and construct the alignment relationship between the two knowledge graph entities through the embedding-based entity alignment method.

[0094] S7. Construct a knowledge graph based on the obtained triple knowledge data and store it in the Neo4j graph database.

[0095] The triple knowledge data here refers to the triple data in the aforementioned embodiment.

[0096] In one embodiment of the present invention, see Figure 5 , provides a security emergency dynamic knowledge graph construction system, the system includes: Ontology construction and dictionary generation module, used to obtain text data of safety emergency knowledge text; The knowledge extraction module is used to extract events from text data using a pre-trained multi-task learning model to obtain entity information and relationship information of key events described in the text data; wherein the multi-task learning model is a model obtained by training a preset neural network model using sample text data and used for the joint task of entity recognition and relationship extraction; The knowledge fusion module is used to construct a dynamic knowledge graph for safety and emergency response based on triple data formed by entity information and relationship information.

[0097] Among them, the ontology construction and dictionary generation module can be specifically divided into an ontology construction module and a dictionary generation module, wherein the ontology construction submodule is used to construct and update the ontology structure according to the safety emergency knowledge system and the text features related to the safety emergency field to obtain structured text data; The dictionary generation module is used to build and update the dictionary library to cover various professional terms and contexts in the field of safety and emergency response.

[0098] The knowledge extraction module can extract entities, relationships, and events from semi-structured and unstructured data in text data, and implement joint learning by iteratively training the data through building a multi-task model. The knowledge fusion module can obtain triple data, perform multi-source knowledge fusion on the knowledge graph entities in the triple data, and build the alignment relationship between two knowledge graph entities through the embedding-based entity alignment method. After entity alignment, a safety emergency dynamic knowledge graph is constructed based on the aligned entities and relationships.

[0099] In one embodiment, the system further includes a knowledge application module for applying the constructed knowledge graph to a specific task; The knowledge application module includes entity recognition submodule, security encyclopedia submodule, relationship query submodule, and graph display submodule; among them, The entity recognition submodule is used to automatically identify relevant entities in the unstructured input text based on the security emergency dynamic knowledge graph; The security encyclopedia submodule is used to display the entity list classified according to different scenarios in the security emergency dynamic knowledge graph, and display the basic information and related entities of each entity in the entity list; The relationship query submodule is used to receive the entity query information input by the user, search the safety emergency dynamic knowledge graph according to the entity query information, and obtain the relevant entity information and relevant relationship information of the entity query information; The graph display submodule is used to graphically display the safety emergency dynamic knowledge graph.

[0100] The knowledge application module is only used to illustrate the use scenarios of the knowledge graph, and does not limit the use scenarios. For other scenarios that require a safety emergency dynamic knowledge graph, the safety emergency dynamic knowledge graph can still be constructed and used by the method of the above embodiment.

[0101] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion with one or more wirings (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0102] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0103] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" 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 present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0104] In the description of the present invention, it is to be understood that the terms “center”, “longitudinal”, “lateral”, “length”, “width”, “thickness”, “up”, “down”, “front”, “back”, “left”, “right”, “vertical”, “horizontal”, “top”, “bottom”, “inside”, “outside”, “clockwise”, “counterclockwise”, “axial”, “radial”, “circumferential”, etc., indicating orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore should not be understood as limiting the present invention.

[0105] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of the present invention, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0106] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements, unless otherwise clearly defined. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0107] In the present invention, unless otherwise clearly specified and limited, a first feature being "above" or "below" a second feature may mean that the first and second features are in direct contact, or the first and second features are in indirect contact through an intermediate medium. Moreover, a first feature being "above", "above" or "above" a second feature may mean that the first feature is directly above or obliquely above the second feature, or simply means that the first feature is higher in level than the second feature. A first feature being "below", "below" or "below" a second feature may mean that the first feature is directly below or obliquely below the second feature, or simply means that the first feature is lower in level than the second feature.

[0108] Although the embodiments of the present invention have been shown and described above, it is to be understood that the above embodiments are exemplary and are not to be construed as limitations of the present invention. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present invention.

Claims

1. A method for constructing a safety emergency dynamic knowledge graph, characterized in that: The method comprises: Acquire text data of safety emergency knowledge text; Using a pre-trained multi-task learning model to extract events from the text data, and obtaining entity information and relationship information of key events described in the text data; wherein the multi-task learning model is: a model obtained by training a preset neural network model using sample text data, and used for the joint task of entity recognition and relationship extraction; A safety emergency dynamic knowledge graph is constructed based on the triple data formed by the entity information and relationship information.

2. The method according to claim 1, characterized in that: The text data includes: structured text data, unstructured text data and semi-structured text data; The structured text data is obtained in the following manner: Obtaining the original data of safety emergency knowledge text; The ontology structure information of the text data is determined, and the structured text data is obtained based on the ontology structure information.

3. The method according to claim 2, characterized in that The ontology structure information is obtained in the following manner: Determine the scope of the professional field described by the text data; Obtaining various ontologies and related terms of various ontologies in the text data; Define the classes and class hierarchies included in each ontology; Define class relationships and attributes; Design instances of classes and check the completeness and consistency of the ontology.

4. The method according to claim 1, characterized in that: The multi-task model is trained as follows: Inputting the sample text data into the multi-task model to obtain entity classification results and relationship classification results output by the multi-task model; Calculating a first loss value of the entity classification result and a second loss value of the relationship classification result, and determining a total loss value based on the first loss value and the second loss value; The model parameters of the multi-task model are adjusted based on the loss value until a training termination condition is reached.

5. The method according to claim 4, characterized in that The multi-task model includes: a representation layer, a coding layer, a first decoding layer and a second decoding layer; wherein The representation layer is used to extract feature vectors of the sample text data; The encoding layer is used to perform context encoding according to the feature vector to obtain encoding features; The first decoding layer is used to obtain the entity classification result of the encoding feature by using a conditional random field CRF; The second decoding layer is used to obtain the relationship classification result of the encoded feature by using a Softmax function.

6. The method according to claim 1, characterized in that The method further comprises: Perform entity alignment on the target entity in the triple data and similar entities in the seed set of pre-aligned entity pairs to obtain an entity alignment result; If the entity alignment result indicates that there is no aligned entity, the triple data is added to the seed set.

7. The method according to claim 6, characterized in that The step of performing entity alignment on the target entity in the triple data and the similar entity in the seed set of pre-aligned entity pairs includes: For the target entity, determining similar entities in the seed set; Acquire a first embedding vector based on the structural features of the target entity and the structural features of similar entities, and acquire a second embedding vector based on the attribute features of the target entity and the attribute features of similar entities; When the similarity between the first embedding vector and the second embedding vector is less than a preset similarity threshold, an entity alignment result indicating that no alignment entity exists is obtained; otherwise, the target entity is replaced with the similar entity.

8. The method according to claim 7, characterized in that The similar entities are determined as follows: The trigger words of the target entity and the trigger words of each entity in the seed set are uniformly named, and similar entities are determined based on the similarity between the trigger words of each entity in the entity set and the trigger words of the target entity after the uniform naming.

9. A security emergency dynamic knowledge graph construction system, characterized in that: The system comprises: Ontology construction and dictionary generation module, used to obtain text data of safety emergency knowledge text; A knowledge extraction module, used to extract events from the text data using a pre-trained multi-task learning model to obtain entity information and relationship information of key events described in the text data; wherein the multi-task learning model is a model obtained by training a preset neural network model using sample text data and used for the joint task of entity recognition and relationship extraction; The knowledge fusion module is used to construct a safety emergency dynamic knowledge graph based on the triple data formed by the entity information and relationship information.

10. The system according to claim 9, characterized in that The system comprises: The knowledge application module is used to apply the constructed knowledge graph to specific tasks; The knowledge application module includes an entity recognition submodule, a security encyclopedia submodule, a relationship query submodule, and a graph display submodule; wherein, An entity recognition submodule, for automatically identifying relevant entities in the unstructured input text based on the security emergency dynamic knowledge graph; A security encyclopedia submodule is used to display a list of entities classified according to different scenarios in the security emergency dynamic knowledge graph, and to display basic information and related entities of each entity in the entity list; A relationship query submodule is used to receive entity query information input by a user, search the security emergency dynamic knowledge graph according to the entity query information, and obtain relevant entity information and relevant relationship information of the entity query information; The graph display submodule is used to graphically display the safety emergency dynamic knowledge graph.

Citation Information

Patent Citations

  • Method for constructing and storing knowledge graph in network space security field

    CN111428054A

  • Steel production line equipment diagnosis method based on self-learning entity relationship joint extraction

    CN114756687A

  • SG-CIM model-oriented entity alignment method

    CN114911946A

  • Event knowledge graph construction method oriented to network security

    CN116932661A

  • Knowledge graph construction method, knowledge graph query method, knowledge graph construction device, knowledge graph query device and related system

    CN118152578A

Cited By

  • Gas safety knowledge accurate pushing method and system based on user feature analysis

    CN120579819A

  • Gas safety knowledge accurate pushing method and system based on user feature analysis

    CN120579819B