Method for constructing general knowledge base in electric power safety industry based on large model

By building a large model-based agent to process and integrate diversified data sources in the power safety industry, the problem of building a general knowledge base for power safety is solved, and efficient knowledge processing and application is achieved.

CN119808910AActive Publication Date: 2025-04-11GUIZHOU POWER GRID CO LTD

Patent Information

Application Number
CN202411729075.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-04-11
Estimated Expiration
2044-11-28

AI Technical Summary

Technical Problem

The existing technology is difficult to effectively build a general knowledge base for the power safety industry, especially when dealing with diverse data sources and formatting data, there is a lack of automated information extraction methods.

Method used

Using a large model-based method, multiple agents are constructed to process and integrate data sources in the power safety industry, including file analysis agents, analysis report information extraction agents, rules and regulations information extraction agents, and operation instruction manual information extraction agents. These agents convert unstructured data into structured and vectorized data through predefined rules and vectorized processing and store it in a vector database.

Benefits of technology

The systematization and automation processing of power safety knowledge is realized, the efficiency of knowledge acquisition and organization is improved, the application value of knowledge is enhanced, and high-quality training data is provided for subsequent large-scale applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119808910A_ABST
    Figure CN119808910A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power systems, in particular to a method for constructing a general knowledge base in the power safety industry based on a large model. Performing data classification and sorting on the data source of the electric power safety industry to obtain classified data; constructing a plurality of agents based on the large model, and processing the classified data by using the plurality of agents to obtain structured data; and carrying out vectorization processing on the structured data to generate vector data, storing the vector data into a vector database, and constructing a universal knowledge base in the electric power safety industry. The data source comprises intrinsic safety analysis historical data, an intrinsic safety analysis report, electric power safety rules and regulations and operation specifications. The intelligent agents comprise a file analysis intelligent agent, an analysis report information extraction intelligent agent, a rule and regulation information extraction intelligent agent and an operation instruction information extraction intelligent agent. Through a multi-agent cooperative processing and vectorization storage mechanism, efficient organization and intelligent application of electric power safety knowledge are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electric power systems, and in particular to a method for constructing a general knowledge base for the electric power safety industry based on a large model. Background Art

[0002] In the power industry, intrinsic safety is a key factor in ensuring that the power system remains safe both in normal operation and in fault conditions. Although power companies have adopted a variety of safety management measures, safety risks still exist due to the complexity and diversity of the power system. Traditional safety management methods mainly rely on manual experience and analysis of historical data, which makes it difficult to comprehensively and timely identify and prevent potential safety hazards.

[0003] With the rapid development of artificial intelligence technology, large language models (LLMs) have demonstrated powerful capabilities in the field of natural language processing (NLP). However, the application of large language models to the field of power safety, especially intrinsic safety analysis, still faces many challenges. First, the field of power safety is highly professional, and the existing large language models lack sufficient corpus in the field of power safety, resulting in limited problem analysis capabilities in this field. Secondly, the tasks of intrinsic safety analysis are complex and diverse, and the analysis of different events does not have strict universal similarities. Traditional algorithms show strong data dependence and poor model generalization when dealing with these complex tasks.

[0004] In order to meet these challenges, it is urgent to build a comprehensive and high-quality power safety knowledge base. However, there are the following difficulties in building a knowledge base: First, the data sources and forms are diverse, including historical data of intrinsic safety analysis, intrinsic safety analysis reports, management rules, operating instructions and violation cases, etc. It is necessary to sort out and analyze the data sources, data types and data characteristics in the power field in detail, and finally unify them into queryable similar data. Secondly, some data exists in text, and the amount of text is large. How to extract the information required for the knowledge base in an automated way. Summary of the invention

[0005] In view of the problems existing in the prior art, the present invention is proposed.

[0006] Therefore, the problem to be solved by the present invention is how to construct a knowledge base with the following difficulties: First, the data sources and forms are diverse, including historical data of intrinsic safety analysis, intrinsic safety analysis reports, management rules, operating instructions and violation cases, etc. It is necessary to sort out and analyze the data sources, data types and data features in the power field in detail, and finally unify them into queryable similar data. Secondly, some data exist in texts, and the amount of texts is large. How to extract the information required by the knowledge base in an automated way.

[0007] In order to solve the above technical problems, the present invention provides the following technical solutions:

[0008] In a first aspect, an embodiment of the present invention provides a method for constructing a general knowledge base for the power safety industry based on a large model, which includes classifying and combing data sources of the power safety industry to obtain classified data;

[0009] Building multiple intelligent agents based on the large model, and using the multiple intelligent agents to process the classified data to obtain structured data;

[0010] The structured data is vectorized to generate vector data, and the vector data is stored in a vector database to construct a general knowledge base for the power safety industry.

[0011] As a preferred solution of the method for constructing a general knowledge base of the power safety industry based on a large model described in the present invention, wherein: the data source includes: historical data of intrinsic safety analysis, intrinsic safety analysis reports, power safety rules and regulations, and operating specifications;

