A method and system for constructing knowledge graph based on steel plant safety production

By building and updating the knowledge graph based on steel mill safety production, the accuracy and user experience of the intelligent Q&A system in this field is solved, and more efficient data processing and Q&A accuracy is achieved.

CN117972108BActive Publication Date: 2025-02-07XI LIN IRON & STEEL GRP +5
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410113309.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-26
Publication Date
2025-02-07
Estimated Expiration
2044-01-26

AI Technical Summary

Technical Problem

The existing technology is difficult to improve the accuracy and user experience of intelligent question-and-answer systems in the field of safe production of steel mills.

Method used

By acquiring and analyzing the original data of steel mills’ safe production, using preset classification, extraction and alignment algorithms, a knowledge graph is built, and the Q&A accuracy and user experience is improved by constantly updating the knowledge graph.

Benefits of technology

The accuracy and user experience of the intelligent question-and-answer system in the field of safe production of steel mills has been improved, and through closely related answers and questions, data processing efficiency and knowledge graph update speed have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117972108B_ABST
    Figure CN117972108B_ABST
Patent Text Reader

Abstract

A method and system for constructing a knowledge graph based on steel plant safety production, including: acquiring and analyzing the original data of steel plant safety production to obtain the original question; classifying the original question according to a preset classification algorithm; extracting the classified original question using a preset extraction algorithm to construct a knowledge graph; aligning the original data and the constructed knowledge graph using a preset alignment algorithm; repeating the above steps to update the knowledge graph; and searching for steel plant safety production data using the updated knowledge graph. The present invention obtains the original question through the original data; that is, analyzing the possible question from the answer, so that the correlation between the answer and the question is closer, classifying the original question, and increasing the speed of subsequent data processing; and enhancing the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of knowledge graph technology, and in particular to a method and system for constructing a knowledge graph based on steel plant production safety. Background Art

[0002] Knowledge Graph is an important branch technology of artificial intelligence. It was proposed by Google in 2012. It is a structured semantic knowledge base used to describe concepts and their relationships in the physical world in symbolic form. Its basic components are "entity-relationship-entity" triples, as well as entities and their related attribute-value pairs. Entities are connected to each other through relationships to form a network knowledge structure.

[0003] Knowledge graphs can be divided into general knowledge graphs and domain knowledge graphs according to their functions and application scenarios. General knowledge graphs are aimed at general fields, emphasizing the breadth of knowledge. They are usually in the form of structured encyclopedic knowledge and are mainly targeted at ordinary users. Domain knowledge graphs are aimed at a specific field, emphasizing the depth of knowledge. They usually need to be built based on the database of the industry and are targeted at industry practitioners and potential industry insiders.

[0004] The ultimate form of the Internet is the interconnection of all things, and the ultimate goal of search is to search all things directly. Traditional search relies on hyperlinks between web pages to search web pages, while semantic search searches directly for things, such as people, things, organizations, places, etc. These things can come from text, pictures, videos, audio, IoT devices, etc. Knowledge graphs and semantic technologies provide descriptions of the classification, attributes, and relationships of these things, so that search engines can search for things directly, improving search efficiency. Summary of the invention

[0005] (I) Purpose of the invention

[0006] The purpose of the present invention is to provide a method and system for constructing a knowledge graph based on steel plant safety production, which can improve the accuracy of intelligent question and answer and enhance the user experience of intelligent question and answer.

[0007] (II) Technical solution

[0008] In order to solve the above problems, the present invention provides a method for constructing a knowledge graph based on steel plant safety production, comprising:

[0009] Obtain and analyze the original data of steel plant safety production and identify the original problems;

[0010] Classifying the original question according to a preset classification algorithm;

[0011] Use the preset extraction algorithm to extract the original questions after classification and build a knowledge graph;

[0012] Use the preset alignment algorithm to align the original data and the constructed knowledge graph;

[0013] Repeat the above steps to update the knowledge graph;

[0014] The updated knowledge graph is used to search for steel plant production safety data.

[0015] In another aspect of the present invention, preferably, the obtaining and analyzing of the original data of steel plant safety production to obtain the original problem comprises:

