A safety analysis path generation method and system based on the nature of the power industry
By combining large language models and vector models in power safety analysis, a vector dataset is constructed for similarity matching, which solves the problems of low accuracy and efficiency in existing power safety analysis and achieves efficient and accurate identification of safety hazards.
Patent Information
- Application Number
- CN202411729077.2
- 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
Existing power safety analysis methods rely on human experience and historical data, making it difficult to comprehensively and timely identify complex and diverse safety hazards. Furthermore, large language models lack corpora in the power field, resulting in limited answer analysis capabilities and high system complexity and cost.
By combining large language models and vector models, an intrinsically safe analysis vector dataset is constructed. Query vectors are used for similarity matching, and root cause backtracking analysis is combined to reduce system complexity and cost.
It improves the accuracy and efficiency of power security analysis, ensures the precision of problem description, shortens matching time, and reduces model training and hardware resource consumption.
Smart Images

Figure CN119646154B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application 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. BACKGROUND
[0002] In the power industry, it is crucial to ensure the essential safety of power systems under normal operation and fault conditions. Although power companies have taken various safety management measures, due to the complexity and diversity of power systems, safety risks still exist. Currently, 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 (LLM) in natural language processing (NLP) field, it provides new possibilities for improving power safety. However, applying large language models to the field of power safety, especially in essential safety analysis, still faces multiple challenges. First, the power safety field has rich professional knowledge, and existing large language models lack sufficient support from the field corpus, resulting in limited answer analysis capabilities. Second, essential safety analysis tasks are often complex and diverse, and different events lack specific universal similarities, making traditional algorithms exhibit strong model data dependency and poor generalization ability when dealing with these complex tasks. Therefore, an automated method is needed to assist power safety workers in analyzing the essential causes of problems in depth to improve the overall safety of power systems. SUMMARY
[0003] In view of the problems existing in the prior art, the present application is proposed.
[0004] Therefore, the present application needs to solve the problem of low accuracy and efficiency of the essential safety analysis path generation method in the power industry, which includes:
[0005] For complex and variable user problem descriptions, there is a lack of effective summarization and analysis methods, resulting in inaccurate essential safety analysis paths.
[0006] When matching problem descriptions with known safety analysis paths, relying on manually written rules or simple text similarity matching methods results in low accuracy and efficiency.
[0007] The large language model needs to be fine-tuned or fused with other models, increasing the complexity and cost of the system.
[0008] In view of the above technical defects, the application provides a safety analysis path generation method based on retrieval enhancement of the essence of the power industry, which combines a large language model and a vector model to efficiently summarize and accurately analyze user problem descriptions, and quickly and accurately find the most matched safety analysis path of the essence of the problem description. This method does not need to fine-tune the large language model or fuse it with other models, reducing system cost and complexity and improving overall accuracy and efficiency.
[0009] To solve the above technical problems, the application provides the following technical solutions:
[0010] In a first aspect, the application embodiment provides a safety analysis path generation method based on the essence 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 dataset, the query vector is subjected to similarity matching to obtain a matching result;
[0013] The root cause in the matching result is provided as reference material to the large language model for reference and answering, and the safety analysis path of the essence is traced back through the root cause.
[0014] As a preferred scheme of the safety analysis path generation method based on the essence of the power industry, before obtaining the problem description input by the user, the method further includes the step of constructing a safety analysis vector dataset: summarizing and processing historical safety analysis problem descriptions; vectorizing the summarized descriptions; and saving the results of the vectorization processing to the vector dataset.
[0015] As a preferred scheme of the safety analysis path generation method based on the essence of the power industry, the vectorization processing is performed using a preset vectorization model.
[0016] As a preferred scheme of the safety analysis path generation method based on the essence of the power industry, the step of summarizing the problem description based on the large language model includes: constructing a prompt according to the problem description and a preset prompt template; and inputting the prompt into the large language model to guide the large language model to generate a summary of the problem based on the prompt.
[0017] As a preferred scheme of the safety analysis path generation method based on the essence of the power industry, the step of summarizing the problem description based on the large language model comprises: constructing a prompt according to the problem description and a preset prompt template; inputting the prompt into the large language model to guide the large language model to generate a summary of the problem based on the prompt.
[0018] As a preferred scheme of the safety analysis path generation method based on the essence of the power industry, the classification of the root cause comprises: human factors, including the ability to save psychology and the psychology of taking chances; management factors, including department personnel not supervising employees according to the in-place standard.
[0019] As a preferred scheme of the safety analysis path generation method based on the essence of the power industry, the step of similarity matching comprises: calculating the similarity between the query vector and the vectors in the vector data set; sorting the calculated similarity results to generate an initial matching result; and optimizing and screening the initial matching result to obtain a final matching result; wherein the final matching result comprises the root cause related to the problem description and the corresponding essential safety analysis path.
[0020] In a second aspect, the embodiments of the present application provide a safety analysis path generation system based on the essence of the power industry, which comprises a problem acquisition module that acquires a problem description input by a user;
[0021] A description summarization module summarizes the problem description based on a large language model to generate a summary of the problem description.
[0022] A vector generation module vectorizes the problem description summary based on a vector model to obtain a query vector.
[0023] A data matching module performs similarity matching on the query vector based on a constructed vector data set to obtain a matching result.
[0024] A path generation module provides the root cause in the matching result as reference material to a large language model and traces back an essential safety analysis path through the root cause.
[0025] In a third aspect, the embodiments of the present application provide a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the computer program instructions are executed by the processor to implement the steps of the safety analysis path generation method based on the essence of the power industry according to the first aspect of the present application.
[0026] In a fourth aspect, the embodiments of the present application provide a computer readable storage medium, which stores a computer program, wherein the computer program instructs a processor to implement the steps of the safety analysis path generation method based on the essence of the power industry according to the first aspect of the present application.
[0027] The present application has the advantages that: the present application provides a safety analysis path generation method based on retrieval and enhancement of the essence of the power industry, which summarizes the problem description through a large language model to ensure the accuracy of the problem description and improve the accuracy of subsequent analysis path generation. The vector model and the constructed vector dataset are matched to shorten the matching time and improve the overall processing speed. The large language model does not need to be fine-tuned or fused with the model, which reduces the time required for model training and hardware resource consumption, and reduces the labor cost. BRIEF DESCRIPTION OF DRAWINGS
[0028] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0029] Figure 1 The flowchart of the safety analysis path generation method based on the essence of the power industry;
[0030] Figure 2 The computer device diagram of the safety analysis path generation method based on the essence of the power industry;
[0031] Figure 3 The flowchart of the safety analysis path generation method based on the essence of the power industry. DETAILED DESCRIPTION
[0032] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific embodiments of the present application will be described in detail below with reference to the drawings.
[0033] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, but the present application can also be implemented in other ways different from the description, and those skilled in the art can make similar generalizations without departing from the essence of the present application, therefore the present application is not limited to the specific embodiments disclosed below.
[0034] Second, the "one embodiment" or "an embodiment" referred to herein means a specific feature, structure, characteristic, or combination of features and / or characteristics described herein that can be included in at least one implementation of the present application. The appearance of the phrase "in one embodiment" in various places in the specification does not necessarily refer to the same embodiment, nor does it necessarily refer to a single alternative implementation or a single alternative implementation in isolation.
[0035] Embodiment 1
[0036] Referring to Figures 1-2 For the first embodiment of the present application, the embodiment provides a safety analysis path generation method based on the essence of the power industry, comprising,
[0037] S100: acquiring a problem description input by a user;
[0038] In the embodiment of the present application, the problem description includes personnel basic information, event description information, environmental condition information, and event result information.
[0039] The problem description is all the description information acquired when the user inputs the problem through a preset standardized template.
[0040] Specifically, the personnel basic information can be information such as the name, type of work, and qualification of the working personnel, the event description information can be information such as the location, time, and process of the event, the environmental condition information can be information such as the weather condition and site condition, and the event result information can be information such as the accident consequence and casualty condition.
[0041] In an optional embodiment, the personnel basic information, the event description information, the environmental condition information, and the event result information can be any combination of data acquired by a personnel management system, an event management system, an environmental monitoring system, and a result evaluation system. For example, when the personnel basic information is qualification information of the working personnel, the event result information can be injury degree evaluation data.
[0042] In an optional embodiment, the personnel basic information, the event description information, the environmental condition information, and the event result information can also increase or decrease other types of data according to different analysis requirements. For example, when a more comprehensive safety analysis is required, 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 influence of the diversity of the working scene on the quality of the data, an adaptive data verification algorithm can also be introduced to dynamically adjust the acquired problem description, so as to ensure that high-quality description data can be obtained under various working scenes.
[0043] In an optional embodiment, if the environmental condition data is not required to be considered, the environmental condition information can be omitted, thereby reducing the workload of data acquisition and processing. However, in the present application, in order to ensure the comprehensiveness of the analysis, such information is still retained.
[0044] S101: Before obtaining the user input question description, a step of constructing an intrinsic safety analysis vector dataset is further included: summarizing the historical intrinsic safety analysis question descriptions; vectorizing the summarized descriptions; saving the vectorization results to the vector dataset.
[0045] In the embodiments of the present application, constructing the intrinsic safety analysis vector dataset includes three main steps: historical question description summarization, vectorization processing, and vector dataset storage.
[0046] Specifically, the historical question description summarization uses a large language model to summarize each historical question, with each summary controlled to be within 200 words; the vectorization processing uses a pre-set vectorization model to convert the summary text into a vector; and the vector dataset storage saves the vector and related information in a specific format.
[0047] In an optional embodiment, different summarization strategies can be used when summarizing historical question descriptions. For example, the summary can be performed in a fixed format of "time-place-person-event-result", or using a "key information extraction" method, or using an "element induction" method.
[0048] In an optional embodiment, different vectorization models can be selected for vectorization processing. For example, a pre-trained general language model can be used for vectorization, or a model specifically trained for the power field can be used for vectorization, or a multi-model fusion method can be used for vectorization.
[0049] It should be noted that the construction process of the above vector dataset is crucial to ensuring the accuracy of safety analysis. First, by systematically summarizing historical questions, the most critical information can be extracted, avoiding redundancy and interference. Second, selecting the appropriate vectorization model can accurately capture the semantic features of the question description. Finally, establishing a standardized storage format helps subsequent quick 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 question description summary is vectorized to obtain a query vector;
[0051] S201: The vectorization processing uses a pre-set vectorization model for processing.
[0052] In the embodiments of the present application, the vectorization processing uses a pre-set vectorization model for processing. 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-training model based on a Transformer architecture, a BERT-based domain adaptation model, 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 specific domain terminology, a domain-adapted special-purpose model can be used.
[0055] In an optional embodiment, the vectorization process can also use a multi-model fusion strategy. For example, multiple different vectorization models can be used simultaneously, and then the final vector representation can be obtained through weighted averaging or voting. This method can combine the advantages of different models to improve the robustness of the vector representation.
[0056] It should be noted that vectorization is one of the key steps in the present application. Effective vectorization not only accurately captures the semantic information of the problem description, but also ensures that the distance between vectors can truly reflect the similarity between problems. By selecting appropriate vectorization models and processing strategies, 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 balance between accuracy and efficiency.
[0057] S300: Based on the constructed vector dataset, 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 dataset; sorting the calculated similarity results to generate an initial matching result; optimizing and screening the initial matching result to obtain a final matching result; wherein the final matching result includes the root cause related to the problem description and the corresponding intrinsic safety analysis path.
[0059] In the embodiments of the present application, similarity matching is divided into three main steps: similarity calculation, sorting processing, and optimization screening. Each step has an important impact on the quality of the final matching result.
[0060] Specifically, the similarity calculation can use cosine similarity, Euclidean distance, or other measurement methods; the sorting processing is based on the descending order of the calculated similarity values; the optimization screening selects the most relevant matching items from the initial results by setting a threshold or other rules.
[0061] In an optional embodiment, the similarity calculation method can be selected according to specific needs. For example, when focusing on the similarity of vector direction, the cosine similarity can be selected; when focusing on the absolute distance between vectors, the Euclidean distance can be selected; when the weights of multiple features need to be considered, a weighted similarity calculation method can be used.
[0062] In an optional embodiment, the optimization screening can adopt various strategies. For example, a fixed similarity threshold can be set for screening, or the threshold can be dynamically adjusted according to the similarity distribution, or the screening can be combined with expert rules. In addition, factors such as timeliness and importance of the problem can be considered to adjust the screening rules.
[0063] It should be noted that similarity matching is one of the most core steps in the present scheme. A good matching algorithm not only ensures the calculation efficiency, but also ensures the accuracy and reliability of the results. By selecting appropriate similarity calculation methods, reasonable sorting strategies 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 conditions, such as handling new problem types or handling cases with low matching degrees. In addition, the selection of the matching algorithm also needs to consider the real-time requirements of the system, and find a suitable balance point between query response time and matching accuracy.
[0064] S400: The root cause in the matching result is provided as reference material to the large language model for reference answering, and the essential safety analysis path is traced back through the root cause.
[0065] S401: The steps of summarizing the problem description based on the large language model include: constructing a prompt according to the problem description and a preset prompt template; inputting the prompt into the large language model to guide the large language model to generate summary content of the problem based on the prompt.
[0066] In the embodiments of the present application, the problem summary based on the large language model is an important preprocessing step, which needs to be guided by a carefully designed prompt template to generate an accurate and concise summary.
[0067] Specifically, the prompt template can include role definition, task description, output format and other elements to guide the large language model to generate summary content that meets the requirements. For example, you are an experienced power safety expert, please briefly summarize the following safety event, focusing on the key factors of the event.
[0068] In an optional embodiment, the prompt template can be customized according to different types of safety issues. For example, for device failure type issues, the device status and failure performance can be emphasized; for personnel violation type issues, the violation behavior and work environment can be highlighted; for management defect type 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 up to ensure that the summary contains essential safety elements; text normalization processing can be applied to unify the expression; professional term replacement can be used to improve the accuracy of the description.
[0070] It should be noted that the effective use of the large language model is crucial to the successful implementation of the present application. First, through reasonable prompt design, the model can be guided to better understand the context of the problem and generate accurate summaries. Second, the quality of the model output directly affects the subsequent vectorization and matching effect. In addition, in order to improve the reliability of the system, an effective quality control mechanism needs to be established 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 a prompt according to the problem description and a preset prompt template; inputting the prompt word into the large language model to guide the large language model to generate summary content for the problem based on the prompt word.
[0072] In the embodiments of the present application, the generation of summary content needs to consider the particularity of the power industry to ensure that the output content is both professional and accurate and easy to process subsequently.
[0073] Specifically, the generation process of the summary content includes several key steps: first, analyze the core information in the problem description, then organize the content according to the predefined format, and finally verify the accuracy. For example, the summary content should include elements such as "event type - involved object - specific performance - impact consequences".
[0074] In an optional embodiment, the generation of summary content can use different strategies. For example, an extractive summarization method can be used to directly extract key information from the original text; a generative summarization method can be used to reorganize the language after understanding the original text; a hybrid method can also 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, an importance rating can be added to indicate the urgency of the event; related information can be added to link similar historical cases; suggestions can be included to provide preliminary handling directions.
[0076] S403: The classification of root causes includes human factors, including the desire to show off and the psychology of taking chances; management factors, including the failure of department personnel to supervise employees in accordance with the in-place standards.
[0077] In the embodiments of the present application, the classification of root causes is a key link in analyzing the nature of the problem, and needs to comprehensively cover the typical factors in the field of power safety.
[0078] Specifically, human factors mainly include reasons related to the psychological state and behavior habits of personnel, such as the desire to show off, the psychology of taking chances, and carelessness; management factors mainly include reasons related to system execution and supervision management, such as inadequate supervision and lax standard execution.
[0079] In an optional embodiment, the root cause can be further classified into more specific categories. For example, human factors can be further divided into cognitive biases (such as incorrect judgments of risks), emotional influences (such as work stress leading to inattention), and ability deficiencies (such as insufficient professional skills); management factors can be further classified into system defects (such as imperfect rules and regulations), weak execution (such as superficial checks), and poor communication (such as insufficient inter-department coordination).
[0080] In an optional embodiment, the root cause analysis can also consider the relevance between factors. For example, a safety incident may involve multiple root causes, and there may be causal or interactive relationships between these causes. By analyzing these relevance, the formation mechanism of the problem can be better understood, which helps to develop 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, covering the main problem types 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, facilitating actual operation and the development of improvement measures. At the same time, the classification system should also have a certain flexibility to adapt to new problem types and the evolving needs of safety management.
[0082] For example, a vector data set for analyzing power safety problems is constructed, totaling about 1000 records, ensuring the coverage of various problem types (such as personnel violations and equipment failures).
[0083] The collected data is labeled and classified, generating a training set of 500 training samples and a validation set of 100 samples. The problem summary process is performed to improve the integrity of the data set, in which 300 missing contents are supplemented, 200 abnormal contents are verified, and 150 error contents are corrected, finally generating a total of 1850 complete records in the training set.
[0084] It should be noted that using the summary process can expand the original 1000 data samples to 1850 data samples. This data completion technology not only helps the model to better learn various features of power safety problems, 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 hidden safety risks in different scenarios.
[0085] Further, the preprocessed data is input into the vectorization model for problem description vectorization.
[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] Where 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, avoiding missing or false matching. At the same time, through the quality inspection of each matching result, it can be ensured that the similar cases found can indeed provide valuable reference for the current problem, 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, further improving the efficiency and effectiveness of safety management.
[0093] In the embodiments 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 as a cache layer to improve system response speed. The system realizes load balancing through Nginx to ensure stable operation in high-concurrency scenarios.
[0094] Further, the present embodiment also provides a safety analysis path generation system based on the essence of the power industry, comprising,
[0095] A problem acquisition module acquires the problem description input by the user;
[0096] The description summary module summarizes the problem description based on a large language model to generate a summary of the problem description.
[0097] The vector generation module vectorizes the problem description summary based on a vector model to obtain a query vector.
[0098] The data matching module performs similarity matching on the query vector based on the constructed vector dataset to obtain a matching result.
[0099] The path generation module provides the matching result to the large language model as reference material and traces the essential safety analysis path based on the root cause.
[0100] In summary, by structuring the user input problem description (including personnel basic information, event description information, environmental condition information, and event result information) and using a pre-set standardized template for input, the problem description is standardized and standardized. This structured data collection method not only improves the completeness and accuracy of the data, but also lays a foundation for subsequent vectorization processing, ultimately making the starting point of safety 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, the long and complex problem description is accurately refined. This intelligent summary based on a large language model overcomes the time-consuming and labor-intensive problems of traditional manual summary and ensures the quality of input for subsequent vectorization processing.
[0102] By constructing an essential safety analysis vector dataset and using a pre-set vectorization model for processing, high-dimensional feature representation of the problem description is achieved. This vectorization representation method not only captures the deep semantic features of the problem description, but also supports 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, so that the system can find the most relevant historical cases.
[0104] By providing the matched root cause as reference material to the large language model and combining the pre-set analysis path, the trace from the superficial problem to the essential cause is achieved. This analysis method combining retrieval enhancement and path tracing avoids the possible illusion problem of the large language model and ensures the reliability of the analysis result.
[0105] Embodiment 2
[0106] Reference Figure 1 -Figure 3 For the second embodiment of the application, the embodiment provides a method for generating an intrinsically safe analysis path based on the safety analysis path of the power industry. In order to verify the beneficial effects of the application, economic benefit calculation and simulation experiments are used for scientific demonstration.
[0107] The embodiment of the application provides a method for generating an intrinsically safe analysis path based on retrieval enhancement in the power industry. The method can match the safety root cause based on the user's problem description, thereby automatically generating an intrinsically safe analysis path. The application content includes two parts: constructing an intrinsically safe analysis vector dataset and constructing an intrinsically safe analysis path generation logic.
[0108] The application provides a method for generating an intrinsically safe analysis path based on retrieval enhancement in the power industry, which includes:
[0109] Obtaining a problem description input by a user;
[0110] Summarizing the problem description based on a large language model to generate a summary of the problem description;
[0111] Vectorizing the problem description summary based on a vector model to obtain a query vector;
[0112] Based on the constructed vector dataset, finding the topN problem description corresponding data including root causes, intrinsically safe analysis paths, etc. that best match the query vector;
[0113] Providing the topN matched root causes as reference materials to the large language model for reference answers, and tracing back the intrinsically safe analysis path through the root causes.
[0114] The application scheme improves the accuracy and efficiency of the intrinsically safe analysis path generation by combining the large language model and the vector model, and does not need to fine-tune or fuse the large language model, greatly reducing the labor cost.
[0115] The embodiment of the application provides a method for generating an intrinsically safe analysis path based on retrieval enhancement in the power industry. The method can match the safety root cause based on the user's problem description, thereby automatically generating an intrinsically safe analysis path. Figure 3 The embodiment of the application is shown, and the specific implementation is as follows:
[0116] 1. Constructing an intrinsically safe analysis vector dataset
[0117] 1.1 Summary of historical problem description
[0118] First, summarize the historical intrinsically safe analysis problem description based on a large language model, and require each summarized description to be no more than 200 words. The specific steps are as follows:
[0119] Data collection: Collect historical intrinsically safe analysis problem descriptions, ensuring that the dataset covers a wide range of application scenarios.
[0120] Problem description summary: Use a large language model to summarize each problem description, extracting key information and generating 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 compress the power poles, resulting in 10kV from ** Branch Line 11, 12 poles breaking, and 10, 13 poles losing wires. After receiving a call from a villager, the team members responded quickly, but did not immediately take preventive measures."
[0121] 1. Process disposal
[0122] April 15th:
Distribution network
[0123] April 15th 14:50: The team members of ** station received a call from a villager that strong winds blew tree branches and broke the power poles;
[0124] April 15th 14:55: ** station quickly organized personnel to arrive at the scene for verification;
[0125] April 15th 15:30: Personnel arrived at the scene and found that 10kV from ** Branch Line 11, 12 poles were broken, and 10, 13 poles lost wires, and immediately carried out on-site investigation;
[0126] April 15th 17:25: ** station arranged personnel to carry out emergency repair reporting, work tickets and other series of work;
[0127] April 15th 23:47: The distribution team leader of ** station applied for 10kV from ** Branch Line 11, 12 poles broken, and 10, 13 poles lost wires (natural disaster) emergency repair;
[0128] April 15th 23:49: Start executing 110kV from ** 10kV from ** Branch Line 1 Pole 201 switch rear section line from hot standby to maintenance;
[0129] April 16th 17:21: 10kV from ** Branch Line 11, 12 poles broken, and 10, 13 poles lost wires (natural disaster) emergency repair is completed;
[0130] April 16th 17:25: Execute 110kV from ** 10kV from ** Branch Line 1 Pole 201 switch rear section line from maintenance to operation, and 10kV from ** Branch Line 1 Pole 201 switch rear section line is restored to normal at 18:04.
[0131] 1.2 Vectorization processing
[0132] Vectorization processing of summarized descriptions based on vector models, specific steps as follows:
[0133] Vector model selection: Select appropriate vector model, such as bge, bcembedding or OpenAIEmbedding service, etc., to ensure that the model can accurately capture the semantic information of the text.
[0134] Vectorization processing: Input the summarized description into the vectorization model to generate the corresponding vector representation. For example, the summarized description "Strong wind weather causes tree branches to break and press down power poles, 10kV from ** branch line No. 11 and No. 12 poles occur, 10 No. pole and 13 No. pole conductor falls off, after the villagers call the team members respond quickly, but did not immediately take preventive measures." After vectorization, the vector V is obtained.
[0135] Data saving: Save the generated vector together with the corresponding description and label data to file or database for subsequent query use.
[0136] 2. Constructing essential safety analysis path generation logic
[0137] 2.1 Summarization of user problem description
[0138] Summarize the user's problem description based on large language model, especially for long text problem description, function as shown in 1.1, specific steps as follows:
[0139] Problem description input: User input problem description, such as "Zhang * worked in ** branch line construction site on June 18, 2024, and did not use safety belt correctly during climbing operation, resulting in ** consequences".
[0140] Problem description summary: Use large language model to summarize the problem description, generate summary description not more than 200 words, after summarization, the example description can be summarized as "Zhang * did not wear safety belt during climbing operation, resulting in ** consequences".
[0141] Query vector generation: Input the summarized description into the vectorization model to generate the query vector. For example, the vectorization model generates the vector Q from the summarized description "Zhang * did not wear safety belt during climbing operation, resulting in ** consequences".
[0142] 2.2 Vector matching and precision sorting
[0143] Based on the constructed vector dataset, find the topN problem descriptions corresponding to the query vector, including root cause, essential safety analysis path, etc., specific steps as follows:
[0144] Vector matching: match the query vector Q with the vectors V stored in the vector dataset, and find the topN vectors closest to Q.
[0145] Fine-tuning processing: fine-tune the problem descriptions corresponding to the topN vectors found, and preferentially select the descriptions with high matching degrees with the query vector. For example, if the vector matching result is "high-altitude worker does not use safety belt" and "high-altitude worker does not wear safety helmet", select the one with higher matching degree "high-altitude worker does not use safety belt".
[0146] Data extraction: extract the root cause, essential safety analysis path, etc. from the matching result. For example, extract the root cause and essential safety analysis path as shown in the following table.
[0147]
[0148] 2.3. Automatically generating essential safety analysis path
[0149] The topN root causes matched are provided as reference materials to the large language model for reference answers, and the essential safety analysis path is traced back through the root cause. The specific steps are as follows:
[0150] Reference material provision: provide the extracted root cause to the large language model as reference material for generating analysis path, for example, the large model gives the root cause of "Zhang * does not use safety belt during high-altitude operation, leading to ** consequences" as "provincial energy psychology" "lucky psychology" and "XX department XX personnel does not supervise employees to fulfill their responsibilities according to the in-place standard".
[0151] Path generation: in order to avoid the illusion problem of the large model, the application queries the essential safety analysis path based on the essential safety analysis vector dataset based on the root cause given by the large model. For example, for the "provincial energy psychology" root cause, the query path is "essential safety analysis model one factor - safety psychology - psychological state - whether there is a bad psychological state - is a simplified operation, lazy, afraid of hard work, inconvenient, and just getting by. - provincial energy psychology".
[0152] 3. Implementation process
[0153] Figure 1 The implementation process of the essential safety analysis path generation method based on retrieval enhancement provided by the embodiment of the application is shown, and the specific implementation principles of each step are as follows:
[0154] S1: Obtain the user input problem description
[0155] The user inputs the problem description, for example, "Zhang * worked at ** branch line construction site on June 18, 2024, and did not use safety belt correctly during high-altitude operation, leading to ** consequences".
[0156] S2: Constructing the 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, generating a summary description of no more than 200 words.
[0158] Initial prompt construction: Based on the summarized description, construct an initial prompt, for example:
[0159] You are an excellent power safety engineer, based on
power safety problem description
[0160]
Power safety problem description
[0161] {{User input problem description}}
[0162]
Problem summary
[0163] {{Problem description summary}}
[0164] S3: Query vector generation
[0165] Input the prompt word into the large language model, guide the large language model to generate the summary content of the problem based on the prompt word, and input the summary content into the vectorization model to generate the query vector.
[0166] S4: Vector matching and fine sorting
[0167] Vector matching: Match the query vector with the vectors stored in the vector data set, find the topN vectors closest to the query vector.
[0168] Fine sorting: Fine sorting processing is performed on the problem description corresponding to the topN vectors found, and the description with high matching degree with the query vector is preferentially selected.
[0169] S5: Intrinsic safety analysis path generation
[0170] Input the above matching results into the large language model, guide the large language model to generate the intrinsic safety analysis path corresponding to the problem based on the target root cause in the query vector and the query vector data set. The prompt word example is as follows.
[0171] You are an excellent power safety engineer, based on
power safety problem description
power safety problem description
referenceable reasons
[0172]
power safety problem description
[0173] {{user input problem description}}
[0174]
referenceable reasons
[0175] {{vector matching root cause}}
[0176]
root cause
[0177] Embodiment 3
[0178] The embodiment also provides a computer device suitable for the case of the safety analysis path generation method based on the essence of the power industry, including 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 power distribution network forced oscillation detection and positioning method proposed in the above embodiment.
[0179] The embodiment also provides a storage medium having a computer program stored thereon, which is executed by a processor to realize the power distribution network forced oscillation detection and positioning method proposed in the above embodiment.
[0180] 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 through a system bus. Among them, the processor of the computer device is used to provide computing and control ability. 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 for wired or wireless communication with external terminals, and the wireless mode can be realized through WIFI, 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, and the input device of the computer device can be a touch layer overlaid on the display screen, or a key, trackball or touchpad arranged on the shell of the computer device, or an external keyboard, touchpad or mouse, etc.
[0181] If a function is implemented as 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 this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0182] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a processor-included system, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device.
[0183] More specific examples (a non-exhaustive list) of computer-readable media include: electrical connections (electronic devices) having one or more wires, portable computer disk drives (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0184] 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, by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, and in another embodiment, any of the following technology, known in the art, or combinations thereof, can be used: discrete logic circuitry having logic gates for implementing logic functions upon an application of data signals, application specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field programmable gate arrays (FPGA), and the like.
[0185] It should be noted that the above examples are only used to illustrate the technical solutions of the present application but not limit the present application. 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, which should be covered by the claims of the present application.
Claims
1. A method for generating a safety analysis path based on the essence of the power industry, characterized in that: include, Obtain the user's input description of the problem; Before obtaining the user-inputted question description, the process also includes the step of constructing an intrinsic safety analysis vector dataset: summarizing and processing historical intrinsic safety analysis question descriptions; vectorizing the summarized descriptions; and saving the results of the vectorization process to the vector dataset. Based on the vector model, the problem description is summarized and vectorized to obtain the query vector; Based on the constructed vector dataset, similarity matching is performed on the query vector to obtain the matching results; The similarity matching steps include: calculating the similarity between the query vector and the vectors in the vector dataset; sorting the calculated similarity results to generate initial matching results; optimizing and filtering 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; The root causes in the matching results are provided as reference data to the large language model for reference in answering, and the intrinsic safety analysis path is traced back through the root causes.
2. The method for generating a safety analysis path based on the essence of the power industry as described in claim 1, characterized in that: The vectorization process is performed using a preset vectorization model.
3. The method for generating a safety analysis path based on the essence of the power industry as described in claim 2, characterized in that: The steps for summarizing the problem description based on the large language model include: constructing prompts based on the problem description and a preset prompt template; inputting the prompts into the large language model, guiding the large language model to generate a summary of the problem based on the prompts.
4. The method for generating a safety analysis path based on the essence of the power industry as described in claim 3, characterized in that: The root causes are categorized as follows: human factors, including a desire to save energy and a sense of complacency; and management factors, including departmental staff failing to supervise employees' performance of their duties in accordance with established standards.
5. A safety analysis path generation system based on the essence of the power industry, based on the safety analysis path generation method based on the essence of the power industry as described in any one of claims 1 to 4, characterized in that: It also includes a problem retrieval module, which retrieves the problem description input by the user; The description and summary module, based on a large language model, summarizes the problem description and generates a summary of the problem description. The vector generation module, based on the vector model, summarizes and vectorizes the problem description to obtain the query vector; The data matching module performs similarity matching on the query vector based on the constructed vector dataset to obtain the matching results; The path generation module provides the root cause in the matching results as reference material to the large language model, and traces back the intrinsic safety analysis path through the root cause.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the security analysis path generation method based on the essence of the power industry as described in any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the security analysis path generation method based on the essence of the power industry as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Power customer matching method based on pre-training model and vector retrieval
CN117972023A
Vector database retrieval method and device based on large model, terminal and medium
CN118312594A