[0012] Among them, the intrinsic safety analysis historical data includes structured data and Class A accident analysis reports, and the power safety regulations and operating specifications include public data and internal regulations.

[0013] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model described in the present invention, the data classification and sorting of the data sources for the power safety industry include:

[0014] Sorting out intrinsic safety analysis data, including structured data processing and Class A accident analysis report processing;

[0015] Sorting out power safety regulations and operating specifications, including public data processing and processing of regulations and operating instructions.

[0016] As a preferred solution of the method for constructing a general knowledge base for the electric power safety industry based on a large model described in the present invention, wherein: the structured data processing includes: based on predefined rules, filtering out high-quality data that completes a closed loop from the structured data, wherein the predefined rules refer to a complete closed loop of the intrinsic safety analysis process consisting of problem description, intrinsic safety analysis of the problem, essential summary, problem review, measure formulation, and resource allocation;

[0017] The data is formatted and stored according to the fields of problem description, problem type, analysis path, root cause and corresponding measures.

[0018] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model described in the present invention, the processing of the Class A accident analysis report includes: extracting statistical comparison content of the intrinsic safety system and manual analysis from the report; extracting field information of the root cause and responsibility description from the "manual analysis" part; classifying the extracted information according to four dimensions: human factors, material factors, environmental factors, and management factors, and converting it into a structured data format.

[0019] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model described in the present invention, the public data processing includes: obtaining publicly released power safety regulations and system data; performing data cleaning on the obtained data; and structuring the cleaned data according to a preset format.

[0020] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model as described in the present invention, the multiple agents include: a file parsing agent, used to parse the category and content of the input file; an analysis report information extraction agent, used to extract the intrinsic safety analysis path in the Class A accident analysis report; a regulations and system information extraction agent, used to extract regulations and system clauses and generate three related questions for each clause; an operation instruction information extraction agent, used to extract the operation name, operation description and detailed operation steps or standards.

[0021] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model as described in the present invention, the workflow of the analysis report information extraction agent includes: extracting the "manual analysis" part in the analysis report; outputting the root cause of the problem in a preset format according to the four factors of "people, environment and management"; calling the intrinsic safety analysis path matching tool to form a mapping relationship between the matched root cause and the analysis path.

[0022] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model as described in the present invention, the workflow of the intelligent agent for extracting information on rules and regulations includes: determining whether the rules and regulations are publicly released external regulations or internal regulations used within the company; extracting clauses in the regulations based on the scope of application of the rules and regulations; and generating three related questions that can be answered by the content of the clauses for the extracted clauses.

[0023] As a preferred solution of the method for constructing a general knowledge base for the power safety industry based on a large model described in the present invention, the vectorization processing includes: designing and constructing knowledge base fields according to intrinsic safety analysis data, system data and work instruction data respectively; inputting fields with field types marked as "vector" into the vector model for vectorization, including vectorizing the problem description vector, the problem content vector and the work content vector; storing the vectorized data in a vector database for retrieval of upper-level applications and fine-tuning of the large language model.

[0024] In a second aspect, an embodiment of the present invention provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program instructions are executed by the processor, the steps of the method for constructing a general knowledge base for the power safety industry based on a large model as described in the first aspect of the present invention are implemented.

[0025] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program instructions are executed by a processor, the steps of the method for constructing a general knowledge base for the power safety industry based on a large model as described in the first aspect of the present invention are implemented.

[0026] The beneficial effects of the present invention are as follows: the present invention transforms scattered power safety knowledge into a structured and searchable knowledge base by constructing a multi-level knowledge processing system. Compared with traditional methods, the present invention not only improves the efficiency of knowledge acquisition and organization, but also enhances the application value of knowledge through intelligent means. At the same time, the quantized storage mechanism of the present invention provides high-quality training data for subsequent large-scale model applications, laying the foundation for the intelligent development of the power safety field. This innovative technical solution significantly improves the level of power safety knowledge management and provides more reliable technical support for industry safety management. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0028] Figure 1 A flowchart of the method for constructing a general knowledge base for the power safety industry based on a large model;

[0029] Figure 2 Computer equipment diagram for the general knowledge base method of the power safety industry based on large models;

[0030] Figure 3A workflow diagram for extracting text content for a general knowledge base method for the power safety industry built based on a large model;

[0031] Figure 4 The workflow diagram of document parsing agent for the general knowledge base method of the power safety industry built based on the big model;

[0032] Figure 5 Diagram of the text vectorization process of the general knowledge base method for the power safety industry built based on a large model. DETAILED DESCRIPTION

[0033] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are described in detail below in conjunction with the accompanying drawings.

[0034] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0035] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or selective embodiment that is mutually exclusive with other embodiments.

[0036] Example 1

[0037] Reference Figure 1-2 , which is the first embodiment of the present invention, and provides a method for constructing a general knowledge base for the power safety industry based on a large model, including:

[0038] S100: Classify and sort out the data sources of the power safety industry to obtain classified data;

