Safety analysis path generation method and system based on essence of power industry

By combining large language model and vector model search enhancement methods in the power industry, the problem of accuracy and efficiency in the generation of intrinsic safety analysis paths in the power industry is solved, and more accurate and efficient analysis path generation is achieved.

CN119646154AActive Publication Date: 2025-03-18GUIZHOU POWER GRID CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

The prior art has low accuracy and efficiency in the generation of intrinsic safety analysis paths in the power industry, especially when dealing with complex and changeable user problem descriptions, and lacks effective summary and analysis methods, resulting in the generated analysis paths inaccurate enough.

Method used

A method based on retrieval enhancement is adopted, combining large language model and vector model, and the problem description input by the user is obtained, summary and vectorized, and the constructed vector data set is used to match similarity, and the intrinsic security analysis path that best matches the problem description.

Benefits of technology

It improves the accuracy and efficiency of analysis path generation, reduces system cost and complexity, and does not need to fine-tune the large language model or integrates with other models, ensuring the accuracy of problem description and the accuracy of subsequent analysis paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119646154A_ABST
    Figure CN119646154A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of power systems, in particular to a safety analysis path generation method and system based on the essence of the power industry. Obtaining question description input by a user, wherein the question description comprises personnel basic information, event description information, environmental condition information and event result information; based on a vector model, summarizing and vectorizing the problem description to obtain a query vector; based on the constructed vector data set, performing similarity matching on the query vectors to obtain a matching result; and providing the root cause in the matching result to the large language model as reference data, and backtracking the intrinsic safety analysis path through the root cause. Summarizing and processing historical intrinsic safety analysis problem description; carrying out vectorization processing on the summarized description; and storing a vectorization processing result to a vector data set. The limitation that a traditional method depends on artificial experience is avoided. According to the method, accurate security analysis can be realized without complex model training, and the system deployment and maintenance cost is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power systems, and in particular to a method and system for generating a safety analysis path based on the nature of the power industry. Background Art

[0002] In the power industry, it is crucial to ensure the intrinsic safety of power systems in normal operation and fault conditions. Although power companies have taken a variety of safety management measures, safety risks still exist due to the complexity and diversity of power systems. At present, 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. With the rapid development of artificial intelligence technology, especially the widespread application of large language models (LLMs) in the field of natural language processing (NLP), it has provided new possibilities for improving power safety. However, the application of large language models in the field of power safety, especially in intrinsic safety analysis, still faces multiple challenges. First, the field of power safety is rich in professional knowledge, and the existing large language models lack sufficient corpus support in this field, resulting in limited answer analysis capabilities. Second, intrinsic safety analysis tasks are often complex and diverse, and different events lack specific universal similarities, which makes traditional algorithms show strong model data dependence and poor generalization ability when dealing with these complex tasks. Therefore, there is an urgent need for an automated method to assist power safety personnel in deeply analyzing the essential causes of the problem to improve the safety of the overall power system. Summary of the invention

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

[0004] Therefore, this application needs to solve the problems of low accuracy and efficiency of the intrinsic safety analysis path generation method in the power industry, including:

[0005] There is a lack of effective summarization and analysis methods for complex and changeable user problem descriptions, which results in the generated intrinsic safety analysis path being inaccurate.

[0006] When matching problem descriptions with known security analysis paths, relying on manually written rules or simple text similarity matching methods has low accuracy and efficiency.

[0007] Large language models need to be fine-tuned or integrated with other models, which increases the complexity and cost of the system.

[0008] In response to the above technical defects, this application proposes a method for generating an intrinsic safety analysis path for the power industry based on retrieval enhancement. By combining a large language model and a vector model, it achieves efficient summary and accurate analysis of user problem descriptions, and can quickly and accurately find the intrinsic safety analysis path that best matches the problem description. This method does not require fine-tuning of the large language model or fusion with other models, which reduces system cost and complexity and improves overall accuracy and efficiency.

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

[0010] In a first aspect, an embodiment of the present invention provides a method for generating a safety analysis path based on the nature of the power industry, which includes obtaining a problem description input by a user;

[0011] Based on the vector model, the problem description is summarized and vectorized to obtain a query vector;

[0012] Based on the constructed vector data set, similarity matching is performed on the query vector to obtain a matching result;

[0013] The root cause in the matching result is provided to the large language model as reference material for reference answer, and the intrinsic safety analysis path is traced back through the root cause.

[0014] As a preferred solution of the method for generating a safety analysis path based on the nature of the power industry described in the present invention, before obtaining the problem description input by the user, it also includes the steps of constructing an intrinsic safety analysis vector data set: summarizing the historical intrinsic safety analysis problem descriptions; vectorizing the summarized descriptions; and saving the results of the vectorization processing to the vector data set.