[0016] Analyze the original data and extract features of the original data;

[0017] identifying associations in the raw data using a correlation analysis method;

[0018] Based on the extracted features of the original data and the identified associations of the original data, an original question is obtained.

[0019] In another aspect of the present invention, preferably, the classifying the original question according to a preset classification algorithm comprises:

[0020] Preset categories, each with corresponding features;

[0021] The similarity between the original question and the features corresponding to each category is calculated using the following formula;

[0022]

[0023] Among them, C represents the category, F 1 ,..F i ,..F n represents the corresponding feature set of category C, P(C|F 1 ,..F i ,..F n ) represents the posterior probability of the original problem based on the corresponding feature set of category C, P(C) represents the prior probability of category C; P(F i |C) is the feature F in category C i Conditional probability of occurrence;

[0024] The class that maximizes the logarithmic form of the posterior probability is the class of the original problem.

[0025] In another aspect of the present invention, preferably, the constructed knowledge graph includes entities, relationships, entity attributes, relationship attributes and triples;

[0026] The entities include equipment, types of work, materials and sources of danger;

[0027] The relationship includes the connection mode between equipment, the order of operation steps and the correspondence between work types and responsibilities;

[0028] The entity attributes include manufacturer, model and production date;

[0029] The relationship attributes include additional information about the relationship between entities;

[0030] The triple includes two entities and a relationship between the two entities.

[0031] In another aspect of the present invention, preferably, the preset extraction algorithm includes: entity extraction and relationship extraction;

[0032] The relationship extraction is performed using an open information extraction prototype system.

[0033] In another aspect of the present invention, preferably, the entity extraction algorithm comprises:

[0034] Perform sequence labeling on each classified original question according to the sentence length to obtain the labeling sequence;

[0035] Preset labels and generate label sequences corresponding to each classified original question based on the labels;

[0036] Calculate the conditional probability of the annotation sequence and the label sequence;

[0037] The label sequence when the conditional probability of the annotation sequence and the label sequence is maximized is the target of entity extraction.

[0038] In another aspect of the present invention, preferably, calculating the conditional probability of the annotation sequence and the tag sequence includes calculating using the following formula:

[0039]

[0040] Among them, X represents the annotation sequence, Y represents the label sequence, P(Y|X) represents the conditional probability of the annotation sequence and the label sequence, and f i represents the characteristic function, w i is the characteristic function f i The weight, f i (Y,X) represents the feature score of label sequence Y under the condition of given label sequence X; Σy' represents the sum of all label sequences, f i (y',X) represents the feature score of the label sequence y' given the label sequence X.

[0041] In another aspect of the present invention, preferably, the preset alignment algorithm includes:

[0042] The constructed knowledge graph includes multiple areas classified according to the original question;

[0043] Calculate the region to which the original data belongs;

[0044] The original data includes a data node, the region includes a plurality of nodes, and the similarity between the data node and all nodes in the region to which it belongs is calculated;

[0045] Entity alignment is performed based on the data nodes with the highest similarity and the nodes in the constructed knowledge graph.

[0046] In another aspect of the present invention, preferably, calculating the similarity between the data node and all nodes in the region to which it belongs includes:

[0047] S=Max(cosine(v,u i1 ),···,cosine(v,u ij ),···,cosine(v,u iJ ))

[0048] Among them, s i represents the similarity of the current region, v represents the vector of the data node, u ij Represents the vector set of all nodes in region i, and the set is expressed as (u i1 ,…,u ij ,…,u iJ ).

[0049] In another aspect of the present invention, preferably, a knowledge graph construction system based on steel plant safety production includes:

[0050] Acquisition module: acquire and analyze the original data of steel plant safety production and obtain the original problem;

[0051] Classification module: classify the original question according to a preset classification algorithm;

[0052] Extraction module: Use the preset extraction algorithm to extract the original questions after classification and build a knowledge graph;

[0053] Alignment module: Use the preset alignment algorithm to align the original data and the constructed knowledge graph;

[0054] Update module: repeat the above steps to update the knowledge graph;