[0039] In the embodiment of the present application, the data source includes: intrinsic safety analysis historical data, intrinsic safety analysis report, power safety rules and regulations and operating specifications. Among them, the intrinsic safety analysis historical data includes structured data and Class A accident analysis report, and the power safety rules and regulations and operating specifications include public data and internal rules and regulations.

[0040] Specifically, the structured data in the historical data of intrinsic safety analysis mainly includes four aspects of information: safety inspection records (including daily inspections, special inspections, comprehensive inspections, etc.), system audit data (including safety management system audit results, safety performance evaluation data, etc.), hidden danger management records (including hidden danger levels, rectification measures, rectification deadlines, etc.) and accident prevention data (including near-event statistics, risk assessment reports, etc.). These data are usually stored in structured forms such as tables and databases.

[0041] Class A accident analysis reports are comprehensive analysis documents of major safety accidents, including accident description, accident cause analysis, personnel responsibility determination, rectification measures, etc. Such reports are usually stored in Word, PDF and other formats, and require specific processing methods to extract key information.

[0042] Electricity safety regulations are mainly divided into two categories: one is the public regulations and standards issued by authoritative departments such as the China Electricity Council and the National Energy Administration; the other is various regulations, operating specifications and safety management methods formulated by enterprises. These documents usually contain a large number of normative requirements and specific operational guidance.

[0043] In an optional embodiment, the intrinsic safety analysis historical data may also include equipment operation data, such as substation operation parameters, line load data, etc. These data can help the system better understand the relationship between equipment operation status and safety risks. At the same time, environmental factor data such as meteorological data and geographic information may also be added, which are of great value for analyzing safety risks in specific environments.

[0044] In another optional embodiment, data sources can be managed hierarchically based on the importance and frequency of use of the data. For example, core data such as Class A accident analysis reports and important rules and regulations can be classified as primary data sources and processed and analyzed first; daily inspection records and general operating specifications can be classified as secondary data sources and processed when system resources allow. This hierarchical management method can improve the processing efficiency and resource utilization of the system.

[0045] It should be noted that the selection and classification of data sources directly affect the quality and practicality of the knowledge base. This application ensures that the knowledge base can fully cover all aspects of the power safety field through multi-dimensional data classification. At the same time, the efficiency and accuracy of data processing are improved through differentiated processing of different types of data.

[0046] S101: Data sources include: historical data of intrinsic safety analysis, intrinsic safety analysis reports, power safety regulations and operating specifications;

[0047] Among them, the historical data of inherent safety analysis includes structured data and Class A accident analysis reports, and the power safety regulations and operating specifications include public data and internal regulations.

[0048] Among them, the historical data of inherent safety analysis includes structured data and Class A accident analysis reports, and the power safety regulations and operating specifications include public data and internal regulations.

[0049] In the embodiment of the present application, the intrinsic safety analysis historical data mainly includes two categories: one is the structured data generated from daily inspections, patrols and system audits, and the other is the Class A accident analysis report for major accidents. These data record various safety hazards, accident causes and treatment measures in the power industry, and constitute an important source of power safety knowledge.

[0050] Specifically, structured data can be daily safety inspection records, equipment inspection data, safety hazard rectification records, etc. Class A accident analysis reports can be detailed analysis documents for major safety accidents, including the course of the accident, cause analysis, rectification measures, etc. The latter often includes more in-depth intrinsic safety analysis and experience summary.

[0051] In an optional embodiment, structured data and Class A accident analysis reports can be organized according to different classification dimensions. For example, they can be classified according to accident type (such as equipment failure, operating error, management defect, etc.), involved units (such as power plants, substations, transmission lines, etc.) or time periods (monthly, quarterly, annual). This multi-dimensional classification method is helpful for subsequent data analysis and knowledge extraction.

[0052] In an optional embodiment, data can be managed hierarchically according to its importance and frequency of use. For example, cases involving major safety hazards or typical cases can be marked as high priority and given priority in the knowledge base construction process. This hierarchical management mechanism can improve the efficiency of knowledge base construction and ensure that important knowledge is organized and used in a timely manner.

[0053] It should be noted that the classification and organization of data sources is the basis for building a high-quality knowledge base. Through a reasonable classification system, data can be made more orderly, easier to manage and use. At the same time, the characteristics and values ​​of different types of data are also different: structured data is convenient for statistical analysis, while Class A accident analysis reports contain more in-depth lessons. By comprehensively utilizing these data with different characteristics, a more comprehensive and practical knowledge base can be built.

[0054] S102: Classify and sort out the data sources of the power safety industry, including:

[0055] Sorting out intrinsic safety analysis data, including structured data processing and Class A accident analysis report processing;

[0056] Sorting out power safety regulations and operating specifications, including public data processing and processing of regulations and operating instructions.

[0057] In the embodiment of the present application, the data combing process adopts different processing strategies for different types of data. For structured data, data cleaning, standardization and integration are mainly performed; for Class A accident analysis reports, text parsing and information extraction are required; for rules and regulations and operating instructions, clause parsing and key information annotation are required.

