Fault tree generation method and device, storage medium and electronic device
By building a knowledge base for troubleshooting files and using preset models to generate fault trees, the complex and time-consuming problem of traditional fault tree drawing is solved, and the automatic generation of fault trees is realized, which reduces time and workload and improves fault location efficiency .
Patent Information
- Application Number
- CN202411344916.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-25
- Publication Date
- 2024-12-27
AI Technical Summary
Traditional fault tree drawing is complex and time-consuming in complex systems, especially in multi-failure tree systems. Manual drawing leads to high workload and time costs.
By determining the corresponding knowledge base of the fault processing file of the target device, using the database and vector library to store slice knowledge and vector information, using preset big models to process the knowledge base, generate slice questions and answers, build question-and-answer pairs, and generate based on progressive relationships Fault Tree.
It reduces the workload and time cost of fault tree drawing, improves the efficiency and accuracy of fault location and resolution, and realizes the automatic generation of fault tree.
Smart Images

Figure CN119202188A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent devices, and in particular, to a method, device, storage medium and electronic device for generating a fault tree. Background Art
[0002] Fault tree analysis is a commonly used system safety analysis method, which is used to identify various events and conditions that may cause failures in the system, and connect them through logical relationships to find out the root cause of the system failure. In the industrial field, especially in complex systems such as air conditioners, the drawing of fault trees is an important task, because once a system fails, it is necessary to quickly and accurately locate the problem and repair it. Traditional fault tree drawing is done by hand, which requires drawing various events and conditions one by one and connecting them through logic gates. This process is very cumbersome and time-consuming. Especially for systems with multiple fault trees such as air conditioners, the workload and time cost of manual drawing are very high.
[0003] Therefore, in the related art, an effective solution has not yet been proposed for the problem that the process of drawing multiple fault trees is complicated and time-consuming and costly. Summary of the invention
[0004] The embodiments of the present application provide a method, device, storage medium and electronic device for generating a fault tree, so as to at least solve the problem in the related art that the process of drawing multiple fault trees is complicated and time-consuming and costly.
[0005] According to an embodiment of the present application, a method for generating a fault tree is provided, including: determining a knowledge base corresponding to a fault handling file of a target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; processing the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; constructing question-answer pairs based on the slice questions and slice answers, and generating a target fault tree corresponding to the fault handling file based on the progressive relationship between different question-answer pairs.
[0006] In an exemplary embodiment, determining a knowledge base corresponding to a fault handling file of a target device includes: obtaining slicing parameters corresponding to the target device, wherein the slicing parameters include: a step size corresponding to the slicing knowledge, a first partitioning requirement corresponding to a starting index for partitioning the slicing knowledge, and a second partitioning requirement corresponding to an ending index for partitioning the slicing knowledge; slicing the device fault text according to the slicing parameters to obtain a plurality of slicing knowledge; performing vectorization operations on the plurality of slicing knowledge respectively to obtain a plurality of vector information; storing the plurality of slicing knowledge in a database, and storing the plurality of vector information in a vector library, and determining the knowledge base corresponding to the fault handling file based on the database and the vector library.
[0007] In an exemplary embodiment, the knowledge base is processed by a preset large model to obtain slice problems corresponding to different slices in the knowledge base, including: receiving a fault type requirement issued by a target object associated with a target device; looping through the knowledge base according to the fault type requirement to obtain multiple target slices participating in fault tree construction; inputting multiple target slices into the preset large model, outputting target slice problems corresponding to each slice in the multiple target slices, and obtaining multiple target slice problems.
[0008] In an exemplary embodiment, multiple target slices are input into a preset large model, and the target slice problems corresponding to each slice in the multiple target slices are output. After the multiple target slice problems are obtained, the above method also includes: vectorizing the multiple target slice problems according to preset vectorization rules to obtain multiple text vectors; calculating the semantic similarity scores between different text vectors in the multiple text vectors; and deduplicating the multiple target slice problems according to the size of the scores.
[0009] In an exemplary embodiment, the knowledge base is processed by a preset large model to obtain a slice answer corresponding to the slice question, including: determining the answer prompt information corresponding to the slice question by the preset large model; sending the answer prompt information to a target object using a target device, and receiving a preliminary sub-answer fed back by the target object in response to the answer prompt information; and summarizing all preliminary sub-answers corresponding to the slice question to obtain a slice answer corresponding to the slice question.
[0010] In an exemplary embodiment, a question-answer pair is constructed based on slice questions and slice answers, and a target fault tree corresponding to a fault handling file is generated based on a progressive relationship between different question-answer pairs, including: determining the fault domain of the target fault tree to be generated; identifying the target question-answer pair belonging to the fault domain; parsing the slice answers in the target question-answer pair to obtain a plurality of reference prompt information; determining a target progressive relationship corresponding to the target question-answer pair based on the plurality of reference prompt information; and generating a target fault tree corresponding to the current fault domain by combining the target progressive relationship and the plurality of reference prompt information.
[0011] In an exemplary embodiment, after constructing question-answer pairs based on slicing questions and slicing answers, and generating a target fault tree corresponding to a fault handling file based on a progressive relationship between different question-answer pairs, the method further includes: determining a target code format that allows output and display of the target fault tree; obtaining a coding strategy and a coding database corresponding to the target code format; and performing code conversion on the target fault tree based on the coding strategy and the coding database.
[0012] According to another embodiment of the embodiments of the present application, a fault tree generation device is also provided, including: a determination module, used to determine a knowledge base corresponding to a fault handling file of a target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; a processing module, used to process the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; a generation module, used to construct question-answer pairs based on slice questions and slice answers, and generate a target fault tree corresponding to the fault handling file based on the progressive relationship between different question-answer pairs.
[0013] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned fault tree automatic generation method when running.
[0014] According to another aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the above-mentioned fault tree automatic generation method through the computer program.
[0015] According to another embodiment of the present application, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in any of the above-mentioned fault tree automatic generation method embodiments are implemented.
[0016] In an embodiment of the present application, a knowledge base corresponding to the fault handling file of the target device is determined, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; the knowledge base is processed by a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; question-answer pairs are constructed based on the slice questions and slice answers, and a target fault tree corresponding to the fault handling file is generated based on the progressive relationship between different question-answer pairs. The above technical solution solves the problem that the process of drawing multiple fault trees is complicated and time-consuming, reduces the workload of drawing fault trees, and shortens the time cost of drawing. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0018] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0019] Figure 1 is a hardware environment schematic diagram of a fault tree generation method according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for generating a fault tree according to an embodiment of the present application;
[0021] Figure 3 This is a fault tree of “Why does the air conditioner not cool” according to an embodiment of the present application;
[0022] Figure 4 It is a flow chart of a method for automatically generating a fault tree based on a large model according to an embodiment of the present application;
[0023] Figure 5 is a flow chart for generating a knowledge base of a faulty device according to an embodiment of the present application;
[0024] Figure 6 is a flow chart of generating a fault problem according to an embodiment of the present application;
[0025] Figure 7 is a flow chart for generating an answer to a fault question according to an embodiment of the present application;
[0026] Figure 8is a flow chart for generating a fault tree according to an embodiment of the present application;
[0027] Fig. 9 is a structural block diagram of a fault tree generating device according to an embodiment of the present application;
[0028] Fig.10 is a block diagram of a computer system structure of an electronic device according to an embodiment of the present application;
[0029] Fig.11 An electronic device for implementing a method for automatically generating a fault tree according to an embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] According to one aspect of an embodiment of the present application, a method for generating a fault tree is provided. The fault tree automatic generation method is widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned fault tree automatic generation method can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, Figure 1This is a hardware environment diagram of a fault tree generation method according to an embodiment of the present application. The server 104 is connected to the terminal device 102 through a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.
[0033] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WI FI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.
[0034] In this embodiment, a method for generating a fault tree is provided, which can be applied to a computer terminal or an Internet of Things cloud. Figure 2 : is a flow chart of a method for generating a fault tree according to an embodiment of the present application, the flow chart includes the following steps:
[0035] Step S202, determining a knowledge base corresponding to the fault handling file of the target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault;
[0036] It should be noted that in actual applications, the correspondence between the above-mentioned slice knowledge and fault types can be that multiple slice knowledge corresponds to the first fault type at the same time, or that part of the multiple slice knowledge corresponds to the first fault type, and the other part corresponds to the second fault type; that is, each slice is divided into a fault type, and the fault type division results between different slices may be the same or may be different, which is flexibly determined based on the matching of the text content corresponding to the slice knowledge and the fault type.
[0037] Optionally, in actual applications, the air conditioning equipment fault handling file includes information such as fault code, fault description, fault cause, and fault solution. First, the fault handling file is classified and stored in the database according to the fault description and cause. For example, all files related to refrigeration faults are stored in one category. Then, according to the fault types of different categories, key features are extracted and stored in the vector library. For example, the vector information of refrigeration faults may include parameters such as temperature, pressure, and current. Finally, when the air conditioning equipment fails, the problem can be quickly located and solved by querying the information in the knowledge base.
[0038] Step S204, processing the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions;
[0039] Optionally, the preset large model refers to a model trained using a large-scale data set and parameters during the training phase. It usually has strong generalization and expression capabilities and can be used to handle various complex natural language processing tasks. The training process of the preset large model usually includes the following steps:
[0040] (1) Data preparation: Collect large-scale text datasets, perform data cleaning and preprocessing, and construct training sets and validation sets.
[0041] (2) Model selection: Select a suitable preset large model, such as BERT, GPT, etc., and select the corresponding model structure according to task requirements.
[0042] (3) Model training: Use the training set to train the preset large model, optimize the model parameters by minimizing the loss function, so that the model can better fit the training data.
[0043] (4) Model evaluation: Use the validation set to evaluate the trained model and assess its generalization ability on unseen data.
[0044] For example, the text data in the fault knowledge base of an air-conditioning device is input into the preset large model, so that the model can learn and understand the content in the knowledge base. Then, the slice questions and slice answers corresponding to different slices are extracted from the model. For example, the slice problem is that the air conditioner cannot cool, and the slice answer is that it may be caused by refrigerant leakage, which can be solved by checking and replenishing refrigerant. In this way, the questions and answers of different slices in the knowledge base can be quickly and accurately extracted, providing a better reference for troubleshooting and solving.
[0045] Step S206, constructing a question-answer pair based on the slicing question and the slicing answer, and generating a target fault tree corresponding to the fault handling file based on the progressive relationship between different question-answer pairs.
[0046] Optionally, the generation process of an air conditioning equipment fault tree usually includes the following steps:
[0047] (1) Determine the top event: First, determine that the failure of the air conditioning equipment is the top event, that is, the main problem that needs to be solved.
[0048] (2) Determine basic events: Based on the slice questions and slice answers, determine the various basic events that may cause air-conditioning equipment failures, such as power failure, refrigeration system failure, control panel failure, etc.
[0049] (3) Determine intermediate events: Based on the logical relationship between basic events, determine the intermediate events that may cause these basic events to occur, such as a short circuit in the power line may cause a power failure.
[0050] (4) Combined nodes: Combine basic events and intermediate events into combined nodes with certain logical relationships to form the structure of the fault tree.
[0051] (5) Determine the logical relationship between the top event and other events: Determine the logical relationship between the top event and other events, such as "and", "or", etc., to ensure the completeness and accuracy of the fault tree.
[0052] Through the above steps, the knowledge base corresponding to the fault handling file of the target device is determined, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; the knowledge base is processed by a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; question-answer pairs are constructed based on the slice questions and the slice answers, and the target fault tree corresponding to the fault handling file is generated based on the progressive relationship between different question-answer pairs. The above technical solution solves the problem that the process of drawing multiple fault trees is complicated and time-consuming, reduces the workload of drawing fault trees, and shortens the drawing time cost.
[0053] In an exemplary embodiment, determining a knowledge base corresponding to a fault handling file of a target device includes: obtaining slicing parameters corresponding to the target device, wherein the slicing parameters include: a step size corresponding to the slicing knowledge, a first partitioning requirement corresponding to a starting index for partitioning the slicing knowledge, and a second partitioning requirement corresponding to an ending index for partitioning the slicing knowledge; slicing the device fault text according to the slicing parameters to obtain a plurality of slicing knowledge; performing vectorization operations on the plurality of slicing knowledge respectively to obtain a plurality of vector information; storing the plurality of slicing knowledge in a database, and storing the plurality of vector information in a vector library, and determining the knowledge base corresponding to the fault handling file based on the database and the vector library.
[0054] Optionally, slicing knowledge vectorization refers to applying slicing operations to knowledge representation in order to better represent and process knowledge. Slicing is an operation that divides, filters, and combines knowledge, which can help better understand and utilize knowledge. In knowledge representation systems such as knowledge graphs and semantic networks, slicing operations can be used to extract specific pieces of knowledge, such as extracting subgraphs related to a topic from a knowledge graph, or extracting related attributes and relationships of a concept from a semantic network. Such slicing operations can help better understand and analyze knowledge, and can also be used in applications such as knowledge reasoning and recommendation systems. By vectorizing the slicing operation, knowledge can be represented as a high-dimensional vector, which facilitates related calculations and analysis. This vectorized representation can be processed by various machine learning and deep learning techniques, such as similarity calculation, cluster analysis, classification, and regression. By slicing knowledge vectorization, knowledge can be better understood and utilized, promoting the development and application of knowledge representation technologies such as knowledge graphs and semantic networks.
[0055] In an exemplary embodiment, the knowledge base is processed by a preset large model to obtain slice problems corresponding to different slices in the knowledge base, including: receiving a fault type requirement issued by a target object associated with a target device; looping through the knowledge base according to the fault type requirement to obtain multiple target slices participating in fault tree construction; inputting multiple target slices into the preset large model, outputting target slice problems corresponding to each slice in the multiple target slices, and obtaining multiple target slice problems.
[0056] It is understandable that the air-conditioning equipment fault type requirements issued by the target object are received, such as the need to solve the problem of poor air-conditioning refrigeration effect. According to the requirements, the knowledge base is traversed in a loop to obtain multiple target slices involved in the construction of the fault tree, such as air-conditioning refrigeration system, air-conditioning circuit system, air-conditioning control system, etc. Multiple target slices are input into the preset large model, and the target slice problems corresponding to each slice are output. For example, the possible problems in the air-conditioning refrigeration system are refrigerant leakage, compressor failure, etc. Multiple target slice problems are obtained, and further analysis and processing are performed based on these problems. In turn, it helps maintenance personnel to better locate and solve air-conditioning failures. The whole process is efficient, accurate, and automated, which improves the efficiency and quality of maintenance services.
[0057] In an exemplary embodiment, multiple target slices are input into a preset large model, and the target slice problems corresponding to each slice in the multiple target slices are output. After the multiple target slice problems are obtained, the above method also includes: vectorizing the multiple target slice problems according to preset vectorization rules to obtain multiple text vectors; calculating the semantic similarity scores between different text vectors in the multiple text vectors; and deduplicating the multiple target slice problems according to the size of the scores.
[0058] Optionally, multiple target slice questions can be deduplicated based on their scores. A threshold can be set. When the semantic similarity scores of two slice questions exceed the threshold, they are considered duplicates, and one of them is selected to be retained and the other is deleted. You can also choose which slice question to retain based on specific needs, such as retaining the one with the higher score or retaining the one that appears first.
[0059] In an exemplary embodiment, the knowledge base is processed by a preset large model to obtain a slice answer corresponding to the slice question, including: determining the answer prompt information corresponding to the slice question by the preset large model; sending the answer prompt information to a target object using a target device, and receiving a preliminary sub-answer fed back by the target object in response to the answer prompt information; and summarizing all preliminary sub-answers corresponding to the slice question to obtain a slice answer corresponding to the slice question.
[0060] It is understandable that the use of a preset large model can quickly and effectively classify and identify questions, provide accurate answer prompt information, and save manpower and time costs. The answer prompt information is sent directly to the target object, reducing the intermediate links of information transmission, improving efficiency and timeliness. By receiving feedback from the target object, the specific situation of the problem can be understood in a timely manner, which is conducive to giving a more accurate answer. By integrating and summarizing all preliminary sub-answers, a more comprehensive and accurate slice answer can be obtained, which improves the efficiency and accuracy of problem solving.
[0061] In an exemplary embodiment, a question-answer pair is constructed based on slice questions and slice answers, and a target fault tree corresponding to a fault handling file is generated based on a progressive relationship between different question-answer pairs, including: determining the fault domain of the target fault tree to be generated; identifying the target question-answer pair belonging to the fault domain; parsing the slice answers in the target question-answer pair to obtain a plurality of reference prompt information; determining a target progressive relationship corresponding to the target question-answer pair based on the plurality of reference prompt information; and generating a target fault tree corresponding to the current fault domain by combining the target progressive relationship and the plurality of reference prompt information.
[0062] It is understandable that determining the fault area of the target air-conditioning equipment fault tree is to clarify the specific problem scope, identifying the target question and answer pairs can help screen relevant information, parsing the sliced answers to obtain prompt information, establishing progressive relationships to help logical connections, and finally generating a target fault tree to quickly solve the fault problem.
[0063] For example, the fault domain of an air-conditioning device is determined to be a refrigeration fault, and the target question-answer pair of the fault domain is identified as follows:
[0064] Target Questions and Answers: Q: What should I do if the air conditioning cooling effect becomes worse? A: Check whether the air conditioning filter is clean.
[0065] Slice answer analysis: The reference prompt is "Check whether the air conditioning filter is clean."
[0066] Target progressive relationship: The air conditioning cooling effect becomes worse -> Check whether the air conditioning filter is clean -> Clean the filter.
[0067] Generate a target fault tree: the air conditioning cooling effect becomes worse -> check whether the air conditioning filter is clean -> clean the filter, and so on, to construct a target fault tree for air conditioning equipment cooling failure.
[0068] In an exemplary embodiment, after constructing question-answer pairs based on slicing questions and slicing answers, and generating a target fault tree corresponding to a fault handling file based on a progressive relationship between different question-answer pairs, the method further includes: determining a target code format that allows output and display of the target fault tree; obtaining a coding strategy and a coding database corresponding to the target code format; and performing code conversion on the target fault tree based on the coding strategy and the coding database.
[0069] It is understandable that constructing question-answer pairs based on slice questions and slice answers can help the system better understand the needs of users and thus generate the target fault tree more accurately. By generating the target fault tree corresponding to the fault handling file through the progressive relationship between different question-answer pairs, the integrity and accuracy of the target fault tree can be ensured. Determining the target code format that allows the output display of the target fault tree can make the fault tree generated by the system easier to understand and use. Obtaining the coding strategy and coding database corresponding to the target code format can improve the maintainability and scalability of the target fault tree. Code conversion of the target fault tree based on the coding strategy and coding database can automatically generate code and reduce the workload of manual code writing.
[0070] In order to better understand the process of the above-mentioned fault tree automatic generation method, the implementation method flow of the above-mentioned fault tree generation is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0071] In the related art, for some complex intelligent devices, there are multiple fault trees, and drawing the fault trees takes a lot of time.
[0072] In order to solve the above problems, the optional embodiment of the present application proposes a method for automatically generating a fault tree based on a large model. Specifically, first, the faulty device text is input into a preset large model to form a knowledge base; then, multiple fault questions are generated according to the content in the knowledge base through the model capability of the large model, and the fault questions are matched with the corresponding answers to form fault question-answer pairs; finally, a fault tree is constructed based on the fault question-answer pairs.
[0073] Optionally, a fault tree refers to a tree-like representation of home appliance maintenance fault knowledge. After-sales personnel can quickly help users locate problems based on the fault tree. Figure 3 As shown, Figure 3 It is a fault tree of "Why the air conditioner does not cool" according to the embodiment of the present application. The specific generation content includes: determining the top event of the fault tree, that is, the fault field of the fault tree is "Why does the air conditioner not cool". Determine the basic events of the fault tree, the target question and answer pair: Question: Why doesn't the air conditioner cool? Answer: No air blowing, natural air blowing. Determine the reference prompt information of the fault tree, including: Please put your hand on the air outlet to see which situation is it: No air blowing? Natural air blowing? Please check whether the remote control is selected in "cooling" mode, whether there is a snowflake symbol or cooling word on the remote control; check whether the indoor temperature displayed by the air conditioner reaches the set temperature, etc. Determine the progressive relationship of the fault tree target. If there is no air blowing, please check whether the remote control is in "cooling" mode, whether there is a snowflake symbol or cooling word on the remote control, if so, prompt the user to report a repair, if not, prompt the user to adjust the air conditioner to cooling mode; blow natural wind, check whether the remote control is in "cooling" mode, whether there is a snowflake symbol or cooling word on the remote control, if so, prompt the user to check whether the indoor temperature displayed by the air conditioner reaches the set temperature, please press the "light" key or "screen display" key, the air conditioner displays the indoor temperature, and restores the display of the set temperature after 5 seconds. If the set temperature is reached, prompt the user to check whether the filter is dirty and blocked, if not, prompt the user to lower the temperature a little; if the filter has not been cleaned for a long time, prompt the user to clean the filter, if the filter is very clean and has been cleaned recently. Prompt the user to report a repair. Generate a fault tree. According to the progressive relationship of the target and the reference prompt information, generate a fault tree for poor air conditioning cooling effect, including possible reasons and solutions such as no air blowing when the machine is turned on and blowing natural wind.
[0074] Optional, Figure 4 This is a flow chart of a method for automatically generating a fault tree based on a large model according to an embodiment of the present application, which specifically includes the following steps:
[0075] Step 1: Input the faulty device text into the preset large model to form a knowledge base. Specifically, firstly, each fault handling knowledge point in the knowledge base is divided into an independent fault knowledge slice through the model capability of the large model and stored in the database; then each fault knowledge slice is vectorized and represented as a vector and saved in the vector library. Figure 5 As shown, Figure 5 It is a flow chart of generating a faulty device knowledge base according to an embodiment of the present application.
[0076] Step 2: Generate fault question and answer pairs based on the knowledge base. Specifically include:
[0077] (1) Generate fault problems based on knowledge switching. Specifically, first, the fault slice knowledge is traversed through the model capability of the large model to extract knowledge fragments related to the fault; then, the equipment fault problem is generated based on the knowledge fragments; then, the equipment fault problem is converted into a representation in the vector space; finally, the semantic similarity scores between the equipment fault problems are calculated to perform automatic deduplication operations, where problems with high similarity can be merged or removed. Figure 6 As shown, Figure 6 It is a flow chart of generating a fault problem according to an embodiment of the present application.
[0078] (2) Generate answers based on the questions, and finally form a fault question-answer pair. Specifically, first input the equipment fault problem into the big model; then use the vector retrieval technology to extract the fault knowledge slices most relevant to the equipment fault problem, where the most relevant fault knowledge slices are the fault knowledge slices with higher similarity scores; finally, use the model capability of the big model to generate answers to the equipment fault problem from the fault knowledge slices with higher similarity scores, and form a equipment fault question-answer pair. Figure 7 As shown, Figure 7 It is a flow chart of generating an answer to a fault question according to an embodiment of the present application.
[0079] Step 3: Generate a fault tree based on the question and answer pairs. Specifically, first input the answer to the equipment failure question into the big model; then, construct a prompt for generating the fault tree based on the answer to the equipment failure question, where the prompt is a prompt information that includes at least one of the following: question description, answer prompt, expected fault tree structure, etc.; then, use the model capability of the big model to generate the JSON data of the fault tree from the prompt of the fault tree; finally, import the JSON data of the fault tree into the fault tree generation tool and convert it into a visual fault tree diagram. Figure 8 As shown, Figure 8 It is a flow chart of generating a fault tree according to an embodiment of the present application.
[0080] Optionally, JSON (JavaScript Object Notation) is a lightweight data exchange format based on JavaScript syntax for transferring and storing data between different systems. JSON data consists of key-value pairs, where the key is a string and the value can be a string, number, array, object, Boolean, or null. JSON data can be serialized into a string or parsed from a string into a JSON object. Common uses of JSON include transferring data, storing configuration information, and interacting with APIs in Web development. JSON stores data in key-value pairs and represents it in a simple text format, which is easy to read and write. The design goal of JSON is to be simple, easy to understand and implement, and has good scalability and interoperability. JSON is widely used in Web development and is used in scenarios such as front-end and back-end data interaction and API interface design.
[0081] It should be noted that when the text of the air-conditioning fault equipment is input into the preset large model to form a knowledge base, it is necessary to ensure that the input text content is clear and accurate to avoid input errors that lead to erroneous information in the knowledge base. When generating multiple fault questions, it is necessary to pay attention to whether the model capability of the large model is strong enough to effectively generate accurate questions based on the knowledge base content to avoid generating invalid or erroneous questions. When matching fault questions with corresponding answers to form fault question and answer pairs, it is necessary to ensure the accuracy and completeness of the match to avoid giving irrelevant answers or omitting important information. Finally, when constructing a fault tree, it is necessary to organize the fault question and answer pairs reasonably according to their relevance and logic to ensure that the structure of the fault tree is clear and complete, and can effectively help users quickly locate and solve faults.
[0082] Through the above solution, the text of the faulty equipment is input into the preset large model, which can quickly form a knowledge base, greatly saving the time and energy of manually collecting and organizing information. The large model has powerful model capabilities, and can generate multiple fault questions based on the content in the knowledge base, and form fault question and answer pairs by matching answers, ensuring the accuracy and completeness of the information. Constructing a fault tree based on the fault question and answer pairs can clearly show the relationship and impact between faults, making it easier for engineers to understand and analyze the causes of faults, and helping to locate and solve faults more quickly.
[0083] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0084] Fig. 9 is a structural block diagram of a fault tree generating device according to an embodiment of the present application; Fig. 9 As shown, including:
[0085] A determination module 92 is used to determine a knowledge base corresponding to the fault handling file of the target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault;
[0086] A processing module 94 is used to process the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions;
[0087] The generation module 96 is used to construct a question-answer pair based on the slicing question and the slicing answer, and to generate a target fault tree corresponding to the fault processing file based on the progressive relationship between different question-answer pairs.
[0088] Through the above device, the knowledge base corresponding to the fault handling file of the target device is determined, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; the knowledge base is processed by a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; question-answer pairs are constructed based on the slice questions and the slice answers, and the target fault tree corresponding to the fault handling file is generated based on the progressive relationship between different question-answer pairs. The above technical solution solves the problem that the process of drawing multiple fault trees is complicated and time-consuming, reduces the workload of drawing fault trees, and shortens the time cost of drawing.
[0089] In an exemplary embodiment, the above-mentioned determination module is also used to obtain slicing parameters corresponding to the target device, wherein the slicing parameters include: a step size corresponding to the slicing knowledge, a first partitioning requirement corresponding to the starting index of the slicing knowledge, and a second partitioning requirement corresponding to the ending index of the slicing knowledge; slicing the device fault text according to the slicing parameters to obtain multiple slicing knowledge; vectorizing the multiple slicing knowledge respectively to obtain multiple vector information; storing the multiple slicing knowledge in a database, and storing the multiple vector information in a vector library, and determining the knowledge base corresponding to the fault handling file based on the database and the vector library.
[0090] In an exemplary embodiment, the above-mentioned processing module is also used to receive fault type requirements issued by a target object associated with a target device; loop through the knowledge base according to the fault type requirements to obtain multiple target slices participating in the construction of the fault tree; input the multiple target slices into a preset large model, output the target slice problem corresponding to each slice in the multiple target slices, and obtain multiple target slice problems.
[0091] In an exemplary embodiment, the above-mentioned device also includes: a computing module, which is used to input multiple target slices into a preset large model, output a target slice problem corresponding to each slice in the multiple target slices, and after obtaining the multiple target slice problems, vectorize the multiple target slice problems according to preset vectorization rules to obtain multiple text vectors; calculate the semantic similarity scores between different text vectors in the multiple text vectors; and deduplicate the multiple target slice problems according to the size of the scores.
[0092] In an exemplary embodiment, the above-mentioned processing module is also used to determine the answer prompt information corresponding to the slicing question through a preset large model; send the answer prompt information to the target object using the target device, and receive the preliminary sub-answers fed back by the target object in response to the answer prompt information; summarize all the preliminary sub-answers corresponding to the slicing question to obtain the slicing answer corresponding to the slicing question.
[0093] In an exemplary embodiment, the above-mentioned generation module is also used to determine the fault field of the target fault tree to be generated; identify the target question and answer pairs belonging to the fault field; parse the slice answers in the target question and answer pairs to obtain multiple reference prompt information; determine the target progressive relationship corresponding to the target question and answer pairs based on multiple reference prompt information; and generate the target fault tree corresponding to the current fault field by combining the target progressive relationship and multiple reference prompt information.
[0094] In an exemplary embodiment, the above-mentioned device also includes: an acquisition module, which is used to construct question-answer pairs based on slicing questions and slice answers, and after generating a target fault tree corresponding to a fault handling file based on a progressive relationship between different question-answer pairs, determine the target code format that allows the target fault tree to be output and displayed; obtain the encoding strategy and encoding database corresponding to the target code format; and perform code conversion on the target fault tree based on the encoding strategy and encoding database.
[0095] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware (such as processing circuits or memories) or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.
[0096] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0097] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0098] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0099] S1, determining a knowledge base corresponding to a fault handling file of a target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store a plurality of slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault;
[0100] S2, processing the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions;
[0101] S3, constructing a question-answer pair based on the slice question and the slice answer, and generating a target fault tree corresponding to the fault handling file based on the progressive relationship between different question-answer pairs.
[0102] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0103] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0105] S1, determining a knowledge base corresponding to a fault handling file of a target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store a plurality of slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault;
[0106] S2, processing the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions;
[0107] S3, constructing a question-answer pair based on the slice question and the slice answer, and generating a target fault tree corresponding to the fault handling file based on the progressive relationship between different question-answer pairs.
[0108] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0109] Fig.10 The computer system structure block diagram for implementing the electronic device of the embodiment of the present application is schematically shown. It should be noted that: Fig.10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application. Fig.10As shown, the computer system 500 includes a central processing unit 1001 (CPU), which can perform various appropriate actions and processes according to the program stored in the read-only memory 1002 (ROM) or the program loaded from the storage part 1008 to the random access memory 503 (RAM). In the random access memory 1003, various programs and data required for system operation are also stored. The central processing unit 1001, the read-only memory 1002 and the random access memory 1003 are connected to each other through a bus 1004. The input / output interface 1005 (I nput / Output interface, i.e., I / O interface) is also connected to the bus 1004.
[0110] The following components are connected to the input / output interface 1005: an input section 1006 including a keyboard, a mouse, etc.; an output section 10010 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1008 including a hard disk, etc.; and a communication section 1009 including a network interface card such as a LAN card, a modem, etc. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the input / output interface 1005 as needed. A removable medium 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1010 as needed so that a computer program read therefrom is installed into the storage section 1008 as needed.
[0111] In particular, according to an embodiment of the present application, the process described in each method flow chart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer readable medium, and the computer program contains a program code for executing the method shown in the flow chart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1009, and / or installed from the removable medium 1011. When the computer program is executed by the central processor 1001, various functions defined in the system of the present application are executed.
[0112] According to another aspect of the embodiment of the present application, an electronic device for implementing the generation of the above-mentioned fault tree is also provided. Fig.11As shown, the electronic device includes a memory 1102 and a processor 1104. The memory 1102 stores a computer program, and the processor 1104 is configured to execute the steps in any of the above method embodiments through the computer program.
[0113] Optionally, in this embodiment, the electronic device may be located in at least one of a plurality of network devices of a computer network. A person skilled in the art may understand that Fig.11 The structure shown is for illustration only, and the electronic device may also be a device including the above-mentioned flash memory. Fig.11 The structure of the electronic device is not limited. Fig.11 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig.11 Different configurations are shown.
[0114] Among them, the memory 1102 can be used to store software programs and modules, such as the program instructions / modules corresponding to the generation and device of the fault tree in the embodiment of the present application. The processor 1104 executes various functional applications and data processing by running the software programs and modules stored in the memory 1102, that is, realizing the generation of the above-mentioned fault tree. The memory 1102 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 1102 may further include a memory remotely located relative to the processor 1104, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 1102 may specifically be, but is not limited to, used for information such as logs containing modeling data. As an example, such as Fig.11 As shown, the memory 1102 may include but is not limited to the modules in the fault tree generation device. In addition, it may also include but is not limited to other module units in the fault tree generation device, which will not be described in detail in this example.
[0115] Optionally, the transmission device 1106 is used to receive or send data via a network. Specific examples of the network may include a wired network and a wireless network. In one example, the transmission device 1106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 1106 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0116] In addition, the electronic device further includes: a display 11011; and a connection bus 1110, which is used to connect various module components in the electronic device.
[0117] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.
[0118] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.
[0119] The embodiments of the present application also provide a computer program, which includes computer instructions stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps of any one of the above method embodiments.
[0120] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0121] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0122] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for generating a fault tree, characterized in that: include: Determine a knowledge base corresponding to the fault handling file of the target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store multiple slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; The knowledge base is processed by a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; A question-answer pair is constructed based on the slicing question and the slicing answer, and a target fault tree corresponding to the fault processing file is generated based on the progressive relationship between different question-answer pairs.
2. The method for generating a fault tree according to claim 1, characterized in that: Determine the knowledge base corresponding to the troubleshooting file of the target device, including: Acquire a slice parameter corresponding to the target device, wherein the slice parameter includes: a step size corresponding to the slice knowledge, a first partitioning requirement corresponding to a start index of the slice knowledge, and a second partitioning requirement corresponding to an end index of the slice knowledge; Slice the device fault text according to the slicing parameters to obtain a plurality of slicing knowledge; Performing vectorization operations on the plurality of slice knowledge respectively to obtain a plurality of vector information; The plurality of slice knowledge is stored in a database, and the plurality of vector information is stored in a vector library, and a knowledge base corresponding to the fault handling file is determined based on the database and the vector library.
3. The method for generating a fault tree according to claim 1, characterized in that: The knowledge base is processed by a preset large model to obtain slice problems corresponding to different slices in the knowledge base, including: Receiving a fault type requirement issued by a target object associated with the target device; According to the fault type requirement, the knowledge base is traversed in a loop to obtain a plurality of target slices involved in the construction of the fault tree; The multiple target slices are input into a preset large model, and the target slice problem corresponding to each slice in the multiple target slices is output to obtain multiple target slice problems.
4. The method for generating a fault tree according to claim 3, characterized in that: The plurality of target slices are input into a preset large model, and a target slice problem corresponding to each slice in the plurality of target slices is output. After the plurality of target slice problems are obtained, the method further includes: Vectorizing the multiple target slicing problems according to a preset vectorization rule to obtain multiple text vectors; Calculating semantic similarity scores between different text vectors in the plurality of text vectors; The multiple target slice problems are deduplicated according to the sizes of the scores.
5. The method for generating a fault tree according to claim 1, characterized in that: The knowledge base is processed by a preset large model to obtain a slice answer corresponding to the slice question, including: Determine answer prompt information corresponding to the slicing question through the preset large model; Sending the answer prompt information to the target object using the target device, and receiving a preliminary sub-answer fed back by the target object in response to the answer prompt information; All preliminary sub-answers corresponding to the slice problem are summarized to obtain a slice answer corresponding to the slice problem.
6. The method for generating a fault tree according to claim 1, characterized in that: Constructing a question-answer pair based on the slice question and the slice answer, and generating a target fault tree corresponding to the fault processing file based on the progressive relationship between different question-answer pairs, including: Determine the fault domain of the target fault tree to be generated; identifying a target question-answer pair belonging to the fault domain; Parsing the slice answers in the target question-answer pair to obtain a plurality of reference prompt information; Determine the target progressive relationship corresponding to the target question-answer pair based on the multiple reference prompt information; A target fault tree corresponding to the current fault field is generated by combining the target progressive relationship and the plurality of reference prompt information.
7. The method for generating a fault tree according to claim 1, characterized in that: After constructing a question-answer pair based on the slice question and the slice answer, and generating a target fault tree corresponding to the fault handling file based on a progressive relationship between different question-answer pairs, the method further includes: Determine the target code format that allows the target fault tree to be output and displayed; Obtaining a coding strategy and a coding database corresponding to the target code format; The target fault tree is converted into code based on the coding strategy and the coding database.
8. A fault tree generating device, characterized in that: include: A determination module, used to determine a knowledge base corresponding to a fault handling file of a target device, wherein the knowledge base includes a database and a vector library, the database is used to classify and store a plurality of slice knowledge corresponding to the fault handling file, each slice knowledge corresponds to a type of fault, and the vector library is used to store vector information corresponding to each type of fault; A processing module, used to process the knowledge base through a preset large model to obtain slice questions corresponding to different slices in the knowledge base and slice answers corresponding to the slice questions; A generation module is used to construct a question-answer pair based on the slicing question and the slicing answer, and to generate a target fault tree corresponding to the fault processing file based on the progressive relationship between different question-answer pairs.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Knowledge base optimization method of intelligent IETM fault maintenance auxiliary system
CN110750655A
Enterprise knowledge base question and answer pair generation method based on large model and knowledge graph
CN117035099A
Fault diagnosis tree generation method and device, equipment and medium
CN118093950A
Cited By
Fault processing method and device, storage medium, program product and electronic equipment
CN120196728A
Fault handling method, device, storage medium, program product, and electronic device
CN120196728B