[0055] Search module: Use the updated knowledge graph to search for steel plant safety production data.

[0056] (III) Beneficial effects

[0057] The above technical solution of the present invention has the following beneficial technical effects:

[0058] The present invention obtains the original question through the original data; that is, to analyze the possible questions from the answers, to make the correlation between the answers and the questions closer, to classify the original questions, to increase the speed of subsequent data processing, and to improve the efficiency of establishing the knowledge graph; by extracting and aligning the data to the knowledge graph, the data processing efficiency is improved, the knowledge graph is updated, the accuracy of questions and answers is improved, and the user experience is enhanced. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 It is an overall flow chart of a data processing method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0060] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.

[0061] Obviously, the described embodiments are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] In the description of the present invention, it should be noted that the terms “first”, “second” and “third” are only used for descriptive purposes and cannot be understood as indicating or implying relative importance.

[0063] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0064] Many specific details of the present invention are described below, such as device structure, materials, dimensions, processing technology and techniques, so as to more clearly understand the present invention. However, as those skilled in the art will appreciate, the present invention may be implemented without following these specific details.

[0065] Embodiment 1

[0066] A knowledge graph construction method based on steel plant safety production. Figure 1 The overall flow of a data processing method according to an embodiment of the present invention is shown as follows: Figure 1 As shown, including:

[0067] Obtain and analyze the original data of steel plant safety production and identify the original problems;

[0068] The specific content of the original data is not limited here. The original data can be selected according to the type or according to the purpose of implementation, such as according to policy documents, standard documents or patent documents. In this embodiment, the original data includes data on steel plant safety production, including: casualty accident data, the number, type, cause and consequence of various casualties in the steel plant; safety hazard investigation data. The steel plant should conduct safety hazard investigation regularly and record the number, type, distribution of the hidden dangers found, as well as rectification measures and results; safety training data. The steel plant should conduct safety training for employees and record the time, content, participants and training effect of the training; safety inspection data: The steel plant should conduct safety inspections regularly and record the time, location, content, problems found and rectification of the inspections; safety investment data: The steel plant should record the investment in safety facilities, safety training, safety inspections, etc., including funds, manpower, material resources, etc.; the implementation of the safety production responsibility system, recording the performance of the duties of managers and employees at all levels in the safety production responsibility system, including the completion of safety goals and the performance of safety responsibilities;

[0069] The original data is the data on steel plant's production safety. It is realized based on the steel plant's production safety knowledge graph, starting from the steel plant's production safety data analysis, to analyze and obtain the original question. The specific method of analyzing and obtaining the original question is not limited here. Optionally, in this embodiment, the questions that users may raise are manually analyzed based on existing policy documents. The method of obtaining the original data is not limited here, and different acquisition methods can be used according to the specific content of the original data, such as: the obtained original data mainly includes relevant standard documents, enterprise information, personnel information, intellectual property rights and other contents. The acquisition of relevant standard documents is obtained from the official website, and information such as enterprise information, personnel information, intellectual property rights, etc. is obtained from the public platform authorized by crawling through the interface; further, in this embodiment, due to the large number of original data types obtained, different acquisition methods and storage methods can be adopted, and the relevant standard file data is stored in the form of folders, and the two parties establish a friendly communication mechanism to ensure data consistency; the text directory can be divided according to the actual business to complete the classification of relevant standard documents; enterprise information is obtained through network crawling technology to complete the acquisition of preliminary information, and the enterprise information is saved in a relational database for data cleaning; personnel information and intellectual property rights and other information are already structured data, so they are directly obtained through the public platform, and mapping rules are established to complete the conversion from data to knowledge; further, in this embodiment, the original data is cleaned, and the specific content is that the acquired original data is cleaned of blank lines and spaces in the document, and special symbols and network symbols appearing in the document are cleaned to form a standard utf-8 txt document, etc.;

