Equipment state analysis method, electronic equipment and storage medium
By using the combination of device data, prompt word generator and large language model, automated equipment status analysis is realized, solving the problem of manual intervention in the prior art, and improving analysis efficiency and accuracy.
Patent Information
- Application Number
- CN202411532527.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-14
AI Technical Summary
The existing equipment status analysis method requires manual intervention and cannot be automated.
By obtaining the device data of the target device, the prompt word generator and the large language model, the model interaction data is determined, and the device state analysis and reasoning is automated through the model interaction data, the prompt word generator and the large language model.
It realizes equipment status analysis without manual intervention, improves the efficiency and accuracy of the analysis, and can quickly and efficiently realize the reuse and promotion of expert knowledge.
Smart Images

Figure CN119442028A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the technical field of device status analysis, and in particular to a device status analysis method, an electronic device, and a storage medium. Background Art
[0002] Equipment status analysis is a complex process that involves multiple steps such as equipment classification, fault presetting, mechanism modeling, parameter alignment, time scale classification, pattern recognition and classification, and secondary data collection to ensure the accuracy and reliability of the analysis. The entire process requires not only multidisciplinary knowledge such as mechanical engineering, electrical engineering, and computer science, but also cross-disciplinary cooperation to be completed effectively.
[0003] Current equipment status analysis methods include expert consultation, fault tree, event tree, expert system, data-driven diagnosis, Bayesian network and fault simulation, etc. However, the above methods require human intervention and cannot achieve automated equipment status analysis. Summary of the invention
[0004] The embodiment of the present invention provides a device status analysis method, an electronic device and a storage medium to implement automated device status analysis.
[0005] According to one aspect of the present invention, a device status analysis method is provided, which may include:
[0006] Obtain device data, prompt word generator, and large language model of the target device;
[0007] Determine model interaction data based on device data and large language models;
[0008] Inputting the model interaction data into a prompt word generator, and inputting a first prompt word generated by the prompt word generator into a large language model to obtain a first output result;
[0009] According to the first prompt word and the first output result, a state analysis is performed on the target device to obtain a device state analysis result.
[0010] According to another aspect of the present invention, there is provided an electronic device, which may include:
[0011] at least one processor; and
[0012] a memory communicatively connected to at least one processor; wherein,
[0013] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the device status analysis method provided by any embodiment of the present invention is implemented when the at least one processor executes the computer program.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, on which computer instructions are stored. The computer instructions are used to enable a processor to implement the device status analysis method provided by any embodiment of the present invention when executed.
[0015] The technical solution of the embodiment of the present invention obtains the device data, prompt word generator and large language model of the target device to obtain the factors related to the device status analysis; determines the model interaction data according to the device data and the large language model to determine the model interaction data that represents the basic understanding of the device status analysis; inputs the model interaction data into the prompt word generator, and inputs the first prompt word generated by the prompt word generator into the large language model to obtain the first output result, thereby realizing the automatic reasoning of the device status analysis through the model interaction data, the prompt word generator and the large language model; performs status analysis on the target device according to the first prompt word and the first output result, obtains the device status analysis result, and realizes the device status analysis. The above technical solution can perform device status analysis without manual intervention through device data, prompt word generator and large language model, thereby realizing automatic device status analysis.
[0016] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0018] Figure 1 is a flow chart of a device status analysis method provided according to an embodiment of the present invention;
[0019] Figure 2 is a flow chart of another device status analysis method provided according to an embodiment of the present invention;
[0020] Figure 3 is an example diagram of a first prompt word in a device status analysis method provided according to an embodiment of the present invention;
[0021] Figure 4 is a flow chart of another device status analysis method provided according to an embodiment of the present invention;
[0022] Figure 5is a flowchart of a prompt word generator trained in another device status analysis method provided in an embodiment of the present invention;
[0023] Figure 6 is a flowchart of a problem clarification stage in an optional example of another device status analysis method provided by an embodiment of the present invention;
[0024] Figure 7 is a flowchart of a logic verification phase in an optional example of another device status analysis method provided in an embodiment of the present invention;
[0025] Figure 8 is a structural block diagram of a device status analysis apparatus provided according to an embodiment of the present invention;
[0026] Fig. 9 It is a schematic diagram of the structure of an electronic device for implementing the device status analysis method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0027] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention 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 invention described herein can be implemented in an order other than those illustrated or described herein. The situations of "target", "original", etc. are similar and will not be repeated here. In addition, the terms "including" and "having" and any variations thereof 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.
[0029] Figure 11 is a flow chart of a device status analysis method provided in an embodiment of the present invention. This embodiment is applicable to the case of device status, and is particularly applicable to the case of industrial equipment operation status analysis. The method can be executed by the device status analysis device provided in an embodiment of the present invention, and the device can be implemented by software and / or hardware, and the device can be integrated in an electronic device, and the electronic device can be various user terminals or servers.
[0030] See also Figure 1 The method of the embodiment of the present invention specifically includes the following steps:
[0031] S110, obtaining device data, a prompt word generator, and a large language model of a target device.
[0032] The target device is a device for which device status analysis is required; the target device may be, for example, an industrial device. The device data is data related to the target device; the device data may be, for example, structured data; the device data may include at least one of the device name of the target device, the device specification, the real-time data generated by the current operation of the target device, and the historical maintenance records. The device specification may include at least one of the device model, manufacturer, and installation date. The real-time data may include at least one of the current values of the target device, such as temperature, pressure, and rotation speed. The historical maintenance records may include the maintenance log of the target device, etc.
[0033] It is understandable that a large language model refers to a large pre-trained language model with a parameter volume of one billion or more. It receives a large amount of text training including data and knowledge, and then learns the statistical laws and semantic information of the language, and can generate fluent and natural text to answer various questions. In this process, the large language model can naturally integrate specific data and abstract knowledge in the format of text, providing a way to realize equipment status analysis. However, equipment status analysis often requires experts to perform analysis through multi-step logical reasoning. Although the large language model can retrieve and paraphrase professional materials according to the requirements of the input prompt words, it lacks the reasoning ability involving mathematical knowledge, and therefore cannot be directly applied in equipment status analysis. Therefore, in an embodiment of the present invention, the large language model can be guided by using a prompt word generator to perform step-by-step reasoning, thereby realizing automated equipment status analysis.
[0034] It should be noted that the prompt word generator is a neural network with an encoder structure as its main body, and its input is the conversation text related to the large language model, or the conversation text between the large language model and the prompt word generator, and its output is the probability of the prompt word code (1 to 30) of the prompt word library. The prompt word corresponding to the prompt word code with the highest probability output by the prompt word generator can be used as the output result of the prompt word generator. In the embodiment of the present invention, the structure and parameters of the prompt word generator are not specifically limited.
[0035] In the embodiment of the present invention, for example, the device name in the device data can be obtained; the device manual interface can be called according to the device name to obtain the device manual, that is, the input of the device manual interface is the device name, and the output is the description text of the device manual of the target device including the device model, device manufacturer (manufacturer), production date, commissioning date, instructions for use, installation date and operating procedures; the real-time data interface can be called according to the device name to obtain real-time data output in the form of a dictionary, that is, the input of the real-time data interface is the device name, and the output is the real-time data in the form of a dictionary consisting of Chinese descriptions and real-time values of all measurement points related to the target device; the maintenance log interface can be called according to the device name to obtain the maintenance log output in the form of a dictionary including time and content as a historical maintenance record, that is, the input of the maintenance log interface is the device name, and the output is the maintenance log related to the target device, and the maintenance log is in the form of a dictionary consisting of time and maintenance content. In the embodiment of the present invention, there is no specific limitation on the method of obtaining the device data of the target device.
[0036] S120: Determine model interaction data based on device data and the large language model.
[0037] Among them, model interaction data is the data generated by interacting with the large language model; model interaction data can also be understood as the interactive dialogue history generated during the interaction with the large language model.
[0038] In the embodiment of the present invention, for example, a pre-prompt word can be constructed based on the device data. The pre-prompt word can, for example, represent the current requirement that the task performed by the large language model is to list all possible current operating states of the target device; the pre-prompt word is input into the large language model to obtain a pre-output result, which can be, for example, all possible current operating states of the target device; the pre-output result and the pre-prompt word are used as model interaction data. Among them, constructing the pre-prompt word based on the device data can, for example, be constructing the pre-prompt word based on the device data in a hard-coded manner, or, for example, the device data can be fused with a preset first prompt word template to obtain the pre-prompt word, and so on. In the embodiment of the present invention, there is no specific limitation on the method of determining the model interaction data based on the device data and the large language model.
[0039] In an embodiment of the present invention, determining model interaction data based on device data and a large language model can be used as a problem-clarifying stage. By determining model interaction data based on device data and a large language model, the device type and analysis task of the target device of the demand analysis can be defined, so that the large language model can have a basic understanding of device status analysis and transform the status analysis problem into a classification problem.
[0040] S130: input the model interaction data into a prompt word generator, and input the first prompt word generated by the prompt word generator into the large language model to obtain a first output result.
[0041] The first prompt word is a prompt word generated by the prompt word generator; it should be noted that the first prompt word can be expressed in the form of a word or a sentence, that is, there is no specific limitation on the length and expression form of the first prompt word; the number of the first prompt word can be at least one. The first output result is the output result of the large language model.
[0042] In the embodiment of the present invention, there is no specific limitation on the method of inputting the model interaction data into the prompt word generator, and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result.
[0043] S140: Perform status analysis on the target device according to the first prompt word and the first output result to obtain a device status analysis result.
[0044] The device status analysis result is the result of status analysis of the target device; the device status analysis result may include at least one of the diagnosis result, status detection result, and performance analysis result of the target device, etc., which is not specifically limited here.
[0045] In the embodiment of the present invention, for example, the first output result can be used as the device state analysis result; for another example, the model interaction data can be updated according to the first prompt word and the first output result, and the steps of inputting the model interaction data into the prompt word generator and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result are repeatedly performed, until the first prompt word is a prompt word of the inductive summary type, and the corresponding first output result is used as the device state analysis result; etc. In the embodiment of the present invention, the method of performing state analysis on the target device according to the first prompt word and the first output result to obtain the device state analysis result is not specifically limited.
[0046] It is understandable that the current device status analysis method not only cannot realize automated device status analysis, but also has the problem of difficulty in quickly and efficiently realizing the reuse and promotion of expert knowledge, and difficulty in effectively integrating the device data of the device and the device status analysis process mechanism. The above-mentioned technical scheme of the embodiment of the present invention can not only realize automated device status analysis, but also can quickly and efficiently realize the reuse and promotion of expert knowledge, and effectively integrate the device data of the device and the device status analysis process mechanism.
[0047] In the embodiment of the present invention, the device status analysis result may correspond one-to-one with all possible current operating states of the target device.
[0048] The technical solution of the embodiment of the present invention obtains the device data, prompt word generator and large language model of the target device to obtain the factors related to the device status analysis; determines the model interaction data according to the device data and the large language model to determine the model interaction data that represents the basic understanding of the device status analysis; inputs the model interaction data into the prompt word generator, and inputs the first prompt word generated by the prompt word generator into the large language model to obtain the first output result, thereby realizing the automatic reasoning of the device status analysis through the model interaction data, the prompt word generator and the large language model; performs status analysis on the target device according to the first prompt word and the first output result, obtains the device status analysis result, and realizes the device status analysis. The above technical solution can perform device status analysis without manual intervention through device data, prompt word generator and large language model, thereby realizing automatic device status analysis.
[0049] Figure 2 is a flow chart of another device status analysis method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, according to the first prompt word and the first output result, the state analysis of the target device is performed to obtain the device status analysis result, including: according to the first prompt word and the first output result, the model interaction data is updated; according to the model interaction data, the state analysis of the target device is performed to obtain the device status analysis result.
[0050] The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0051] See also Figure 2 The method of this embodiment may specifically include the following steps:
[0052] S210: Acquire device data, a prompt word generator, and a large language model of a target device.
[0053] S220: Determine model interaction data based on device data and the large language model.
[0054] S230: input the model interaction data into a prompt word generator, and input the first prompt word generated by the prompt word generator into the large language model to obtain a first output result.
[0055] S240: Update the model interaction data according to the first prompt word and the first output result.
[0056] In the embodiment of the present invention, for example, the first prompt word and the first output result can be added to the model interaction data, and the model interaction data can be updated according to the obtained data addition result. In the embodiment of the present invention, the method of updating the model interaction data according to the first prompt word and the first output result is not specifically limited.
[0057] S250: Perform status analysis on the target device according to the model interaction data to obtain a device status analysis result.
[0058] In the embodiment of the present invention, for example, the model interaction data may be analyzed to obtain the device state analysis result; for another example, the step of inputting the model interaction data into the prompt word generator, and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result may be repeatedly performed until the first prompt word is a prompt word of the summary type, and the corresponding first output result is used as the device state analysis result; etc. In the embodiment of the present invention, the method of performing state analysis on the target device according to the model interaction data to obtain the device state analysis result is not specifically limited.
[0059] The technical solution of the embodiment of the present invention updates the model interaction data according to the first prompt word and the first output result, and performs a state analysis on the target device according to the model interaction data to obtain a device state analysis result. The obtained device state analysis result can take into account not only the first output result output by the large language model, but also the entire model interaction data that interacts with the large language model, thereby improving the accuracy of determining the obtained device state analysis result.
[0060] An optional technical solution, updating model interaction data according to a first prompt word and a first output result, includes: adding the first prompt word and the first output result into the model interaction data, and updating the model interaction data according to the obtained data addition result; after updating the model interaction data according to the obtained data addition result, it also includes: when the first prompt word is not a prompt word of the inductive summary class, repeatedly inputting the model interaction data into a prompt word generator, and inputting the first prompt word generated by the prompt word generator into a large language model to obtain a first output result.
[0061] The data adding result is the result obtained by adding the first prompt word and the first output result into the model interaction data.
[0062] In the embodiment of the present invention, there is no specific limitation on the manner of adding the first prompt word and the first output result into the model interaction data and updating the model interaction data according to the obtained data adding result.
[0063] In an embodiment of the present invention, the process of repeatedly inputting the model interaction data into the prompt word generator and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result can be regarded as a stage of causal reasoning. In the causal reasoning stage, multi-step reasoning can be performed based on all possible current operating states of the target device in the model interaction data. Each step of reasoning is a process of repeatedly inputting the model interaction data into the prompt word generator and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result. The multi-step reasoning can involve the comprehensive use of multiple reasoning methods, including at least one of data collection, information organization, association analysis, pattern recognition, divide and conquer, traceability, statistics and induction and summary, etc. Each reasoning method contains a different first prompt word, that is, since the model interaction data input into the prompt word generator each time is updated and different from the model interaction data before the update, correspondingly, the first prompt word generated by the prompt word generator each time may also be different with the model interaction data. Therefore, the comprehensive use of multiple reasoning methods for causal reasoning can be achieved.
[0064] In an embodiment of the present invention, the type of the first prompt word may be, for example, at least one of the prompt words of the types of data collection, information organization, association analysis, pattern recognition, divide and conquer, traceability, statistics, and induction and summary. Among them, the first prompt word of the data collection type can enable the large language model to retrieve the original data such as equipment data and / or historical data through external functions when further analysis is required during the reasoning process to assist the analysis process; the first prompt word of the information organization type can enable the large language model to extract the relationship between the numerical value and trend of key parameters and maintenance during the reasoning process, and analyze the number and type of target equipment failures and their manifestations in the data; the first prompt word of the association analysis type can enable the large language model to construct the correlation between operating parameters, maintenance records, fault types and current status during the reasoning process, and clarify the logical relationship and probability between various types of faults; the first prompt word of the pattern recognition type can enable the large language model to , identify data anomalies, identify state anomalies, and match with historical fault states; the first prompt word of the divide-and-conquer type can enable the large language model to check for abnormal clues feature by feature, parameter by parameter, component by component, and / or history by history during the reasoning process; the first prompt word of the abductive type can guide the large language model to make assumptions, verify, sort, and / or exclude logical reasoning during the reasoning process to narrow the scope of the conclusion; the first prompt word of the statistical type can enable the large language model to use maintenance logs and operating data during the reasoning process to clarify the differences between various types of faults on the timeline and quantify the risk level; the first prompt word of the inductive type can enable the large language model to converge logical reasoning during the reasoning process to guide the large language model to draw the final conclusion.
[0065] It should be noted that, in the case where the type of the first prompt word is a data acquisition type, a historical data interface may be called through an external function, the input of the historical data interface is a Chinese description of the measuring point, a start time string, an end time string and / or a sampling period, etc., and the output is the original data consisting of time series data sampled at a specified period within a specified time range of the measuring point. It should be noted that at least one of the equipment manual interface, real-time data interface, maintenance log interface and historical data interface mentioned in the embodiments of the present invention may be an interface in a pre-built external call function library.
[0066] For example, see Figure 3In the case where the type of the first prompt word includes the data collection type, the first prompt word may include, for example, "If you need to further obtain historical data, please return the following request parameters in sequence: Chinese description of the measuring point, start time string, end time string, sampling period. (That is, after generating the request parameters, the historical data interface is automatically called and fed back to the large language model)"; in the case where the type of the first prompt word includes the information sorting type, the first prompt word may include, for example, "sort out the values and trends of key parameters before the maintenance time", "sort out the values and trends of parameters that have changed significantly before and after the maintenance", "analyze the number and type of equipment failures" and "analyze the performance of various types of failures in the data" and at least one of the following. ; In the case where the type of the first prompt word includes the association analysis type, the first prompt word may, for example, include at least one of "constructing a correlation matrix between equipment operating parameters", "analyzing the relationship between maintenance records and equipment failures", "comparing changes in key parameters before and after failures", "analyzing the data correlation between the current state and various common failures", "analyzing the logical relationship and causal relationship between different failure types", and "analyzing the probability of occurrence of various possible failures", etc.; In the case where the type of the first prompt word includes the pattern recognition type, the first prompt word may, for example, include "finding data points and time periods that do not match the normal operating range", "identifying the current state based on key parameters and possible failures, and analyzing the probability of occurrence of various possible failures", etc. At least one of "sort by probability" and "match the pattern of historical fault states according to the current key parameters and sort by probability", etc.; in the case where the type of the first prompt word includes the divide-and-conquer type, the first prompt word may, for example, include "check one by one whether the current device state meets various fault characteristics according to the characteristics of the possible fault state", "According to the manual, what components can the device be divided into? List the possible operating states of each component", "Analyze the deviation between the current key parameters and the design parameters one by one", and "Compare the current system key parameters with the data records during historical normal operation to find the differences", etc.; in the case where the type of the first prompt word includes the traceability type In the case where the first prompt word type includes a statistical type, the first prompt word may include at least one of "based on the previous analysis, describe the possible causes of the current phenomenon", "assuming that the above analysis is correct, try to overturn this analysis", "analyze the causal relationship between the key parameter values and their potential causes", and "eliminate the impossible fault types in the above analysis", etc.; in the case where the type of the first prompt word includes a statistical type, the first prompt word may include at least one of "statistically calculate the number of occurrences of various faults in the maintenance record", "are various possible faults short-term sudden faults or long-term slow-changing faults", "whether various possible faults have periodicity", "quantify the risk level of various faults", and "analyze the remaining life of equipment and components", etc.;In the case where the type of the first prompt word includes the type of summary, the first prompt word may include, for example, at least one of "select the most likely fault cause from the above multiple possible fault causes", "combine all collected data and analysis results to make a comprehensive assessment of the overall health status of the equipment", and "assess the risk level of different components or systems based on the fault frequency and impact, and determine the priority items to be handled". ;
[0067] In an embodiment of the present invention, by repeatedly executing the steps of inputting model interaction data into a prompt word generator and inputting the first prompt word generated by the prompt word generator into a large language model to obtain a first output result when the first prompt word is not a prompt word of the inductive summary type, multi-step reasoning of device status analysis can be implemented, thereby improving the accuracy and comprehensiveness of the obtained device status analysis results.
[0068] Another optional technical solution is to perform a status analysis on the target device based on the model interaction data to obtain a device status analysis result, including: performing a logic check on the model interaction data based on the large language model to obtain a logic check result; performing a status analysis on the target device based on the logic check result to obtain a device status analysis result of the target device.
[0069] The logic check result is the result obtained by performing logic check on the model interaction data.
[0070] In an embodiment of the present invention, the process of performing logic verification on the model interaction data according to the large language model to obtain the logic verification result, performing status analysis on the target device according to the logic verification result, and obtaining the device status analysis result of the target device can be regarded as a logic verification stage. In the logic verification, the step-by-step logical reasoning of the above-mentioned device status analysis process can be reviewed, guiding the large language model to self-verify the logical reasoning process, and pruning redundant reasoning processes, thereby improving the accuracy of the device status analysis.
[0071] In an embodiment of the present invention, the model interaction data is the interactive dialogue history generated by the dialogue with the large language model during the above-mentioned process of device status analysis. For example, a post-prompt word can be constructed based on the model interaction data. The post-prompt word can, for example, represent that the task currently required of the large language model is to perform a logic check, so as to guide the large language model to check the reasoning process through the post-prompt word; the post-prompt word is input into the large language model to obtain a logic check result. Among them, the post-prompt word is constructed based on the model interaction data, for example, the post-prompt word can be constructed based on the model interaction data in a hard-coded manner, and the model interaction data can be merged with a preset second prompt word template to obtain the post-prompt word, and so on. In an embodiment of the present invention, the method of performing a logic check on the model interaction data according to the large language model to obtain the logic check result is not specifically limited.
[0072] In the embodiment of the present invention, for example, when the logic verification result indicates that the model interaction data has a logic vulnerability, the model interaction data can be updated according to the re-logic verification result and the model interaction data, and the above steps of generating the first prompt word and so on can be performed again; when the logic verification result indicates that the model interaction data does not have a logic vulnerability, the state analysis of the target device is performed according to the logic verification result to obtain the device state analysis result. In the embodiment of the present invention, the method of performing the state analysis of the target device according to the logic verification result to obtain the device state analysis result of the target device is not specifically limited.
[0073] In an embodiment of the present invention, by performing logic verification on the model interaction data according to a large language model, and then performing status analysis on the target device according to the obtained logic verification result, to obtain a device status analysis result of the target device, the influence of logic errors in the process of obtaining the model interaction data on the accuracy of the device status analysis result can be avoided, thereby improving the accuracy of the device status analysis.
[0074] Based on the above scheme, there is another optional technical scheme, which performs a status analysis on the target device according to the logic verification result to obtain the device status analysis result of the target device, including: when the logic verification result indicates that the model interaction data has a logic vulnerability, the model interaction data is updated according to the model interaction data and the logic verification result, and the model interaction data is input into the prompt word generator repeatedly, and the first prompt word generated by the prompt word generator is input into the large language model to obtain a first output result; when the logic verification result indicates that the model interaction data does not have a logic vulnerability, the target device is analyzed according to the logic verification result to obtain the device status analysis result.
[0075] In an embodiment of the present invention, when the logic check result indicates that the model interaction data has a logic loophole, the model interaction data can be updated according to the model interaction data and the description of the logic loophole in the logic check result, so that the model interaction data is input into a prompt word generator to construct a first prompt word for re-performing causal reasoning, and the first prompt word generated by the prompt word generator is input into the large language model to guide the large language model to re-perform causal reasoning to obtain a first output result. In an embodiment of the present invention, when the logic check result indicates that the model interaction data has a logic loophole, the model interaction data is updated according to the model interaction data and the logic check result, and the steps of inputting the model interaction data into the prompt word generator and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result are not specifically limited.
[0076] In the embodiment of the present invention, when the logic verification result indicates that the model interaction data does not have a logic vulnerability, that is, when the logic verification passes, the diagnostic analysis result in the logic verification result can be structured to obtain a structured device status analysis result. In the embodiment of the present invention, when the logic verification result indicates that the model interaction data does not have a logic vulnerability, the state analysis of the target device is performed according to the logic verification result to obtain the device status analysis result without specific limitation.
[0077] In an embodiment of the present invention, when the logic verification result indicates that the model interaction data has a logic loophole, the model interaction data is re-input into the prompt word generator and the subsequent process, and when the logic verification result indicates that the model interaction data does not have a logic loophole, a state analysis is performed on the target device according to the logic verification result to obtain a device state analysis result, which can further avoid the influence of logic errors in the process of obtaining the model interaction data on the accuracy of the device state analysis result, thereby further improving the accuracy of the device state analysis.
[0078] Figure 4 It is a flow chart of another device status analysis method provided in an embodiment of the present invention. This embodiment is optimized based on the above-mentioned technical solutions. In this embodiment, optionally, the prompt word generator is pre-trained by the following steps: obtaining sample data of the sample device and the device status analysis label of the sample data; based on the sample data, the device status analysis label and the large language model, the original generator is trained to obtain the prompt word generator.
[0079] The explanations of the terms that are the same as or corresponding to the above embodiments are not repeated here.
[0080] See also Figure 4 The method of this embodiment may specifically include the following steps:
[0081] S310: Obtain sample data of a sample device and a device status analysis tag of the sample data.
[0082] The sample device is a device corresponding to the sample data used to train the prompt word generator. The sample data is data used to train the prompt word generator; the number of sample data can be one or more. The device state analysis label is a label that characterizes the state analysis result of the sample device corresponding to the sample data.
[0083] In the embodiment of the present invention, for example, sample data of the sample device and the device state analysis tag of the sample data can be obtained from the sample library. In the embodiment of the present invention, the method of obtaining the sample data of the sample device and the device state analysis tag of the sample data is not specifically limited.
[0084] S320: Based on the sample data, the device status analysis label and the large language model, the original generator is trained to obtain a prompt word generator.
[0085] In the embodiment of the present invention, for example, the original generator can be trained based on sample data, device state analysis labels, and a large language model, and the original generator can be updated according to the training results. The steps of obtaining sample data of the sample device and the device state analysis labels of the sample data are repeated until the training of the original generator is completed, and the obtained original generator is used as the prompt word generator. In the embodiment of the present invention, the method of training the original generator based on sample data, device state analysis labels, and a large language model to obtain the prompt word generator is not specifically limited.
[0086] S330: Obtain device data, a prompt word generator, and a large language model of the target device.
[0087] S340: Determine model interaction data based on device data and the large language model.
[0088] S350: input the model interaction data into a prompt word generator, and input the first prompt word generated by the prompt word generator into the large language model to obtain a first output result.
[0089] S360: Perform status analysis on the target device according to the first prompt word and the first output result to obtain a device status analysis result.
[0090] The technical solution of the embodiment of the present invention can improve the accuracy and applicability of prompt words generated by the trained prompt word generator by training the original generator based on sample data, device status analysis labels and a large language model to obtain a prompt word generator.
[0091] An optional technical solution, based on sample data, device state analysis labels and a large language model, trains an original generator to obtain a prompt word generator, including: determining sample interaction data according to the sample data and the large language model; inputting the sample interaction data into the original generator, and inputting the second prompt word generated by the original generator into the large language model to obtain a second output result; performing state analysis on the sample device according to the second prompt word and the second output result to obtain a sample state analysis result and update the sample interaction data; adjusting the original generator according to the sample state analysis result, the sample interaction data and the device state analysis label to obtain a prompt word generator.
[0092] Among them, the sample interaction data is the data generated by interacting with the large language model based on the sample data. The second prompt word is the prompt word generated by the original generator; it should be noted that the second prompt word can be expressed in the form of vocabulary or in the form of a sentence, that is, there is no specific limitation on the length and expression form of the second prompt word; the number of the second prompt word can be at least one. The second output result is the output result of the large language model. The sample state analysis result is the result obtained by performing state analysis on the sample device; the sample state analysis result can include, for example, at least one of the diagnosis result, state detection result, and performance analysis result of the sample device, etc., which are not specifically limited here.
[0093] In an embodiment of the present invention, the method of determining sample interaction data based on sample data and a large language model may be the same as or different from the method of determining model interaction data based on device data and a large language model; the method of inputting sample interaction data into the original generator and inputting the second prompt word generated by the original generator into the large language model to obtain the second output result may be the same as or different from the method of inputting model interaction data into the prompt word generator and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result; the method of performing state analysis on a sample device based on the second prompt word and the second output result to obtain a sample state analysis result may be the same as or different from the method of performing state analysis on a target device based on the first prompt word and the first output result to obtain a device state analysis result. In an embodiment of the present invention, the scope of the above process is not specifically limited.
[0094] In the embodiment of the present invention, for example, the second prompt word and the second output result can be added to the sample interaction data, and the model interaction data can be updated according to the obtained sample addition result; for another example, the interaction data related to the large language model generated in the process of performing state analysis on the sample device according to the second prompt word and the second output result to obtain the sample state analysis result can be used to update the sample interaction data. In the embodiment of the present invention, the manner of performing state analysis on the sample device according to the second prompt word and the second output result to update the sample interaction data is not specifically limited.
[0095] In the embodiment of the present invention, for example, the optimization gradient can be calculated based on the sample state analysis results, the sample interaction data, and the device state analysis label, and the original generator can be adjusted based on the result of calculating the optimization gradient to obtain the prompt word generator. In the embodiment of the present invention, the method of adjusting the original generator based on the sample state analysis results, the sample interaction data, and the device state analysis label to obtain the prompt word generator is not specifically limited.
[0096] In an embodiment of the present invention, sample interaction data can be determined based on sample data and a large language model, the sample interaction data can be input into an original generator, and a second prompt word generated by the original generator can be input into the large language model to obtain a second output result. According to the second prompt word and the second output result, a state analysis is performed on a sample device to obtain a sample state analysis result and a process of updating the sample interaction data, thereby realizing the interaction between the original generator and the large language model, and adjusting the original generator according to the result obtained by the interaction to obtain a prompt word generator. This can make the trained prompt word generator more suitable for interacting with the large language model, thereby facilitating the realization of automated device state analysis.
[0097] Based on the above scheme, another optional technical scheme is to adjust the original generator according to the sample state analysis results, sample interaction data and device state analysis labels to obtain a prompt word generator, including: determining a group of sample interaction trajectories according to the sample state analysis results, device state analysis labels and sample interaction data; when the number of sample interaction trajectories is less than a preset number, repeating the steps of obtaining sample data of the sample device and device state analysis labels of the sample data; when the number of sample interaction trajectories is greater than or equal to a preset number, adjusting the original generator according to at least one group of sample interaction trajectories obtained to obtain a prompt word generator.
[0098] The sample interaction trajectory may represent the interaction-related data generated during the interaction between the original generator corresponding to the sample data and the large language model; the sample interaction trajectory may include, for example, at least one of the second prompt word generated during the interaction between the original generator corresponding to the sample data and the large language model, the sample interaction data, and the result of determining whether the sample state analysis result is correct based on the sample state analysis result and the device state analysis label, etc. The preset number is the number of sample interaction trajectories when repeatedly executing the steps of obtaining the sample data of the sample device and the device state analysis label of the sample data.
[0099] For example, see Figure 5, obtain a large language model LLM; initialize the original generator of random parameters a=G(s) and the state value neural network v=V(s) and the interactive training count k=0; initialize the sample count n=0 of the sample data, and the sample count is the number of sample data that have been obtained; randomly obtain sample data of sample devices with or without faults and the corresponding analysis conclusions of the sample data from the sample library as device status analysis labels, and the sample data may include at least one of the device name of the sample device, the device manual, the real-time data generated by the current operation of the sample device, the historical maintenance record and the historical data; construct sample pre-prompt words according to the sample data, and input the sample pre-prompt words into the large language model LLM to obtain sample interaction data s; input the sample interaction data s into the original generator G to obtain the probabilities corresponding to each candidate prompt word; use the candidate prompt word with the largest probability among the candidate prompt words as the second prompt word a; input the second prompt word a into the large language model, and update the sample interaction data s according to the second output result and the second prompt word; judge the Whether the second prompt word a is a prompt word of the inductive summary type, if the second prompt word a is not a prompt word of the inductive summary type, reward r=0, and repeatedly execute the step of inputting the sample interaction data s into the original generator G to obtain the probabilities corresponding to each candidate prompt word; if the second prompt word a is a prompt word of the inductive summary type, perform logic verification on the sample interaction data s according to the large language model to obtain a sample verification result; if the sample verification result indicates that the sample interaction data s has a logic vulnerability, update the sample interaction data s according to the sample interaction data s and the sample verification result, reward r=0, and repeatedly execute the step of inputting the sample interaction data s into the original generator G to obtain the probabilities corresponding to each candidate prompt word; if the sample verification result indicates that the sample interaction data s does not have a logic vulnerability, obtain a structured sample state analysis result according to the logic verification result; judge whether the sample state analysis result is correct according to the sample state analysis result and the device state analysis label, and reward r=1 if it is correct, and reward r=0 if it is wrong;According to the second prompt word a, reward r, and sample interaction data s generated after each round of repeated execution of the step of inputting the sample interaction data s into the original generator G to obtain the probabilities corresponding to the alternative prompt words, a set of sample interaction trajectories {s0, a0, r0, s1, a1, r1, …} is determined, where the subscript "0" or "1" in the sample interaction trajectory represents the number of rounds of repeated execution of the step of inputting the sample interaction data s into the original generator G to obtain the probabilities corresponding to the alternative prompt words, and s0 refers to the first execution of inputting the sample interaction data s into the original generator G to obtain the probabilities corresponding to the alternative prompt words. After the step of calculating the probabilities corresponding to the words respectively, the second prompt word a is input into the large language model, and the s obtained in the step of updating the sample interaction data s is updated according to the second output result and the second prompt word; when the number of sample interaction trajectories, that is, the sample count n, is not the preset number 1000, n=n+1, and the step of randomly obtaining sample data of sample devices with or without faults and the corresponding analysis conclusions of the sample data as device status analysis labels from the sample library is repeated; when the number of sample interaction trajectories, that is, the sample count n, is equal to the preset number 1000, a copy of the parameter G of the original generator G is made; old , set the iteration count m = 0, collect the 1000 groups of sample interaction trajectories [{s0,a0,r0,s1,a1,r1,…},{s0,a0,r0,s1,a1,r1,…},…]; for each group of state transition pairs in the 1000 groups of sample interaction trajectories [{s0,a0,r0,s1,a1,r1,…},{s0,a0,r0,s1,a1,r1,…},…] t ,a t ,r t >, calculate the state value target v t =r t +0.9·r t+1 +1+0.9 2 ·r t+2 +…, calculate the advantage function value A t =v t -V(s t ), calculate the probability ratio b t =G(s t ) / G old (s t ), calculate the optimization objective function L t =min(b t A t ,clip(b t ,0.9,1.1))-0.2·(V(s t )-v t ) 2 +0.2·(-Σpi log(p i )), where p i is G(s t ) outputs the probability value of the i-th second prompt word; using the Adam optimizer to perform gradient ascent calculation to increase L t Update the parameters of G and V in the direction of 1 step; determine whether m is equal to 100, if not, then m = m + 1, and repeat for each set of state transition pairs in the 1000 sets of sample interaction trajectories [{s0, a0, r0, s1, a1, r1, …}, {s0, a0, r0, s1, a1, r1, …}, …] t ,a t ,r t >, calculate its state value target v t =r t +0.9·r t+1 +1+0.9 2 ·r t+2 +…, calculate its advantage function value A t =v t -V(s t ), calculate its probability ratio b t =G(s t ) / G old (s t ), calculate its optimization objective function L t =min(b t A t ,clip(b t ,0.9,1.1))-0.2·(V(s t )-v t ) 2 +0.2·(-Σp i log(p i )); if yes, then obtain G and V after a single round of optimization; determine whether the interactive training count k=0 is equal to 1000, if not, then k=k+1, and repeat the step of initializing the sample count n=0 of the sample data; if yes, then complete the training, and use the obtained original generator as the prompt word generator. The above technical scheme can be achieved by repeatedly executing the interactive link and the training link until the training of the prompt word generator is completed. Through repeated iterations of the interactive link and the training link, the sample generator will converge to the optimal solution, thereby obtaining a trained prompt word generator, wherein the interactive link refers to the original generator and the large language model, using the device operation status case library including the sample data of the sample device and the device status analysis label of the sample data, to conduct interactive question and answer. For any set of questions and answers, if the analysis conclusion obtained is the same as the case library, the reward value is 1, otherwise the reward value is 0; the training link refers to using the obtained sample interaction trajectory to calculate the optimization gradient and update the original generator.
[0100] In an embodiment of the present invention, there is no specific limitation on the process of determining a set of sample interaction trajectories based on sample state analysis results, device state analysis labels, and sample interaction data, and adjusting the original generator based on at least one set of sample interaction trajectories obtained to obtain a prompt word generator when the number of sample interaction trajectories is greater than or equal to a preset number.
[0101] In an embodiment of the present invention, by determining the sample interaction trajectory and then adjusting the original generator to obtain a prompt word generator, the trained prompt word generator can be made more suitable for interacting with a large language model, thereby facilitating automated device status analysis.
[0102] In order to better understand the technical solution of the above embodiment of the present invention, an optional example is provided here. Exemplarily, the device status analysis may include four stages: problem clarification, causal reasoning, logic verification, and structured output to obtain the device status analysis result. For details, see Figure 6, the device name can be obtained in the problem clarification stage; the device manual interface, real-time data interface and maintenance log interface are called according to the device name to obtain the device manual, real-time data and maintenance log output in the form of a dictionary including time and content; the pre-prompt word "the basic information of the device to be analyzed is {device manual}. The current operating status of the device is {real-time data}. The historical maintenance record of the device includes maintenance log}. Please list all possible current operating states of {device name} based on the information provided" is obtained by hard coding according to the device name, device manual, real-time data and maintenance log. The pre-prompt word is input into the large language model to obtain the pre-output result; the model interaction data is determined according to the pre-output result and the pre-prompt word. Causal reasoning can input the model interaction data into the prompt word generator, and input the first prompt word generated by the prompt word generator into the large language model to obtain the first output result; add the first prompt word and the first output result into the model interaction data, add the result according to the obtained data, and update the model interaction data; when the first prompt word is not a prompt word of the inductive summary type, repeatedly input the model interaction data into the prompt word generator, and input the first prompt word generated by the prompt word generator into the large language model to obtain the first output result. See Figure 7 In the logic verification stage, the device name and the model interaction data obtained by the causal reasoning interaction between the above-mentioned large language model and the prompt word generator can be hard-coded to obtain the post-prompt word "The following is the reasoning process for the analysis of the running status of {device name}: {model interaction data}, please determine whether there is a logical loophole in the above reasoning process? If not, please return to pass (Pass) and the analysis conclusion. If so, please describe the logical loophole"; when the logic verification result indicates that the model interaction data has a logical loophole, according to the device name, model interaction data and the logical loophole represented by the logic verification result, the model interaction data is updated to "The following reasoning process for the analysis of the running status of {device name} has a logical loophole, please correct it and re-analyze it: original reasoning process: {model interaction data history} logical loophole: {logical loophole}", and the steps of performing causal reasoning interaction between the above-mentioned large language model and the prompt word generator are repeated; when the logic verification result indicates that the model interaction data does not have a logical loophole, the analysis conclusion in the logic verification result is structured to obtain a structured output device status analysis result.
[0103] The technical solution of the embodiment of the present invention can utilize a multi-round dialogue prompt word library of typical equipment fault analysis, combined with an external function call, through interactive training, to obtain a prompt word generator for guiding a large language model to perform step-by-step reasoning, which can realize automatic analysis of the operating status of industrial equipment, and is of great significance for applications such as system status monitoring, fault diagnosis and performance analysis.
[0104] Figure 8 This is a structural block diagram of a device state analysis apparatus provided in an embodiment of the present invention, and the device is used to execute the device state analysis method provided in any of the above embodiments. The device and the device state analysis method of the above embodiments belong to the same inventive concept, and the details not described in detail in the embodiment of the device state analysis apparatus can refer to the embodiment of the above device state analysis method. Figure 8 The device may specifically include: a large language model acquisition module 410, a model interaction data determination module 420, a first output result acquisition module 430 and a device status analysis result acquisition module 440.
[0105] The large language model acquisition module 410 is used to acquire device data, a prompt word generator and a large language model of a target device;
[0106] A model interaction data determination module 420, for determining model interaction data according to device data and a large language model;
[0107] A first output result obtaining module 430 is used to input the model interaction data into a prompt word generator, and input the first prompt word generated by the prompt word generator into the large language model to obtain a first output result;
[0108] The device status analysis result obtaining module 440 is used to perform status analysis on the target device according to the first prompt word and the first output result to obtain the device status analysis result.
[0109] Optionally, the device status analysis result obtaining module 440 includes:
[0110] A model interaction data updating submodule, used for updating the model interaction data according to the first prompt word and the first output result;
[0111] The device status analysis result obtaining submodule is used to perform status analysis on the target device according to the model interaction data to obtain the device status analysis result.
[0112] Optionally, based on the above device, the model interaction data updating submodule includes:
[0113] A model interaction data updating unit, used to add the first prompt word and the first output result into the model interaction data, and update the model interaction data according to the obtained data addition result;
[0114] The device may also include:
[0115] The repeated execution module is used to add results according to the obtained data and update the model interaction data. When the first prompt word is not a prompt word of the inductive summary class, repeatedly execute the steps of inputting the model interaction data into the prompt word generator and inputting the first prompt word generated by the prompt word generator into the large language model to obtain the first output result.
[0116] Optionally, based on the above device, a submodule for obtaining the device status analysis result includes:
[0117] A logic verification result obtaining unit is used to perform logic verification on the model interaction data according to the large language model to obtain a logic verification result;
[0118] The device status analysis result obtaining unit is used to perform status analysis on the target device according to the logic verification result to obtain the device status analysis result of the target device.
[0119] Optionally, based on the above device, a device status analysis result obtaining unit includes:
[0120] A repeated execution subunit is used for updating the model interaction data according to the model interaction data and the logic verification result when the logic verification result indicates that the model interaction data has a logic loophole, and repeatedly executing the step of inputting the model interaction data into a prompt word generator, and inputting the first prompt word generated by the prompt word generator into the large language model to obtain a first output result;
[0121] The device status analysis result obtaining subunit is used to perform status analysis on the target device according to the logic verification result to obtain the device status analysis result when the logic verification result indicates that the model interaction data does not have a logic vulnerability.
[0122] Optionally, the device may also include the following modules to pre-train a prompt word generator:
[0123] A device status analysis label acquisition module is used to acquire sample data of a sample device and a device status analysis label of the sample data;
[0124] The prompt word generator obtains a module, which is used to train the original generator based on sample data, device status analysis labels and a large language model to obtain a prompt word generator.
[0125] Optionally, based on the above device, the prompt word generator obtains a module, including:
[0126] A sample interaction data determination submodule, used to determine the sample interaction data based on the sample data and the large language model;
[0127] A second output result obtaining submodule is used to input the sample interaction data into the original generator, and input the second prompt word generated by the original generator into the large language model to obtain a second output result;
[0128] A sample interaction data updating submodule, used to perform status analysis on the sample device according to the second prompt word and the second output result, obtain a sample status analysis result and update the sample interaction data;
[0129] The prompt word generator obtains a submodule, which is used to adjust the original generator according to the sample state analysis results, the sample interaction data and the device state analysis label to obtain the prompt word generator.
[0130] Optionally, based on the above device, the prompt word generator obtains submodules, including:
[0131] A sample interaction trajectory obtaining unit, used to determine a set of sample interaction trajectories according to the sample state analysis results, the device state analysis labels and the sample interaction data;
[0132] a repeating execution unit, configured to repeat the step of obtaining sample data of a sample device and a device status analysis label of the sample data when the number of sample interaction trajectories is less than a preset number;
[0133] The prompt word generator obtaining unit is used to adjust the original generator according to at least one group of obtained sample interaction trajectories to obtain the prompt word generator when the number of sample interaction trajectories is greater than or equal to a preset number.
[0134] The device state analysis device provided by the embodiment of the present invention acquires the device data, prompt word generator and large language model of the target device through the large language model acquisition module to achieve the acquisition of factors related to the device state analysis; determines the model interaction data according to the device data and the large language model through the model interaction data determination module to determine the model interaction data representing the basic understanding of the device state analysis; inputs the model interaction data into the prompt word generator through the first output result acquisition module, and inputs the first prompt word generated by the prompt word generator into the large language model to obtain the first output result, thereby achieving the inference of automatic device state analysis through the model interaction data, the prompt word generator and the large language model; performs state analysis on the target device according to the first prompt word and the first output result through the device state analysis result acquisition module to obtain the device state analysis result, thereby achieving the device state analysis. The above device can perform device state analysis without manual intervention through the device data, the prompt word generator and the large language model, thereby achieving the automatic device state analysis.
[0135] The device state analysis apparatus provided in the embodiment of the present invention can execute the device state analysis method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0136] It is worth noting that in the embodiment of the above-mentioned equipment status analysis device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0137] Fig. 9 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0138] like Fig. 9 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0139] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0140] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as the device status analysis method.
[0141] In some embodiments, the device state analysis method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the device state analysis method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to perform the device state analysis method in any other appropriate manner (e.g., by means of firmware).
[0142] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0143] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine as a stand-alone software package and partially on a remote machine, or entirely on a remote machine or server.
[0144] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0145] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0146] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0147] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0148] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0149] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A device status analysis method, characterized in that: include: Obtain device data, prompt word generator, and large language model of the target device; Determining model interaction data according to the device data and the large language model; Inputting the model interaction data into the prompt word generator, and inputting the first prompt word generated by the prompt word generator into the large language model to obtain a first output result; According to the first prompt word and the first output result, a status analysis is performed on the target device to obtain a device status analysis result.
2. The method according to claim 1, characterized in that The step of performing a status analysis on the target device according to the first prompt word and the first output result to obtain a device status analysis result includes: updating the model interaction data according to the first prompt word and the first output result; According to the model interaction data, a status analysis is performed on the target device to obtain a device status analysis result.
3. The method according to claim 2, characterized in that The updating of the model interaction data according to the first prompt word and the first output result includes: Adding the first prompt word and the first output result into the model interaction data, and updating the model interaction data according to the obtained data addition result; After the model interaction data is updated according to the obtained data adding result, the method further includes: In the case where the first prompt word is not a prompt word of the inductive summary type, the step of inputting the model interaction data into the prompt word generator, and inputting the first prompt word generated by the prompt word generator into the large language model is repeated to obtain a first output result.
4. The method according to claim 2, characterized in that: The step of performing status analysis on the target device according to the model interaction data to obtain a device status analysis result includes: According to the large language model, logic verification is performed on the model interaction data to obtain a logic verification result; According to the logic verification result, a status analysis is performed on the target device to obtain a device status analysis result of the target device.
5. The method according to claim 4, characterized in that The step of performing a status analysis on the target device according to the logic verification result to obtain a device status analysis result of the target device includes: In the case where the logic verification result indicates that the model interaction data has a logic loophole, the model interaction data is updated according to the model interaction data and the logic verification result, and the steps of inputting the model interaction data into the prompt word generator, and inputting the first prompt word generated by the prompt word generator into the large language model to obtain a first output result are repeatedly executed; When the logic verification result indicates that there is no logic vulnerability in the model interaction data, a status analysis is performed on the target device according to the logic verification result to obtain a device status analysis result.
6. The method according to claim 1, characterized in that The prompt word generator is pre-trained through the following steps: Acquire sample data of a sample device and a device status analysis tag of the sample data; Based on the sample data, the device status analysis label and the large language model, the original generator is trained to obtain the prompt word generator.
7. The method according to claim 6, characterized in that The method of training the original generator based on the sample data, the device status analysis label and the large language model to obtain the prompt word generator includes: Determining sample interaction data according to the sample data and the large language model; Inputting the sample interaction data into the original generator, and inputting the second prompt word generated by the original generator into the large language model to obtain a second output result; According to the second prompt word and the second output result, performing status analysis on the sample device, obtaining a sample status analysis result and updating the sample interaction data; According to the sample state analysis result, the sample interaction data and the device state analysis label, the original generator is adjusted to obtain the prompt word generator.
8. The method according to claim 7, characterized in that The adjusting the original generator according to the sample state analysis result, the sample interaction data and the device state analysis label to obtain the prompt word generator includes: Determine a set of sample interaction trajectories according to the sample state analysis result, the device state analysis tag, and the sample interaction data; When the number of the sample interaction trajectories is less than a preset number, repeatedly executing the step of obtaining the sample data of the sample device and the device status analysis label of the sample data; In the case that the number of the sample interaction trajectories is greater than or equal to the preset number, the original generator is adjusted according to the obtained at least one group of sample interaction trajectories to obtain the prompt word generator.
9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor performs the device status analysis method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the device status analysis method as described in any one of claims 1 to 8 when executed.
Citation Information
Cited By
Interactive construction and equipment state linkage method for flow chart
CN122312805A
Stateful pretrained transformers in a generative response engine
US12400074B1