[0015] As a preferred solution of the method for generating a safety analysis path based on the nature of the electric power industry described in the present invention, the vectorization processing is performed using a preset vectorization model.

[0016] As a preferred solution of the method for generating a safety analysis path based on the nature of the power industry described in the present invention, the step of summarizing the problem description based on a large language model includes: constructing prompt words according to the problem description and a preset prompt word template; inputting the prompt words into the large language model, and guiding the large language model to generate a summary of the problem based on the prompt words.

[0017] As a preferred solution of the method for generating a safety analysis path based on the nature of the power industry described in the present invention, the step of summarizing the problem description based on a large language model includes: constructing prompt words according to the problem description and a preset prompt word template; inputting the prompt words into the large language model, and guiding the large language model to generate a summary of the problem based on the prompt words.

[0018] As a preferred solution of the method for generating a safety analysis path based on the nature of the power industry described in the present invention, the classification of the root causes includes: human factors, including the mentality of saving energy and the mentality of taking chances; management factors, including department personnel failing to supervise employees in performing their duties in accordance with the standards in place.

[0019] As a preferred solution of the method for generating a safety analysis path based on the nature of the electric power industry described in the present invention, the similarity matching step includes: calculating the similarity between the query vector and the vectors in the vector data set; sorting the calculated similarity results to generate initial matching results; optimizing and screening the initial matching results to obtain final matching results; wherein the final matching results include the root causes related to the problem description and their corresponding intrinsic safety analysis paths.

[0020] In a second aspect, an embodiment of the present invention provides a safety analysis path generation system based on the nature of the power industry, which includes a problem acquisition module to acquire a problem description input by a user;

[0021] A description summary module summarizes the problem description based on a large language model to generate a summary of the problem description;

[0022] A vector generation module, based on a vector model, vectorizes the problem description summary to obtain a query vector;

[0023] A data matching module performs similarity matching on the query vector based on the constructed vector data set to obtain a matching result;

[0024] The path generation module provides the root cause in the matching result as reference material to the large language model, and traces back the intrinsic safety analysis path through the root cause.

[0025] In a third 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 generating a safety analysis path based on the nature of the power industry as described in the first aspect of the present invention are implemented.

[0026] In a fourth 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 generating a safety analysis path based on the nature of the power industry as described in the first aspect of the present invention are implemented.

[0027] The beneficial effects of the present invention are as follows: This application provides a method for generating a safety analysis path based on retrieval to enhance the nature of the power industry, summarizes the problem description through a large language model, ensures the accuracy of the problem description, and thus improves the accuracy of subsequent analysis path generation. The vector model is combined with the constructed vector data set for matching, which shortens the matching time and improves the overall processing speed. There is no need to fine-tune the large language model or fuse the model, which reduces the time required for model training and the consumption of hardware resources, and reduces labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] 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.

[0029] Figure 1 A flow chart of the method for generating a safety analysis path based on the nature of the power industry;

[0030] Figure 2 Computer equipment diagram for safety analysis path generation method based on the nature of the power industry;

[0031] Figure 3 The flowchart of the implementation plan of the safety analysis path generation method based on the nature of the power industry. DETAILED DESCRIPTION

[0032] 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.

[0033] 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.

[0034] 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.

[0035] Example 1

[0036] Reference Figure 1-2 , which is the first embodiment of the present invention, and provides a method for generating a safety analysis path based on the nature of the power industry, including:

[0037] S100: Obtaining a problem description input by a user;

[0038] In the embodiment of the present application, the problem description includes: basic personnel information, event description information, environmental condition information, and event result information;

[0039] The problem description is all the description information obtained when the user's problem is entered through the preset standardized template.

[0040] Specifically, basic personnel information may include the name, job type, qualifications, etc. of the operator; event description information may include the location, time, and process of the incident; environmental condition information may include weather conditions, site conditions, etc.; event result information may include the consequences of the accident, casualties, etc.

[0041] In an optional embodiment, the basic personnel information, event description information, environmental condition information, and event result information may be any combination of data acquired by the personnel management system, event management system, environmental monitoring system, and result evaluation system. For example, when the basic personnel information is the qualification information of the operator, the event result information may be the injury degree evaluation data.

[0042] In an optional embodiment, basic personnel information, event description information, environmental condition information, and event result information can also add or reduce other types of data according to different analysis requirements. For example, when a more comprehensive safety analysis is needed, equipment data (i.e., the fifth type of equipment data) can be added to capture equipment failure characteristics, thereby further improving the accuracy and comprehensiveness of the analysis. In addition, considering the impact of the diversity of operating scenarios on data quality, an adaptive data verification algorithm can also be introduced to dynamically adjust the collected problem descriptions to ensure that high-quality description data can be obtained in various operating scenarios.