[0070] Optionally, in this embodiment, the method for obtaining the original question includes: analyzing the original data, extracting the features of the original data; identifying the association of the original data using correlation analysis; and obtaining the original question based on the extracted features of the original data and the identified association of the original data. It can also be that the specific content of the original question is mainly composed of questions, answers, and sources of answers. Multiple questions can correspond to the same answer. It is estimated that each type of question will generate about 1,000 answers. The knowledge enhancement algorithm can be further used to cover field-related issues. According to the user's understanding of steel plant safety production and the need to search for questions and answers, the problems that may be encountered are sorted out. And the answers to common questions are sorted out to form a "question-answer" data set. The question can be many-to-one, that is, the answer to multiple questions can be one;

[0071] Optionally, in this embodiment, the original question can be enhanced by using the GPT model. For example, in this embodiment, the collected questions are divided into questions with similar meanings and questions with the same answers to form a training data set. The GPT model is used as a basis to add the policy document data set for fine-tuning training, and an industry domain model suitable for policy document question and answer is trained. New questions are automatically generated for the existing sorted questions to expand the existing question set. The model is trained based on the collected question and answer data as the basic training data, and GPT is used as a pre-trained model for the training model, which is used for the basic model of anthropomorphic answering of the intelligent question and answer robot;

[0072] The data enhancement also includes: constructing a similar word-standard word library based on the original question, using the similar word-standard word library to expand the original question, and obtaining the expanded original question. Constructing a similar word-standard word library is a key step. This library usually contains two groups of words: one group is standard words, that is, words that the model can accurately understand and respond to; the other group is similar words that are close or related in meaning to these standard words. For example, in a question-answering system, "how to produce safely" may be a standard question, while "how to produce safely", "methods of safe production", etc. can be regarded as similar questions. Words with similar meanings to standard words that appear in user questions or related documents are sorted out to expand the original question;

[0073] Classifying the original question according to a preset classification algorithm;

[0074] The classification of original questions is mainly used to summarize the types of questions, and to assist with ontology construction, data model design and intent recognition. The specific content of the classification algorithm is not limited here. Optionally, in this embodiment, the preset classification algorithm is a text classification algorithm, and the text classification algorithm is obtained through training. The training includes: manually classifying the original questions according to preset intelligent question-answering rules to obtain a first original question training set; inputting the first original question training set into the text classification algorithm to obtain a first classification result; calculating the loss value between the first classification result and the first original question training set according to a preset loss function; adjusting the text classification algorithm according to the loss value to obtain a trained text classification algorithm;

[0075] Optionally, in this embodiment, original problems that may be encountered in steel plant production safety are collected, and they are manually classified to obtain a first original problem training set; the first original problem training set is input into a text classification algorithm to obtain a first classification result, and the model is adjusted according to the first original problem training set and the first classification result; so that it becomes a model that conforms to the classification of steel plant production safety problems, and realizes the intention recognition of user problems; the specific content of the text classification algorithm is not limited here, and optionally, it can be k-nearest neighbor, decision tree, multilayer perceptron, naive Bayes, including Bernoulli Bayes, Gaussian Bayes and polynomial Bayes, logistic regression and support vector machine, random forest, AdaBoost, lightGBM and xgBoost, feedforward neural network and LSTM algorithm;

[0076] Further, in this embodiment, classifying the original question according to a preset classification algorithm includes:

[0077] Preset categories, each with corresponding features;

[0078] The similarity between the original question and the features corresponding to each category is calculated using the following formula;

[0079]

[0080] Among them, C represents the category, F 1 ,..F i ,..F n represents the corresponding feature set of category C, P(C|F 1 ,..F i ,..F n ) represents the posterior probability of the original problem based on the corresponding feature set of category C, P(C) represents the prior probability of category C; P(F i |C) is the feature F in category C i Conditional probability of occurrence;

[0081] The class that maximizes the logarithmic form of the posterior probability is the class of the original problem.

[0082] The original questions after classification are extracted using a preset extraction algorithm to construct a knowledge graph; the constructed knowledge graph includes entities, relationships, entity attributes, relationship attributes and triples; the entities include equipment, types of work, materials and sources of danger; the relationships include the connection method between equipment, the sequential relationship of operating steps and the correspondence between types of work and responsibilities; the entity attributes include manufacturer, model and production date; the relationship attributes include additional information about the relationship between entities; the triples include two entities and the relationship between the two entities.

