Special equipment inspection file knowledge graph construction method and device, equipment and storage medium

By constructing a special equipment inspection archive knowledge graph, the inconvenience of data retrieval and analysis in traditional archive management methods is solved, rapid data retrieval and intelligent analysis are realized, complex queries and reasoning are supported, and the intelligence level of equipment management is improved.

CN119670857APending Publication Date: 2025-03-21BINZHOU SPECIAL EQUIP INSPECTION & RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411706127.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-26
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

It is difficult for the existing technology to realize the rapid retrieval and intelligent analysis of archive data for special equipment inspection. The traditional archive management method has the problem of inconvenience in data query and analysis.

Method used

By constructing a special equipment inspection archive knowledge graph, using nodes (entities), edges (relationships) and attributes, the entities and their interrelationships in the real world are formally expressed to realize data integration and intelligent analysis. Specific steps include data preprocessing, entity and relationship extraction, knowledge fusion, ontology modeling and knowledge reasoning.

Benefits of technology

It realizes the rapid retrieval and efficient utilization of special equipment inspection archive data, supports complex relationship query and reasoning, discovers potential safety hazards or risk points, provides scientific basis for decision-making, and improves the intelligence level of equipment management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119670857A_ABST
    Figure CN119670857A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of archive management, and particularly provides a special equipment inspection archive knowledge graph construction method and device, equipment and a storage medium, and the method comprises the following steps: processing a special equipment inspection archive to obtain original data of the special equipment inspection archive; extracting entities, attributes and relationships among the entities from the original data; performing knowledge fusion by combining structured data and unstructured data in the original data; ontology modeling is carried out on the extracted entities, attributes and relations to complete special equipment inspection file ontology extraction; performing knowledge reasoning on the special equipment inspection file body to complete construction of a knowledge graph; nodes in the knowledge graph represent entities, and directed edges represent the relationship between the entities. Original scattered and heterogeneous inspection file data are integrated into a unified and structured knowledge base, and rapid retrieval and efficient utilization of the data are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] Special equipment, such as boilers, pressure vessels, elevators, lifting machinery, etc., must strictly comply with relevant laws and regulations during production, installation, use and maintenance, and conduct regular inspections to ensure their safe operation. These inspection activities generate a large number of inspection files, which contain key data such as basic information of the equipment, inspection records, defects and rectification. Traditional file management methods are mainly based on paper documents or simple electronic document storage. This method can only roughly retrieve files but cannot find in-depth relevant information, let alone discover knowledge from them. If you want to get more in-depth professional information, you need to read and refine the contents of the files in detail, which will bring a lot of time cost to the borrower. These methods have many inconveniences in data query, analysis, and utilization, and it is difficult to achieve rapid retrieval and intelligent analysis of data.

[0003] With the continuous development of information technology, especially the rise of technologies such as big data and artificial intelligence, building a knowledge graph for special equipment inspection archives has become an effective solution. Knowledge graph is a structured knowledge storage method that formally expresses entities and their relationships in the real world through elements such as nodes (entities), edges (relationships) and attributes. However, the data of special equipment inspection archives is diverse and contains a large amount of technical information and standards, including structured data (such as basic equipment information tables), semi-structured data (such as inspection report templates) and unstructured data (such as text descriptions, pictures, video and audio in inspection reports). The processing and integration of these data has become a key challenge in building a knowledge graph. Summary of the invention

[0004] In view of the many inconveniences in the existing storage methods of special equipment inspection archives and the difficulty in realizing rapid retrieval and intelligent analysis of data, the present invention provides a method, device, equipment and storage medium for constructing a knowledge graph of special equipment inspection archives.

[0005] In a first aspect, the technical solution of the present invention provides a method for constructing a knowledge graph of special equipment inspection archives, comprising the following steps: Process the special equipment inspection files to obtain the original data of the special equipment inspection files; Extract entities, attributes, and relationships between entities from raw data; Combine structured data and unstructured data in the original data to perform knowledge fusion; The extracted entities, attributes and relationships are modeled by ontology to complete the extraction of special equipment inspection archives ontology; Conduct knowledge reasoning on the special equipment inspection archive ontology to complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

