Nuclear power DCS operation and maintenance knowledge graph construction system and method based on large language model
Through the nuclear power DCS operation and maintenance knowledge graph construction system based on the large language model, the problem of multi-source heterogeneous information processing of nuclear power DCS operation and maintenance data is solved, a high-quality knowledge graph is constructed, the operation and maintenance efficiency and quality are improved, and the nuclear power plant is ensured. Safe and stable operation.
Patent Information
- Application Number
- CN202410753001.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-12
- Publication Date
- 2024-09-06
AI Technical Summary
Existing technology cannot effectively handle the multi-source heterogeneous information of nuclear power DCS operation and maintenance data, resulting in a lack of integrity of the knowledge graph and a huge demand for data annotation, making it difficult to build a high-quality knowledge graph in the nuclear power field.
The nuclear power DCS operation and maintenance knowledge graph construction system based on the large language model is used. Through the nuclear power DCS operation and maintenance knowledge graph conceptual layer design, data collection, preprocessing, extraction and fusion processing modules, combined with prompt learning and few-sample learning methods, a self-topped A knowledge graph that combines downward and bottom-up methods reduces data annotation work and improves automation.
It achieves efficient processing of complex text data, improves the efficiency and quality of knowledge graph construction, reduces dependence on manual annotation, enhances adaptability and generalization capabilities to multi-source heterogeneous data, and ensures the logic of knowledge graphs. sexual and systematic.
Smart Images