[0043] In an optional embodiment, if the environmental condition data does not need to be considered, the environmental condition information can be omitted, thereby reducing the workload of data collection and processing. However, in this application, in order to ensure the comprehensiveness of the analysis, such information is still retained.

[0044] S101: Before obtaining the problem description input by the user, the steps of constructing an intrinsic safety analysis vector data set are also included: summarizing the historical intrinsic safety analysis problem descriptions; vectorizing the summarized descriptions; and saving the vectorized processing results to the vector data set.

[0045] In an embodiment of the present application, constructing an intrinsic safety analysis vector data set includes three main steps: historical problem description summary, vectorization processing, and vector data set storage.

[0046] Specifically, the historical issue description summary uses a large language model to summarize each historical issue, and each summary is controlled within 200 words; the vectorization processing uses a preset vectorization model to convert the summary text into a vector; the vector data set storage uses a specific format to save the vector and related information.

[0047] In an optional embodiment, different summarization strategies can be used when summarizing the description of historical issues. For example, the summary can be made in a fixed format of "time-place-person-event-result", or by "key information extraction" or "element induction".

[0048] In an optional embodiment, different vectorization models may be selected for vectorization processing, for example, a pre-trained general language model may be used for vectorization, a model trained specifically for the power field may be used for vectorization, or a multi-model fusion approach may be used for vectorization.

[0049] It should be noted that the construction process of the above vector dataset is crucial to ensure the accuracy of security analysis. First, through the systematic summary of historical problems, the most critical information can be extracted to avoid redundancy and interference. Secondly, choosing a suitable vectorization model can accurately capture the semantic features of the problem description. Finally, establishing a standardized storage format facilitates subsequent rapid retrieval and matching. This multi-step data processing strategy not only improves the efficiency of the analysis system, but also provides a reliable data foundation for subsequent path generation.

[0050] S200: Based on the vector model, the problem description is summarized and vectorized to obtain a query vector;

[0051] S201: vectorization processing is performed using a preset vectorization model.

[0052] In the embodiment of the present application, the vectorization process is performed using a preset vectorization model. The selection of the vectorization model directly affects the quality of the query vector and the accuracy of subsequent matching.

[0053] Specifically, the preset vectorization model can be a pre-trained model based on the Transformer architecture, a domain adaptation model based on BERT, or a vectorization model specially trained for the power safety field. Model selection needs to consider multiple factors such as computational efficiency, accuracy, and domain adaptability.

[0054] In an optional embodiment, the vectorization model can be selected according to different application scenarios. For example, for simple problem descriptions, a lightweight vectorization model can be used to improve processing speed; for complex professional descriptions, a deeper model can be used to improve accuracy; for terminology in a specific field, a dedicated model that has been adapted to the field can be used.

[0055] In an optional embodiment, the vectorization process may also adopt a multi-model fusion strategy. For example, multiple different vectorization models may be used simultaneously, and then the final vector representation may be obtained by weighted averaging or voting. This method may combine the advantages of different models and improve the robustness of the vector representation.

[0056] It should be noted that vectorization is one of the key steps in this application. Effective vectorization must not only accurately capture the semantic information of the problem description, but also ensure that the distance between vectors can truly reflect the similarity between the problems. By selecting a suitable vectorization model and processing strategy, the accuracy and efficiency of subsequent matching can be significantly improved. In addition, the selection of the vectorization model also needs to consider the hardware conditions and performance requirements of the actual deployment environment, and strike a balance between accuracy and efficiency.

[0057] S300: Based on the constructed vector data set, similarity matching is performed on the query vector to obtain a matching result;

[0058] S301: The similarity matching step includes: calculating the similarity between the query vector and the vectors in the vector data set; sorting the calculated similarity results to generate initial matching results; optimizing and screening the initial matching results to obtain final matching results; wherein the final matching results include the root causes related to the problem description and their corresponding intrinsic safety analysis paths.

[0059] In the embodiment of the present application, similarity matching is divided into three main steps: similarity calculation, sorting and optimization screening. Each step has an important impact on the quality of the final matching result.

[0060] Specifically, similarity calculation can use cosine similarity, Euclidean distance or other measurement methods; sorting processing is based on descending order of calculated similarity values; optimization screening filters out the most relevant matches from the initial results by setting thresholds or other rules.

[0061] In an optional embodiment, the similarity calculation method can be selected according to specific needs. For example, when the similarity of the vector direction is emphasized, the cosine similarity can be selected; when the absolute distance between vectors is emphasized, the Euclidean distance can be selected; when the weights of multiple features need to be considered, the weighted similarity calculation method can be used.