[0006] As a preferred embodiment of the technical solution of the present invention, the step of processing the special equipment inspection file to obtain the original data of the special equipment inspection file includes: Perform text preprocessing on the text data of special equipment inspection files; Performing speech recognition on the video data of the special equipment inspection archive and converting it into first text data, dividing the video data into image data through a hash perception algorithm, processing the image data to generate second text data, and using a language model to compare and fuse the first text data and the second text data to generate fused text data; Perform text analysis on the fused text data and pre-processed text data to generate the original data of special equipment inspection archives; Extracting attributes of entities from text data.

[0007] As a preferred embodiment of the technical solution of the present invention, the step of extracting entities from the step of extracting entities, attributes and relationships between entities from the original data includes: The training set is constructed by manually annotating data to train the BiLSTM+CRF model for entity recognition and generate a trained entity recognition model; Input the semi-structured data and unstructured data in the original data into the trained entity recognition model to output entity tags.

[0008] As a preferred embodiment of the technical solution of the present invention, the steps of training the BiLSTM+CRF model for entity recognition by constructing a training set through manually annotated data to generate a trained entity recognition model include: The manually annotated data is used to construct a training set, and the training set is represented by a sentence vector containing semantics output by Bert. The sentence vector is used to train the BiLSTM+CRF model to fit the entity recognition model. After the entity recognition model is fitted, the unlabeled raw data is converted into sentence vectors using Bert, and then the fitted entity recognition model is used to predict the label; The predicted data is judged for confidence, and samples with confidence levels higher than the threshold are added to the existing training set. The entity recognition model is trained using the new training set until the training number is reached to complete the training of the entity recognition model.

[0009] As a preferred embodiment of the technical solution of the present invention, the step of extracting the relationship between entities in the step of extracting entities, attributes and the relationship between entities from the original data includes: Extract the relationship between entities in the semi-structured data and unstructured data in the original data based on the identified entities; specifically including: The semi-structured data and unstructured data in the original data are converted into word vectors after word segmentation using Pkuseg; Use the BiLSTM model to obtain the semantic encoding of the original data and extract the relationship between entities; Use the results of entity recognition to correct the results of entity relationship extraction.

[0010] As a preferred embodiment of the technical solution of the present invention, the step of combining structured data and unstructured data in the original data to perform knowledge fusion includes: Convert the raw data into vector representation and calculate the cosine similarity between entity vectors; Convert the attribute data of each entity into a vector and calculate the cosine similarity between the attribute vectors; The entity cosine similarity and the cosine similarity of the attribute data are input into the fusion model, and the extracted entity relationship is used as the training label to perform model training to generate an aligned entity model; Entities and entity relationships are aligned using the aligned entity model and added to the data layer of the knowledge graph.

[0011] As a preferred embodiment of the technical solution of the present invention, the steps of performing knowledge reasoning on the extracted special equipment inspection archive ontology and completing the construction of the knowledge graph include: From the special equipment inspection archive ontology, a walking path is constructed according to the relationship between entities and the path is vectorized. Entities are constructed as state spaces, where each entity represents a state. Entity relationships are constructed as action spaces, where each relationship represents a transition from one state to another. By walking between entities, the state transition in the state space is simulated. The model is trained using a deep reinforcement learning algorithm. During the training process, rewards are given when the model selects the correct entities and relationships for state transitions; penalties are given when the wrong choice is made. The training of the deep reinforcement learning model is completed when the best relationship is selected for state transition based on the current state. The entity vector representation is input into the trained deep reinforcement learning model for knowledge reasoning, completing the relational output in the knowledge graph and constructing a complete knowledge graph.

[0012] In a second aspect, the technical solution of the present invention provides a device for constructing a knowledge graph of special equipment inspection archives, including a data acquisition module, an entity and relationship extraction module, a knowledge fusion processing module, an archive ontology generation module and a knowledge reasoning module; The data acquisition module is used to process the special equipment inspection files to obtain the original data of the special equipment inspection files; Entity and relationship extraction module, used to extract entities, attributes and relationships between entities from raw data; The knowledge fusion processing module is used to combine the structured data and unstructured data in the original data to perform knowledge fusion; The archive ontology generation module is used to perform ontology modeling on the extracted entities, attributes and relationships to complete the extraction of special equipment inspection archive ontology; The knowledge reasoning module is used to perform knowledge reasoning on the special equipment inspection archive ontology and complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