[0058] Specifically, structured data processing includes the following steps:

[0059] Data cleaning: remove duplicate records, correct erroneous values, and handle missing values; data standardization: unify data formats, unify measurement units, and standardize the use of terminology; data integration: merge data from different systems and establish data associations; data verification: verify the accuracy, completeness, and consistency of data.

[0060] Class A accident analysis report processing mainly includes:

[0061] Report document parsing: convert reports in PDF or Word format into processable text; Chapter recognition: identify different chapters in the report (such as accident description, cause analysis, etc.); Key information extraction: extract key information such as accident type, cause classification, and corrective measures; Knowledge point annotation: annotate the lessons learned and best practices in the report.

[0062] In an optional embodiment, a more detailed processing flow can be designed according to specific business needs. For example, for accident reports involving specific equipment, steps such as equipment parameter extraction and failure mode analysis can be added; for cases involving human operations, operating procedures and safety precautions can be extracted.

[0063] It should be noted that data combing is an iterative optimization process. As business develops and needs change, it may be necessary to continuously adjust and improve processing strategies. At the same time, the processing methods of different types of data also need to be optimized according to actual results. For example, for structured data, it may be necessary to adjust the cleaning rules; for text data, it may be necessary to improve the information extraction algorithm.

[0064] S103: Class A accident analysis report processing includes: extracting the statistical comparison content of the intrinsic safety system and manual analysis from the report; extracting the field information of the root cause and responsibility description from the "manual analysis" part; classifying the extracted information according to the four dimensions of human factors, material factors, environmental factors, and management factors, and converting it into a structured data format.

[0065] S104: Public data processing includes: obtaining publicly released power safety regulations and system data; performing data cleaning on the obtained data; and structuring the cleaned data according to a preset format.

[0066] S200: Building multiple agents based on the large model, and using multiple agents to process the classified data to obtain structured data;

[0067] In the embodiment of the present application, four types of agents are constructed based on the large language model: file parsing agent, analysis report information extraction agent, rules and regulations information extraction agent and work instruction information extraction agent. These agents are responsible for processing different types of data and converting unstructured data into structured formats.

[0068] The main responsibility of the file parsing agent is to determine the category and content of the input file. It first identifies the file type through the file name and content features, and then calls the corresponding processing module for parsing. For example, for PDF files, it uses a dedicated PDF parser to extract the text content; for Word files, it uses the Office document parser for processing.

[0069] The analysis report information extraction agent specializes in processing Class A accident analysis reports. It uses a sequence labeling model based on the attention mechanism to accurately identify key information in the report, such as root causes, responsibility determination, and corrective measures. The core of the agent is a professional model trained with data from the power safety field that can understand industry-specific terms and expressions.

[0070] The rules and regulations information extraction agent is responsible for processing various rules and regulations documents. It can not only extract the specific terms and conditions, but also automatically generate related questions, which can be used in the subsequent knowledge question-answering system. For example, for a regulation on "substation equipment maintenance", the agent will generate relevant questions such as "What are the cycle requirements for substation equipment maintenance?" and "What safety issues need to be paid attention to during the maintenance process?"

[0071] The work instruction information extraction agent specializes in processing various operating specifications and work instructions. It can split long operating instructions into specific steps and requirements, and establish logical connections between the steps. This is of great value for subsequent safety training and operation guidance.

[0072] In an optional embodiment, each agent is equipped with a self-learning and optimization mechanism. They can continuously adjust and optimize their processing strategies based on the feedback of processing results. For example, if an agent makes many errors when processing a certain type of document, the system will automatically collect these error cases for subsequent model optimization training.

[0073] In another optional embodiment, a collaborative working mechanism can be configured for agents. When a document requires multiple agents to work together, the system will automatically coordinate their working order and data exchange methods. For example, when processing a comprehensive document containing operating specifications and accident case analysis, the system will first use the file parsing agent for preliminary processing, and then call the corresponding professional agents for in-depth analysis based on the content characteristics.

[0074] An example of an agent's processing flow:

[0075] File parsing agent processing flow

[0076] Input: Acceptance work instructions for SF6 circuit breakers in a power supply bureau's substation;

[0077] Processing steps:

[0078] a) File type determination: Determine the file type as an operation instruction based on the file name characteristics;

[0079] b) Content acquisition: read the file content and extract the plain text information;

[0080] c) Format standardization: unify text formats and handle special characters;

[0081] d) Output processing results: generate standardized text content.

[0082] Analysis report information extraction agent processing flow:

[0083] Input: accident analysis report of a substation;

[0084] Processing steps:

[0085] a) Structural identification: identifying the chapters and paragraphs of the report;

[0086] b) Extraction of key information: locate and extract information such as the cause of the accident and personnel responsibility;

[0087] c) Classification and organization: Classification and organization according to the four dimensions of "people, environment and management";

[0088] d) Output processing results: Generate structured accident analysis data.