[0062] In an optional embodiment, multiple strategies can be used to optimize the screening. For example, a fixed similarity threshold can be set for screening, or the threshold can be dynamically adjusted according to the similarity distribution, or screening can be performed in combination with expert rules. In addition, the screening rules can also be adjusted by considering factors such as the timeliness and importance of the problem.

[0063] It should be noted that similarity matching is one of the most core links in this solution. A good matching algorithm must not only ensure computational efficiency, but also ensure the accuracy and reliability of the results. By selecting a suitable similarity calculation method, a reasonable sorting strategy, and effective screening rules, the quality of the matching results can be greatly improved. At the same time, the system also needs to be able to handle various boundary situations, such as handling new types of questions, or handling situations where the matching degree is low. In addition, the selection of the matching algorithm also needs to consider the real-time requirements of the system and find a suitable balance between query response time and matching accuracy.

[0064] S400: Provide the root cause in the matching result as reference material to the large language model for reference answer, and trace back the intrinsic safety analysis path through the root cause.

[0065] S401: The step of summarizing the problem description based on the large language model includes: constructing prompt words according to the problem description and a preset prompt word template; inputting the prompt words into the large language model, and guiding the large language model to generate a summary of the problem based on the prompt words.

[0066] In the embodiments of the present application, question summarization based on a large language model is an important preprocessing step, which requires a carefully designed prompt template to guide the model to generate an accurate and concise summary.

[0067] Specifically, the prompt template can include elements such as role definition, task description, and output format to guide the large language model to generate summary content that meets the requirements. For example, if you are an experienced power safety expert, please give a brief summary of the following safety incidents, focusing on the key factors of the incidents.

[0068] In an optional embodiment, the prompt template can be customized according to different types of safety issues. For example, for equipment failure issues, the equipment status and failure symptoms can be emphasized; for personnel violation issues, the violation behavior and working environment can be highlighted; for management defect issues, the management process and system implementation can be focused on.

[0069] In an optional embodiment, the output of the large language model can also be post-processed and optimized. For example, a keyword filtering mechanism can be set to ensure that the summary contains necessary safety elements; text normalization can be applied to unify the expression method; and professional terminology can be used to replace it to improve the accuracy of the description.

[0070] It should be noted that the effective use of large language models is crucial to the successful implementation of this application. First, through reasonable prompt design, the model can be guided to better understand the context of the question and generate accurate summaries. Secondly, the quality of the model output directly affects the subsequent vectorization and matching effects. In addition, in order to improve the reliability of the system, it is also necessary to establish an effective quality control mechanism to ensure the stability and consistency of the model output.

[0071] S402: The step of summarizing the problem description based on the large language model includes: constructing prompt words according to the problem description and a preset prompt word template; inputting the prompt words into the large language model, and guiding the large language model to generate a summary of the problem based on the prompt words.

[0072] In the embodiment of the present application, the generation of summary content needs to take into account the particularities of the power industry to ensure that the output content is both professional and accurate and easy to process later.

[0073] Specifically, the process of generating summary content includes several key steps: first, analyzing the core information in the problem description, then organizing the content according to a predefined format, and finally verifying the accuracy. For example, the summary content should include elements such as "incident type - involved objects - specific manifestations - impact consequences".

[0074] In an optional embodiment, different strategies can be used to generate summary content. For example, an extractive summary method can be used to extract key information directly from the original text; a generative summary method can be used to reorganize the language after understanding the original text; or a hybrid method can be used to combine the advantages of both methods.

[0075] In an optional embodiment, the summary content can also be optimized according to actual needs. For example, importance ratings can be added to mark the urgency of the event; related information can be added to link similar historical cases; and suggested measures can be included to provide preliminary processing directions.

[0076] S403: The classification of root causes includes: human factors, including the mentality of showing off and relying on luck; management factors, including department personnel failing to supervise employees in fulfilling their duties in accordance with the standards in place.

[0077] In the embodiments of the present application, root cause classification is a key step in analyzing the nature of the problem, and it is necessary to comprehensively cover typical factors in the field of power safety.

[0078] Specifically, human factors mainly include reasons related to people's psychological state and behavioral habits, such as the mentality of showing off, relying on luck, and carelessness; management factors mainly include reasons related to system implementation and supervision management, such as inadequate supervision and lax implementation of standards.

[0079] In an optional embodiment, the root causes can be further subdivided into more specific categories. For example, human factors can be further divided into cognitive biases (such as misjudgment of risks), emotional influences (such as lack of concentration due to work pressure), and ability deficiencies (such as insufficient professional skills), etc.; management factors can be subdivided into system defects (such as imperfect rules and regulations), poor execution (such as perfunctory inspections), and poor communication (such as insufficient coordination between departments).