[0013] As a preferred embodiment of the technical solution of the present invention, the data acquisition module includes a preprocessing unit, a fusion processing unit, a text parsing unit and a parsing processing unit; A preprocessing unit, used for preprocessing text data of special equipment inspection files; A fusion processing unit, used to perform speech recognition on the video data of the special equipment inspection archive and convert it into first text data, and at the same time divide the video data into image data through a hash perception algorithm, process the image data to generate second text data, and use a language model to compare and fuse the first text data and the second text data to generate fused text data; A text parsing unit, used for performing text parsing on the fused text data and the pre-processed text data to generate original data of special equipment inspection archives; The parsing processing unit is used to extract the attributes of entities from text data.

[0014] As a preferred embodiment of the technical solution of the present invention, the entity and relationship extraction module includes a model training unit and an entity labeling unit; The model training unit is used to construct a training set through manually labeled data to train the BiLSTM+CRF model for entity recognition and generate a trained entity recognition model; The entity tagging unit is used to input the semi-structured data and unstructured data in the original data into the trained entity recognition model to output entity tags.

[0015] As a preferred embodiment of the technical solution of the present invention, the model training unit is specifically used to construct a training set with manually annotated data, output a sentence vector representation containing semantics of the training set through Bert, and use the sentence vector to train the BiLSTM+CRF model to fit the entity recognition model; after the entity recognition model is fitted, the unlabeled original data is converted into a sentence vector using Bert, and then the fitted entity recognition model is used to predict the label; the predicted data is judged for confidence, samples with confidence higher than a threshold are added to the existing training set, and the new training set is used to continue training the entity recognition model until the training number of times is reached to complete the training of the entity recognition model.

[0016] As a preferred embodiment of the technical solution of the present invention, the entity and relationship extraction module also includes an entity relationship extraction unit, which is used to extract the relationship between entities in the semi-structured data and unstructured data in the original data based on the identified entities; specifically including: converting the semi-structured data and unstructured data in the original data into word vectors after using Pkuseg word segmentation; using the BiLSTM model to obtain the semantic encoding of the original data and extract the relationship between entities; using the results of entity recognition to correct the results of entity relationship extraction.

[0017] As a preferred embodiment of the technical solution of the present invention, the knowledge fusion processing module is specifically used to convert the original data into vector representation and calculate the cosine similarity between entity vectors; convert the attribute data of each entity into a vector and calculate the cosine similarity between the attribute vectors; input the entity cosine similarity and the cosine similarity of the attribute data into the fusion model, use the extracted entity relationship as the training label, perform model training to generate an aligned entity model; align the entities and entity relationships using the aligned entity model, and add them to the data layer of the knowledge graph.

[0018] As a preferred embodiment of the technical solution of the present invention, the knowledge reasoning module is specifically used to construct a walking path from the special equipment inspection archive ontology according to the relationship between entities and to vectorize the path; construct entities as a state space, each entity represents a state, and construct entity relationships as an action space, each relationship represents a transition from one state to another, and simulate the state transition in the state space by walking between entities. The model is trained using a deep reinforcement learning algorithm. During the training process, rewards are given when the model selects the correct entities and relationships for state transition; penalties are given when an incorrect selection is made, and the training of the deep reinforcement learning model is completed when the best relationship is selected for state transition according to the current state; the entity vector representation is input into the trained deep reinforcement learning model for knowledge reasoning, the relationship output in the knowledge graph is completed, and a complete knowledge graph is constructed.

[0019] In the third aspect, the technical solution of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the method for constructing a knowledge graph of special equipment inspection archives as described in the first aspect.

[0020] In a fourth aspect, the technical solution of the present invention also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method for constructing a knowledge graph of special equipment inspection archives as described in the first aspect.