[0089] It should be noted that the construction and training of intelligent agents is a continuous optimization process. The system will regularly evaluate the performance of each intelligent agent, including indicators such as accuracy and processing speed, and make optimization adjustments based on the evaluation results. At the same time, by introducing multiple professional intelligent agents, the system can flexibly respond to different types of data processing needs, improving the overall processing efficiency and accuracy.

[0090] S201: Structured data processing includes: based on predefined rules, filtering out high-quality data that completes the closed loop from structured data, where the predefined rules refer to the complete closed loop of the intrinsic safety analysis process consisting of problem description, intrinsic safety analysis of the problem, essential summary, problem review, measure formulation, and resource allocation;

[0091] The data is formatted and stored according to the fields of problem description, problem type, analysis path, root cause and corresponding measures.

[0092] S202: Multiple agents include: a file parsing agent, used to parse the category and content of the input file; an analysis report information extraction agent, used to extract the intrinsic safety analysis path in the Class A accident analysis report; a regulations information extraction agent, used to extract regulations clauses and generate three related questions for each clause; an operation instruction information extraction agent, used to extract the operation name, operation description and detailed operation steps or standards.

[0093] S203: The workflow of the analysis report information extraction agent includes: extracting the "manual analysis" part in the analysis report; outputting the root cause of the problem in a preset format according to the four factors of "people, environment and management"; calling the intrinsic safety analysis path matching tool to form a mapping relationship between the matched root cause and the analysis path.

[0094] S204: The workflow of the intelligent agent for extracting information on rules and regulations includes: determining whether the rules and regulations are external regulations that are publicly released or internal regulations used within the company; extracting clauses in the system based on the scope of application of the rules and regulations; and generating three related questions that can be answered by the content of the clauses for the extracted clauses.

[0095] S300: vectorize the structured data to generate vector data, store the vector data in a vector database, and build a general knowledge base for the power safety industry.

[0096] S301: Vectorization processing includes: designing and constructing knowledge base fields according to intrinsic safety analysis data, system data and work instruction data respectively; inputting fields with field type marked as "vector" into the vector model for vectorization, including vectorizing the problem description vector, problem content vector and work content vector; storing the vectorized data in the vector database for retrieval of upper-level applications and fine-tuning of the large language model.

[0097] In summary, by classifying and sorting out the data sources of the power safety industry, a multi-dimensional data system including historical data of intrinsic safety analysis, Class A accident analysis reports, rules and regulations, and operating specifications has been established, solving the problem of scattered traditional power safety knowledge and inconsistent formats. This systematic data organization method not only improves the availability of data, but also lays the foundation for subsequent intelligent processing and realizes the efficient management of power safety knowledge.

[0098] By introducing the complete closed-loop predefined rules of "problem description → intrinsic safety analysis → essential summary → problem review → measure formulation → resource allocation", the quality control of structured data is achieved. This closed-loop screening mechanism ensures that the data entering the knowledge base has a complete analysis link and practical value, and improves the practicality and reliability of the knowledge base.

[0099] By building four types of professional agents for document parsing, analysis report information extraction, rules and regulations information extraction, and work instruction information extraction, we have achieved automated processing of different types of unstructured data. This large-model-based agent collaboration mechanism has broken through the efficiency bottleneck of traditional manual processing methods and significantly improved the accuracy and processing speed of knowledge extraction.

[0100] By systematically classifying accident analysis according to human factors, material factors, environmental factors, and management factors, a comprehensive intrinsic safety analysis framework has been established. This multi-dimensional analysis method enables the system to more accurately identify the root causes of accidents and provide more effective decision-making support for preventing similar accidents.

[0101] Through the intelligent agent automatically generating questions related to the provisions of the rules and regulations, a closed-loop system of knowledge application is constructed. This innovative knowledge conversion mechanism not only improves the practicality of the rules and regulations, but also provides a more intuitive learning method for power safety training and knowledge popularization.

[0102] By vectorizing structured data and storing it in a vector database, efficient retrieval and application of knowledge is achieved. This vectorized storage method not only supports traditional exact match queries, but also enables semantic-based similarity retrieval, greatly improving the practical value of the knowledge base.

[0103] Example 2

[0104] Reference Figure 1 - Figure 5 , which is the second embodiment of the present invention, and this embodiment provides a method for constructing a general knowledge base for the power safety industry based on a large model. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0105] The technical problem to be solved by the present invention is to integrate data from heterogeneous data sources based on a large language model, extract knowledge in the field of power safety from different categories of text, and build a general knowledge base for the power safety industry to provide data support for subsequent application construction. To this end, the present invention adopts the following technical solutions.

[0106] First, classify and sort out the data sources, adopt different knowledge construction methods for different categories of data, and sort out the fields and content that need to be extracted from different data.

[0107] Secondly, multiple intelligent agents are built based on the large language model, which are used to classify, extract, and format data sources, and finally to build a knowledge base.

[0108] Finally, the extracted or integrated data fields are vectorized and saved in a vector database for retrieval by upper-level applications and fine-tuning of large language models.

[0109] The present invention proposes a method to solve the problem of heterogeneous data source integration and knowledge extraction, including data classification and combing, intelligent agent construction and data vectorization. The specific implementation plan is as follows:

