Equipment defect grading system and method based on large language model
By designing a device defect rating system based on the agent large language model, combined with auxiliary plug-ins and planning actuators, the problem of inaccurate and inability to guide the defect rating description of the main equipment of the power grid is solved, and a more accurate and generalized defect rating effect is achieved.
Patent Information
- Application Number
- CN202510284832.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-11
- Publication Date
- 2025-06-17
AI Technical Summary
The existing defect grading methods for power grid main equipment have problems such as inaccurate description, inability to guide and difficult to meet the defect grading requirements of power grid main equipment.
A device defect rating system based on the agent large language model is designed, combining auxiliary plug-ins and planning executors to achieve accurate level of device defects, and enhance generalization, solve numerical calculation problems, alleviate output structure problems, and improve interpretability and traceability capabilities.
This method can more accurately rank equipment defects, improve generalization and numerical judgment accuracy, and alleviate the problems of poor interpretability and output structure of large language models.
Smart Images

Figure CN120162628A_ABST
Abstract
Description
Technical Field
[0001] The present invention proposes a device defect grading system and method based on a large language model, belonging to the technical field of power grid simulation. Background Art
[0002] Currently, there are mainly three solutions for the task of grading the defects of main power grid equipment: Solution 1: A defect grading model based on a deep learning classifier; this type of method uses a pre-trained language model such as BERT to encode the defect description text, map it to a high-dimensional semantic space, obtain a vector, and then train a three-classifier to output the defect level according to the defect description vector. The CrossEntropy loss function is used to calculate the loss of the model, and the optimizer is used to improve the prediction effect of the model. The advantage of this method is that it has strong semantic representation ability, can perform parallel computing, and has high efficiency. It is suitable for scenarios with a large amount of labeled data.
[0003] Solution 2: A defect grading model based on large language model prompt engineering; this method activates the capabilities related to power equipment of the large language model by constructing a prompt provided to the large language model. Then, combined with the device defect description input by the user, the knowledge of the large language model itself is used to grade the defects. The advantage of this method is that it can utilize the extensive knowledge of the large model during the learning process and is helpful for the defect grading problem. In addition, the logic of the large language model for answering defect grading is different from that of the method based on a deep learning classifier.
[0004] Solution 3: A defect grading model based on machine learning; this method relies on the decision tree model Xgboost of machine learning to traverse all the defect states of all main equipment, construct one or more decision trees, split the user input into components during prediction, input them into the decision tree, and finally output the device defect level. The advantage of this method is that it has strong interpretability, a transparent reasoning path, a low algorithm update cost, is easy to obtain timely feedback from users and improve the model, and is suitable for processing batch-standard structured defect description texts.
[0005] The above three solutions have different usage scenarios, and the problems and deficiencies they bring are also different: Solution 1 is based on deep learning and requires a large amount of labeled data for supervised learning. Considering that in the field of power NLP, the labeled data for equipment defect grading is a huge gap. Moreover, this method has certain requirements for the quantity and richness of the labeled data. Therefore, the cost of constructing the labeled data is high, the cycle is long, and the benefits are small. Solution 2 is based on the method of large language model prompt engineering and has two main drawbacks. One is that the capabilities of the large language model activated only through prompt information have limited improvement in the field of power equipment. On the other hand, the understanding of the reference standard also stays at the understanding ability of the large model itself in the general field. Solution 3 constructs a decision tree relying on the work experience of a large number of experts. Moreover, the model network is too simple, the recognition accuracy is limited, and the robustness is poor. At the same time, it is difficult for the model to directly process unstructured text and needs to rely on tools such as NER to identify equipment names, component names, and part names, resulting in error propagation and ultimately affecting the defect level.
[0006] The existing models have inaccurate descriptions of the defect grading of power grid main equipment and cannot play a guiding role, especially cannot meet the needs of the defect grading of power grid main equipment. Therefore, a more accurate equipment defect grading method is needed. Summary of the Invention
[0007] To solve the problems existing in the prior art, the present invention proposes a device defect grading system and method based on a large language model considering device probability failures. By designing a defect grading framework based on an agent large language model and integrating auxiliary plugins and a planning executor, accurate grading of device defects is achieved, while generalization is enhanced, numerical calculation problems are solved, output structure problems are alleviated, and interpretability and traceability capabilities are improved.
[0008] To solve the above technical problems, the technical solutions adopted by the present invention are as follows: In a first aspect, the present invention provides a device defect grading system based on a large language model, including: A large language model, which is used to respond to a user instruction, generate a command for calling the knowledge base retrieval and corresponding retrieval keywords according to the device and phenomenon descriptions corresponding to the user instruction, and then call the knowledge base to retrieve the defect grading standard related to the user instruction; it is also used to send a call instruction based on the defect grading standard and the user instruction to obtain additional information or numerical comparison for auxiliary grading; according to the defect grading standard, the obtained additional information or numerical comparison information, obtain the final predicted defect level; An auxiliary plugin, which is used to provide the additional information or perform numerical comparison information; A planning executor for invoking the auxiliary plug-in according to the invocation instruction sent by the large language model and feeding back the invocation result to the large language model.
[0009] As a further improvement of the present invention, the auxiliary plug-in includes: A retrieval plug-in for constructing a relevant knowledge base and defect grading criteria based on defect grading criteria knowledge and using vector retrieval methods and inverted indexes; A calculation plug-in for performing numerical comparisons based on a numerical comparison calculator; A status query plug-in for querying device status information.
[0010] As a further improvement of the present invention, the auxiliary plug-in further includes: A structured detection and repair plug-in for detecting and repairing the output format of the large language model.
[0011] As a further improvement of the present invention, the structured detection and repair plug-in is used to repair the following format errors: 1) Supplement missing end identifiers; 2) Supplement missing delimiter symbols; 3) Delete redundant line breaks; 4) Correct the representation of special characters.
[0012] As a further improvement of the present invention, the large language model is trained based on existing defect grading criteria, and by obtaining the phenomenon descriptions around the defect grading criteria and the corresponding defect grading results. After training, the large language model can judge the operations to be performed based on the current information and complete defect grading.
[0013] As a further improvement of the present invention, the large language model is based on an agent-based approach, and different Prompt templates need to be designed for different states and stages in the training data.
[0014] As a further improvement of the present invention, the training data of the large language model includes retrieving key devices and description words extracted from the user's defect descriptions, judging whether to obtain status values based on the standards and descriptions, and whether to extract key values for auxiliary comparison, and then performing defect level determination; the training method adopts a full-parameter training form.
[0015] As a further improvement of the present invention, the large language model also includes a process of field restrictions on the output operation function name, operation selection, and conclusion, specifically including: Weighting the fields of the operation function name, operation selection, and conclusion, adding special identifiers on both sides of the corresponding field content, and then calculating the loss; the loss function is:
[0016]
[0017] Among them, O is the output part; P( ) is the correct probability; Q( ) is the predicted probability of under the condition of known ; is the loss weight of the special field; is the serial number of the special field.
[0018] As a further improvement of the present invention, the defect levels of the final prediction are divided into three levels: general, serious, and critical.
[0019] In a second aspect, the present invention provides a method for classifying device defects based on a large language model, including: Responding to a user instruction, and generating a command for invoking knowledge base retrieval and corresponding retrieval keywords according to the device and phenomenon descriptions corresponding to the user instruction; Then invoking the knowledge base to retrieve the defect classification criteria related to the user instruction; Based on the defect classification criteria and the user instruction, sending an invocation instruction to obtain additional information or numerical comparison for auxiliary classification; According to the defect classification criteria, the obtained additional information or numerical comparison information, obtaining the final predicted defect level.
[0020] In a third aspect, the present invention provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, it implements the method for classifying device defects based on a large language model considering the probability of device failure.
[0021] In a fourth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method for classifying device defects based on a large language model considering the probability of device failure.
[0022] In a fifth aspect, the present invention provides a computer program product, where the computer program product includes computer instructions, and the computer instructions direct a computer to execute the method for classifying device defects based on a large language model considering the probability of device failure.
[0023] The beneficial effects of the present invention compared with the prior art are: The present invention designs a defect grading framework based on an agent large language model, which can extract retrieval keywords such as devices and phenomena based on the described phenomena, and use these keywords to retrieve corresponding entries in the knowledge base. This method has a certain generalization ability in defect description and can handle various descriptions of different devices and phenomena. The large language model is introduced to utilize the ability of plugins, especially the calculator plugin, to solve the numerical calculation problem in defect grading. This method gets rid of the low generalization of relying on the correlation between words for numerical comparison and improves the accuracy and generalization of numerical judgment. The process of the large language model gradually solving the defect grading problem, including steps such as extracting retrieval keywords based on the description, obtaining the corresponding grading criteria based on the knowledge base retrieval, and judging the defect level based on relevant knowledge and description, is traceable and explainable. This alleviates the problem of poor interpretability and difficulty in traceability of the large language model to a certain extent.
[0024] By using a structured detection plugin and a structured repair plugin to parse and repair the json content output by the large language model, the inevitable output structuring problem of the large language model is alleviated. At the same time, the content of the fields in the label is weighted to make the large language model pay more attention to the accuracy of the field content. Brief Description of the Drawings
[0025] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following introduces the accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings below are only for conveniently and clearly presenting some embodiments of the technical solutions in the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.
[0026] Figure 1 It is a flowchart of a method for grading device defects based on an agent and a power cognitive large language model Figure 2 It is an example diagram of defect grading provided by an embodiment of the present invention; Figure 3 It is an example of a training data prompt word provided by an embodiment of the present invention. Detailed Embodiments
[0027] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention. For the step numbers in the following embodiments, they are only set for the convenience of explanation and illustration, and no limitation is imposed on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0028] In the description of the present invention, unless otherwise clearly defined, words such as "set", "installed", "connected", etc. should be understood in a broad sense. Those skilled in the art can reasonably determine the specific meanings of the above words in the present invention in combination with the specific content of the technical solution.
[0029] Explanation of related terms A large language model (LLM for short) is a deep learning architecture that is trained based on a vast corpus of text. It can simulate human language logic and knowledge structure to generate natural language text. The working principle of a large language model generally includes three main steps: preprocessing, modeling, and text generation. In the preprocessing stage, operations such as tokenizing the corpus, removing stop words, and converting case are performed to facilitate the model's better understanding of the text. In the modeling stage, the model learns language rules from the data in the corpus through machine learning algorithms. These rules are encoded as parameters in the neural network, forming the "language understanding" and "language generation" capabilities of the large language model. In the text generation stage, when the model receives the input context, it uses the learned language rules to generate a response.
[0030] An agent refers to an intelligent entity that can autonomously perceive the environment and take actions to achieve goals. It usually acts in an intelligent manner, can perceive the environment, autonomously take actions to achieve goals, and can improve its performance by learning or acquiring knowledge. In the field of artificial intelligence, agents are widely used in various intelligent systems, such as intelligent robots and intelligent customer service.
[0031] The first object of the present invention is to provide a device defect grading system based on a large language model, including: A large language model, which is used to respond to a user instruction, and based on the device and phenomenon description corresponding to the user instruction, generate a command for invoking the knowledge base retrieval and corresponding retrieval keywords, and then call the knowledge base to retrieve the defect grading criteria related to the user instruction; it is also used to send a call instruction based on the defect grading criteria and the user instruction to obtain additional information or numerical comparison for auxiliary grading; according to the defect grading criteria, the obtained additional information or numerical comparison information, obtain the final predicted defect level; An auxiliary plugin for providing the additional information or performing numerical comparison information; A planning executor for calling the auxiliary plugin according to the call instruction sent by the large language model and feeding back the call result to the large language model.
[0032] The present invention is a specific application for the large language model. The large language model first receives a user instruction, parses out key information such as devices and phenomena in the description, and forms retrieval keywords. These keywords are used to retrieve relevant defect grading criteria in the knowledge base. According to the retrieved defect grading criteria, the large language model can further determine whether additional information or numerical comparison is required to assist in grading. If additional information or numerical comparison is needed, the large language model will send a call instruction to call the corresponding auxiliary plugin through the planning executor.
[0033] Among them, the auxiliary plugin (such as a calculator plugin, a structured detection plugin, a structured repair plugin, etc.) provides necessary information or performs numerical calculations according to the call instruction of the large language model to support the defect grading process. Instruction execution and result feedback: The planning executor is responsible for receiving the call instruction of the large language model, calling the corresponding auxiliary plugin, and feeding back the execution result of the plugin to the large language model for subsequent defect grading judgment.
[0034] The following will further elaborate on the present invention in conjunction with the accompanying drawings and specific embodiments.
[0035] The device defect grading method based on an agent and a large language model proposed by the present invention is a defect grading method that uses multiple plugins with the large language model.
[0036] As Figure 1 shown, the framework of the method of the present invention includes: Step 1. First, utilize the defect grading standard knowledge, use the vector retrieval method and the inverted index to construct the relevant knowledge base and the defect grading standard query plugin, and design plugin function functions such as a calculator, device status query, structured data detection and repair.
[0037] Step 2. Input the user's question into the large language model and make a task plan using the large language model.
[0038] Preferably, in actual operation, first generate a command for calling the knowledge base retrieval and the corresponding retrieval keywords according to the corresponding device and phenomenon description, and then call the knowledge base to retrieve the defect grading criteria related to the user's question.
[0039] 3. After the large language model obtains the relevant criteria and the user's question, comprehensively judge whether additional information acquisition or numerical comparison is required for auxiliary grading when performing defect grading.
[0040] Furthermore, if status information such as relative temperature difference needs to be obtained, a status query plugin needs to be called to collect the corresponding information. Subsequently, if numerical comparison is required, an additional numerical comparison calculator (which can be implemented by a program, and the large language model only needs to call the program and pass parameters) is called based on the numerical parts of the user's question and relevant information for auxiliary grading.
[0041] 4. During the process of calling the large language model, the large language model is required to output structured JSON format data. Therefore, a plugin for JSON data structuring detection and structuring repair is also designed to detect and repair the output format of the large language model, improving the robustness of data flow transmission in the overall framework.
[0042] It should be noted that, compared with the calculation plugin and the status query plugin, the detection and repair plugin is called by the planning executor to detect the output of the large language model rather than the large language model itself. Therefore, it does not participate in the training process and only targets the inference process.
[0043] Specifically, the present invention repairs several common JSON format errors, as exemplified below: 1) Supplement the missing end identifier} or ] 2) Supplement the missing delimiter “ or, 3) Delete the redundant line break \n 4) Correct the representation of special characters, such as characters like null, Null, True, TRUE, etc. 5. Finally, the large language model returns the predicted defect level according to the numerical comparison result, as Figure 1 shown in the flowchart.
[0044] Regarding the construction method of training data, the present invention is based on the existing defect grading standards, and semi-automatically obtains the phenomenon descriptions and corresponding defect grading results around the defect grading standards through manual and large language model means. In addition, since the large language model is based on an agent-based approach, the present invention also needs to design different Prompt templates for different states and stages in the training data.
[0045] As an example, when dealing with tasks, large language models are based on an agent approach. And during the training process, designing different Prompt templates for different states and stages is an effective strategy. When building a system based on a large language model (LLM), the agent approach is a common framework. The agent system can be controlled with natural language instructions, can perform tasks in complex environments with no or little supervision, and can use external tools as well as control the fluidity. Through the agent approach, the large language model can better interact with users, understand the users' intentions, and generate corresponding responses. The Prompt template is the key for the large language model to understand the task and perform corresponding operations. When designing the Prompt template, the current state of the model, the task stage, and the specific needs of the user need to be considered.
[0046] Common basic Prompt templates include: Context: Provide background information of the task to help the model understand the specific scenario.
[0047] Objective: Clearly define the task requirements so that the model can focus on achieving specific goals.
[0048] Style and Tone: According to the task requirements, specify a specific writing style or tone to ensure that the response is coordinated with the expected emotional or mood background.
[0049] Audience: Customize the response for a specific audience to ensure that the content is appropriate and easy to understand in a specific context.
[0050] Response: Specify the output format to ensure that the model generates responses according to specific requirements.
[0051] Prompt templates for different states and stages: Pretraining stage: The Prompt templates in this stage mainly focus on enabling the model to learn rich language structures and patterns. The templates may contain a large amount of unannotated text data for training the general language ability of the model.
[0052] Fine-tuning stage: In the fine-tuning stage, the Prompt templates are carefully designed for specific tasks. The templates may contain input-output correspondences related to the task, context markers, etc. to help the model learn the requirements and rules of specific tasks.
[0053] Inference stage: In the inference stage, the Prompt templates need to be able to guide the model to generate appropriate responses based on the input information. This may require combining the context, the user's intention, and the model's own knowledge reserve to build a complex template structure. This invention shows one example, a training data prompt word example such asFigure 3 shown.
[0054] As an example, the training goal of the present invention is to enable the large language model to learn from the training process to judge the operations that should be performed based on the current information, and complete the defect classification step by step. Therefore, the training data of the present invention is based on the user's defect description file, extracting key equipment and description words, and searching, judging whether it is necessary to obtain the state value and whether to extract the key value for auxiliary comparison according to the search results through the standards and descriptions, and judging the defect level according to the judgment results; the training method of the large language model adopts the full parameter training form.
[0055] As a further example, the training method of the present invention adopts the form of full parameter training, and allows all parameters of the large language model to participate in the training to make the large language model adaptable to downstream tasks.
[0056] Specifically, considering the instability of the output of the large language model, the output operation function name, operation selection and conclusion of the large language model are limited. Therefore, in the training objective, the present invention weights the three fields of operation selection, function name and conclusion.
[0057] More specifically, the present invention adds a special identifier [SPEC] in the dictionary on both sides of the corresponding field content, thereby facilitating the calculation of the loss. Therefore, the final loss function is designed as follows:
[0058]
[0059] Among them, O is the output part; P( ) for The correct probability is usually 1; Q( ) is known In the case The predicted probability of is the loss weight of the special field, usually greater than 0.5; The sequence number of the special field.
[0060] In the inference stage, the present invention only provides the user's description of the defect to the large language model, and the large language model will output the method to be called and the corresponding parameters according to the user's question. The executor automatically calls the functions such as the numerical comparator and keyword search according to the output of the large language model, and returns the results of each function and the user's question to the large language model, and then obtains the final reply.
[0061] The goal of the present invention is to classify the defect description of the equipment into three levels: general, serious, and critical. Different demarcation ranges are set according to different levels. The final level can be directly determined based on the parameters.
[0062] The task of defect grading for the main equipment of the power grid can be defined as follows: Input: Equipment information + component information + location information + defect description. For example: The cross arm of the tower pole is skewed, and the angle is about 7%. Output: Severe defect.
[0063] Design of the framework and detailed flowchart of the equipment defect grading method based on agents and large language models, as Figure 2 shown. The specific process is described as follows: User question: The xx transformer is overheating at 80 degrees; The large language model interacts with the structured detection plugin and the planning executor. The specific steps are as follows: Step 1. It is necessary to retrieve relevant content Func Search([xx transformer, overheating]); Data related to the user's question: The xx transformer is at 70 - 75 degrees, defect level: severe; The xx transformer is above 75 degrees, defect level: critical; Step 2. It is necessary to compare the magnitudes of 70 and 80 Func Compare (70, 80); Step 3. 70 is less than 80; Step 4. It is necessary to compare the magnitudes of 75 and 80 Func Compare (75, 80); Step 5. 75 is less than 80; Step 6. Since 75 degrees is less than 80 degrees, according to the relevant standards, the current defect level is critical.
[0064] The structured detection plugin interacts with the structured repair plugin; The retrieval plugin includes vector retrieval + inverted index, and the defect grading standard library; The planning executor interacts with the calculation plugin and the retrieval plugin; The final returned result: For example, since the overheating temperature of 80 degrees is greater than 75 degrees, according to the relevant standards, the current defect level is critical.
[0065] In addition, the solution of the present invention also has a certain degree of scalability. Multiple related auxiliary plugins can be designed in the plugin library, such as the historical defect record plugin, etc.
[0066] Because the present invention has the following advantages: Alleviate the problem of the generalization of large language models. By designing a defect grading framework based on an agent large language model, it is possible to use the large language model to extract retrieval keywords such as devices and phenomena in the description based on the described phenomena, and then use the keywords to retrieve the corresponding entries; the large language model mainly masters the ability to extract device and phenomenon keywords based on the description during the training process. Therefore, not only can the defect pricing standard in the knowledge base be dynamically adjusted, but also there is a certain generalization ability in defect descriptions, achieving the goal of increasing the generalization of large language models.
[0067] Furthermore, solve the numerical calculation in the defect grading problem. By introducing the ability of the large language model to use plugins to solve the numerical calculation problem in defect grading. For traditional large language models, for numerical judgment problems, they mainly use the correlation between words to solve numerical comparisons, and this method has extremely low generalization, and it is difficult to make correct judgments for unseen numerical values. However, in the present invention, by training the large language model to obtain the ability to recognize the need for numerical judgment in the defect grading standard and extract the numerical values to be compared, and then calling the calculator plugin for numerical comparison, it gets rid of the low generalization of relying on correlation to compare numerical values.
[0068] Even further, alleviate the dependence on the structural correctness and content accuracy of the output content of the large language model in the framework. First, use the structured detection plugin to parse the json content output by the large language model. If there is a structured error report, then use the structured repair plugin to repair several common structured errors proposed, thereby alleviating to a certain extent the inevitable output structured problem of the large language model. In addition, in order to avoid the output operation field limitation of the large language model, the present invention also performs weighted processing on the content of the fields in the label, making the large language model pay more attention to the accuracy of the field content.
[0069] Alleviate the problems of poor interpretability and difficult traceability of large language models. The large language model gradually solves the defect grading problem. First, extract retrieval keywords based on the description, then retrieve the corresponding grading standard based on the knowledge base, and finally, based on relevant knowledge and description, perform defect level judgment; if numerical judgment is required for grading, the calculator plugin will be called for numerical calculation. The gradual grading process of the large language model can alleviate to a certain extent the problems of poor interpretability and difficult traceability of large language models.
[0070] As Figure 3 shown, the third object of the present invention is to provide a device defect grading method based on a large language model considering device probability failure, including: Respond to the user instruction, and generate a command to call the knowledge base retrieval and corresponding retrieval keywords according to the device and phenomenon descriptions corresponding to the user instruction; Then call the knowledge base to retrieve the defect grading standard related to the user instruction; Based on the defect grading criteria and user instructions, send a call instruction to obtain additional information or numerical comparison for auxiliary grading; According to the defect grading criteria, the obtained additional information or numerical comparison information, obtain the finally predicted defect level.
[0071] The device defect grading method based on the large language model of the present invention is based on the above-mentioned device defect grading system based on the large language model.
[0072] The third object of the embodiments of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the above-mentioned device defect grading method based on the large language model considering the probability of device failure. It also includes a communication interface and a bus.
[0073] The fourth object of the embodiments of the present invention is to provide a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the above-mentioned device defect grading method based on the large language model considering the probability of device failure.
[0074] The fifth object of the embodiments of the present invention is to provide a computer program product. The computer program product includes computer instructions, and the computer instructions instruct a computer to execute the above-mentioned device defect grading method based on the large language model considering the probability of device failure.
[0075] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, and the instruction device implements in the process Figure 1 one process or multiple processes and / or boxes Figure 1 the functions specified in one box or multiple boxes.
[0076] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one process or multiple processes and / or boxes Figure 1 one box or multiple boxes.
[0077] The present invention may be implemented in the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention may be implemented in the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, read-only storage media, optical storage, etc.) containing computer-usable program code.
[0078] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in one Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0079] Obviously, the described embodiments are only partial embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the scope of protection of the present invention.
[0080] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that it is still possible to modify the specific implementation manners of the present invention or make equivalent replacements. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention shall be covered by the scope of protection of the present invention.
Claims
1. A large language model-based equipment defect grading system, characterized in that: include: The large language model is used to respond to user instructions and generate commands and corresponding search keywords for calling knowledge base retrieval according to the device and phenomenon description corresponding to the user instructions, and then call the knowledge base to retrieve the defect grading standard related to the user instruction; it is also used to send a call instruction based on the defect grading standard and the user instruction to obtain additional information or numerical comparison for auxiliary grading; according to the defect grading standard, additional information acquisition or numerical comparison information, obtain the final predicted defect level; Auxiliary plug-in, used to provide the additional information or perform numerical comparison information; The planning executor is used to call the auxiliary plug-in according to the calling instruction sent by the large language model, and feed back the calling result to the large language model.
2. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The auxiliary plug-in includes: Retrieval plug-in, which is used to build relevant knowledge base and defect grading standards based on defect grading standard knowledge and using vector retrieval method and inverted index; Calculation plugin for numerical comparison based on numerical comparison calculator; Status query plug-in, used to query device status information.
3. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The auxiliary plug-in also includes: Structural detection and repair plugin, used to detect and repair the output format of large language models.
4. The equipment defect grading system based on a large language model according to claim 3 is characterized in that: The structured detection and repair plug-in is used to repair the following format errors: 1) Supplement the missing end mark; 2) Supplement the missing separators; 3) Delete extra line breaks; 4) Correct the representation of special characters.
5. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The large language model is trained based on the existing defect grading standards and the phenomenon descriptions around the defect grading standards and the corresponding defect grading results. The trained large language model can independently judge the operations that should be performed based on the current information and complete the defect grading.
6. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The large language model is based on an agent-based approach, and different prompt templates need to be designed for different states and stages in the training data.
7. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The large language model extracts key equipment and descriptive words based on the defect description file of the user, and performs retrieval. It determines whether it is necessary to obtain status values and whether to extract key values for auxiliary comparison according to the retrieval results, and determines the defect level according to the judgment results. The training method of the large language model adopts a full-parameter training form.
8. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The large language model also includes a process of limiting the fields of output operation function names, operation selections, and conclusions, specifically including: The fields of the operation function name, operation selection, and conclusion are weighted, and special marks are added on both sides of the corresponding field content to calculate the loss; the loss function is: Among them, O is the output part; P( ) for The correct probability of Q( ) is known In the case The predicted probability of is the loss weight of the special field; The sequence number of the special field.
9. The equipment defect grading system based on a large language model according to claim 1, characterized in that: The final predicted defect levels are divided into three levels: general, serious, and critical.
10. A method for grading equipment defects based on a large language model, characterized in that: include: In response to a user instruction, and based on the device and phenomenon description corresponding to the user instruction, generate a command for invoking a knowledge base search and corresponding search keywords; Then call the knowledge base to retrieve the defect classification standards related to the user instructions; Based on the defect grading standard and the user instruction, sending a call instruction to obtain additional information or numerical comparison results for auxiliary grading; The final predicted defect level is obtained according to the defect grading standard, the additionally acquired information or the numerical comparison information.
11. An electronic device, characterized in that: The invention comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for grading equipment defects based on a large language model and taking into account equipment probabilistic failures as described in any one of claims 1 to 9 is implemented.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for grading equipment defects based on a large language model and considering equipment probabilistic failures as described in any one of claims 1 to 9 is implemented.
13. A computer program product, comprising computer instructions, characterized in that: The computer instructions instruct the computer to execute the equipment defect rating method based on a large language model taking into account probabilistic equipment failures as described in any one of claims 1-9.
Citation Information
Cited By
Flight event processing method, device and equipment based on large model and medium
CN120873044A