[0021] It can be seen from the above technical solutions that the present invention has the following advantages: by constructing a knowledge graph of special equipment inspection archives, the originally scattered and heterogeneous inspection archive data are integrated into a unified and structured knowledge base, which realizes the rapid retrieval and efficient use of data, and provides strong data support for the safety management of equipment. The knowledge graph can support complex relationship queries and reasoning, and by mining the potential connections between data, it can discover potential safety hazards or risk points, and provide a scientific basis for decision-making. In addition, combined with artificial intelligence technology, it can also realize functions such as intelligent early warning and fault diagnosis, and further improve the intelligent level of equipment management. Entities, attributes and relationships are extracted from the original data in an automated or semi-automated manner, reducing the workload of manual entry and improving the efficiency and accuracy of archive management. At the same time, the construction process of the knowledge graph is also a process of cleaning and integrating data, which helps to improve the quality of archive data. As a standardized knowledge representation method, the knowledge graph facilitates data sharing and collaborative work between different systems and departments, breaks information islands, and improves overall work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0023] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0024] Figure 2 is a schematic block diagram of an apparatus according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] like Figure 1 As shown, an embodiment of the present invention provides a method for constructing a knowledge graph of special equipment inspection archives, comprising the following steps: Step 1: Process the special equipment inspection files to obtain the original data of the special equipment inspection files; Step 2: Extract entities, attributes, and relationships between entities from the original data; Step 3: Combine the structured and unstructured data in the original data for knowledge fusion; Step 4: Conduct ontology modeling on the extracted entities, attributes, and relationships to complete the extraction of the special equipment inspection file ontology; Step 5: Conduct knowledge reasoning on the special equipment inspection file ontology to complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

[0027] In some embodiments, the steps of processing the special equipment inspection file to obtain the original data of the special equipment inspection file include: Step 11: Perform text preprocessing on the text data of the special equipment inspection file; Read the original text data of the special equipment inspection file from the storage device. Delete the irrelevant characters in the text, such as punctuation marks, numbers (unless crucial for the inspection file), special symbols, etc. Use a word segmentation tool (such as jieba, NLTK, etc.) to split the text into words or phrases. Restore the words to their basic forms, for example, "running" becomes "run". Delete the common words that are not actually helpful for understanding the text, such as "的", "了", "是", etc.

[0028] Assume the original text is Text_raw and the preprocessed text is Text_preprocessed, then the preprocessing process can be expressed as: Textpreprocessed = RemoveNoise(Tokenize(RemoveStopWords( Textraw ))) Here, multiple steps are combined into a function chain, and in actual implementation, each step may need to be processed separately.

[0029] Step 12: Perform speech recognition on the video data of the special equipment inspection file and convert it into the first text data. At the same time, segment the video data into image data through the hash perception algorithm, process the image data to generate the second text data, and use a language model to compare and fuse the first text data and the second text data to generate the fused text data; Use speech recognition tools (such as Google Speech-to-Text, Baidu speech recognition, etc.) to convert the speech content in the video into the first text data Text_audio. Use a hash algorithm (such as SHA-256) to segment the video and divide each shot into image data Images. Perform OCR (optical character recognition) on the image data to extract the text content in the image and generate the second text data Text_ocr. Use a language model (such as BERT, GPT, etc.) to compare and fuse the first text data and the second text data to generate the fused text data Text_fused. The comparison and fusion process may include deduplication, merging similar content, adjusting word order, etc.

[0030] Step 13: Perform text analysis on the fused text data and the preprocessed text data to generate the original data of the special equipment inspection archive; Combine the fused text data Text_fused and the preprocessed text data Text_preprocessed to form a complete text data set Text_complete. Use regular expressions, NLP tools or custom parsers to parse the text data set, extract structured information, and generate the raw data Data_raw of the special equipment inspection archive.

[0031] Step 14: Extract the attributes of entities from the text data.

[0032] Use NER (Named Entity Recognition) tools to identify entities (such as names of people, places, institutions, equipment, etc.) from text data. Extract the attributes of the entity (such as model, specification, production date, inspection date, inspection results, etc.) based on the context of the entity in the text.

[0033] In some embodiments, the step of extracting entities from the step of extracting entities, attributes, and relationships between entities from raw data includes: Step 211: constructing a training set through manually annotated data to train the BiLSTM+CRF model for entity recognition and generate a trained entity recognition model; Step 212: Input the semi-structured data and unstructured data in the original data into the trained entity recognition model to output entity tags.