[0110] 1. Data classification and sorting

[0111] In the process of building a general knowledge base for the power safety industry, data classification and sorting are key steps to ensure the accuracy and practicality of the knowledge base. The following is a detailed description of data classification and sorting:

[0112] 1. Data classification

[0113] According to the different data sources and contents, the relevant data of the power safety industry can be divided into the following categories:

[0114] (1) Historical data of intrinsic safety analysis

[0115] Structured data: includes historical data of multiple categories such as inspections, patrols, and system audits, covering fields such as problem description, problem type, analysis path, root cause, and corresponding measures.

[0116] Class A accident analysis report: includes files in doc, docx or pdf format, which records in detail the system analysis results, manual analysis results, root cause analysis and responsibility description of Class A incidents.

[0117] (2) Electricity safety regulations and operating specifications

[0118] Public data: Publicly released power safety regulations and rules were obtained from the websites of national ministries and commissions such as the China Electricity Council, the State-owned Assets Supervision and Administration Commission of the State Council, and the National Energy Administration.

[0119] Internal rules and regulations: including internal documents such as rules and regulations, work instructions and operating specifications in the field of power safety.

[0120] 2. Data sorting

[0121] The data combing process aims to systematize and standardize data from different sources to facilitate subsequent analysis and application. The specific steps are as follows:

[0122] (1) Sorting out intrinsic safety analysis data

[0123] 1) Structured data processing

[0124] Filter high-quality historical data: Filter high-quality data from structured data based on predefined rules.

[0125] Note: The predefined rules here refer to the intrinsic safety analysis process, which consists of problem description → intrinsic safety analysis of the problem → essential summary → problem review → (rectification assignment) → measure formulation → resource allocation, and the process ends to form a complete closed loop. Therefore, in order to select high-quality data, it is necessary to select historical data that completes the closed loop from the historical intrinsic safety analysis data.

[0126] Formatted storage: Format and store data according to fields such as problem description, problem type, analysis path, root cause and corresponding measures to ensure the systematization and standardization of data.

[0127] 2) Class A accident analysis report processing

[0128] PDF parsing: Use PDF parsing technology to parse the contents of the statistical comparison table between the intrinsically safe system and manual analysis.

[0129] Information Extraction: Apply cue word engineering or rule-based methods to extract the root cause and responsibility description fields in the “Human Analysis” section.

[0130] Structured storage: The extracted information is converted into a structured data format and stored according to predefined fields.

[0131] Note: For the specific operation process of the "information extraction" work in the above steps, please refer to the "II. Intelligent Agent Construction" section.

[0132] (2) Review of power safety regulations and operating specifications

[0133] 1) Public data processing

[0134] Crawler technology: Use crawler technology to obtain publicly released power safety regulations and systems from websites such as the China Electricity Council, the State-owned Assets Supervision and Administration Commission of the State Council, and the National Energy Administration.

[0135] Data cleaning: Clean the crawled data to remove redundant and invalid information to ensure the accuracy and completeness of the data.

[0136] 2) Rules and regulations and operating instructions

[0137] PDF parsing: Use PDF parsing technology to parse internal rules and regulations and operating specifications, and parse PDF text into plain text format.

[0138] Information extraction: Combined with the prompt word project, the parsed text is further extracted and processed to extract clause units with business significance.

[0139] Structured storage: The extracted clause units are converted into structured data format and incorporated into the knowledge base.

[0140] Note: For the specific operation process of the "information extraction" work in the above steps, please refer to the "II. Intelligent Agent Construction" section.

[0141] 2. Agent Construction

[0142] Based on the analysis of "I. Data classification and combing", the data can be divided into structured data and unstructured data according to the data source form. Structured data is intrinsically safe historical analysis data. When building a knowledge base, you only need to adjust the original data fields and supplement other required information without extracting too much data. Unstructured data includes but is not limited to Class A accident analysis reports, public regulations of the power safety industry, internal rules and regulations of the power safety industry, and operating instructions. It is necessary to extract power safety knowledge from the above data to build a general knowledge base for the power safety industry. Therefore, this chapter builds an intelligent agent based on a large model and builds a workflow for automatically extracting power safety knowledge.

[0143] An agent is an efficient agent system that can perceive the environment and take actions to achieve specific goals. Agents can exist in the form of software, hardware or integrated systems, and have a high degree of autonomy, adaptability and interaction. Its core function is to perceive changes in the environment in real time through a variety of sensors or data input interfaces, and make intelligent judgments and decisions based on the internally stored knowledge base and complex algorithm models. The agent then performs a series of actions to effectively influence the environment or achieve a predetermined goal.

