A method for constructing a general knowledge base of the power safety industry based on a large model
By classifying and organizing data sources in the power safety industry, constructing intelligent agents and performing vectorization processing, the problem of data unification in the construction of the power safety knowledge base was solved, achieving efficient management and intelligent application, and improving the practicality and reliability of power safety knowledge.
Patent Information
- Application Number
- CN202411729075.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-11-28
- Estimated Expiration
- 2044-11-28
AI Technical Summary
The existing knowledge base in the field of power safety suffers from the problem that the data sources and formats are diverse, making it difficult to unify them into a searchable set of similar data. Furthermore, some data exists in large amounts of text and lacks automated extraction methods.
By classifying and organizing the data sources in the power safety industry, multiple intelligent agents are constructed to process the data, generate structured data, and store it in vector form, thus forming a general knowledge base for the power safety industry.
This has enabled efficient management and intelligent application of power safety knowledge, improved the efficiency of knowledge acquisition and organization, enhanced the application value of knowledge, and laid the foundation for the intelligent development of the power safety field.
Smart Images

Figure CN119808910B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power systems, in particular to a power safety industry general knowledge base method based on large model construction. BACKGROUND
[0002] In the power industry, intrinsic safety is a key factor to ensure that the power system can maintain a safe state under normal operation and fault conditions. Although power companies have taken various safety management measures, due to the complexity and diversity of the power system, safety risks still exist. Traditional safety management methods mainly rely on manual experience and analysis of historical data, which is difficult to comprehensively and timely identify and prevent potential safety hazards.
[0003] With the rapid development of artificial intelligence technology, large language models (LLM) have shown great capabilities in natural language processing (NLP) field. However, applying large language models to the field of power safety, especially intrinsic safety analysis, still faces many challenges. First, the field of power safety has high professionalism, and existing large language models lack sufficient power safety domain corpus, resulting in limited problem analysis capabilities in this field. Second, the task of intrinsic safety analysis is complex and diverse, and the analysis of different events does not have strict universal similarity, and traditional algorithms show strong data dependence and poor model generalization when dealing with these complex tasks.
[0004] In order to cope with 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 intrinsic safety analysis historical data, intrinsic safety analysis reports, management rules, operation instruction books and violation cases, etc., which need to be detailedly combed and analyzed for data sources, data types and data characteristics in the power field, and finally unified into queryable similar data. Second, part of the data exists in the text, and the number of texts is large, how to extract the information required by the knowledge base based on an automated way. SUMMARY
[0005] In view of the problems existing in the prior art, the present application is proposed.
[0006] Therefore, the problem to be solved by the present application is how to construct the existing knowledge base, which has the following difficulties: first, the data sources and forms are diverse, including intrinsic safety analysis historical data, intrinsic safety analysis reports, management rules, operation instruction books and violation cases, etc., which need to be detailedly combed and analyzed for data sources, data types and data characteristics in the power field, and finally unified into queryable similar data. Second, part of the data exists in the text, and the number of texts is large, how to extract the information required by the knowledge base based on an automated way.
[0007] To solve the above technical problems, the present application provides the following technical solutions:
[0008] In a first aspect, the embodiments of the present application provide a method for constructing a general knowledge base of the power safety industry based on a large model, which comprises classifying and sorting data sources of the power safety industry to obtain classified data;
[0009] A plurality of agents are constructed based on a large model, and the classified data is processed by using the plurality of agents 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 of the power safety industry.
[0011] As a preferred scheme of the method for constructing a general knowledge base of the power safety industry based on a large model, the data sources include intrinsic safety analysis historical data, intrinsic safety analysis reports, power safety regulations and operation specifications.
[0012] The intrinsic safety analysis historical data includes structured data and class A accident analysis reports, and the power safety regulations and operation specifications include public data and internal regulations.
[0013] As a preferred scheme of the method for constructing a general knowledge base of the power safety industry based on a large model, the classification and sorting of the data sources of the power safety industry comprises:
[0014] The intrinsic safety analysis data is sorted, including structured data processing and class A accident analysis report processing;
[0015] The power safety regulations and operation specifications are sorted, including public data processing and regulations and operation guide processing.
[0016] As a preferred scheme of the method for constructing a general knowledge base of the power safety industry based on a large model, the structured data processing comprises: based on a predefined rule, high-quality data with a closed loop is screened from the structured data, wherein the predefined rule refers to a complete closed loop composed of problem description, intrinsic safety analysis of the problem, intrinsic summary, problem review, measure development and resource allocation.
[0017] The data is stored in a format according to the fields of problem description, problem type, analysis path, root cause and corresponding measures.
[0018] As a preferred scheme of the power safety industry general knowledge base method based on a large model constructed by the application, wherein: the A-class accident analysis report processing includes: extracting the intrinsic safety system and the artificial analysis statistical comparison content from the report; extracting the field information of the root cause and responsibility description from the "artificial analysis" part; classifying the extracted information according to four dimensions of human factors, object factors, environmental factors and management factors, and converting it into a structured data format.
[0019] As a preferred scheme of the power safety industry general knowledge base method based on a large model constructed by the application, wherein: the public data processing includes: acquiring publicly published power safety regulations and systems data; performing data cleaning on the acquired data; and structuring the cleaned data according to a preset format.
[0020] As a preferred scheme of the power safety industry general knowledge base method based on a large model constructed by the application, wherein: the plurality of intelligent agents include: a file analysis intelligent agent for analyzing the category and content of the input file; an analysis report information extraction intelligent agent for extracting the intrinsic safety analysis path in the A-class accident analysis report; a regulations and systems information extraction intelligent agent for extracting the regulations and systems clauses and generating three related questions for each clause; and a work instruction information extraction intelligent agent for extracting the work name, work description and work detailed steps or standards.
[0021] As a preferred scheme of the power safety industry general knowledge base method based on a large model constructed by the application, wherein: the analysis report information extraction intelligent agent includes: extracting the "artificial analysis" part in the analysis report; outputting the root cause of the problem in a preset format according to the "personnel, environmental and management" four factors; and calling the intrinsic safety analysis path matching tool to form a mapping relationship between the matched root cause and analysis path.
[0022] As a preferred scheme of the power safety industry general knowledge base method based on a large model constructed by the application, wherein: the regulations and systems information extraction intelligent agent includes: judging whether the regulations and systems are publicly published external regulations or company-internal used internal regulations; extracting the clauses in the regulations and systems based on the applicable scope of the regulations and systems; and generating three related questions that can be answered through the clause content for the extracted clauses.
[0023] As a preferred scheme of the power safety industry general knowledge base method based on a large model constructed by the application, the vectorization processing comprises: respectively designing and constructing knowledge base fields according to the intrinsically safe analysis data, the system data and the operation instruction book data; inputting the field type marked as "vector" into a vector model for vectorization, including vectorization processing of the question description vector, the question content vector and the operation content vector; and storing the vectorized data into a vector database for retrieval of upper application and fine tuning of a large language model.
[0024] In a second aspect, the embodiments of the application provide a computer device, comprising a memory and a processor, and the memory stores a computer program, wherein: the computer program instructions are executed by the processor to realize the steps of the power safety industry general knowledge base method based on a large model constructed by the first aspect of the application.
[0025] In a third aspect, the embodiments of the application provide a computer readable storage medium, which stores a computer program, wherein: the computer program instructions are executed by the processor to realize the steps of the power safety industry general knowledge base method based on a large model constructed by the first aspect of the application.
[0026] The application has the following beneficial effects: the application converts the dispersed power safety knowledge into a structured and retrievable knowledge base through the construction of a multi-level knowledge processing system. Compared with the traditional method, the application 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 vectorization storage mechanism of the application provides high-quality training data for subsequent large model applications and lays a 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 DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the application, the following will briefly introduce the drawings needed to be used in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings.
[0028] Figure 1 The flowchart of the power safety industry general knowledge base method based on a large model constructed by the application;
[0029] Figure 2 The computer device diagram of the power safety industry general knowledge base method based on a large model constructed by the application;
[0030] Figure 3A work flow diagram for extracting text content of a general knowledge base method for the power safety industry based on a large model construction;
[0031] Figure 4 A document analysis agent work flow diagram for a general knowledge base method for the power safety industry based on a large model construction;
[0032] Figure 5 A text vectorization process diagram for a general knowledge base method for the power safety industry based on a large model construction. DETAILED DESCRIPTION
[0033] In order to make the above objectives, features and advantages of the present application more apparent, specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0034] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. However, it will be apparent to one skilled in the art that the present application can be practiced without the specific details and other implementations can be employed. In other instances, well-known methods have not been described in detail in order to avoid obscuring the present application.
[0035] Secondly, the "one embodiment" or "embodiment" referred to herein means that the specific features, structures or characteristics can be included in at least one implementation of the present application. "In one embodiment" appearing in different places in the specification does not mean the same embodiment, nor does it mean an embodiment that is separate or selectively excluded from other embodiments.
[0036] Embodiment 1
[0037] Reference Figures 1-2 For the first embodiment of the present application, the embodiment provides a general knowledge base method for the power safety industry based on a large model construction, comprising,
[0038] S100: classifying and sorting the data sources of the power safety industry to obtain classified data;
[0039] In the embodiment of the present application, the data sources include intrinsic safety analysis historical data, intrinsic safety analysis reports, power safety rules and operation specifications. Among them, the intrinsic safety analysis historical data includes structured data and class A accident analysis reports, and the power safety rules and operation specifications include public data and internal rules and regulations.
[0040] Specifically, the structured data in the intrinsic safety analysis historical data mainly contains four aspects of information: safety inspection records (including daily inspection, special inspection, comprehensive inspection, etc.), system audit data (including safety management system audit results, safety performance evaluation data, etc.), hidden danger governance records (including hidden danger level, rectification measures, rectification period, etc.), and accident prevention data (including approximate event statistics, risk assessment report, etc.). These data are usually stored in structured forms such as tables and databases.
[0041] The A-class accident analysis report is a comprehensive analysis document of major safety accidents, containing accident description, accident cause analysis, personnel responsibility identification, rectification measures, etc. This kind of report is usually stored in formats such as Word and PDF, and key information needs to be extracted through specific processing methods.
[0042] The power safety regulations and systems are mainly divided into two categories: one is the public regulations and standards issued by authoritative departments such as China Electricity Enterprise Association and State Energy Bureau; the other is various regulations and systems, operation specifications and safety management methods formulated by enterprises. These documents usually contain a large number of normative requirements and specific operation guidance.
[0043] In an optional embodiment, the intrinsic safety analysis historical data can also include device operation data, such as substation device operation parameters and line load data. These data can help the system better understand the correlation between device operation state and safety risk. At the same time, environmental factor data such as meteorological data and geographic information can also be added, which has important value for analyzing safety risks in specific environments.
[0044] In another optional embodiment, data sources can be managed in a hierarchical manner based on the importance and frequency of use of data. For example, A-class accident analysis reports, important regulations and systems, etc. Core data is divided into first-level data sources, which are processed and analyzed first; daily inspection records, general operation specifications, etc. are divided into second-level data sources, which are 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 affects the quality and practicality of the knowledge base. Through multi-dimensional data classification, the present application ensures that the knowledge base can comprehensively cover all aspects of the power safety field. At the same time, through the differentiated processing of different types of data, the efficiency and accuracy of data processing are improved.
[0046] S101: The data sources include: intrinsic safety analysis historical data, intrinsic safety analysis report, power safety regulations and operation specifications;
[0047] The intrinsic safety analysis historical data includes structured data and A-class accident analysis reports, and the power safety rules and operation specifications include public data and internal rules.
[0048] The intrinsic safety analysis historical data includes structured data and A-class accident analysis reports, and the power safety rules and operation specifications include public data and internal rules.
[0049] In the embodiments of the present application, the intrinsic safety analysis historical data mainly includes two types: one is structured data from daily inspection, patrol and system audit, and the other is A-class accident analysis reports for major accidents. These data record various safety hazards, accident causes and their treatment measures in the power industry, and constitute an important source of power safety knowledge.
[0050] Specifically, the structured data can be daily safety inspection records, equipment inspection data, safety hazard rectification records, etc., and the A-class accident analysis report can be a detailed analysis document for major safety accidents, including accident process, cause analysis, rectification measures, etc. The latter often contains more in-depth intrinsic safety analysis and experience summary.
[0051] In an optional embodiment, the structured data and A-class 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, operation error, management defect, etc.), involved unit (such as power plant, substation, transmission line, etc.) or time period (monthly, quarterly, annually). 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 processed first in the knowledge base construction process. This hierarchical management mechanism can improve the efficiency of knowledge base construction and ensure that important knowledge is timely organized and utilized.
[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 more orderly and easier to manage and utilize. At the same time, different types of data have different characteristics and values: structured data is suitable for statistical analysis, while A-class accident analysis reports contain more in-depth experience and lessons. By comprehensively utilizing these data with different characteristics, a more comprehensive and practical knowledge base can be built.
[0054] S102: Classify and organize the data sources of the power safety industry, including:
[0055] The intrinsic safety analysis data is sorted out, including structured data processing and A-class accident analysis report processing;
[0056] The power safety regulations and operation specifications are sorted out, including public data processing and regulations and operation guide processing.
[0057] In the embodiments of the present application, different processing strategies are adopted for different types of data in the data sorting process. For structured data, data cleaning, standardization and integration are mainly performed; for A-class accident analysis reports, text analysis and information extraction are needed; for regulations and operation guides, clause analysis and key information labeling are needed.
[0058] Specifically, the structured data processing includes the following steps:
[0059] Data cleaning: removing duplicate records, correcting error values, and handling missing values; data standardization: unifying data format, unifying measurement units, and standardizing term usage; data integration: merging data from different systems, establishing data correlation; data verification: verifying the accuracy, completeness and consistency of data.
[0060] A-class accident analysis report processing mainly includes:
[0061] Report document analysis: converting PDF or Word format reports into processable text; chapter identification: identifying different chapters in the report (such as accident description, cause analysis, etc.); key information extraction: extracting accident type, cause classification, corrective measures, etc.; knowledge point labeling: labeling lessons learned and best practices in the report.
[0062] In an optional embodiment, more detailed processing procedures 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 personnel operation, operation procedures and safety precautions can be extracted.
[0063] It should be noted that data sorting is an iterative optimization process. With the development of business and changes in demand, processing strategies may need to be continuously adjusted and improved. At the same time, the processing methods of different types of data also need to be optimized according to the actual effect. For example, for structured data, cleaning rules may need to be adjusted; for text data, information extraction algorithms may need to be improved.
[0064] S103: The A-class accident analysis report processing includes: extracting the intrinsic safety system and the manual analysis statistical comparison content from the report; extracting the root cause and responsibility description field information from the "manual analysis" part; classifying the extracted information according to four dimensions of human factors, material factors, environmental factors and management factors, and converting it into a structured data format.
[0065] S104: The public data processing includes: obtaining publicly published electric 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: Based on a large model, a plurality of agents are constructed, and the classified data is processed by using the plurality of agents to obtain structured data.
[0067] In the embodiments of the present application, four types of agents are constructed based on a large language model: a file parsing agent, an analysis report information extraction agent, a regulations and system information extraction agent, and a job instruction book information extraction agent. These agents are responsible for processing different types of data and converting unstructured data into a structured format.
[0068] The main responsibility of the file parsing agent is to judge the category and content of the input file. It first identifies the file type through the file name and content characteristics, and then calls the corresponding processing module for parsing. For example, for a PDF file, it uses a special PDF parser to extract the text content; for a Word file, it uses an Office document parser for processing.
[0069] The analysis report information extraction agent is specially used for processing A-class accident analysis reports. It uses a sequence labeling model based on attention mechanism, which can accurately identify key information in the report such as root cause, responsibility determination, and rectification measures. The core of this agent is a professional model trained on electric power safety field data, which can understand industry-specific terminology and expression methods.
[0070] The regulations and system information extraction agent is responsible for processing various regulations and system documents. It can not only extract specific clause content, but also automatically generate related questions, which can be used in subsequent knowledge question and answer systems. For example, for a provision on "substation equipment maintenance", the agent will generate questions such as "What is the cycle requirement for substation equipment maintenance?", "What safety matters need to be paid attention to during the maintenance process?" and other related questions.
[0071] The job instruction book information extraction agent is specially used for processing various operation specifications and job instruction books. It can split long operation instructions into specific steps and requirements, and establish logical relationships between steps. This has important 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 feedback from the processing results. For example, if a certain agent makes more errors when processing a specific type of document, the system will automatically collect these error cases for subsequent model optimization training.
[0073] In another optional embodiment, agents can be configured with a collaborative working mechanism. When a document needs to be processed by multiple agents, the system will automatically coordinate their working order and data exchange method. For example, when processing a comprehensive document containing operation specifications and accident case analysis, the system will first use the file parsing agent for preliminary processing, and then call the corresponding professional agent for in-depth analysis according to the content characteristics.
[0074] Example of agent processing flow:
[0075] File parsing agent processing flow
[0076] Input: Acceptance operation instruction of SF6 circuit breaker of a power supply bureau substation;
[0077] Processing steps:
[0078] a) File type judgment: judging as operation instruction type according to file name characteristics;
[0079] b) Content acquisition: reading file content and extracting pure text information;
[0080] c) Format standardization: unifying text format and processing special characters;
[0081] d) Output processing results: generating standardized text content.
[0082] Analysis report information extraction agent processing flow:
[0083] Input: Accident analysis report of a substation;
[0084] Processing steps:
[0085] a) Structure recognition: recognizing each chapter and paragraph of the report;
[0086] b) Key information extraction: locating and extracting information such as accident cause and personnel responsibility;
[0087] c) Classification and arrangement: classified and arranged according to the four dimensions of "personnel, management, and environment";
[0088] d) Output processing results: generating structured accident analysis data.
[0089] It should be noted that the construction and training of the intelligent agent is a continuous optimization process. The system regularly evaluates the performance of each intelligent agent, including accuracy, processing speed, etc., and makes optimization adjustments based on the evaluation results. At the same time, by introducing multiple professional intelligent agents, the system can flexibly cope with different types of data processing demands, improving the overall processing efficiency and accuracy.
[0090] S201: Structured data processing includes: based on the pre-defined rules, filtering out high-quality data that completes the closed loop from structured data, wherein the pre-defined rules refer to the complete closed loop of the intrinsic safety analysis process composed of problem description, problem intrinsic safety analysis, intrinsic summary, problem review, measure development, 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 intelligent agents include: a file parsing intelligent agent for parsing the category and content of the input file; an analysis report information extraction intelligent agent for extracting the intrinsic safety analysis path in the A-type accident analysis report; a regulation and system information extraction intelligent agent for extracting regulation and system clauses and generating three related questions for each clause; and a job instruction book information extraction intelligent agent for extracting job name, job description, and job detailed steps or standards.
[0093] S203: The workflow of the analysis report information extraction intelligent agent includes: extracting the "manual analysis" part of the analysis report; outputting the root cause of the problem in a preset format according to the "personnel management" four factors; calling the intrinsic safety analysis path matching tool to form a mapping relationship between the matched root cause and analysis path.
[0094] S204: The workflow of the regulation and system information extraction intelligent agent includes: determining whether the regulation and system is a publicly released external regulation or a company-internal used internal regulation; extracting the clauses in the system based on the applicable scope of the regulation and system; generating three related questions that can be answered through the clause content for the extracted clauses.
[0095] S300: Vectorizing the structured data to generate vector data and storing the vector data in a vector database to build a general knowledge base for the power safety industry.
[0096] S301: Vectorization includes: designing and building knowledge base fields according to intrinsic safety analysis data, system data, and job instruction book data respectively; inputting the field type marked as "vector" into the vector model for vectorization, including vectorizing problem description vector, problem content vector, and job content vector; storing the vectorized data in the vector database for retrieval by upper-layer applications and fine-tuning of large language models.
[0097] In summary, by classifying and sorting the data sources of the electric power safety industry, a multi-dimensional data system including intrinsic safety analysis historical data, class A accident analysis reports, regulations and operation specifications is established, solving the problem of scattered and non-uniform format of traditional electric power safety knowledge. This systematic data organization method not only improves the usability of data, but also lays a foundation for subsequent intelligent processing, realizing efficient management of electric power safety knowledge.
[0098] By introducing the complete closed-loop predefined rules of "problem description → intrinsic safety analysis → intrinsic summary → problem review → measure development → resource allocation", the quality control of structured data is realized. This closed-loop screening mechanism ensures that the data entering the knowledge base has a complete analysis link and practical value, improving the practicality and reliability of the knowledge base.
[0099] By constructing four types of professional agents including file parsing, analysis report information extraction, regulations and standards information extraction, and work instruction information extraction, automatic processing of different types of unstructured data is realized. This agent cooperation mechanism based on large models breaks through the efficiency bottleneck of traditional manual processing, significantly improving the accuracy and speed of knowledge extraction.
[0100] By classifying accident analysis according to human factors, material factors, environmental factors, and management factors, a comprehensive intrinsic safety analysis framework is established. This multi-dimensional analysis method enables the system to more accurately identify the root cause of accidents, providing more effective decision support for preventing similar accidents.
[0101] By automatically generating questions related to regulations and standards clauses by agents, a closed-loop system for knowledge application is constructed. This innovative knowledge transformation mechanism not only improves the practicality of regulations and standards, but also provides a more intuitive learning method for electric power safety training and knowledge popularization.
[0102] By vectorizing structured data and storing it in a vector database, efficient retrieval and application of knowledge are realized. This vector storage method not only supports traditional exact match queries, but also enables semantic-based similarity retrieval, significantly improving the practical value of the knowledge base.
[0103] Embodiment 2
[0104] Reference Figure 1 - Figure 5 For the second embodiment of the invention, this embodiment provides a general knowledge base method for the electric power safety industry based on large models. In order to verify the beneficial effects of the invention, economic benefit calculation and simulation experiments are used for scientific demonstration.
[0105] The technical problem to be solved by the present application is to integrate data of heterogeneous data sources based on a large language model, extract power safety field knowledge of different categories of text respectively, and construct a general knowledge base of the power safety industry to provide data support for subsequent application construction.
[0106] Firstly, the data sources are classified and sorted, and different knowledge construction methods are used for different categories of data, and the fields and contents that need to be extracted from different data are sorted.
[0107] Secondly, based on the large language model, multiple agents are constructed for classifying, extracting and formatting the data sources, and finally for constructing the knowledge base.
[0108] Finally, the extracted or integrated data fields are vectorized and saved to a vector database for retrieval by upper-layer applications and fine-tuning of the large language model.
[0109] The present application proposes to solve the problem of integrating heterogeneous data sources and knowledge extraction. It includes data classification and sorting, agent construction and data vectorization, and the specific implementation scheme is as follows:
[0110] I. Data classification and sorting
[0111] In the process of constructing a general knowledge base of the power safety industry, data classification and sorting is a key step 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 sources and contents of data, the relevant data of the power safety industry can be divided into the following categories:
[0114] (1) Intrinsic safety analysis historical data
[0115] Structured data: including historical data of multiple categories such as inspection, patrol, system audit, covering fields such as problem description, problem type, analysis path, root cause and corresponding measures.
[0116] Class A accident analysis report: including files in doc, docx or pdf format, which details the system analysis results, manual analysis results, root cause analysis and responsibility description of Class A events.
[0117] (2) Power safety regulations and operation specifications
[0118] Public data: obtained from the websites of China Electricity Enterprise Association, State-owned Assets Supervision and Administration Commission of the State Council, National Energy Bureau and other national departments to obtain publicly released power safety regulations and operation specifications.
[0119] Internal regulations: including internal documents such as regulations, operation instructions, and operation specifications in the field of electrical safety.
[0120] 2. Data collation
[0121] The data collation process aims to systematically and standardize different sources of data for subsequent analysis and application. The specific steps are as follows:
[0122] (1) Analysis of intrinsic safety data
[0123] 1) Structured data processing
[0124] Screening high-quality historical data: Based on predefined rules, high-quality data is screened from structured data.
[0125] Note: Here, the predefined rules refer to the intrinsic safety analysis process consisting of problem description, intrinsic safety analysis of the problem, intrinsic summary, problem review, (rectification assignment), measure development, and resource allocation. The process forms a complete closed loop. Therefore, in order to select high-quality data, we need to select historical data that has completed the closed loop from historical intrinsic safety analysis data.
[0126] Formatted storage: Store data in fields such as problem description, problem type, analysis path, root cause, and corresponding measures to ensure systematic and standardized data.
[0127] 2) A-type accident analysis report processing
[0128] PDF parsing: Use PDF parsing technology to analyze the content of the intrinsic safety system and the manual analysis and statistics comparison table.
[0129] Information extraction: Apply prompt word engineering or rule-based methods to extract root causes and responsibility descriptions in the "manual analysis" section.
[0130] Structured storage: Convert the extracted information into structured data format and store it according to the predefined fields.
[0131] Note: The specific operation process of "information extraction" in the above steps is detailed in the "II. Agent construction" section.
[0132] (2) Collation of electrical safety regulations and operation specifications
[0133] 1) Public data processing
[0134] Crawler technology: Use crawler technology to obtain publicly released electrical safety regulations from websites such as China Electricity Enterprise Federation, State-owned Assets Supervision and Administration Commission of the State Council, and National Energy Bureau.
[0135] Data cleaning: Clean the crawled data, remove redundant and invalid information, and ensure the accuracy and integrity of the data.
[0136] 2) Handling of rules and procedures
[0137] PDF parsing: Use PDF parsing technology to parse internal rules and operating specifications, and parse PDF text into plain text format.
[0138] Information extraction: Combine the prompt word engineering to further extract and process the parsed text, and extract the clause units with business significance.
[0139] Structured storage: Convert the extracted clause units into structured data format and include them in the knowledge base.
[0140] Note: The specific operation process of "information extraction" in the above steps is detailed in the "II. Agent construction" section.
[0141] II. Agent Construction
[0142] Based on the analysis in "I. Data classification and sorting", the data can be divided into structured data and unstructured data according to the data source form. Structured data is the essence of safety historical analysis data. When building the knowledge base, only the original data fields need to be adjusted and other information needs to be supplemented. No further extraction of data is required. Unstructured data includes but is not limited to A-class accident analysis reports, public regulations of the electric power safety industry, internal rules and regulations of the electric power safety industry, and operation instructions. It is necessary to extract electric power safety knowledge from the above data to build a general knowledge base of the electric power safety industry. Therefore, this chapter is based on a large model to build an intelligent agent and build a workflow for automatically extracting electric power safety knowledge.
[0143] An intelligent agent (Agent) is a highly efficient proxy system that can perceive the environment and take actions to achieve specific goals. Intelligent agents can exist in the form of software, hardware or integrated systems, with high autonomy, adaptability and interaction capabilities. Its core function is to perceive changes in the environment in real time through various sensors or data input interfaces, and make intelligent judgments and decisions based on the internal stored knowledge base and complex algorithm models. Intelligent agents then perform a series of actions to effectively influence the environment or achieve predetermined goals.
[0144] Intelligent agents have wide applications in the field of artificial intelligence, covering multiple areas such as automated systems, robots, virtual assistants, and game characters. Their significant advantage lies in their ability to learn autonomously and continuously evolve, ensuring efficient task completion even in dynamic and complex environments. By continuously optimizing their decision-making algorithms and action strategies, intelligent agents not only improve the efficiency and accuracy of task execution but also significantly enhance the system's adaptability and robustness. The construction of a typical single intelligent agent generally consists of two parts: first, prompts, which tell the large model the task to perform and what information is currently available; the large model plans or adjusts its approach based on the prompts to complete the final task; and second, tools, which the large model uses to obtain intermediate results during the task completion process.
[0145] Since unstructured text data belongs to different categories, the knowledge extracted is different. Therefore, it is necessary to first identify the category of the input data, and then build agents of different categories based on a large model to identify and extract text of different categories. Figure 3 The workflow for extracting text content.
[0146] 1. File parsing intelligent agent
[0147] This intelligent agent is used to first determine the category of the text based on the input file name, such as an event analysis report, publicly available regulations in the power safety industry, or a work instruction manual; then, it obtains the file content corresponding to the input file name; and finally, it parses the file content and outputs plain text information. For example, an application scenario is used to illustrate the use of parsing file content based on text name in this embodiment.
[0148] Document Name: Acceptance Operation Instruction for SF6 Circuit Breakers in a Power Supply Bureau Substation
[0149] Construct prompt words:
[0150]
[0151] After determining the system instructions and tool list and the agent's input, the agent executes the task. Figure 4 Workflow for document parsing intelligent agents.
[0152] 2. Analysis Report Information Extraction Intelligent Agent
[0153] This intelligent agent is used to extract information from Class A accident analysis reports and extract intrinsic safety analysis paths from unstructured text data that are consistent with the results of manual analysis.
[0154]
[0155]
[0156] 3. Regulation information extraction agent
[0157] The agent is used to extract relevant clauses of power safety field regulations. First, it determines whether the regulations are publicly released or internal. Then, it extracts the clauses of different types of regulations. Finally, based on the extracted clauses, it generates three related questions.
[0158]
[0159] 4. Work instruction information extraction agent
[0160]
[0161]
[0162] III. Data vectorization
[0163] Based on "II. Agent construction", relevant knowledge of the power safety industry has been extracted from unstructured files (class A accident analysis report, power safety industry public regulations, power safety industry internal regulations, work instruction, etc.). This chapter vectorizes the extracted relevant knowledge and constructs a general knowledge base of the power safety industry.
[0164] Figure 5 The process of storing the vectorized text in the database is explained: the specific steps are as follows: first, according to the data source: intrinsically safe analysis data, regulation data and work instruction data, design the fields needed for the construction of the knowledge base, the specific knowledge base fields are shown in the following table. Then input the fields marked as "vector" into the vector model for vectorization and store them in the vector database.
[0165] Vector database is a database system specially designed for storing, managing and querying high-dimensional vector data. Vector database is mainly used to store and process image, text, audio and other unstructured data. These data are converted into vector form through machine learning model or feature extraction technology for storage and management.
[0166] Features of vector database
[0167] High-dimensional vector storage: vector database can efficiently store and manage a large amount of high-dimensional vector data, which are usually features extracted from original data by deep learning models.
[0168] Efficient retrieval: using index technology and vector retrieval algorithm, vector database can realize fast response under high-dimensional big data, support proximity or similarity based on vector positioning and retrieval.
[0169] Support traditional structured data: In addition to managing vector data, vector databases also support the management of traditional structured data, and filtering retrieval can be performed on both vector fields and structured fields.
[0170] The following table is the required field of the intrinsically safe analysis knowledge base, where issue_embedding is the field that needs to be vectorized by the vector model before being stored.
[0171] Serial number Field English name Field Chinese name Type 1 issue_desp Problem description Scalar 2 issue_type Problem category Scalar 3 col1 Problem field 1 Scalar 4 col2 Problem field 2 Scalar ... ... ... ... N-3 analysis_path Essentially safe analysis path Scalar N-2 root_cause Root cause Scalar N-1 solution Corresponding measures Scalar N issue_embedding Problem description vector Vector
[0172] The following table is the required field of the institutional knowledge base, where question_embedding is the field that needs to be vectorized by the vector model before being stored.
[0173] Serial number Field English name Field Chinese name Type 1 provision_content Provision content Scalar 2 question_content Question content Scalar 3 chapter Provision chapter Scalar 4 rule Belonging rules and regulations Scalar 5 rule_type Regulation type Scalar ... ... ... ... N-3 issue_unit Issuing unit Scalar N-2 start_date Effective date Scalar N-1 store_path Regulation storage path Scalar N question_embedding Question content vector Vector
[0174] The following table is the required field of the job instruction manual knowledge base, where job_embedding is the field that needs to be vectorized by the vector model before being stored.
[0175]
[0176]
[0177] So far, the construction of the general knowledge base of the power safety industry is completed. The data in the knowledge base can be used for retrieval and query in combination with large models, and also provides data support for the construction of the general large model of the power safety industry.
[0178] Embodiment 3
[0179] The embodiment also provides a computer device suitable for the method of constructing a general knowledge base of the power safety industry based on a large model, which includes a memory and a processor; the memory is used to store computer executable instructions, and the processor is used to execute the computer executable instructions to realize the method of forced oscillation detection and positioning for distribution networks proposed in the above embodiments.
[0180] The embodiment also provides a storage medium having a computer program stored thereon, which is executed by a processor to realize the method of forced oscillation detection and positioning for distribution networks proposed in the above embodiments.
[0181] The computer device can be a terminal, and the computer device includes a processor, a memory, a communication interface, a display screen and an input device connected by a system bus. The processor of the computer device is configured 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 running the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is configured to perform wired or wireless communication with an external terminal. The wireless communication can be achieved by WIFI, an operator network, NFC (near field communication) or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer overlaid on the display screen, or can be a key, a trackball or a touchpad arranged on the shell of the computer device, or can be an external keyboard, a touchpad or a mouse, etc.
[0182] If the functions are implemented in the form of software function units and sold or used as independent products, the functions can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application or the parts of the technical solutions that essentially contribute to the prior art or the parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the present application. The storage medium mentioned above includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk and various 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 a list of executable instructions for implementing logic functions, and can be specifically embodied in any computer readable medium for use by an instruction execution system, apparatus or device, such as a computer-based system, a system including a processor or other system that can fetch and execute instructions from the instruction execution system, apparatus or device, or in conjunction with these instructions. For the purpose of this specification, the "computer readable medium" can be any device that can contain, store, communicate, propagate or transport programs for use by an instruction execution system, apparatus or device or in conjunction with these instructions.
[0184] More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can also be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, for example, via an optical scanner, then compiled, interpreted, or otherwise processed, as necessary, and stored in a computer memory.
[0185] It should be understood that aspects of the application can be implemented in hardware, software, firmware or combinations thereof. In the embodiments described above, various steps or methods can be implemented, for example, in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following technologies, known in the art, or combinations thereof, can be used: discrete logic circuitry having logic gates for implementing logic functions upon data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0186] It should be noted that the above examples are merely intended to illustrate the technical solutions of the present application and not to limit the same. Although the present application 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 application can be modified or replaced by equivalents without departing from the spirit and scope of the present application, and all such modifications or replacements should be included in the scope of the claims of the present application.
Claims
1. A method for constructing a general knowledge base for the power safety industry based on a large model, characterized by: include, Data from power safety industry data sources is classified and organized to obtain categorized data. Multiple agents are constructed based on a large model, and the classified data is processed by the multiple agents to obtain structured data. The multiple intelligent agents include: a file parsing intelligent agent, used to parse the category and content of the input file; an analysis report information extraction intelligent agent, used to extract the intrinsic safety analysis path from the Class A accident analysis report; a rules and regulations information extraction intelligent agent, used to extract the rules and regulations clauses and generate three related questions for each clause; and a work instruction information extraction intelligent agent, used to extract the work name, work description, and detailed work steps or standards. The workflow of the intelligent agent for extracting information from the analysis report includes: extracting the "manual analysis" section from the analysis report; outputting the root cause of the problem in a preset format according to the four factors of "person, person, environment, and management"; and calling the intrinsic safety analysis path matching tool to form a mapping relationship between the matched root cause and the analysis path. The workflow of the intelligent agent for extracting rules and regulations information includes: determining whether the rules and regulations are publicly released external rules or internal rules used within the company; extracting clauses from the rules and regulations based on their scope of application; and generating three relevant questions that can be answered based on the content of the extracted clauses. The structured data is vectorized to generate vector data, and the vector data is stored in a vector database to build a general knowledge base for the power safety industry. The vectorization process includes: designing and constructing knowledge base fields according to intrinsic safety analysis data, system data, and work instruction data respectively; inputting fields marked as "vector" into a vector model for vectorization, including vectorizing problem description vectors, problem content vectors, and work content vectors; and storing the vectorized data in a vector database for retrieval by upper-level applications and fine-tuning of the large language model.
2. The method for constructing a general knowledge base for the power safety industry based on a large model as described in claim 1, characterized in that: The data sources include: historical data of intrinsic safety analysis, intrinsic safety analysis reports, and power safety regulations and operating procedures. The intrinsic safety analysis historical data includes structured data and Class A accident analysis reports, while the power safety regulations and operating procedures include publicly available data and internal regulations.
3. The method for constructing a general knowledge base for the power safety industry based on a large model as described in claim 2, characterized in that: The data classification and organization of data sources in the power safety industry includes: Organize the intrinsic safety analysis data, including structured data processing and Class A accident analysis report processing; The regulations and operating procedures for power safety were reviewed, including the processing of publicly available data and the processing of regulations and operating instructions.
4. The method for constructing a general knowledge base for the power safety industry based on a large model as described in claim 3, characterized in that: The structured data processing includes: based on predefined rules, selecting high-quality data that completes the closed loop from the structured data, wherein the predefined rules refer to the complete closed loop of the intrinsic safety analysis process, which consists 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 fields such as problem description, problem type, analysis path, root cause, and corresponding measures.
5. The method for constructing a general knowledge base for the power safety industry based on a large model as described in claim 4, characterized in that: The processing of the Class A accident analysis report includes: extracting the content of the intrinsic safety system and the statistical comparison of manual analysis from the report; extracting the field information of the root cause and responsibility description from the "manual analysis" section; 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.
6. The method for constructing a general knowledge base for the power safety industry based on a large model as described in claim 5, characterized in that: The publicly available data processing includes: acquiring publicly released power safety regulations and systems data; cleaning the acquired data; and structuring the cleaned data according to a preset format.
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