[0034] In some embodiments, the steps of training the BiLSTM+CRF model for entity recognition by constructing a training set through manually annotated data to generate a trained entity recognition model include: Step 201: construct a training set with manually annotated data, output a sentence vector representation containing semantics through Bert, and use the sentence vector to train a BiLSTM+CRF model to fit the entity recognition model; You need to have a set of manually annotated data, which should contain text and corresponding entity labels. Organize this data into a training set, usually a list of text and label pairs. For each text in the training set, use a pre-trained Bert model (such as Bert-base-uncased) to obtain its sentence vector representation. This usually involves inputting the text into the Bert model and extracting the last hidden state of the model output as the sentence vector. Use the obtained sentence vector as input and use BiLSTM (bidirectional long short-term memory network) to capture the sequence information in the text. Then, use the CRF (conditional random field) layer to further optimize the sequence of entity labels to ensure that the output label sequence is globally optimal. During the training process, you need to define a loss function (such as negative log-likelihood loss) to evaluate the accuracy of the model's predictions, and use an optimizer (such as Adam) to update the model's parameters.

[0035] Assume that the training set is D = {(x_1, y_1), (x_2, y_2), ..., (x_N, y_N)}, where x_i is the text and y_i is the corresponding entity label sequence.

[0036] The sentence vector output by Bert can be expressed as h_i = Bert(x_i), where h_i is the sentence vector representation of text x_i.

[0037] The output of BiLSTM can be expressed as o_i = BiLSTM(h_i), where o_i is the output vector of text x_i at each time step.

[0038] The output of the CRF layer can be expressed as y_pred_i = CRF(o_i), where y_pred_i is the entity label sequence predicted by the model.

[0039] The loss function can be expressed as L = -\sum_{i=1}^{N} \log P(y_i | x_i), where P(y_i |x_i) is the probability of the entity label sequence y_i predicted by the model given the text x_i.

[0040] Step 202: After the entity recognition model is fitted, the unlabeled raw data is converted into sentence vectors using Bert and then the fitted entity recognition model is used to predict labels; For the unlabeled raw data, the pre-trained Bert model is also used to convert it into sentence vector representation. The obtained sentence vector is input into the trained BiLSTM+CRF model, and the model will output the predicted entity label sequence.

[0041] Step 203: Perform confidence judgment on the predicted data, add samples with confidence higher than the threshold to the existing training set, and continue to train the entity recognition model using the new training set until the training of the entity recognition model is completed after reaching the training times.

[0042] For the predicted label sequence, calculate its confidence (such as the probability and the probability of the maximum probability label). If the confidence is higher than the set threshold, the prediction is considered reliable and added to the training set. Use the new training set (including the original training set and the newly added reliable prediction samples) to continue training the BiLSTM+CRF model. This process can be repeated until the preset number of training times is reached or the model performance is no longer significantly improved.

[0043] Confidence can be expressed as confidence = \sum_{t=1}^{T} P(y_t' | x', y_{1:t-1}'), where T is the length of text x', y_t' is the label predicted at time step t, and P(y_t' | x', y_{1:t-1}') is the probability of predicting label y_t' at time step t given text x' and the label sequence y_{1:t-1}' at the previous time step. Note that the formula here is simplified, and the calculation of confidence in practice may be more complicated and may involve the probability of the entire label sequence. The iterative training process can be expressed as Model_{new} = Train(D + D_{new}), where D is the original training set, D_{new} is the newly added reliable prediction sample set, Train is the training process, and Model_{new} is the new model obtained after iterative training.

[0044] In some embodiments, the step of extracting the relationship between entities in the step of extracting entities, attributes, and the relationship between entities from the original data includes: extracting the relationship between entities based on the semi-structured data and unstructured data of the identified entities in the original data; specifically including: Step 221: Use Pkuseg to segment the semi-structured data and unstructured data in the original data and convert them into word vectors; Step 222: Use the BiLSTM model to obtain the semantic encoding of the original data and extract the relationship between entities; Step 223: Use the results of entity recognition to correct the results of entity relationship extraction.

[0045] In some embodiments, the step of combining structured data and unstructured data in the original data to perform knowledge fusion includes: Step 31: Convert the original data into vector representation and calculate the cosine similarity between entity vectors; Step 32: convert the attribute data of each entity into a vector and calculate the cosine similarity between the attribute vectors; Step 33: Input the entity cosine similarity and the cosine similarity of the attribute data into the fusion model, use the extracted entity relationship as the training label, perform model training and generate an aligned entity model; Step 34: Align the entities and entity relationships using the aligned entity model and add them to the data layer of the knowledge graph.