[0144] Intelligent agents are widely used in the field of artificial intelligence, covering many fields such as automated systems, robots, virtual assistants, and game characters. Its significant advantage is that it can learn and evolve autonomously, ensuring that it can still complete tasks efficiently when facing dynamic and complex environments. By continuously optimizing its own decision-making algorithms and action strategies, intelligent agents not only improve the efficiency and accuracy of task execution, but also significantly enhance the adaptability and robustness of the system. Generally, the construction of a single intelligent agent consists of two parts: one is the prompt word, which needs to tell the big model the task to be done and what information can be obtained at present through the prompt word. The big model plans or adjusts its ideas according to the prompt word to complete the final task; the second is the tool, and the big model needs to obtain the intermediate results in the process of completing the task by calling the tool.

[0145] Since unstructured text data belongs to different categories and the extracted knowledge is different, we must first identify the category to which the input data belongs, and then build different categories of intelligent agents based on the large model to identify and extract texts of different categories. Figure 3 Workflow for extracting text content.

[0146] 1. File parsing agent

[0147] The agent is used to first determine the category of the text based on the input file name, such as event analysis report, public regulations of the power safety industry, or operation instructions, etc.; then obtain the file content corresponding to the input file name; and finally parse the file content and output plain text information. For example, an application scenario is taken as an example to illustrate the use of parsing file content based on text name in this embodiment.

[0148] Get the file name: Acceptance work instructions for SF6 circuit breakers in a power supply bureau substation

[0149] Constructing prompt words:

[0150]

[0151] After determining the system command and tool list and the agent input, the agent performs the task. Figure 4 Parsing agent workflow for documents.

[0152] 2. Analysis report information extraction agent

[0153] The intelligent agent is used to extract Class A accident analysis report information and extract intrinsic safety analysis paths that are consistent with manual analysis results from text unstructured data.

[0154]

[0155]

[0156] 3. Rules and regulations information extraction agent

[0157] The intelligent agent is used to extract relevant clauses of regulations and systems in the field of power safety. First, it determines whether the regulations and systems are publicly released or internal. Then, for different types of regulations and systems, it extracts the content of the clauses. Finally, based on the extracted content of the clauses, it generates three related questions.

[0158]

[0159] 4. Work instruction information extraction agent

[0160]

[0161]

[0162] 3. Data Vectorization

[0163] Based on "II. Intelligent Agent Construction", relevant knowledge of the power safety industry has been extracted based on unstructured documents (Class A accident analysis reports, public laws and regulations of the power safety industry, internal rules and regulations of the power safety industry, operating instructions, etc.). This chapter vectorizes the extracted relevant knowledge and constructs a general knowledge base for the power safety industry.

[0164] Figure 5 The process of storing text after vectorization is explained: The specific steps are as follows: First, according to the data source: intrinsic safety analysis data, system data and work instruction data, the fields required for knowledge base are designed and constructed respectively. The specific knowledge base fields are shown in the following table. Then, the fields marked as "vector" are input into the vector model for vectorization and stored in the vector database.

[0165] A vector database is a database system specifically used to store, manage, and query high-dimensional vector data. Vector databases are mainly used to store and process unstructured data such as images, text, and audio. These data are converted into vector form through machine learning models or feature extraction technology for storage and management.

[0166] Characteristics of vector database

[0167] High-dimensional vector storage: Vector databases can efficiently store and manage large amounts of high-dimensional vector data, which are usually features extracted from raw data through deep learning models.

[0168] Efficient retrieval: By using indexing technology and vector retrieval algorithms, vector databases can achieve fast response under high-dimensional big data and support positioning and retrieval based on the proximity or similarity of vectors.

[0169] Support for traditional structured data: In addition to managing vector data, the vector database also supports the management of traditional structured data, and can filter and search both vector fields and structured fields.

[0170] The following table shows the fields required by the intrinsic safety analysis knowledge base, among which issue_embedding is a field that needs to be vectorized by the vector model before being stored in the database.

[0171] Serial number Field English name Field Chinese name type 1 issue_desp Problem Description Scalar 2 issue_type Question Category Scalar 3 col1 Question Field 1 Scalar 4 col2 Question Field 2 Scalar ... ... ... ... N-3 analysis_path Intrinsic safety analysis path Scalar N-2 root_cause root cause Scalar N-1 solution Countermeasures Scalar N issue_embedding Problem Description Vector vector

[0172] The following table shows the fields required by the institutional knowledge base, among which question_embedding is a field that needs to be vectorized by the vector model before being stored in the database.

[0173] Serial number Field English name Field Chinese name type 1 provision_content Terms and Conditions Scalar 2 question_content Question content Scalar 3 Chapter Terms and Conditions Scalar 4 rule Rules and regulations Scalar 5 rule_type Institutional Type Scalar ... ... ... ... N-3 issue_unit Issuing unit Scalar N-2 start_date Effective Date Scalar N-1 store_path System storage path Scalar N question_embedding Question content vector vector

[0174] The following table shows the fields required by the work instruction knowledge base, where job_embedding is a field that needs to be vectorized by the vector model before being stored in the database.

[0175]

[0176]

[0177] At this point, the construction of the general knowledge base for the power safety industry has been completed. On the one hand, the data in the knowledge base can be combined with the big model for retrieval and query, and on the other hand, it can provide data support for building a general big model for the power safety industry.