[0083] The specific content of the preset extraction algorithm is not limited here. The optional preset extraction algorithm includes doccano, which is used to annotate the entity types, relationships and triples in the original data. Optionally, in this embodiment, the annotated original data is used as a training set of the model, and the entities and relationships are defined in the doccano project, and the collected files are uploaded to doccano for annotation; during the data annotation process, an entity can have multiple entity labels at the same time; an entity can establish a relationship with multiple entities; there can also be multiple relationships between two entities; an entity can also establish a relationship with itself, and specific data annotation needs to be performed according to actual conditions; further, in this embodiment, the original data and the annotated data are converted into ternary arrays, attribute relationships, and entity texts using a preset method; the original data is stored, and the entities are stored in a node manner; the attributes will be stored as the attributes of the entity; the ternary array is stored in a graph manner;

[0084] Optionally, in this embodiment, the preset extraction algorithm includes: entity extraction and relationship extraction; the relationship extraction is performed using an open information extraction prototype system.

[0085] The entity extraction algorithm includes:

[0086] Perform sequence labeling on each classified original question according to the sentence length to obtain the labeling sequence;

[0087] Preset labels and generate label sequences corresponding to each classified original question based on the labels;

[0088] Calculate the conditional probability of the annotation sequence and the label sequence;

[0089]

[0090] Among them, X represents the annotation sequence, Y represents the label sequence, P(Y|X) represents the conditional probability of the annotation sequence and the label sequence, and f i represents the characteristic function, wi is the characteristic function f i The weight, f i (Y,X) represents the feature score of label sequence Y under the condition of given label sequence X; Σy' represents the sum of all label sequences, f i (y',X) represents the feature score of the label sequence y' given the label sequence X;

[0091] The label sequence when the conditional probability of the annotation sequence and the label sequence is maximized is the target of entity extraction.

[0092] The original data and the constructed knowledge graph are aligned using a preset alignment algorithm; the preset alignment algorithm includes: the constructed knowledge graph includes multiple regions classified according to the original question;

[0093] The area to which the original data belongs can be calculated by using a cosine similarity algorithm or a Euclidean distance algorithm;

[0094] The original data includes a data node, the region includes a plurality of nodes, and calculating the similarity between the data node and all nodes in the region to which the data node belongs includes:

[0095] S=Max(cosine(v,u i1 ),···,cosine(v,u ij ),···,cosine(v,u iJ ))

[0096] Among them, s i represents the similarity of the current region, v represents the vector of the data node, u ij Represents the vector set of all nodes in region i, and the set is expressed as (u i1 ,…,u ij ,…,u iJ );

[0097] Entity alignment is performed based on the data nodes with the highest similarity and the nodes in the constructed knowledge graph.

[0098] Repeat the above steps to update the knowledge graph; the specific number of repetitions is not limited here; optionally, in this embodiment, updating the knowledge graph includes: data acquisition: manually uploading or downloading relevant steel plant safety production data, the database already has data, and data enhancement to obtain data; manual proofreading: the algorithm extracts steel plant safety into a ternary array, the data after text classification, and the data after data enhancement, and manually proofreads to form standard data; knowledge deletion: steel plant safety production data is released at any time, and the original knowledge may become invalid. The knowledge graph content needs to delete the invalid file content in a timely manner as time changes. According to the advancement of time, continuous steel plant safety production documents are required, and the steel plant safety production analysis is carried out through algorithms to finally realize the full process automation of knowledge graph updates;

[0099] The updated knowledge graph is used to search for steel plant production safety data.

[0100] This embodiment obtains the original question through the original data; that is, to analyze the possible questions from the answers, to make the correlation between the answers and the questions closer, to classify the original questions, to increase the speed of subsequent data processing, and to improve the efficiency of establishing the knowledge graph; by extracting and aligning the data to the knowledge graph, the data processing efficiency is improved, the knowledge graph is updated, the accuracy of questions and answers is improved, and the user experience is enhanced.