[0046] In some embodiments, the steps of performing knowledge reasoning on the extracted special equipment inspection archive ontology and completing the construction of the knowledge graph include: Step 51: From the special equipment inspection archive ontology, a walking path is constructed according to the relationship between entities and the path is vectorized; Step 52: construct entities into a state space, where each entity represents a state, construct entity relationships into an action space, where each relationship represents a transition from one state to another, simulate state transitions in the state space by walking between entities, and use a deep reinforcement learning algorithm to train the model. During the training process, when the model selects the correct entity and relationship for state transition, a reward is given; when an incorrect choice is made, a penalty is given. When the best relationship is selected for state transition based on the current state, the training of the deep reinforcement learning model is completed; Step 53: Input the entity vector representation into the trained deep reinforcement learning model for knowledge reasoning, complete the relationship output in the knowledge graph, and construct a complete knowledge graph.

[0047] like Figure 2 As shown, an embodiment of the present invention provides a special equipment inspection archive knowledge graph construction device, including a data acquisition module, an entity and relationship extraction module, a knowledge fusion processing module, an archive ontology generation module and a knowledge reasoning module; The data acquisition module is used to process the special equipment inspection files to obtain the original data of the special equipment inspection files; Entity and relationship extraction module, used to extract entities, attributes and relationships between entities from raw data; The knowledge fusion processing module is used to combine the structured data and unstructured data in the original data to perform knowledge fusion; The archive ontology generation module is used to perform ontology modeling on the extracted entities, attributes and relationships to complete the extraction of special equipment inspection archive ontology; The knowledge reasoning module is used to perform knowledge reasoning on the special equipment inspection archive ontology and complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

[0048] In some embodiments, the data acquisition module includes a preprocessing unit, a fusion processing unit, a text parsing unit, and a parsing processing unit; A preprocessing unit, used for preprocessing text data of special equipment inspection files; A fusion processing unit, used to perform speech recognition on the video data of the special equipment inspection archive and convert it into first text data, and at the same time divide the video data into image data through a hash perception algorithm, process the image data to generate second text data, and use a language model to compare and fuse the first text data and the second text data to generate fused text data; A text parsing unit, used for performing text parsing on the fused text data and the pre-processed text data to generate original data of special equipment inspection archives; The parsing processing unit is used to extract the attributes of entities from text data.

[0049] In some embodiments, the entity and relationship extraction module includes a model training unit and an entity labeling unit; The model training unit is used to construct a training set through manually labeled data to train the BiLSTM+CRF model for entity recognition and generate a trained entity recognition model; The entity tagging unit is used to input the semi-structured data and unstructured data in the original data into the trained entity recognition model to output entity tags.

[0050] In some embodiments, the model training unit is specifically used to construct a training set with manually annotated data, output a sentence vector representation containing semantics of the training set through Bert, and use the sentence vector to train a BiLSTM+CRF model to fit the entity recognition model; after the entity recognition model is fitted, the unlabeled original data is converted into a sentence vector using Bert and then the fitted entity recognition model is used to predict the label; the predicted data is judged for confidence, samples with confidence higher than a threshold are added to the existing training set, and the new training set is used to continue training the entity recognition model until the training number is reached to complete the training of the entity recognition model.

[0051] In some embodiments, the entity and relationship extraction module also includes an entity relationship extraction unit, which is used to extract the relationship between entities in the semi-structured data and unstructured data in the original data based on the identified entities; specifically including: converting the semi-structured data and unstructured data in the original data into word vectors after using Pkuseg word segmentation; using the BiLSTM model to obtain the semantic encoding of the original data and extract the relationship between entities; using the results of entity recognition to correct the results of entity relationship extraction.

[0052] In some embodiments, the knowledge fusion processing module is specifically used to convert the original data into a vector representation and calculate the cosine similarity between entity vectors; convert the attribute data of each entity into a vector and calculate the cosine similarity between the attribute vectors; input the entity cosine similarity and the cosine similarity of the attribute data into a fusion model, use the extracted entity relationship as a training label, perform model training to generate an aligned entity model; align entities and entity relationships using the aligned entity model, and add them to the data layer of the knowledge graph.