[0178] Example 3

[0179] This embodiment also provides a computer device, which is applicable to a method for building a general knowledge base for the power safety industry based on a large model, and includes a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute computer executable instructions to implement a forced oscillation detection and positioning method for a distribution network as proposed in the above embodiment.

[0180] This embodiment further provides a storage medium on which a computer program is stored. When the program is executed by a processor, a forced oscillation detection and positioning method for a distribution network is implemented as proposed in the above embodiment.

[0181] The computer device may be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covering the display screen, or a key, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc.

[0182] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, 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. The computer software product 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 methods of 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 and other media that can store program codes.

[0183] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in conjunction with such instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in conjunction with such instruction execution systems, devices or apparatuses.

[0184] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk case (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

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

[0186] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present invention, which should all be included in the scope of the claims of the present invention.

Claims

1. A method for constructing a general knowledge base for the power safety industry based on a large model, characterized by: include, Classify and sort out the data sources of the power safety industry to obtain classified data; Building multiple intelligent agents based on the large model, and using the multiple intelligent agents to process the classified data to obtain structured data; The structured data is vectorized to generate vector data, and the vector data is stored in a vector database to construct a general knowledge base for the power safety industry.

2. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 1 is characterized by: The data sources include: intrinsic safety analysis historical data, intrinsic safety analysis reports, power safety regulations and operating specifications; Among them, the intrinsic safety analysis historical data includes structured data and Class A accident analysis reports, and the power safety regulations and operating specifications include public data and internal regulations.

3. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 2 is characterized by: The data classification and sorting of the data sources of the power safety industry include: Sorting out intrinsic safety analysis data, including structured data processing and Class A accident analysis report processing; Sorting out power safety regulations and operating specifications, including public data processing and processing of regulations and operating instructions.

4. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 3 is characterized by: The structured data processing includes: based on predefined rules, filtering out high-quality data that completes a closed loop from the structured data, wherein the predefined rules refer to a complete closed loop of the intrinsic safety analysis process consisting of problem description, intrinsic safety analysis of the problem, essential summary, problem review, measure formulation, and resource allocation; The data is formatted and stored according to the fields of problem description, problem type, analysis path, root cause and corresponding measures.

5. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 4 is characterized by: The processing of the Class A accident analysis report includes: extracting the statistical comparison content of the intrinsic safety system and the manual analysis from the report; extracting the field information of the root cause and responsibility description from the "manual analysis" part; classifying the extracted information according to the four dimensions of human factors, material factors, environmental factors, and management factors, and converting it into a structured data format.

6. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 5, characterized in that: The public data processing includes: obtaining publicly released power safety regulations and system data; performing data cleaning on the obtained data; and performing structured processing on the cleaned data according to a preset format.

7. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 6 is characterized by: The multiple agents include: a file parsing agent, used to parse the category and content of the input file; an analysis report information extraction agent, used to extract the intrinsic safety analysis path in the Class A accident analysis report; a regulations information extraction agent, used to extract regulations clauses and generate three related questions for each clause; an operation instruction information extraction agent, used to extract the operation name, operation description and detailed operation steps or standards.

8. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 7, characterized in that: The workflow of the analysis report information extraction agent includes: extracting the "manual analysis" part in the analysis report; outputting the root cause of the problem in a preset format according to the four factors of "people, environment and management"; calling the intrinsic safety analysis path matching tool to form a mapping relationship between the matched root cause and the analysis path.

9. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 8, characterized in that: The workflow of the intelligent agent for extracting information on rules and regulations includes: determining whether the rules and regulations are publicly released external regulations or internal regulations used within the company; extracting clauses in the system based on the scope of application of the rules and regulations; and generating three related questions that can be answered by the content of the clauses for the extracted clauses.

10. The method for constructing a general knowledge base for the electric power safety industry based on a large model as claimed in claim 9, characterized in that: The vectorization processing includes: designing and constructing knowledge base fields according to intrinsic safety analysis data, system data and work instruction data respectively; inputting fields with field types marked as "vector" into a vector model for vectorization, including vectorizing problem description vectors, problem content vectors and work content vectors; storing the vectorized data in a vector database for retrieval of upper-level applications and fine-tuning of large language models.

Citation Information

Patent Citations

  • Knowledge graph construction method for power grid main equipment

    CN112612902A

  • Construction method and system of power transmission and transformation project knowledge base

    CN116610818A

  • Power transformation project knowledge base construction method based on knowledge graph and large language model

    CN117725996A

  • Power system vector knowledge base construction method based on text vectorization

    CN118964695A

  • Digital-intelligent power regulation and control question answering method and system based on large language model

    CN119003742A

Cited By

  • Electric power information system inspection and resource allocation method based on knowledge base and intelligent agent

    CN120050211A

  • Inspection robot task planning method based on multiple agents and robot

    CN121132622A

  • Industrial knowledge data processing method and device and related equipment

    CN121434204A

  • Production safety accident grade fine-grained division method

    CN122333232A