[0080] In an optional embodiment, the root cause analysis can also consider the correlation between factors. For example, a security incident may involve multiple root causes at the same time, and there may be a causal relationship or interaction relationship between these causes. By analyzing these correlations, we can better understand the formation mechanism of the problem and help formulate more targeted improvement measures.

[0081] It should be noted that the construction of the root cause classification system needs to meet the following requirements: first, the classification should be comprehensive and cover the main types of problems in the field of power safety; second, the classification should be clear, with clear boundaries between categories to avoid confusion; third, the classification should be practical to facilitate actual operation and the formulation of improvement measures. At the same time, the classification system should also have a certain degree of flexibility to adapt to new types of problems and evolving safety management needs.

[0082] Exemplarily, a vector dataset of power safety analysis problems is constructed, totaling about 1,000 records, ensuring that multiple problem types (such as personnel violations, equipment failures, etc.) are covered.

[0083] The collected data was labeled and classified to generate a training set of 500 training samples and a validation set of 100 samples. Problem summarization was performed to improve the completeness of the data set. The summarization process included supplementing 300 missing contents, verifying 200 abnormal contents, and correcting 150 erroneous contents. The final training set generated a total of 1,850 complete records.

[0084] It should be noted that the use of summary processing can expand the original 1,000 data samples to 1,850 data samples. This data improvement technology not only helps the model better learn the various characteristics of power safety issues, but also improves the generalization ability of the model in complex scenarios. During the training process, the model will be exposed to more complete problem data, so that it can better identify safety risks hidden in different scenarios.

[0085] Furthermore, the preprocessed data is input into the vectorization model to vectorize the problem description.

[0086] It can be expressed as:

[0087] initialization:

[0088] d[v]=∞(for all nodes v),d[start]=0

[0089] Update similarity:

[0090] d[v]=min(d[v],d[u]+w(u,v))

[0091] Among them, w(u,v) represents the similarity value between vectors (u,v), d[v] represents the current minimum similarity distance with the query vector v, and u represents the currently processed vector.

[0092] It should be noted that the above steps can ensure that the system is not only efficient in the matching process, but also can efficiently find the most similar historical cases to avoid omissions or wrong matches. At the same time, by checking the quality of each matching result, it can ensure that the similar cases found can indeed provide valuable references for the current problem and improve the accuracy and reliability of the overall analysis. In addition, by establishing a clear analysis path, it can provide clear guidance for subsequent safety management work and further improve the efficiency and effectiveness of safety management.

[0093] In the embodiment of the present application, the system architecture adopts a front-end and back-end separation design. The front-end uses the Vue.js framework to develop the interactive interface, and the back-end uses the Spring Boot framework to provide interface services. The database uses MongoDB to store vector data, and Redis is used as a cache layer to improve the system response speed. The system uses Nginx to achieve load balancing to ensure stable operation in high-concurrency scenarios.

[0094] Furthermore, this embodiment also provides a safety analysis path generation system based on the nature of the power industry, including:

[0095] The problem acquisition module obtains the problem description input by the user;

[0096] Description summary module, based on the large language model, summarizes the problem description and generates a summary of the problem description;

[0097] The vector generation module vectorizes the problem description summary based on the vector model to obtain the query vector;

[0098] The data matching module performs similarity matching on the query vector based on the constructed vector data set to obtain the matching result;

[0099] The path generation module provides the root causes in the matching results as reference materials to the large language model, and traces back the intrinsic safety analysis path through the root causes.

[0100] In summary, by structuring the problem description entered by the user (including basic personnel information, event description information, environmental condition information and event result information), and using a preset standardized template for input, the problem description is standardized and normalized. This structured data collection method not only improves the integrity and accuracy of the data, but also lays the foundation for subsequent vector processing, ultimately making the starting point of security analysis more reliable.

[0101] By introducing a large language model to intelligently summarize the problem description and designing a special prompt template to guide the model output, it is possible to accurately refine lengthy and complex problem descriptions. This intelligent summarization method based on a large language model overcomes the problems of traditional manual summarization, which is time-consuming, labor-intensive and of unstable quality, and ensures the input quality of subsequent vectorization processing.

[0102] By constructing an intrinsic safety analysis vector data set and processing it with a preset vectorization model, a high-dimensional feature representation of the problem description is achieved. This vectorization representation method can not only capture the deep semantic features of the problem description, but also support efficient similarity calculation, creating conditions for subsequent accurate matching.

[0103] By designing a multi-level similarity matching mechanism (including similarity calculation, sorting processing and optimization screening), intelligent retrieval of historical cases is achieved. This progressive matching strategy not only improves the accuracy of retrieval, but also ensures the quality of matching results through optimization screening, allowing the system to find the most relevant historical cases.