[0053] In some embodiments, the knowledge reasoning module is specifically used to construct a walking path from the special equipment inspection archive ontology according to the relationship between entities and vectorize the path; construct entities as a state space, each entity represents a state, and construct entity relationships as an action space, each relationship represents a transition from one state to another, and simulate the state transition in the state space by walking between entities. A deep reinforcement learning algorithm is used to train the model. During the training process, a reward is given when the model selects the correct entity and relationship for state transition; a penalty is given when an incorrect selection is made, and the training of the deep reinforcement learning model is completed when the best relationship is selected for state transition according to the current state; the entity vector representation is input into the trained deep reinforcement learning model for knowledge reasoning, the relationship output in the knowledge graph is completed, and a complete knowledge graph is constructed.

[0054] An embodiment of the present invention also provides an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus. The communication bus can be used for information transmission between the electronic device and the sensor. The processor can call the logic instructions in the memory to execute the following method: Step 1: Process the special equipment inspection file to obtain the original data of the special equipment inspection file; Step 2: Extract entities, attributes and the relationship between entities from the original data; Step 3: Combine the structured data and unstructured data in the original data to perform knowledge fusion; Step 4: Perform ontology modeling on the extracted entities, attributes and relationships to complete the extraction of the special equipment inspection file ontology; Step 5: Perform knowledge reasoning on the special equipment inspection file ontology to complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationship between entities.

[0055] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc., which can store program code.

[0056] An embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute the method provided by the above method embodiment, for example, including: Step 1: Processing special equipment inspection files to obtain special equipment inspection file original data; Step 2: Extracting entities, attributes and relationships between entities from the original data; Step 3: Combining structured data and unstructured data in the original data to perform knowledge fusion; Step 4: Performing ontology modeling on the extracted entities, attributes and relationships to complete the extraction of special equipment inspection file ontology; Step 5: Performing knowledge reasoning on the special equipment inspection file ontology to complete the construction of a knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

[0057] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.

[0058] An embodiment of a device for constructing a knowledge graph for special equipment inspection archives provided in an embodiment of the present invention belongs to the same inventive concept as the method for constructing a knowledge graph for special equipment inspection archives in the above-mentioned embodiments. For details not described in detail in the embodiment of the device for constructing a knowledge graph for special equipment inspection archives, reference can be made to the embodiment of the method for constructing a knowledge graph for special equipment inspection archives in the above-mentioned embodiments.

[0059] The device for constructing a knowledge graph of special equipment inspection archives is a combination of the units and algorithm steps of each example described in the embodiments disclosed herein, and can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0060] Those skilled in the art will appreciate that various aspects of the method for constructing a knowledge graph of special equipment inspection archives can be implemented as a system, method or program product. Therefore, various aspects of the present disclosure can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which can be collectively referred to as "circuit", "module" or "system".

[0061] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person of ordinary skill in the art may easily think of changes or substitutions within the technical scope disclosed by the present invention, and these shall be within the scope of protection of the present invention.

Claims

1. A method for constructing a knowledge graph of special equipment inspection archives, characterized in that: The steps include: Process the special equipment inspection files to obtain the original data of the special equipment inspection files; Extract entities, attributes, and relationships between entities from raw data; Combine structured data and unstructured data in the original data to perform knowledge fusion; The extracted entities, attributes and relationships are modeled by ontology to complete the extraction of special equipment inspection archives ontology; Conduct knowledge reasoning on the special equipment inspection archive ontology to complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

2. The method for constructing a knowledge graph of special equipment inspection archives according to claim 1 is characterized in that: The steps for processing special equipment inspection files and obtaining the original data of special equipment inspection files include: Perform text preprocessing on the text data of special equipment inspection files; Performing speech recognition on the video data of the special equipment inspection archive and converting it into first text data, dividing the video data into image data through a hash perception algorithm, processing the image data to generate second text data, and using a language model to compare and fuse the first text data and the second text data to generate fused text data; Perform text analysis on the fused text data and pre-processed text data to generate the original data of special equipment inspection archives; Extracting attributes of entities from text data.