[0101] Embodiment 2

[0102] A knowledge graph construction system based on steel plant safety production, including:

[0103] Acquisition module: acquire and analyze the original data of steel plant safety production and obtain the original problem;

[0104] Classification module: classify the original question according to a preset classification algorithm;

[0105] Extraction module: Use the preset extraction algorithm to extract the original questions after classification and build a knowledge graph;

[0106] Alignment module: Use the preset alignment algorithm to align the original data and the constructed knowledge graph;

[0107] Update module: repeat the above steps to update the knowledge graph;

[0108] Search module: Use the updated knowledge graph to search for steel plant safety production data.

[0109] It should be understood that the above specific embodiments of the present invention are only used to illustrate or explain the principles of the present invention, and do not constitute a limitation of the present invention. Therefore, any modifications, equivalent substitutions, improvements, etc. made without departing from the spirit and scope of the present invention should be included in the protection scope of the present invention. In addition, the appended claims of the present invention are intended to cover all changes and modifications that fall within the scope and boundaries of the appended claims, or the equivalent forms of such scope and boundaries.

[0110] The present invention has been described above with reference to the embodiments of the present invention. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims and their equivalents. Without departing from the scope of the present invention, a person skilled in the art may make various substitutions and modifications, which should all fall within the scope of the present invention.

[0111] Although the embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.

[0112] Obviously, the above embodiments are merely examples for the purpose of clear explanation, and are not intended to limit the implementation methods. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the implementation methods here. The obvious changes or modifications derived therefrom are still within the scope of protection of the invention.

Claims

1. A knowledge graph construction method based on steel plant safety production, characterized in that: include: Obtain and analyze the original data of steel plant safety production and identify the original problems; Classifying the original question according to a preset classification algorithm; Use the preset extraction algorithm to extract the original questions after classification and build a knowledge graph; Use the preset alignment algorithm to align the original data and the constructed knowledge graph; Repeat the above steps to update the knowledge graph; Use the updated knowledge graph to search for steel plant safety production data; The original data include: casualty accident data, safety hazard investigation data, safety training data, safety inspection data, safety investment data and the implementation of the safety production responsibility system; The original data of steel plant safety production is obtained and analyzed to obtain the original problems including: Analyze the original data and extract features of the original data; identifying associations in the raw data using a correlation analysis method; Obtaining an original question based on the extracted original data features and the identified associations of the original data; The constructed knowledge graph includes entities, relations, entity attributes, relation attributes and triples; The entities include equipment, types of work, materials and sources of danger; The relationship includes the connection mode between equipment, the order of operation steps and the correspondence between work types and responsibilities; The entity attributes include manufacturer, model and production date; The relationship attributes include additional information about the relationship between entities; The triple includes two entities and a relationship between the two entities; The preset extraction algorithm includes: entity extraction and relationship extraction; The relationship extraction is performed using an open information extraction prototype system; The entity extraction includes: Perform sequence labeling on each classified original question according to the sentence length to obtain the labeling sequence; Preset labels and generate label sequences corresponding to each classified original question based on the labels; Calculate the conditional probability of the annotation sequence and the label sequence; The label sequence when the conditional probability of the annotation sequence and the label sequence is maximized is the target of entity extraction; Calculating the conditional probability of the annotation sequence and the label sequence includes calculating using the following formula: Among them, X represents the annotation sequence, Y represents the label sequence, represents the conditional probability of the annotation sequence and the label sequence, f i represents the characteristic function, w i is the characteristic function f i The weight, f i (Y,X) represents the feature score of label sequence Y under the condition of given label sequence X; Σy' represents the sum of all label sequences, f i (y',X) represents the feature score of the label sequence y' given the label sequence X; The classifying the original question according to a preset classification algorithm includes: Preset categories, each with corresponding features; The similarity between the original question and the features corresponding to each category is calculated using the following formula; Among them, C represents the category, represents the corresponding feature set of category C, represents the posterior probability of the original problem based on the corresponding feature set of category C, P(C) represents the prior probability of category C; P(F i |C) is the feature F in category C i Conditional probability of occurrence; The category for which the logarithmic form of the posterior probability is maximized is the category of the original problem; The constructed knowledge graph includes multiple areas classified according to the original question; Calculate the region to which the original data belongs; The original data includes a data node, the region includes a plurality of nodes, and the similarity between the data node and all nodes in the region to which it belongs is calculated; Perform entity alignment based on the data node with the highest similarity and the node in the constructed knowledge graph; Calculating the similarity between a data node and all nodes in the region to which it belongs includes: Among them, s i represents the similarity of region i, v represents the vector of data nodes, u i Represents the vector set of all nodes in region i, and the set is expressed as (u i1 , ,u ij , ,u iJ ).