Figure CN118607632A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of nuclear power DCS health management, and in particular to a nuclear power DCS operation and maintenance knowledge graph construction system and method based on a large language model. Background Art
[0002] The operation and maintenance data of nuclear power DCS (Distributed Control System) contains rich expert experience and DCS health management knowledge. These data cover operation and maintenance contents such as equipment-related knowledge, abnormal causes and corrective measures. However, these data have not been fully integrated at present, and there is a serious data island phenomenon between documents. By converting expert experience and practical knowledge into computer-understandable knowledge and applying it to actual operations, it can effectively help operation and maintenance personnel to respond to alarms quickly, thereby obtaining standardized and high-quality response results. In addition, this knowledge is also helpful for DCS status risk prediction and guides power plant operation and maintenance personnel to conduct alarm training, risk warning and alarm intervention. Therefore, based on the DCS operation and maintenance needs of nuclear power plants, how to extract knowledge from multi-source heterogeneous operation and maintenance data and construct a knowledge graph, and rely on the graph to carry out downstream applications, has become an urgent problem to be solved in power plants.
[0003] In actual engineering applications, the mining efficiency of nuclear power DCS data and technical documents is not high, which is mainly affected by the following three aspects:
[0004] First, data sources are extensive and the amount of data is huge. Nuclear power DCS involves a wide variety of data, including log data, operation and maintenance data, work order data, etc. These data are scattered in different systems and are difficult to obtain in batches. At the same time, the huge amount of data also increases the difficulty of data analysis.
[0005] The second aspect is the limitation of professional knowledge. Document managers and information technology personnel mainly manage nuclear power technical documents from the aspects of cataloging, format and structure, but are unable to extract key content from the content perspective and reorganize it logically. This leads to a low secondary utilization rate of data and makes it difficult to fully realize its value.
[0006] Third, the limitations of relational databases. Traditional relational databases have redundancy of rules and information islands when storing log data and work order data, making it difficult to associate different data or to represent different attributes that data may have. This limits the comprehensive understanding and scientific management of nuclear power DCS operation and maintenance data, and also affects the rapid response to DCS alarm anomalies.
[0007] At present, there is no knowledge graph construction method and related research for nuclear power DCS. The knowledge graph construction methods for other directions and other fields of nuclear power have the following inherent problems:
[0008] (1) Domain knowledge graph based on public data
[0009] The existing knowledge graphs in the nuclear power field based on public data sets mainly come from literature on the Internet, online communities or various open databases. Although this type of data is easy to obtain, there is little factual knowledge related to nuclear power operation and maintenance, and it cannot be directly applied to nuclear power operation and maintenance.
[0010] (2) Building a knowledge graph based on traditional methods
[0011] Traditional rule-based methods require prior knowledge to set rules and are not effective in identifying complex unstructured data; while statistical-based methods require a lot of domain knowledge as research support and have high requirements for researchers.
[0012] (3) Methods based on machine learning / deep learning
[0013] Although this type of method can effectively extract contextual text features, it requires a lot of data annotation work. Faced with the huge multi-source heterogeneous data in the nuclear power field, it becomes very difficult to meet the annotation requirements, resulting in unsatisfactory knowledge extraction results.
[0014] (4) Constructing knowledge graphs based on a bottom-up approach
[0015] Most knowledge graphs are constructed in a bottom-up manner, directly using natural language technology to extract key entities and relationships in the data. Due to its fully automated nature, starting from local data may lead to unclear overall structure, and the global consistency and systematicity of the knowledge graph are poor. Without a clear top-level design, it is easy to cause confusion in the hierarchy and classification of the knowledge graph, and it is difficult to ensure logic and systematicity. In addition, the knowledge graph extracted directly from the data lacks unified standards and specifications, has poor universality and standardization, and the quality of knowledge is difficult to reach a practical level. Summary of the invention
[0016] The purpose of the present invention is to provide a nuclear power DCS operation and maintenance knowledge graph construction system and method based on a large language model, which solves the problems that traditional knowledge graph construction methods cannot effectively handle multi-source heterogeneous information, lack of knowledge graph integrity, and require a large amount of data annotation.
[0017] In order to achieve the above object, the present invention provides the following technical solutions:
[0018] On the one hand, the present invention provides a nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model, comprising:
[0019] The nuclear power DCS operation and maintenance knowledge graph concept layer design module is used to combine the actual operation and maintenance requirements of nuclear power DCS to build a nuclear power DCS knowledge graph ontology and concept layer design that meets nuclear power applications;
[0020] Nuclear power DCS operation and maintenance knowledge collection module, used to collect data related to DCS operation and maintenance, including guide specification data, log data and behavior data;
[0021] The nuclear power DCS operation and maintenance knowledge preprocessing module is used to preprocess the multi-source heterogeneous data collected in the nuclear power DCS field to form a data sample set;
[0022] The nuclear power DCS operation and maintenance knowledge extraction module is used to locally deploy the large language model. It uses the prompt project template with step-by-step prompts to guide the large language model to extract information according to the prompt project, extract entities and attributes from the data sample set, and store them in the database;
[0023] The nuclear power DCS operation and maintenance knowledge fusion and processing module is used to fuse and process the information extracted by the nuclear power DCS operation and maintenance knowledge extraction module to construct a nuclear power DCS operation and maintenance knowledge graph.
[0024] In some embodiments, the multi-source heterogeneous data generated by DCS operation and maintenance includes both structured data such as inventories and lists, as well as semi-structured and unstructured data such as reports, manuals, and procedures, specifically including alarm logs, fault manuals, alarm procedures, risk analysis, maintenance plans, emergency repair reports and other data files.
[0025] In some embodiments, the nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model also includes a nuclear power DCS operation and maintenance knowledge graph application module, which is used to perform knowledge visualization analysis and data query on the knowledge graph.
[0026] On the other hand, the present invention also provides a method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model, comprising:
[0027] Step 1: Build a nuclear power DCS operation and maintenance knowledge graph ontology library and complete the knowledge graph ontology and concept layer framework design;
[0028] Step 2: Collect multi-source heterogeneous operation and maintenance data related to nuclear power DCS operation and maintenance;
[0029] Step 3: Preprocess the data collected in step 2 to establish a data sample set;
[0030] Step 4: Use prompt learning and large language model methods to extract data layer knowledge from the data sample set and obtain bottom-up knowledge graph data layer data;
[0031] Step 5: Carry out knowledge fusion and knowledge processing on the acquired data layer data, match it with the knowledge graph concept layer, and build a knowledge graph database;
[0032] Step 6: Conduct visual analysis and data query based on the constructed knowledge graph.
[0033] In some embodiments, step 3 specifically includes:
[0034] Step 3.1: Secondary data collection, obtaining supplementary data from multiple data sources to enrich the existing data set, including API interfaces, database queries, etc., including but not limited to obtaining some historical operation and maintenance data by calling private API interfaces, using SQL queries to obtain data from the existing DCS relational database, and using crawler technology to collect DCS operation and maintenance related question and answer data from private domain forums;
[0035] Step 3.2: Data cleaning, including filling missing values using mean, median, mode or other strategies, deleting records or columns with missing values, converting data to a uniform format, and identifying and handling outliers in the data;
[0036] Step 3.3: Data deduplication, identify duplicates in the data through a combination of specific columns or records. For the same record data from different sources, retain one record and delete the rest of the duplicate records;
[0037] Step 3.4: Word segmentation: Perform word segmentation on Chinese text and remove stop words to reduce the dimension of feature vector and improve the accuracy of knowledge extraction.
[0038] In some embodiments, data layer knowledge extraction is based on the domain ontology library and the concept layer framework, using prompt engineering, a large language model based on prompt learning and few-sample learning, to extract data information corresponding to concept layer entities and entity attributes from DCS multi-source heterogeneous data, and store it in the form of triples in the knowledge graph database, expressed as:
[0039] G={E,R,F}
[0040] Among them, G represents the knowledge graph, E represents the entity set {e 1 ,e 2 ,…,e E}, R represents the relation set {r 1 ,r 2 ,…,r R}, F represents the fact set {f 1 ,f 2 ,…,f F}, each fact f is defined as a triple (h, r, t)∈f, where h represents the head entity, r represents the relationship, and t represents the tail entity.
[0041] In some embodiments, LangChain+ChatGLM3-6B is used as the basic model, or other open source large language models such as LLaMA / Baichuan / Qwen, etc. In terms of prompts, driven by conditions and tasks, the "step-by-step prompt method" (demand prompts, domain knowledge prompts and case prompts) is used for prompt extraction. At the same time, relying on the prompt project, the extracted English text information is translated into Chinese vocabulary.
[0042] In some embodiments, for structured data, a prompt template for extracting key fields is used to read the field data exported by the DCS system through a large language model, and the data is directly used as extracted information after data preprocessing; for semi-structured data, rule-based prompt templates such as regular expression matching, dictionary matching, and template matching are used to extract entity information from log data; for unstructured data, prompt learning based on step-by-step prompts and a large language model based on few-sample learning are used to perform entity extraction, including requirement prompts, domain knowledge prompts, and sample prompts.
[0043] In some embodiments, text similarity is calculated for extracted entities of the same category, and standard semantic replacement is performed on semantically incorrect or synonymous words to complete knowledge fusion; knowledge processing is performed using text matching to form a large-scale knowledge system.
[0044] In some embodiments, relying on the conceptual layer structure of the knowledge graph, the entities and attributes data after knowledge fusion are matched one by one with the entities and entity attributes in the conceptual layer to complete the matching of entities and attributes. All entities, entity attributes and relationship construction can be completed, and finally a complete knowledge graph database is formed.
[0045] Compared with the prior art, the nuclear power DCS operation and maintenance knowledge graph construction system and method based on a large language model provided by the present invention has the following beneficial effects:
[0046] Based on the large language model (LLM)'s ability to understand natural language and contextual reasoning, the present invention provides a system and method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model (LLM), which reduces the heavy data labeling work of traditional knowledge graph construction and can better process complex text data.
[0047] The present invention has a strong understanding ability. The large language model has been trained with a large amount of text data and combined with prompt learning, so it has a strong semantic understanding ability and can better understand the text content and contextual relationships.
[0048] The present invention has a high degree of automation, and a large language model can automatically perform entity recognition tasks, thereby reducing dependence on manual labeling and improving the degree of automation.
[0049] The present invention has the ability to process multi-source heterogeneous data. The large language model can process data from different sources and in different formats and has good adaptability to multi-source heterogeneous data.
[0050] The present invention has strong generalization ability. Due to the diversity of training data, the large language model has good generalization ability and can cope with the construction of knowledge graphs in different fields and different tasks.
[0051] The present invention can reduce the workload of knowledge engineering. The large language model can reduce the workload of knowledge engineering required when constructing a knowledge graph, such as rule formulation, feature engineering, etc.
[0052] The present invention can improve construction efficiency. The large language model can quickly process large amounts of text data and improve the efficiency of knowledge graph construction.
[0053] The present invention is easy to integrate and expand, and a large language model is easy to integrate with other systems and tools, and is also easy to expand and optimize as needed. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for the technical description.
[0055] Figure 1 A schematic diagram of the structure of a nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model provided by the present invention;
[0056] Figure 2 A framework diagram of a nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model provided by the present invention;
[0057] Figure 3 A flowchart of the information extraction method of the nuclear power DCS operation and maintenance knowledge graph construction system based on the large language model provided by the present invention. DETAILED DESCRIPTION
[0058] The following is further explained in detail through specific implementation methods.
[0059] DCS operation and maintenance data contains a wealth of expert experience and knowledge and DCS health management knowledge, which requires accurate conversion of expert experience and practical knowledge into computer-understandable knowledge and application. Based on DCS operation and maintenance data, this paper conducts research on the construction of DCS operation and maintenance knowledge graph, and realizes the construction of knowledge graph by combining top-down and bottom-up methods. It extracts information from DCS multi-source heterogeneous data through technologies such as large language models, and visualizes the knowledge graph in the Neo4j graph database, realizing functions such as query retrieval and data visualization of the knowledge graph.
[0060] like Figure 1 and Figure 2 As shown, the present invention provides a nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model, including a nuclear power DCS operation and maintenance knowledge graph concept layer design module, a nuclear power DCS operation and maintenance knowledge collection module, a nuclear power DCS operation and maintenance knowledge preprocessing module, a nuclear power DCS operation and maintenance knowledge extraction module, a nuclear power DCS operation and maintenance knowledge fusion processing module, and a nuclear power DCS operation and maintenance knowledge graph application module.
[0061] The concept layer design module of the knowledge graph of nuclear power DCS operation and maintenance starts from the operation and maintenance requirements of nuclear power plant DCS, refers to the nuclear power DCS operation and maintenance specifications and standards, operation and maintenance examples, suggestions and experience of operation and maintenance personnel, as well as a large number of domestic and foreign literature, combined with expert experience, nuclear power DCS alarm response procedures, etc., to construct 7 types of ontology elements such as alarm log, fault manual, alarm procedure, risk analysis, maintenance plan, emergency repair report, and corresponding entity attributes; combined with the business logic of DCS operation and maintenance, the relationship between different entities is determined, such as "association", "guidance", "evaluation", "trigger", "submission" types, and the design of the ontology and concept layer is completed. The design of the knowledge graph concept layer is used to combine the actual operation and maintenance requirements of nuclear power DCS to build the nuclear power DCS knowledge graph ontology and concept layer design that meets nuclear power applications.
[0062] The design of the ontology and concept layer is a clear, formalized and standardized description of the concepts and their interrelationships in the field of nuclear power DCS operation and maintenance. The ontology design provides a theoretical framework for the elements and attributes in the data layer, ensuring the rigor and logic of the knowledge graph structure. Taking the alarm log entity as an example, its corresponding attributes include alarm code, operating status, alarm description, response action and other entity attributes. The design of the knowledge graph ontology is completed by determining all entities and entity attributes contained in the knowledge graph. The design content of the concept layer includes the data structure of knowledge, which mainly revolves around entities (Entity), relations (Relation) and attributes (Attribute). These elements constitute the basic units of the knowledge graph, and constrain the specific knowledge form of the data layer through the definition of hierarchical structure and hierarchical relationship.
[0063] Following the three-element principle of knowledge graph construction, the present invention defines the three-element relationship of entity-relationship-entity attribute or entity-relationship-entity. Combining expert experience and the nuclear power DCS alarm response procedure, seven types of ontology elements such as alarm logs, fault manuals, alarm procedures, risk analysis, maintenance plans, and emergency repair reports are constructed, as well as the relationships between entities and between entities and attributes. For example, the relationship between the alarm log entity and the fault manual entity is "associated", which means that there is an "associated" relationship between the alarm log entity and the fault manual description. Specifically, it is associated through the alarm code attribute in the alarm log entity and the fault code attribute in the fault manual entity.
[0064] The nuclear power DCS operation and maintenance knowledge collection module is used to collect and store operation and maintenance data, historical work order data, standard specification data, expert knowledge, experience feedback, etc. in the field of nuclear power DCS.
[0065] With the assistance of nuclear power operation and maintenance personnel, the corresponding data interfaces or databases of nuclear power DCS are accessed and called. The present invention collects multi-source heterogeneous text data related to operation and maintenance through the nuclear power DCS operation and maintenance knowledge collection module, including alarm logs, fault manuals, alarm procedures, risk analysis, maintenance plans, emergency repair reports, etc. These data serve as the original data set, providing a rich information source for the construction of the knowledge graph.
[0066] The nuclear power DCS operation and maintenance knowledge preprocessing module is used to preprocess the multi-source heterogeneous data in the field of nuclear power DCS to form a data sample set.
[0067] Due to the diverse data sources and inconsistent formats, the data needs to be preprocessed. The present invention first extracts and identifies the text information in the data. Subsequently, the JIEBA word segmentation tool is used to split the Chinese text into meaningful words or phrases, and common stop words such as "de", "shi", "zai", etc. are deleted, as well as data deduplication, word segmentation, etc., to improve the efficiency and accuracy of subsequent processing.
[0068] The nuclear power DCS operation and maintenance knowledge extraction module adopts a multi-strategy method to extract entities and attributes from the data sample set and store them in the database. For structured data with clear field definitions, field matching is used for extraction. For semi-structured data, rule-based methods such as regular expression matching, dictionary matching, and template matching are used to extract the required entity information. For unstructured data, a large language model based on prompt learning (Prompt) and few-shot learning is used for entity extraction. Among them, the Prompt part adopts a "step-by-step" prompting method of requirement prompt, domain knowledge prompt, and case prompt to identify key entities in the text.
[0069] The nuclear power DCS operation and maintenance knowledge fusion and processing module is used to integrate and process the conceptual layer knowledge provided by the design module to construct a nuclear power DCS operation and maintenance knowledge graph. The extracted multi-source heterogeneous operation and maintenance data are integrated to eliminate redundant and contradictory information to ensure consistency and accuracy. Synonym normalization and string similarity matching are used to standardize the extracted entities. Synonym normalization methods are used to normalize different words representing the same entity (such as "nuclear power plant" and "nuclear power plant") into a standardized word; string similarity algorithms (such as edit distance, Jaccard similarity coefficient, etc.) are used to match the same or similar entities. Text similarity is calculated for the extracted entities of the same category, and standard semantic replacement is performed on words with semantic errors or synonymous descriptions to complete knowledge fusion; text matching is used for knowledge processing to form a large-scale knowledge system.
[0070] The nuclear power DCS operation and maintenance knowledge graph application module is used to perform knowledge visualization analysis and data query on the knowledge graph. The visualization tools provided by Neo4j are used for display. The nodes in the graph represent entities or entity attributes, and the lines between nodes represent the relationship between entities or the correspondence between entities and attributes. By visually analyzing the single alarm log information, the alarm log information, fault manual, alarm procedures, risk analysis sheet, work order list (emergency repair report, maintenance report), etc. are associated and structured for display, which is convenient for operation and maintenance personnel to quickly understand the alarm anomaly and response operation. In addition to visual analysis of single alarm response information, Neo4j allows users to customize advanced query statements through the "Search phrase" function. Based on this knowledge graph, operation and maintenance personnel can complete simple query, combination query, condition query, path query and even deep relationship query of graph database information without learning more non-operation and maintenance professional knowledge; they can also extract information or modify data by pattern matching nodes and relationships in the graph database, which helps to obtain standardized and high-quality DCS operation and maintenance and alarm response results.
[0071] like Figure 2 As shown, the present invention also provides a method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model, comprising the following steps:
[0072] Step 1: Top-down knowledge graph ontology and concept layer design. Construct the nuclear power DCS operation and maintenance knowledge graph ontology library and complete the knowledge graph ontology and concept layer framework design.
[0073] Ontology design provides a theoretical framework for the elements and attributes in the data layer, ensuring the rigor and logic of the knowledge graph structure.
[0074] The design content of the conceptual layer includes the data structure of knowledge, mainly centered around entities, relations, and attributes. These elements constitute the basic units of the knowledge graph and define the specific knowledge forms of the data layer through hierarchical structures and hierarchical relationship definitions.
[0075] Step 2: Collect the operation and maintenance data of nuclear power DCS with multiple sources and heterogeneous structures. The operation and maintenance data include, but are not limited to, alarm logs, fault manuals, alarm procedures, risk analyses, maintenance plans, emergency repair reports, etc., which serve as the original data set.
[0076] Step 3: Data preprocessing. Since the data sources are diverse and the formats are inconsistent, data preprocessing is required. First, extract and identify the text information in the data; use word segmentation tools (such as jieba, NLTK, etc.) to split Chinese text into meaningful words or phrases, and delete common stop words, such as "de", "shi", "zai", etc., as well as data deduplication, word segmentation, etc., to improve the efficiency and accuracy of subsequent processing. Step 3 specifically includes:
[0077] Step 3.1: Data cleaning. Clean the collected data to remove noise and redundant information and ensure the quality of the data.
[0078] Step 3.2: Data normalization. Uniformly convert data in different formats into a standard format for convenient subsequent processing.
[0079] Step 3.3: Data word segmentation and stop word removal. For Chinese text, perform word segmentation and remove stop words to reduce the dimensionality of the feature vector and improve the accuracy of extracted knowledge.
[0080] Step 3.4: Data annotation. Conduct annotation on a small number of data samples, and use the web-based annotation tool brat to carry out the annotation work of text reports, and annotate the entity types to be extracted (such as time, device information, system information, fault description, etc.) to provide high-quality annotation samples for the training of large language models.
[0081] Step 4: Extract the knowledge of the data layer and obtain the data layer of the knowledge graph from bottom to top. For the data sample set, carry out the extraction of the data layer knowledge of nuclear power DCS; perform data integration, knowledge fusion, and knowledge processing to complete the matching of entities, entity attributes, and relationships between entities in the data layer of the knowledge graph.
[0082] The data layer of the knowledge graph stores specific data information in units of fact triples. The data layer of the knowledge graph stores specific data information in units of fact triples. Data layer knowledge extraction is based on the domain ontology library and the concept layer framework, extracting data information corresponding to the concept layer entities and entity attributes from the DCS multi-source heterogeneous data, and storing it in the knowledge graph database in the form of triples, which is generally expressed as:
[0083] G={E,R,F}
[0084] Among them, G represents the knowledge graph, E represents the entity set {e 1 ,e 2 ,…,e E}, entity e is the most basic component of the knowledge graph, represented by a node in the graph, and R represents the relationship set {r 1 ,r 2 ,…,r R}, the relationship r is an edge in the knowledge graph, indicating a certain connection between different entities. F represents a set of facts {f 1 ,f 2 ,…,f F}, each fact f is defined as a triple (h, r, t)∈f. Among them, h represents the head entity, r represents the relationship, and t represents the tail entity.
[0085] Data layer knowledge extraction refers to extracting data information corresponding to concept layer entities and entity attributes from DCS multi-source heterogeneous data under the guidance of the domain ontology library and concept layer framework, and storing it in the form of triples in the knowledge graph database. In the nuclear power DCS alarm response, it mainly involves alarm log data, fault manuals, alarm procedures and other guide specification data, risk analysis tables, operation and maintenance work orders, experience feedback and other behavioral data. The above information sources include structured data such as lists and lists, as well as semi-structured and unstructured data such as reports, manuals, and procedures. For various forms of data sources, the present invention adopts a multi-strategy method for knowledge extraction.
[0086] For structured and semi-structured data extraction. For structured data with clear field definitions such as risk analysis tables and work order data (including emergency repair reports and maintenance reports), the data of fields corresponding to the entities and attributes of the knowledge graph concept layer are exported through the DCS system, and can be directly integrated as knowledge graph data layer information after data preprocessing. For semi-structured data such as alarm logs, rule-based methods such as regular expression matching, dictionary matching, and template matching are used to extract entity and attribute information corresponding to "time, equipment name, equipment information, system display, alarm code, and operating status information" in the log data.
[0087] For unstructured data extraction. For unstructured data such as fault manuals, this paper builds a knowledge extraction model based on a large language model, and uses a large language model based on prompt learning (Prompt) and few-shot learning for entity extraction. Prompt allows users to guide and extract scheduling rules in the form of instructions. LLM is used for multiple extractions, and human feedback data is collected to train and optimize Prompt. This process is repeated and iterated until the extraction effect reaches the expected performance level.
[0088] Knowledge fusion and knowledge processing. Knowledge fusion refers to the process of integrating new knowledge to eliminate contradictions and ambiguities when constructing a knowledge graph. The extracted entities of the same category are vectorized and encoded, and text similarity is calculated, generally using cosine similarity or Euclidean distance. Standard semantic replacement is performed on words with semantic errors or synonymous descriptions to complete knowledge fusion.
[0089] The formula for calculating cosine similarity is:
[0090]
[0091] Where A·B is the dot product of vector A and vector B, and ||A|| and ||B|| are the Euclidean norms (lengths) of the vectors.
[0092] The Euclidean distance calculation formula is:
[0093]
[0094] The purpose of calculating vector similarity is to determine whether the different entities extracted are the same entity (for example, "nuclear power plant" and "power plant" in the text often represent the same entity). Cosine similarity is more suitable for processing high-dimensional sparse vectors, such as text data and user behavior data in DCS multi-source heterogeneous operation and maintenance data, and is more suitable for similarity calculation of data of the same type of text. In comparison, Euclidean distance is more suitable for processing low-dimensional data or scenarios that need to consider amplitude information. It mainly measures the absolute distance of vectors and is more suitable for processing the similarity judgment of entities extracted from DCS data sources.
[0095] In the process of knowledge processing, text matching technology is used to further process and integrate the text information in the knowledge base; text matching is used for knowledge processing to ensure that all knowledge elements are semantically consistent. Knowledge processing is a continuous process that requires continuous iteration and updating of the knowledge system based on newly acquired knowledge to form a large-scale knowledge system.
[0096] Step 5: Build a knowledge graph database. Relying on the knowledge graph concept layer framework, import the acquired nuclear power characteristic data, realize the correspondence of the knowledge graph "entity-attribute-relationship" triples, and use Neo4j to complete the construction of the knowledge graph database.
[0097] Because the conceptual layer of the knowledge graph is constructed in a top-down manner, all relationship types have been defined in advance and exist in the conceptual layer. Relying on the conceptual layer structure of the knowledge graph, the entities and entity attribute data after knowledge fusion are matched one by one with the entities and entity attributes in the conceptual layer to complete the matching of entities and attributes. This can complete the construction of all entities, entity attributes and relationships and finally form a complete knowledge graph.
[0098] Step 6: Based on the knowledge graph constructed in the above steps, carry out visual analysis, data query, etc., to lay the foundation for the next step of realizing the application of knowledge graphs such as nuclear power DCS intelligent diagnosis, intelligent question and answer, and rapid fault response.
[0099] The present invention relies on the constructed knowledge graph to carry out applications such as visual analysis and data query. In the knowledge graph, nodes represent entities and the attributes contained in the entities, and the lines between nodes represent the relationship between entities. By displaying a single alarm log information, the alarm log information, fault manual, alarm procedure, risk analysis sheet, work order list (emergency repair report, maintenance report), etc. are associated and structured for display, which facilitates operation and maintenance personnel to quickly understand alarm anomalies and response operations, and is helpful for operations such as nuclear power DCS alarm response, and also lays a good foundation for the next step of realizing the application of knowledge graphs such as nuclear power DCS intelligent guidance, intelligent question and answer, and rapid fault response.
[0100] In addition to displaying information such as single alarm responses, Neo4j allows users to customize advanced query statements through the "Search phrase" function. Users can pre-define static search templates (without parameters) or template statements with parameters, and specify the phrases and parameters used to call the query, thereby achieving one-click advanced query.
[0101] In some embodiments, the present invention provides a method for entity extraction from unstructured data using a large language model based on prompt learning and few-sample learning. Specifically, LangChain+ChatGLM3-6B is used as the basic model, the fault manual is used as the local knowledge base, and the nuclear power DCS domain vocabulary is encoded as an additional vocabulary to improve the accuracy of model extraction. The word embedding formula is expressed as:
[0102] E: V → R d
[0103]
[0104] Where E is the embedding function, V is the vocabulary, d is the dimension of the embedding, and v is the word in the vocabulary.
[0105] For the abnormal information appearing in the alarm log, first locate the document to which the alarm abnormal information belongs and the paragraph or table location where the content is located in the local knowledge base, and then use prompts to extract key entity attributes (fault description (System), alarm code (Error Code), operating status (Message), alarm description (Description), response action (Action)) and translate them into Chinese.
[0106] In terms of prompts, driven by conditions and tasks, "step-by-step" prompts (requirement prompts, domain knowledge prompts, case prompts) are used for extraction, aiming to help the model better understand and perform tasks through step-by-step guidance. In the "step-by-step" prompt strategy, large language models accumulate knowledge through continuous learning, improving the generalization ability of the model. Compared with deep learning methods, through prompt learning and few-sample learning, large language models can significantly reduce dependence on large amounts of annotated data; at the same time, they can also combine domain vocabulary and general knowledge for Chinese-English translation, greatly improving the extraction efficiency of the model.
[0107] Task Prompt: Clearly inform the large language model of the current task objectives and specific requirements that need to be completed, and put forward specific requirement prompts: "Assuming that you are an information extraction expert, please refer to the given examples to perform entity extraction on the text, extract the system, code, information, description, action and other information in the text, translate it into Chinese, and output it strictly according to the sample format." At the same time, propose a specific output sample format: "Extraction result: {system:}; {Code:}; {Message:}; {Description:}; {Action:}". This step helps the model focus on specific tasks, reduce understanding bias, and improve the accuracy of task completion.
[0108] Domain Knowledge Prompt: Provides background knowledge and professional terms related to the task, and stores part of the nuclear power DCS domain knowledge in the form of an external knowledge base. The large language model can improve the model's domain understanding by learning the content of this part of the knowledge base, thereby helping the model to better understand domain-specific concepts and improve the accuracy of information extraction.
[0109] Example Prompt: By providing specific example data and expected results, the model can understand how to perform the task. A small number of specific extraction cases can be given to the large language model. For example, for the extraction of entities and entity attributes in the alarm log, a case prompt is provided: "Example 1: If the error Code for SMDH (Station Manager Display Handler) is -2, the message is "System monitor(s) not responding", the description is "Inability to communicate with a System Monitor", and the commended action is "Check path to the workstation hosting the System Monitor and the load on the workstation. Extraction results: {System: SMDH}; {Error Code: -2}; {Message: System monitor not responding}; {Description: Unable to communicate with the system monitor}; {Action: Check the path and load of the system monitor workstation}". This step helps the model learn and imitate the correct extraction method and improve the accuracy.
[0110] In some embodiments, the present invention provides a data visualization and data query method based on a knowledge graph. In combination with common query requirements for nuclear power operation and maintenance, multiple advanced query statements are customized. For example, it was learned during the survey that when operation and maintenance personnel conduct DCS alarm analysis, they often need to focus on key equipment and need to count equipment with different response levels. Template statements with parameters are pre-defined. By entering the device information corresponding to "A's single PIO bus access error" in the custom query statement, the corresponding node information can be queried to meet the requirements of personalized advanced queries. Based on this knowledge graph, operation and maintenance personnel do not need to learn more non-operation and maintenance professional knowledge to complete simple queries, combined queries, conditional queries, path queries and even deep-level relationship queries on graph database information; they can also extract information or modify data by pattern matching nodes and relationships in the graph database, which helps to obtain standardized and high-quality DCS operation and maintenance and alarm responses.
[0111] Therefore, through the above content, the present invention successfully constructs a nuclear power DCS operation and maintenance knowledge graph, and provides strong support for the operation and maintenance of nuclear power DCS through the visualization and query functions of the knowledge graph. This knowledge graph not only improves the efficiency of operation and maintenance, but also helps to improve the quality of operation and maintenance, ensuring the safe and stable operation of nuclear power plants.
[0112] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed by the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model, characterized in that: include: The nuclear power DCS operation and maintenance knowledge graph concept layer design module is used to build a nuclear power DCS knowledge graph ontology and concept layer design that meets nuclear power applications based on the actual operation and maintenance needs of nuclear power DCS; Nuclear power DCS operation and maintenance knowledge collection module, used to collect data related to DCS operation and maintenance, including guide specification data, log data and behavior data; The nuclear power DCS operation and maintenance knowledge preprocessing module is used to preprocess the multi-source heterogeneous data collected in the nuclear power DCS field to form a data sample set; The nuclear power DCS operation and maintenance knowledge extraction module is used to locally deploy the large language model. It uses the prompt project template with step-by-step prompts to guide the large language model to extract information according to the prompt project, extract entities and attributes from the data sample set, and store them in the database; The nuclear power DCS operation and maintenance knowledge fusion and processing module is used to fuse and process the information extracted by the nuclear power DCS operation and maintenance knowledge extraction module to construct a nuclear power DCS operation and maintenance knowledge graph.
2. According to the large language model-based nuclear power DCS operation and maintenance knowledge graph construction system of claim 1, it is characterized in that: Collect multi-source heterogeneous data generated by DCS operation and maintenance, including structured data such as lists and lists, and semi-structured and unstructured data such as reports, manuals, and procedures, including alarm logs, fault manuals, alarm procedures, risk analysis, maintenance plans, and emergency repair report data files.
3. The nuclear power DCS operation and maintenance knowledge graph construction system based on a large language model according to claim 1 is characterized in that: It also includes a nuclear power DCS operation and maintenance knowledge graph application module, which is used for knowledge visualization analysis and data query on the knowledge graph.
4. A method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model, characterized in that: include: Step 1: Build a nuclear power DCS operation and maintenance knowledge graph ontology library and complete the knowledge graph ontology and concept layer framework design; Step 2: Collect multi-source heterogeneous operation and maintenance data related to nuclear power DCS operation and maintenance; Step 3: Preprocess the data collected in step 2 to establish a data sample set; Step 4: Use prompt learning and large language model methods to extract data layer knowledge from the data sample set and obtain bottom-up knowledge graph data layer data; Step 5: Carry out knowledge fusion and knowledge processing on the acquired data layer data, match it with the knowledge graph concept layer, and build a knowledge graph database; Step 6: Conduct visual analysis and data query based on the constructed knowledge graph.
5. The method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model according to claim 4 is characterized in that: Step 3 specifically includes: Step 3.1: Secondary data collection, obtaining supplementary data from multiple data sources to enrich the existing data set, including API interfaces and database queries; including but not limited to obtaining some historical operation and maintenance data by calling private API interfaces, using SQL queries to obtain data from existing DCS relational databases, and using crawler technology to collect DCS operation and maintenance related question and answer data from private domain forums; Step 3.2: Data cleaning, including filling missing values using mean, median, mode or other strategies, deleting records or columns with missing values, converting data to a uniform format, and identifying and handling outliers in the data; Step 3.3: Data deduplication, identify duplicates in the data through a combination of specific columns or records. For the same record data from different sources, retain one record and delete the rest of the duplicate records; Step 3.4: Word segmentation: Perform word segmentation on Chinese text and remove stop words to reduce the dimension of feature vector and improve the accuracy of knowledge extraction.
6. The method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model according to claim 4 is characterized in that: In step 4, based on the domain ontology library and the concept layer framework, using prompt engineering, a large language model based on prompt learning and few-shot learning, data information corresponding to concept layer entities and entity attributes is extracted from DCS multi-source heterogeneous data and stored in the knowledge graph database in the form of triples, which is expressed as: G={E,R,F} Among them, G represents the knowledge graph, and E represents the entity set {e1,e2,…,e E }, R represents the relation set {r1,r2,…,r R }, F represents the set of facts {f1,f2,…,f F }, each fact f is defined as a triple (h, r, t)∈f, where h represents the head entity, r represents the relationship, and t represents the tail entity.
7. The method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model according to claim 4 is characterized in that: In step 4, LangChain+ChatGLM3-6B is used as the basic model. In terms of prompts, it is driven by conditions and tasks, and a step-by-step prompt method is used for extraction. At the same time, relying on the prompt project, the extracted English text information is translated into Chinese vocabulary.
8. The method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model according to claim 7 is characterized in that: For structured data, we use prompt templates for extracting key fields to read field data exported by the DCS system through a large language model, and directly use it as extracted information after data preprocessing; for semi-structured data, we use prompt templates based on rules such as regular expression matching, dictionary matching, and template matching to extract entity information from log data; for unstructured data, we use prompt learning based on step-by-step prompts and a large language model based on few-sample learning to extract entities, including requirement prompts, domain knowledge prompts, and sample prompts.
9. The method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model according to claim 4 is characterized in that: In step 5, text similarity is calculated for the extracted entities of the same category, and standard semantic replacement is performed on words with semantic errors or synonymous descriptions to complete knowledge fusion; text matching is used for knowledge processing to form a large-scale knowledge system.
10. The method for constructing a nuclear power DCS operation and maintenance knowledge graph based on a large language model according to claim 4, characterized in that: In step 5, relying on the conceptual layer structure of the knowledge graph, the entities and entity attribute data after knowledge fusion are matched one by one with the entities and entity attributes in the conceptual layer to complete the matching of entities and attributes, complete the construction of all entities, entity attributes and relationships, and finally form a complete knowledge graph database.
Citation Information
Patent Citations
Knowledge extraction method in complex equipment knowledge graph construction process
CN116010619A
Domain knowledge graph construction method and system based on generative large language model
CN116860987A
Construction method and device of farming and pastoral knowledge graph, computer equipment and storage medium
CN117709455A
Method, device, medium and program product for realizing power defect description reasoning by LLM
CN118070901A
Cited By
DCS network fault detection and intelligent reasoning method and device
CN119892662A
Knowledge graph generation method and system and terminal equipment
CN119940513A
A method, system and terminal device for generating a knowledge graph
CN119940513B
Nuclear power DCS knowledge base construction system and method
CN120429286A