[0104] By providing the matched root cause as a reference to the large language model and combining it with the preset analysis path, we can trace back from the superficial problem to the essential cause. This analysis method that combines retrieval enhancement and path backtracking avoids the possible hallucination problem of the large language model and ensures the reliability of the analysis results.

[0105] Example 2

[0106] Reference Figure 1 - Figure 3 , which is the second embodiment of the present invention, and this embodiment provides a method for generating a safety analysis path based on the nature of the power industry. In order to verify the beneficial effects of the present invention, scientific demonstration is carried out through economic benefit calculation and simulation experiments.

[0107] The embodiment of the present application provides a method for generating an intrinsic safety analysis path for the power industry based on retrieval enhancement, which can match the root cause of safety based on the user's problem description, thereby automatically generating an intrinsic safety analysis path. The invention content of the present application includes two parts: constructing an intrinsic safety analysis vector data set and constructing an intrinsic safety analysis path generation logic.

[0108] This application provides a method for generating an intrinsic safety analysis path for the power industry based on retrieval enhancement, including:

[0109] Get the problem description entered by the user;

[0110] Based on the large language model, summarize the problem description and generate a summary of the problem description;

[0111] Based on the vector model, the problem description is summarized and vectorized to obtain the query vector;

[0112] Based on the constructed vector data set, find the data corresponding to the top N problem descriptions that best match the query vector, including the root cause, intrinsic safety analysis path, etc.

[0113] The top N matched root causes are provided to the large language model as reference materials for reference answers, and the intrinsic safety analysis path is traced back through the root causes.

[0114] The present application scheme improves the accuracy and efficiency of generating intrinsic safety analysis paths by combining a large language model with a vector model, and does not require fine-tuning of the large language model or model fusion, thereby greatly reducing labor costs.

[0115] The embodiment of the present application provides a method for generating an intrinsic safety analysis path for the electric power industry based on retrieval enhancement. The method can match the root cause of safety based on the user's problem description, thereby automatically generating an intrinsic safety analysis path. Figure 3 The implementation scheme of the present application is shown, and the specific implementation scheme is as follows:

[0116] 1. Constructing intrinsic safety analysis vector data set

[0117] 1.1 Summary of historical problem description

[0118] First, summarize the historical descriptions of intrinsic safety analysis problems based on the large language model, requiring each summary description to be no more than 200 words. The specific steps are as follows:

[0119] Data collection: Collect historical intrinsic safety analysis problem descriptions to ensure that the dataset covers a wide range of application scenarios.

[0120] Problem description summary: Use the large language model to summarize each problem description, extract key information, and generate a summary description of no more than 200 words. For example, for the problem description in the following box, the summary description can be "Strong winds caused tree branches to break and crush the power poles, 10kV ** branch line poles 11 and 12 broke, poles 10 and 13 fell off, and the team members responded quickly after receiving the call from the villagers, but did not take immediate preventive measures."

[0121] 1. Process disposal

[0122] April 15: [** distribution network] 14:42 110kV from ** 10kV from ** branch line No. 1 pole 201 switch zero sequence protection tripped;

[0123] April 15, 14:50: The team members of ** Institute received a call from villagers that the strong wind broke the tree branches and crushed the electric pole;

[0124] April 15, 14:55: ** Institute quickly organized personnel to arrive at the scene for verification;

[0125] 15:30 on April 15: The personnel arrived at the scene and verified that the 10kV ** branch line poles No. 11 and No. 12 were broken, and the conductors of poles No. 10 and No. 13 were detached, and the on-site investigation was immediately carried out;

[0126] 17:25 on April 15: ** arranged personnel to carry out emergency repair reporting, work tickets and other series of work;

[0127] 23:47 on April 15: **, the leader of the power distribution team of **, applied for emergency repair of the broken poles of poles 11 and 12 of the ** branch line, and the conductors of poles 10 and 13 fell off (natural disaster);

[0128] 23:49 on April 15: The 110kV from **10kV from ** branch line No. 1 pole 201 switch rear section line was switched from hot standby to maintenance;

[0129] 04 / 16 17:21: 10kV ** branch line No. 11 and No. 12 poles were broken, and the conductors of No. 10 and No. 13 poles fell off (natural disaster), and the emergency repair was completed;

[0130] At 17:25 on April 16: the 110kV from ** and 10kV from ** branch line No. 1 pole 201 switch rear section line was switched from maintenance to operation. At 18:04, the 10kV from ** branch line No. 1 pole 201 switch rear section line was restored to normal.

[0131] 1.2 Vectorized Processing

[0132] The summarized description is vectorized based on the vector model. The specific steps are as follows:

[0133] Vectorization model selection: Select a suitable vectorization model, such as bge, bcembedding, or OpenAIEmbedding service, to ensure that the model can accurately capture the semantic information of the text.