3. The method for constructing a knowledge graph of special equipment inspection archives according to claim 2 is characterized in that: The steps of extracting entities, attributes, and relationships between entities from raw data include: The training set is constructed by manually annotating data to train the BiLSTM+CRF model for entity recognition and generate a trained entity recognition model; Input the semi-structured data and unstructured data in the original data into the trained entity recognition model to output entity tags.

4. The method for constructing a knowledge graph of special equipment inspection archives according to claim 3 is characterized in that: The steps of training the BiLSTM+CRF model for entity recognition by constructing a training set through manually annotated data to generate a trained entity recognition model include: The manually annotated data is used to construct a training set, and the training set is represented by a sentence vector containing semantics output by Bert. The sentence vector is used to train the BiLSTM+CRF model to fit the entity recognition model. After the entity recognition model is fitted, the unlabeled raw data is converted into sentence vectors using Bert, and then the fitted entity recognition model is used to predict the label; The predicted data is judged for confidence, and samples with confidence levels higher than the threshold are added to the existing training set. The entity recognition model is trained using the new training set until the training number is reached to complete the training of the entity recognition model.

5. The method for constructing a knowledge graph of special equipment inspection archives according to claim 4 is characterized in that: The steps of extracting entities, attributes, and relationships between entities from raw data include: Extract the relationship between entities in the semi-structured data and unstructured data in the original data based on the identified entities; specifically including: The semi-structured data and unstructured data in the original data are converted into word vectors after word segmentation using Pkuseg; Use the BiLSTM model to obtain the semantic encoding of the original data and extract the relationship between entities; Use the results of entity recognition to correct the results of entity relationship extraction.

6. The method for constructing a knowledge graph of special equipment inspection archives according to claim 5 is characterized in that: The steps of combining structured data and unstructured data in the original data for knowledge fusion include: Convert the raw data into vector representation and calculate the cosine similarity between entity vectors; Convert the attribute data of each entity into a vector and calculate the cosine similarity between the attribute vectors; The entity cosine similarity and the cosine similarity of the attribute data are input into the fusion model, and the extracted entity relationship is used as the training label to perform model training to generate an aligned entity model; Entities and entity relationships are aligned using the aligned entity model and added to the data layer of the knowledge graph.

7. The method for constructing a knowledge graph of special equipment inspection archives according to claim 6 is characterized in that: The steps of performing knowledge reasoning on the extracted special equipment inspection archive ontology and completing the construction of the knowledge graph include: From the special equipment inspection archive ontology, a walking path is constructed according to the relationship between entities and the path is vectorized. Entities are constructed as state spaces, where each entity represents a state. Entity relationships are constructed as action spaces, where each relationship represents a transition from one state to another. By walking between entities, the state transition in the state space is simulated. The model is trained using a deep reinforcement learning algorithm. During the training process, rewards are given when the model selects the correct entities and relationships for state transitions; penalties are given when the wrong choice is made. The training of the deep reinforcement learning model is completed when the best relationship is selected for state transition based on the current state. The entity vector representation is input into the trained deep reinforcement learning model for knowledge reasoning, completing the relational output in the knowledge graph and constructing a complete knowledge graph.

8. A device for constructing a knowledge graph of special equipment inspection archives, characterized in that: It includes data acquisition module, entity and relationship extraction module, knowledge fusion processing module, archive ontology generation module and knowledge reasoning module; The data acquisition module is used to process the special equipment inspection files to obtain the original data of the special equipment inspection files; Entity and relationship extraction module, used to extract entities, attributes and relationships between entities from raw data; The knowledge fusion processing module is used to combine the structured data and unstructured data in the original data to perform knowledge fusion; The archive ontology generation module is used to perform ontology modeling on the extracted entities, attributes and relationships to complete the extraction of special equipment inspection archive ontology; The knowledge reasoning module is used to perform knowledge reasoning on the special equipment inspection archive ontology and complete the construction of the knowledge graph; the nodes in the knowledge graph represent entities, and the directed edges represent the relationships between entities.

9. An electronic device, characterized in that: The electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor so that the at least one processor can execute the method for constructing a knowledge graph of special equipment inspection archives as described in any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method for constructing a special equipment inspection archive knowledge graph as described in any one of claims 1 to 7.