2. A knowledge graph construction system based on steel plant safety production, characterized in that: include: Acquisition module: acquire and analyze the original data of steel plant safety production and obtain the original problem; Classification module: classify the original question according to a preset classification algorithm; Extraction module: Use the preset extraction algorithm to extract the original questions after classification and build a knowledge graph; Alignment module: Use the preset alignment algorithm to align the original data and the constructed knowledge graph; Update module: repeat the above steps to update the knowledge graph; Search module: Use the updated knowledge graph to search for steel plant production safety data; the original data includes: casualty accident data, safety hazard investigation data, safety training data, safety inspection data, safety investment data and the implementation of the safety production responsibility system; The original data of steel plant safety production is obtained and analyzed to obtain the original problems including: Analyze the original data and extract features of the original data; identifying associations in the raw data using a correlation analysis method; Obtaining an original question based on the extracted original data features and the identified associations of the original data; The constructed knowledge graph includes entities, relations, entity attributes, relation attributes and triples; The entities include equipment, types of work, materials and sources of danger; The relationship includes the connection mode between equipment, the order of operation steps and the correspondence between work types and responsibilities; The entity attributes include manufacturer, model and production date; The relationship attributes include additional information about the relationship between entities; The triple includes two entities and a relationship between the two entities; The preset extraction algorithm includes: entity extraction and relationship extraction; The relationship extraction is performed using an open information extraction prototype system; The entity extraction includes: Perform sequence labeling on each classified original question according to the sentence length to obtain the labeling sequence; Preset labels and generate label sequences corresponding to each classified original question based on the labels; Calculate the conditional probability of the annotation sequence and the label sequence; The label sequence when the conditional probability of the annotation sequence and the label sequence is maximized is the target of entity extraction; Calculating the conditional probability of the annotation sequence and the label sequence includes calculating using the following formula: Among them, X represents the annotation sequence, Y represents the label sequence, represents the conditional probability of the annotation sequence and the label sequence, f i represents the characteristic function, w i is the characteristic function f i The weight, f i (Y,X) represents the feature score of label sequence Y under the condition of given label sequence X; Σy' represents the sum of all label sequences, f i (y',X) represents the feature score of the label sequence y' given the label sequence X; The classifying the original question according to a preset classification algorithm includes: Preset categories, each with corresponding features; The similarity between the original question and the features corresponding to each category is calculated using the following formula; Among them, C represents the category, represents the corresponding feature set of category C, represents the posterior probability of the original problem based on the corresponding feature set of category C, P(C) represents the prior probability of category C; P(F i |C) is the feature F in category C i Conditional probability of occurrence; The category for which the logarithmic form of the posterior probability is maximized is the category of the original problem; The constructed knowledge graph includes multiple areas classified according to the original question; Calculate the region to which the original data belongs; The original data includes a data node, the region includes a plurality of nodes, and the similarity between the data node and all nodes in the region to which it belongs is calculated; Perform entity alignment based on the data node with the highest similarity and the node in the constructed knowledge graph; Calculating the similarity between a data node and all nodes in the region to which it belongs includes: Among them, s i represents the similarity of region i, v represents the vector of data nodes, u i Represents the vector set of all nodes in region i, and the set is expressed as (u i1 , ,u ij , ,u iJ ).

Citation Information

Patent Citations

  • Domain question and answer-oriented knowledge graph construction method

    CN112163077A