[0134] Vectorization: Input the summarized description into the vectorization model to generate the corresponding vector representation. For example, the summary description "Strong winds caused tree branches to break and crush the power poles, the 10kV ** branch line poles 11 and 12 broke, the wires of poles 10 and 13 fell off, and the team members responded quickly after receiving the call from the villagers, but did not take preventive measures immediately." is vectorized to obtain vector V.

[0135] Data preservation: Save the generated vectors together with the corresponding description and label data to a file or database for subsequent query use.

[0136] 2. Construct intrinsic safety analysis path generation logic

[0137] 2.1 Summary of User Problem Description

[0138] Summarize the user's problem description based on the large language model, especially simplify the long text problem description. The function is shown in 1.1. The specific steps are as follows:

[0139] Problem description input: The user enters a problem description, for example, "Zhang* was working at the ** branch line construction site on June 18, 2024. He did not use the safety belt correctly to secure himself when working at height, resulting in ** consequences."

[0140] Problem description summary: Use a large language model to summarize the problem description and generate a summary description of no more than 200 words. After summarizing, the description in the above example can be summarized as "Zhang* did not wear a safety belt when working at height, resulting in ** consequences."

[0141] Query vector generation: The summarized description is input into the vectorized model to generate a query vector. For example, the vectorized model generates a vector Q from the summary description "Zhang* did not wear a safety belt when working at height, resulting in ** consequences".

[0142] 2.2 Vector Matching and Refinement

[0143] Based on the constructed vector data set, find the data corresponding to the top N problem descriptions that best match the query vector, including the root cause, intrinsic safety analysis path, etc. The specific steps are as follows:

[0144] Vector matching: Match the query vector Q with the vector V stored in the vector dataset and find the top N vectors closest to Q.

[0145] Fine sorting: Fine sorting is performed on the problem descriptions corresponding to the top N vectors found, and the descriptions with a high degree of match with the query vector are given priority. For example, if the vector matching results are "Workers at heights do not use safety belts" and "Workers at heights do not wear safety helmets", the description with a higher degree of match is selected as "Workers at heights do not use safety belts".

[0146] Data extraction: Extract root causes, intrinsic safety analysis paths and other information from the matching results. For example, extract root causes and intrinsic safety analysis paths as shown in the following table.

[0147]

[0148] 2.3. Automatically generate intrinsic safety analysis path

[0149] The top N root causes matched are provided as reference materials to the large language model for reference answers, and the intrinsic safety analysis path is traced back through the root causes. The specific steps are as follows:

[0150] Reference material provision: The extracted root causes are provided to the large language model as reference material for generating analysis paths. For example, based on the retrieval results, the large model gives the root causes of "Zhang* did not wear a safety belt when working at height, resulting in ** consequences" as "energy-saving mentality", "lucky mentality" and "XX department XX personnel failed to supervise employees in fulfilling their duties in accordance with the standards in place".

[0151] Path generation: In order to avoid the big model illusion problem, this application queries the intrinsic safety analysis path based on the root cause given by the big model and the intrinsic safety analysis vector data set. For example, for the root cause of "energy-saving psychology", the query path is "Intrinsic safety analysis model one person's factor - safety psychology - psychological state - whether there is a bad psychological state - simplifying the work, being bothered, afraid of effort, inconvenience, and muddling through. - Energy-saving psychology".

[0152] 3. Implementation process

[0153] Figure 1 The implementation process of the intrinsic safety analysis path generation method based on retrieval enhancement provided in the embodiment of the present application is shown, and the specific implementation principle of each step is as follows:

[0154] S1: Get the problem description entered by the user

[0155] The user enters a description of the problem, for example, "Zhang* was working at the ** branch line construction site on June 18, 2024. He did not use the safety belt correctly to secure himself when working at height, resulting in ** consequences."

[0156] S2: Construct a prompt based on the problem description and the preset prompt template

[0157] Problem description summary: Use a large language model to summarize the problem description and generate a summary description of no more than 200 words.

[0158] Initial prompt construction: Based on the summarized description, construct the initial prompt. The example is as follows:

[0159] You are an outstanding power safety engineer. Based on [Power Safety Problem Description], please summarize the accident phenomenon from the four dimensions of "human factors", "material factors", "environmental factors" and "management factors", ignoring the time when the accident occurred and the information such as the person who recorded it. It is required to only describe the phenomenon, and no inference of the cause or fabrication of the composition is allowed. The word count should not exceed 200 words.

[0160]

Description of power safety issues

[0161] {{User enters a description of the problem}}

[0162]

Summary of the problem

[0163] {{Problem Description Summary}}

[0164] S3: Query vector generation

[0165] The corresponding prompt words are input into the large language model, and the corresponding large language model is guided to generate a summary of the question based on the prompt words. The summary content is then input into the vectorization model to generate a query vector.

[0166] S4: Vector matching and refinement

[0167] Vector matching: Match the query vector with the vectors stored in the vector dataset and find the top N vectors closest to the query vector.

[0168] Fine sorting: Fine sorting is performed on the problem descriptions corresponding to the top N vectors found, giving priority to descriptions with a high degree of match with the query vector.

[0169] S5: Intrinsically safe analysis path generation

[0170] The matching results are input into the large language model, and the large language model is guided to generate an intrinsic safety analysis path corresponding to the problem based on the target root cause in the query vector and query the vector data set. The prompt word example is as follows.

[0171] You are an outstanding power safety engineer. Based on the [Description of the power safety issue], analyze from the perspective of "human factors" ("material factors" / "environmental factors" / "management factors"), and select one or more root causes of the [Description of the power safety issue] from the [reference reasons]. No fabricated elements are allowed.

[0172]

Description of power safety issues

[0173] {{User enters a description of the problem}}

[0174]

Reference reasons

[0175] {{Root cause of vector matching}}

[0176]

root cause

[0177] Example 3

[0178] This embodiment also provides a computer device, which is applicable to a method for generating a safety analysis path based on the nature of the power industry, 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.

[0179] 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.

[0180] 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.

[0181] 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, including several instructions for a computer device (which can be a personal computer, server, or 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, etc. Various media that can store program codes.

[0182] 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.

[0183] 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.

[0184] 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.

[0185] 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 generating a safety analysis path based on the nature of the power industry, characterized by: include, Get the problem description entered by the user; Based on the vector model, the problem description is summarized and vectorized to obtain a query vector; Based on the constructed vector data set, similarity matching is performed on the query vector to obtain a matching result; The root cause in the matching result is provided to the large language model as reference material for reference answer, and the intrinsic safety analysis path is traced back through the root cause.

2. The method for generating a safety analysis path based on the nature of the electric power industry according to claim 1, characterized in that: Before obtaining the problem description input by the user, the steps of constructing an intrinsic safety analysis vector data set are also included: summarizing the historical intrinsic safety analysis problem descriptions; vectorizing the summarized descriptions; The result of the vectorization processing is saved in a vector data set.

3. The method for generating a safety analysis path based on the nature of the electric power industry according to claim 2, characterized in that: The vectorization processing is performed using a preset vectorization model.

4. The method for generating a safety analysis path based on the nature of the electric power industry according to claim 3, characterized in that: The step of summarizing the problem description based on the large language model includes: constructing prompt words according to the problem description and a preset prompt word template; inputting the prompt words into the large language model, and guiding the large language model to generate a summary of the problem based on the prompt words.

5. The method for generating a safety analysis path based on the nature of the electric power industry according to claim 4, characterized in that: The step of summarizing the problem description based on the large language model includes: constructing prompt words according to the problem description and a preset prompt word template; inputting the prompt words into the large language model, and guiding the large language model to generate a summary of the problem based on the prompt words.

6. The method for generating a safety analysis path based on the nature of the electric power industry according to claim 5, characterized in that: The classification of the root causes includes: human factors, including the mentality of energy-saving and luck; management factors, including department personnel's failure to supervise employees in performing their duties in accordance with the standards in place.

7. The method for generating a safety analysis path based on the nature of the electric power industry according to claim 6, characterized in that: The similarity matching step includes: calculating the similarity between the query vector and the vectors in the vector data set; sorting the calculated similarity results to generate initial matching results; optimizing and screening the initial matching results to obtain final matching results; wherein the final matching results include the root causes related to the problem description and their corresponding intrinsic safety analysis paths.

8. A safety analysis path generation system based on the nature of the electric power industry, based on the safety analysis path generation method based on the nature of the electric power industry according to any one of claims 1 to 7, characterized in that: It also includes a question acquisition module to obtain the question description input by the user; A description summary module summarizes the problem description based on a large language model to generate a summary of the problem description; A vector generation module, based on a vector model, vectorizes the problem description summary to obtain a query vector; A data matching module performs similarity matching on the query vector based on the constructed vector data set to obtain a matching result; The path generation module provides the root cause in the matching result as reference material to the large language model, and traces back the intrinsic safety analysis path through the root cause.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for generating a safety analysis path based on the nature of the power industry according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for generating a safety analysis path based on the nature of the power industry according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Power customer matching method based on pre-training model and vector retrieval

    CN117972023A

  • LLM-based intelligent questioning and answering method, system and equipment in power field and medium

    CN118277521A

  • Intrinsic safety problem analysis method and device, equipment, storage medium and product

    CN118297399A

  • Vector database retrieval method and device based on large model, terminal and medium

    CN118312594A

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

    CN119003742A