Abnormality processing method, exception processing model training method, electronic equipment, computer storage medium and program product
By training large language models into generative domain models and fine-tuning them with domain-specific information, the problem of limited applications in specific fields and scenarios is solved, and wider applications and more efficient processing suggestions are achieved.
Patent Information
- Application Number
- CN202411656713.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-19
- Publication Date
- 2024-12-17
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing large language model (LLM) lacks specific task processing experience in some fields and service scenarios, resulting in the semantic understanding and text generation ability that cannot meet actual needs, limiting its application scope and scenarios.
By training LLM into a generative domain model, combining domain-specific exception event description information, event data and processing strategies, prompt information is generated for fine-tuning training, and a generative domain model that can be targeted at specific fields and scenarios is formed to generate more accurate results. and effective handling suggestions.
The application scope and scenarios of the generative basic model are expanded, so that it can better meet the actual needs of specific fields and service scenarios, and improve the accuracy and effectiveness of user experience and processing suggestions.
Smart Images

Figure CN119150035A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of artificial intelligence technology, and in particular to an exception handling and model training method thereof, an electronic device, a computer storage medium, and a computer program product. Background Art
[0002] With the development of machine learning technology, more and more machine learning models have been developed, and LLM (Large Language Model, which can be used as a generative basic model) is one of them. LLM is widely used in various fields and service scenarios due to its good semantic understanding and text generation capabilities.
[0003] However, in some fields and service scenarios, due to different specific needs, the semantic understanding and text generation capabilities of LLM cannot adapt to the actual needs of these fields and service scenarios. As a result, on the one hand, the application of LLM is limited, and on the other hand, the needs of these fields and service scenarios cannot be met and resolved. Summary of the invention
[0004] In view of this, an embodiment of the present application provides an exception handling and model training solution to at least partially solve the above problems.
[0005] According to a first aspect of an embodiment of the present application, there is provided an exception handling method, comprising: receiving abnormal event description information; obtaining event data and an exception handling strategy that match the abnormal event description information; generating prompt information based on the abnormal event description information, the event data and the exception handling strategy; and generatively processing the prompt information through a generative domain model to obtain a handling suggestion for the abnormal event indicated by the abnormal event description information, wherein the generative domain model is a model obtained by training based on a generative basic model.
[0006] According to a second aspect of an embodiment of the present application, a method for handling power system abnormalities is provided, including: receiving power grid regulation abnormal event description information; obtaining event data and power dispatch rule data that match the power grid regulation abnormal event description information; generating prompt information based on the power grid regulation abnormal event description information, the event data and the power dispatch rule data; and generatively processing the prompt information through a generative power domain model to obtain handling suggestions for the abnormal event indicated by the power grid regulation abnormal event description information, wherein the generative power domain model is a model obtained by training based on a generative basic model.
[0007] According to a third aspect of an embodiment of the present application, a model training method is provided, comprising: obtaining a first training sample, the first training sample comprising: an abnormal event description information sample, an abnormal handling suggestion annotation corresponding to the abnormal event description information sample, and a thinking chain reasoning information for obtaining the abnormal handling suggestion annotation; generating a prompt information sample based on the first training sample, and fine-tuning a general generative model of the field to which the first training sample belongs based on the prompt information sample to obtain a generative domain model, the generative domain model being used to generatively process the prompt information generated according to the abnormal event description information, the event data of the abnormal event, and the abnormal handling strategy, so as to generate a processing suggestion for the abnormal event indicated by the abnormal event description information.
[0008] According to the fourth aspect of the embodiments of the present application, an electronic device is provided, comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in the first aspect, the second aspect or the third aspect.
[0009] According to a fifth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the method described in the first aspect, the second aspect, or the third aspect is implemented.
[0010] According to a sixth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the method described in the first aspect, the second aspect, or the third aspect.
[0011] According to the scheme provided by the embodiment of the present application, for certain specific fields and service scenarios, especially in the abnormal event processing scenarios in certain fields, in order to make full use of the capabilities of generative basic models such as LLM, on the one hand, it is trained as a generative domain model that can serve these fields and scenarios, and the generative domain model can more effectively use its own semantic understanding and text generation capabilities to handle the tasks of these fields and scenarios; on the other hand, when using the generative domain model, the abnormal event description information of the abnormal events occurring in these fields and scenarios, the event data associated with the abnormal events, and the abnormal handling strategy for the abnormal events are integrated, thereby generating prompt information for the generative domain model to process, and the generative domain model performs corresponding generative processing based on the prompt information to obtain corresponding processing suggestions. Because the prompt information contains a variety of information, it can provide relatively rich and objective information and processing basis to the generative domain model from the aspects of the performance of the abnormal event (abnormal event description information), the relevant data involved (event data) and the processing principles or rules (exception processing strategy), so that the generative domain model can perform more accurate and effective generation processing based on the prompt information, and thus make the generated processing suggestions more objective, accurate and effective. Therefore, through the generative domain model, the generative basic models such as LLM can be applied to various actual application fields, effectively expanding the application scope and scenarios of the generative basic models; and by carrying prompt information with rich content that can solve practical problems and needs, the generative domain model can generate processing suggestions that fully meet the actual needs in the corresponding fields and service scenarios and solve practical problems, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] 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, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0013] Figure 1 A schematic diagram of an exemplary system applicable to the embodiment of the present application; Figure 2 A schematic diagram of a generation process of a generative domain model according to an embodiment of the present application; Figure 3 A flowchart of the steps of a model training method according to an embodiment of the present application; Figure 4 is a flowchart of a method for handling an exception according to an embodiment of the present application; Figure 5 For the general Figure 4A schematic diagram of a scenario in which the exception handling method in the illustrated embodiment is applied to a power grid control scenario; Figure 6 for Figure 5 An example diagram of a tree search process in the illustrated embodiment; Figure 7 is a flowchart of another exception handling method according to an embodiment of the present application; Figure 8 is a flowchart of another method for handling an exception according to an embodiment of the present application; Fig. 9 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0014] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions 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. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0015] The specific implementation of the embodiment of the present application is further explained below in conjunction with the accompanying drawings of the embodiment of the present application.
[0016] Figure 1 An exemplary system applicable to the embodiment of the present application is shown. Figure 1 As shown, the system 100 may include a cloud service end 102, a communication network 104 and / or one or more user devices 106. Figure 1 The example is multiple (two or more) user devices.
[0017] The cloud service end 102 can be any suitable device for storing information, data, programs and / or any other suitable type of content, including but not limited to distributed storage system devices, server clusters, computing cloud service end clusters, etc. In some embodiments, the cloud service end 102 can perform any suitable function. For example, in some embodiments, the cloud service end 102 can be used to process abnormal events in the corresponding field using a generative domain model, wherein the generative domain model is obtained based on a generative basic model such as LLM training, and is used to provide services for a specific field; and the "field" can be any appropriate field according to different actual needs, including but not limited to power grid regulation, water conservancy regulation, Internet of Things abnormal processing, etc., and the embodiments of the present application do not specifically limit the "field". As an optional example, in some embodiments, the cloud service end 102 can receive abnormal event description information of a specific field sent from the user device 106, and obtain the corresponding event data and abnormal processing strategy, and then generate prompt information based on the abnormal event description information, event data and abnormal processing strategy, and input the prompt information into the generative domain model to generate processing suggestions for specific abnormal events. As another example, in some embodiments, the cloud service end 102 may also be used to send the processing suggestion to the user device 106. As an optional example, in some embodiments, the cloud service end 102 may also obtain a generative domain model through model training.
[0018] In some embodiments, the communication network 104 can be any suitable combination of one or more wired and / or wireless networks. For example, the communication network 104 can include any one or more of the following: the Internet, an intranet, a wide area network (WAN), a local area network (LAN), a wireless network, a digital subscriber line (DSL) network, a frame relay network, an asynchronous transfer mode (ATM) network, a virtual private network (VPN) and / or any other suitable communication network. The user device 106 can be connected to the communication network 104 via one or more communication links (e.g., communication link 112), and the communication network 104 can be linked to the cloud service end 102 via one or more communication links (e.g., communication link 114). The communication link can be any communication link suitable for transmitting data between the user device 106 and the cloud service end 102, such as a network link, a dial-up link, a wireless link, a hard-wired link, any other suitable communication link, or any suitable combination of such links.
[0019] The user device 106 may include any one or more user devices suitable for interacting with the user and capable of presenting information and data. As an optional example, in some embodiments, the user device 106 may send the abnormal event description information input by the user to the cloud service end 102, so that the cloud service end 102 performs the above-mentioned processing for the abnormal event. As an optional example, in some embodiments, the user device 106 may also receive the processing suggestions for the abnormal event generated by the cloud service end 102 and display them to the user. Optionally, subsequent abnormal event processing may also be performed according to the processing suggestion. In some embodiments, the user device 106 may include any suitable type of device. For example, in some embodiments, the user device 106 may include a mobile device, a tablet computer, a laptop computer, a desktop computer, a wearable computer, a game console, a media player, a vehicle entertainment system and / or any other suitable type of user device.
[0020] Based on the above system, the following uses multiple embodiments to first illustrate the process of model training, and then on this basis, illustrate the exception handling of abnormal events using the trained model.
[0021] First refer to Figure 2 , which shows a schematic diagram of the generation process of a generative domain model according to an embodiment of the present application.
[0022] from Figure 2 It can be seen that when the generative domain model is specifically generated, the general knowledge of a certain field can be used to pre-train the generative basic model to obtain a general generative model with the ability to process the general knowledge of the field; then, specific service demand data, which in the embodiment of the present application is data related to abnormal events in the field, is used to fine-tune the general generative model to obtain the generative domain model in the embodiment of the present application. It should be noted that in actual applications, the generative domain model can be obtained based on the aforementioned method, by training the generative basic model and the general generative model in turn, but is not limited to this, and can also be based on a general generative model in a certain field that has been trained by a third party, and is obtained by fine-tuning the training using the service demand data in the field.
[0023] Among them, as mentioned above, in the embodiment of the present application, the specific field served by the generative domain model is not limited. Those skilled in the art can train it to serve any required specific field, such as a domain model of power grid, water conservancy, etc. according to actual needs. In addition, in the embodiment of the present application, the generative basic model refers to a general large model that does not have domain attributes but has good semantic understanding and text generation capabilities, such as LLM, etc. Although the generative basic model can process and generate inputs for various fields without limitation, when it is directly applied to a specific field and solves the tasks in the specific field, it often lacks experience in processing specific tasks in the field, resulting in the generated results being inaccurate and ineffective. Therefore, in the embodiment of the present application, the general knowledge of a certain field is first used to pre-train it, so that the general generative model obtained by training learns the general knowledge of the field and can handle non-specific tasks in the field. Then, on the basis of the general generative model, the specific task knowledge is used to fine-tune it, so that the generative domain model obtained by training can process specific tasks more effectively and accurately.
[0024] Exemplarily, the LLM (generative basic model) can be pre-trained using basic knowledge of electricity (such as electricity textbooks, collections of papers, etc.) to obtain a basic electricity model (general generative model); then, the knowledge of power abnormal event processing can be used to fine-tune the power basic model to obtain a generative power domain model (generative domain model).
[0025] Below, refer to Figure 3 , the specific process of the above model training is explained in detail.
[0026] Figure 3 A flow chart of the steps of a model training method according to an embodiment of the present application is shown in FIG. Figure 3 As shown, the model training method of the embodiment of the present application includes the following steps: Step S202: Obtain a second training sample, and use the second training sample to pre-train the generative basic model to obtain a general generative model.
[0027] The second training samples include: domain-general knowledge samples.
[0028] In this embodiment, a general generative model is obtained through training as an example. However, as mentioned above, in some solutions, the trained general generative model can also be obtained directly from a third party. In this case, this step does not need to be performed.
[0029] A general generative model in a certain field can be obtained by pre-training a generative basic model such as LLM. When performing the pre-training, a training sample for the pre-training is first obtained, that is, a second training sample, which can be a sample including general knowledge in the field, that is, a general knowledge sample in the field. For example, the second training sample can be a sample containing basic knowledge in the power field, including but not limited to: textbooks, collections of papers, massive network basic knowledge data on power in the power field, and the like.
[0030] Based on the second training sample, the pre-training of the generative basic model can adopt an unsupervised training method, including but not limited to contrastive learning, clustering classification, etc. The embodiment of the present application does not limit the specific implementation method of the unsupervised training.
[0031] Through this pre-training, the obtained general generative model not only has the semantic understanding, reasoning, generation and other capabilities of the generative basic model, but also has the knowledge capabilities of a specific field, and can handle general tasks in that specific field more effectively.
[0032] Step S204: Obtain a first training sample.
[0033] The first training sample includes: an abnormal event description information sample in a certain field, an abnormal event handling suggestion annotation corresponding to the abnormal event description information sample, and a thinking chain reasoning information for obtaining the abnormal event handling suggestion annotation.
[0034] In the embodiments of the present application, an abnormal event means an event that, for some reason, a task or transaction cannot be executed or completed normally. For example, in the field of electric power, during the power transmission process, a node trips, so that the power cannot be transmitted normally, then the trip is an abnormal event. For another example, in the field of sewage treatment, during the sewage transmission process, due to a pipe blockage somewhere, the sewage cannot be transported normally, then the management blockage is an abnormal event. For another example, in the field of smart home, due to a short circuit in the line of a smart device, the control of the smart device fails, then the short circuit of the line is an abnormal event. It can be seen that in different specific fields, abnormal events are also different, and they are not exemplified one by one here, but it should be clear to those skilled in the art that the embodiments of the present application do not specifically limit the "field", and therefore, do not limit the specific form of abnormal events in the "field".
[0035] For an abnormal event, its abnormal event description information is used to describe the relevant situation when the abnormal event occurs, including but not limited to: the specific manifestation of the abnormal event (such as X node tripping, Y pipeline port blocking, etc.), the time of occurrence of the abnormal event, and optionally, the location of the abnormal event, the situation of the previous and next event nodes associated with the abnormal event, etc. Accompanying the abnormal event is the processing thereof, that is, what measures are taken to solve the abnormal event so that the task or transaction can return to normal.
[0036] Based on this, in an embodiment of the present application, when fine-tuning the general generative model, the first training sample used includes an abnormal event description information sample corresponding to the abnormal event, and an abnormal handling suggestion label corresponding to the abnormal event description information sample. In an embodiment of the present application, the abnormal handling suggestion includes but is not limited to: abnormal handling measures or instructions, auxiliary decision-making information, abnormal event analysis information (such as abnormal event location, cause identification, protection behavior analysis during the occurrence of abnormal events, etc.). These abnormal handling suggestions are included in the first training sample in the form of annotations to provide supervision conditions for subsequent model training. But in addition to this, the first training sample also includes the thinking chain reasoning information for obtaining the abnormal handling suggestion label.
[0037] Chain of Thought (COT) is a method to enhance the arithmetic, common sense and reasoning ability of LLM by explicitly outputting intermediate step-by-step reasoning steps. It requires LLM to explicitly output a series of intermediate reasoning steps (reasoning process information, usually including multiple steps) before outputting the final response. Through these steps, we can understand the reasoning thinking process of LLM, thereby improving the interpretability of its reasoning. Setting the chain of thought reasoning information in the first training sample can enable the model to learn not only how to handle abnormal events, but also why abnormal events are handled in this way, so that in the future, it can generate corresponding processing suggestions more flexibly and effectively for such abnormal events and events that are partially similar to the abnormal events.
[0038] In an optional manner, the first training sample can be obtained by performing multiple processes such as data preprocessing, data enhancement, data review and labeling on the collected original data.
[0039] First, for the field to be used by the subsequent model, the original event information, original processing method information, and the thinking and reasoning process behind the original processing method of the abnormal events in the field are collected. It should be noted that in the thinking and reasoning process, the information obtained by calling the relevant database and / or application program interface API may be used. In the embodiment of the present application, this part of information is also regarded as part of the information of the thinking and reasoning process.
[0040] On this basis, through data preprocessing, the collected raw data is converted into a unified data format that meets the model training requirements. Because the real data samples usually have the problem of insufficient quantity, after data preprocessing, new sample data can be simulated based on the data after format conversion, including but not limited to: constructing negative samples by modifying part of the real data; obtaining new data as positive samples by adding small errors on the basis of the real data, etc. After data enhancement, further data review and annotation processing can be performed, which can be understood as the process of confirming, checking and correcting the data after data enhancement, so as to ensure the correctness of the training samples. Through the above process, the first training sample for training the general generative model is formed, wherein the original event information can form an abnormal event description information sample after the above processing, the original processing method information can form an abnormal processing suggestion annotation after the above processing, and the original thinking and reasoning process information can form the thinking chain reasoning information of the first training sample after the above processing.
[0041] Step S206: Generate a prompt information sample based on the first training sample, and fine-tune the general generative model of the field to which the first training sample belongs based on the prompt information sample to obtain a generative field model.
[0042] For a model such as LLM, its input is a prompt message prompt, which carries information related to the task to be processed by LLM. Specifically, in the embodiment of the present application, it at least includes an abnormal event description information sample and a thinking chain reasoning information in the first training sample, and the abnormal handling suggestion annotation in the first training sample can be used as a supervision condition for fine-tuning training. It can be seen that, unlike the unsupervised training method used to train and obtain a general generative model in step S202, the fine-tuning training of the general generative model using the first training sample can be carried out in a supervised training manner to achieve a better training effect. In an exemplary manner, based on the abnormal handling suggestion annotation, a cross entropy loss function can be used to implement fine-tuning training of a general generative model to obtain a generative domain model. The generative domain model can be based on the prompt information generated according to the abnormal event description information, the event data of the abnormal event, and the abnormal handling strategy, and generative processing can be performed to generate processing suggestions for the abnormal event indicated by the abnormal event description information.
[0043] In addition, in an optional manner, a database and an external knowledge base are also deployed in the system, wherein the database stores various data generated during the execution of tasks or transactions in the domain, including data generated during abnormal events; and the external knowledge base stores information and / or processing rule information that can provide assistance for solving abnormal events, including abnormal handling strategies for abnormal events. The data in the database and the information in the external knowledge base can be used when generating prompt information and the model performs reasoning, so as to provide richer and more effective information for the model to handle abnormal events, and improve the efficiency and accuracy of the model in handling abnormal events.
[0044] In an optional manner, when generating a prompt information sample based on the first training sample, an external knowledge base can be queried based on the abnormal event description information sample in the first training sample to obtain an abnormal event handling strategy sample corresponding to the abnormal event described by the abnormal event description information sample; and then prompt information is generated based on the abnormal event description information sample, the abnormal event handling strategy sample and the thinking chain reasoning information.
[0045] As for the thinking chain reasoning information, it can include information of multiple reasoning processes based on the thinking chain. Therefore, in an optional way, fine-tuning the general generative model of the field to which the first training sample belongs based on the prompt information sample can be realized as follows: inputting the prompt information sample into the general generative model so that the general generative model performs multiple thinking reasoning based on the prompt information sample; and fine-tuning the general generative model according to the difference between the reasoning results of multiple thinking reasoning and the abnormal handling suggestion annotation. It can be seen that the training for the general generative model adopts the training based on the thinking chain method. In this process, the thinking chain reasoning information in the first training sample can provide reference and basis for the thinking reasoning of the general generative model to improve the training effect and improve the training efficiency. In addition, optionally, the learning and training of the thinking chain reasoning information can be performed in parallel to further improve the model training efficiency. This is because, although there is a sequence and logical relationship between the multiple reasoning processes based on the thinking chain in the model application stage, as part of the training sample, the sequence and logical relationship have been explicitly represented by the thinking chain reasoning information, and the information of each reasoning process is clear and complete, so parallel model training can be achieved.
[0046] For the same abnormal event, the handling measures adopted should also be the same or similar. Therefore, the abnormal handling suggestion annotation can be used as a supervision condition. The difference (loss value) between the handling suggestion output by the model training and the abnormal handling suggestion annotation can be calculated through the loss function, and the parameters of the general generative model can be adjusted based on this.
[0047] In a better optional method, in order to alleviate model illusions, each thinking reasoning can generate multiple reasoning results, from which the more reasonable reasoning results are selected to continue the next thinking reasoning.
[0048] Among them, for each of the multiple thinking reasonings based on the thinking chain, the evaluation model can be used to evaluate the results of each of the multiple thinking reasonings, and the K (generally, K is an integer greater than or equal to 1, and in this example, K=2) target reasoning results obtained from the current evaluation are used as the basis for the subsequent thinking reasoning, until the reasoning result of the last thinking reasoning is obtained. For example, a thinking chain includes five thinking reasoning processes. For the reasoning results 11, 12, 13, 14, and 15 generated by the first reasoning, if the evaluation model determines that the reasoning results 12 and 13 are more reasonable, then the reasoning results 12 and 13 are determined as the target reasoning results of the first reasoning, which serve as the basis for the second thinking reasoning; the second thinking reasoning is based on the reasoning results 12 and 13, and further infers and generates six reasoning results, such as reasoning results 21, 22, 23, 24, 25, and 26. If the evaluation model determines that the reasoning results 21 and 25 are more reasonable, then the reasoning results 21 and 25 are determined as the target reasoning results of the second reasoning, which serve as the basis for the third thinking reasoning; the third thinking reasoning is based on the reasoning results 21 and 25, and further infers and generates three reasoning results, such as reasoning results 31, 32, and 33. If the evaluation model determines that the reasoning results 31 and 32 are more reasonable, then the reasoning results 31 and 33 are determined as the target reasoning results of the second reasoning, which serve as the basis for the third thinking reasoning. If the results 32 and 33 are more reasonable, the inference results 32 and 33 are determined as the target inference results of the third reasoning and serve as the basis for the fourth thinking reasoning; the fourth thinking reasoning is based on the inference results 32 and 33, and three more inference results are inferred, such as inference results 41, 42 and 43. If the evaluation model determines that the inference results 41 and 42 are more reasonable, the inference results 41 and 42 are determined as the target inference results of the fourth reasoning and serve as the basis for the fifth thinking reasoning; the fifth thinking reasoning is based on the inference results 41 and 42, and three more inference results are inferred, such as inference results 51, 52 and 53. Since this is the last reasoning, if the evaluation model determines that the inference results 51 and 53 are more reasonable, and then it is determined that 51 is more reasonable than 53, then the inference result 51 will become the final result of multiple thinking reasoning. Then, the difference between the final result, i.e., the inference result 51 and the exception handling suggestion annotation, can be calculated by the loss function, and the parameters of the general generative model can be adjusted based on the difference.
[0049] By evaluating the results of each thinking reasoning through the evaluation model, the determined target reasoning results are made more reasonable and effective, which helps to improve the speed and efficiency of model training.
[0050] Among them, in an optional method, the evaluation model can be obtained in the following way: before obtaining the first training sample, use the third training sample to train the preset machine learning model to obtain the evaluation model, wherein the third training sample includes: thinking chain reasoning samples and corresponding reasoning result annotations.
[0051] In the embodiment of the present application, the evaluation model is a machine learning model used to evaluate the rationality (or effectiveness) of the reasoning results of the thinking chain. In the specific implementation, the machine learning model can be implemented in any appropriate form, including but not limited to: convolutional neural network model CNN, process reward model PRM (Process Reward Model), etc. The training of the model can be supervised, with the thinking chain reasoning samples in the third training sample as input, and the corresponding reasoning results are marked as supervision conditions for training to obtain the evaluation model. In the embodiment of the present application, the specific implementation method of supervised training is not limited.
[0052] Taking the PRM model as an example, the third training sample includes both positive samples and negative samples. The PRM model is trained based on the third training sample to obtain an evaluation model.
[0053] However, it is not limited to this. In another optional manner, the general generative model obtained by training the generative basic model can be fine-tuned using the third training sample to obtain the PRM model. For example, in the field of electric power, the third training sample can be used to fine-tune the electric power basic model to obtain the evaluation model. In this way, the existing model is effectively utilized and the cost of obtaining the model is saved.
[0054] The PRM model can score the intermediate process (incomplete results) of thinking reasoning. At each step of the thinking chain reasoning, the generative domain model can sample and infer several candidate next-step thinking and actions (by calling tool interfaces, such as database interfaces or application program interfaces APIs, etc.), that is, several reasoning results; then use the PRM model to score several candidate next-step thinking and actions, and select the K with the highest scores (that is, the target reasoning results) to continue the next step of reasoning and evaluation.
[0055] Among them, in an optional way, several candidate next steps of thinking and action can be obtained by tree search. In this case, through the evaluation model, the evaluation of the results of each thinking reasoning in multiple thinking reasoning can be realized as follows: in the process of multiple thinking reasoning, for each thinking reasoning, multiple reasoning results are generated through tree search, and through the evaluation model, multiple reasoning results are evaluated to determine the target reasoning result, and the target reasoning result is used as the reasoning basis for the next thinking reasoning. Therefore, at each step of the thinking chain reasoning, the current result of the model reasoning is reflected and evaluated to determine a reasonable reasoning result.
[0056] Exemplarily, the tree search can be implemented using beam search technology. Beam Search is an algorithm for finding the optimal solution in the search space. It usually includes multiple time steps. The most likely solution is found by selecting a set of candidate solutions with the highest probability at each time step. At each time step, for each candidate result, K new candidate results are generated according to the output probability distribution of the model; for the generated new candidate results, they are sorted according to their scores, and the K candidate results with the highest scores are selected as the candidate result set for the next time step. The above process is repeated until the specified search depth is reached or the termination condition is met. Finally, the result with the highest score is selected from the final candidate result set as the final output.
[0057] Specifically in this embodiment, in the process of training to obtain a generative domain model, for each reasoning process of the thinking chain, the model can generate multiple reasoning results through tree search, and obtain K reasoning results as the target reasoning results through the evaluation model, and continue to the next thinking reasoning.
[0058] In an optional way, when multiple inference results are generated through tree search, some local standard judgment logic blocks (such as data combination logic and its threshold judgment, etc.) can also be abstracted and implemented as a callable tool interface, which is called by the model on demand according to the thinking chain reasoning process, such as when determining the target reasoning result. By calling the tool interface, the required data is obtained from the database or application software outside the model, that is, the event data corresponding to the abnormal event description information sample, so as to perform more accurate reasoning based on the obtained data and obtain more accurate results. In this way, the model hallucination problem of models such as LLM is alleviated, and the model reasoning accuracy and efficiency are improved.
[0059] The above training process is iterated until the training termination condition is reached, such as reaching a preset number of training times or the loss value reaching a preset threshold. After the training is completed, a generative domain model can be obtained, which can generatively process the prompt information generated according to the abnormal event description information, the event data of the abnormal event and the abnormal processing strategy to generate processing suggestions for the abnormal event indicated by the abnormal event description information.
[0060] Through this embodiment, the generative domain model obtained through training based on the thinking chain method can output a complete thinking process including decision-making, so that the model's abnormal event processing is explainable. In addition, it can actively interact with external applications and data through a database interface or API, so that the input information of the generative domain model is constantly improved, and the output changes adaptively accordingly, and one model solves the reasoning prediction of multiple steps. In addition, the local standard judgment logic block is abstracted and implemented as a callable tool interface, which is called on demand by the model according to the thinking chain reasoning process, without the need for the model to statistically learn these complex threshold combination logics from massive samples, which can greatly alleviate the problem of small samples of scarce data samples for specific tasks or transactions.
[0061] Since the generative domain model can be trained according to the needs of the specific required field, the generative domain model can make the generative basic model such as LLM applicable to various actual application fields, effectively expanding the application scope and scenarios of the generative basic model; and by carrying prompt information with rich content that can solve practical problems and needs, the generative domain model can generate processing suggestions that fully meet the actual needs in the corresponding fields and service scenarios and solve practical problems, thereby improving the user experience.
[0062] The following describes the exception handling method of the embodiment of the present application based on the generative domain model obtained through training. However, those skilled in the art should understand that, in practical applications, the exception handling method of the embodiment of the present application can also be implemented directly using the generative domain model that has been trained and obtained from a third party.
[0063] Reference Figure 4 , shows a flowchart of the steps of an exception handling method according to an embodiment of the present application. The exception handling method of this embodiment includes the following steps: Step S302: Receive abnormal event description information.
[0064] For tasks or affairs in a certain field, exceptions may occur during their execution due to various reasons, causing the execution of tasks or affairs to be interrupted or blocked. When these exceptions occur, abnormal event description information will be generated based on the relevant information when the exception occurs. The abnormal event description information can usually include the specific manifestation of the abnormal event (such as X node tripping, Y pipeline port blockage, etc.), the time of occurrence of the abnormal event, and optionally, the location of the abnormal event, the situation of the previous and next event nodes associated with the abnormal event, etc. Exemplarily, the abnormal event description information is such as "At 05:22 on April 23, 2024, the 220kVA line tripped, phase B failed, the two sets of longitudinal differential protection on both sides acted correctly, and the reclosing switch did not throw".
[0065] The specific method of generating the abnormal event description information is not limited in the embodiment of the present application. In an optional method, the abnormal event description information can be derived from the abnormal event alarm information. However, it is not limited to this. Other methods of generating abnormal event description information are also applicable. For example, based on a preset event description template, the relevant attribute information of the abnormal event can be filled in the corresponding position to generate the abnormal event description information, and so on.
[0066] Step S304: Acquire event data and exception handling strategies that match the abnormal event description information.
[0067] In an embodiment of the present application, a database and an external knowledge base may also be deployed in the system. The database stores various data generated during the execution of tasks or transactions in the field, including but not limited to data generated during abnormal events; and the external knowledge base stores information and / or processing rule information that can provide assistance in resolving abnormal events, including but not limited to exception handling strategies for abnormal events.
[0068] Based on this, in order to process the abnormal event described by the abnormal event description information more quickly and effectively, after obtaining the abnormal event description information, event data and abnormal processing strategies matching the abnormal event description information can be obtained.
[0069] In an optional method, a structured query SQL statement can be generated based on the abnormal event description information; the SQL statement can be used through the application program interface to query and obtain event data related to the abnormal event indicated by the abnormal event description information; and, based on the abnormal event description information, the abnormal event handling strategy matching the abnormal event indicated by the abnormal event description information can be retrieved from the external knowledge base through the retrieval enhancement generation RAG method. In this way, the information of the input generative domain model is supplemented and improved, and the efficiency and accuracy of model processing are improved.
[0070] Among them, when obtaining event data, a structured query SQL statement can be generated according to the abnormal event description information, and the SQL statement can be used to query the database to obtain event data. In the specific implementation, a machine learning model with a text as input and an SQL statement as an output function can be used to convert the abnormal event description information into an SQL statement. The machine learning model can be implemented in any appropriate form, and the embodiment of the present application does not limit the specific implementation of the machine learning model. However, it is not limited to this. Because the generative domain model of the present application is obtained based on the training of a generative basic model such as LLM, the generative basic model may also have the ability to convert text into SQL statements. Therefore, the generative domain model also inherits this ability. Then, in an optional manner, the generative domain model can also be used to convert the abnormal event description information into an SQL statement. On this basis, a database query is performed to obtain event data.
[0071] As for the exception handling strategy, the RAG (Retrieval Augmented Generation) method can be used to obtain the exception handling strategy from the external knowledge base. The RAG method is based on the embedding of the exception event description information, and retrieves the exception handling strategy (in the form of embedding) that matches the embedding from the external knowledge base that stores a variety of exception handling strategies; then, the matching exception handling strategy will be used as supplementary information for the exception event description information, and after being converted into text, it will be used together with the exception event description information and event data to generate prompt information that can be accepted by the generative domain model. Through the RAG method, the information input into the generative domain model can be effectively supplemented, improving the processing efficiency and quality of the generative domain model.
[0072] Step S306: Generate prompt information based on the abnormal event description information, event data and abnormal handling strategy; and generatively process the prompt information through the generative domain model to obtain processing suggestions for the abnormal event indicated by the abnormal event description information.
[0073] After obtaining the abnormal event description information, event data and abnormal handling strategy, a prompt message prompt can be generated based on this information and data, and the prompt message prompt is input into the generative domain model. As mentioned above, the generative domain model is a model obtained by training based on the generative basic model. Exemplarily, it can be a model obtained by training using the aforementioned model training method.
[0074] Because the generative domain model of the embodiment of the present application is a model based on the thought chain method, therefore, in an optional manner, the prompt information is generatively processed by the generative domain model to obtain processing suggestions for the abnormal event indicated by the abnormal event description information. This can be achieved by: inputting the prompt information into the generative domain model, so that the generative domain model performs thought chain reasoning generation based on the prompt information through tree search to obtain processing suggestions for the abnormal event indicated by the abnormal event description information. Through the thought chain method, the model reasoning is made more reasonable and more explainable.
[0075] Among them, the generation of thought chain reasoning through tree search to obtain processing suggestions for abnormal events indicated by abnormal event description information can be realized as follows: for two adjacent reasonings in the thought chain reasoning, multiple reasoning results are generated for the previous reasoning through tree search; multiple reasoning results are evaluated to determine the target reasoning result, and the target reasoning result is used as the reasoning basis for the next reasoning; based on the reasoning results obtained from multiple reasonings, processing suggestions for abnormal events indicated by abnormal event description information are obtained. The illusion of generative domain models can be effectively alleviated through thought chain reasoning based on tree search.
[0076] In order to further improve the efficiency of model reasoning, in an optional way, some local standard judgment logic blocks (such as data combination logic and its threshold judgment, etc.) can be abstracted and implemented as callable tool interfaces, which can be called by the model on demand according to the thinking chain reasoning process. For example, in each thinking reasoning, when determining the target reasoning result for multiple reasoning results generated by tree search, these tool interfaces can be called for judgment to determine the target reasoning result. By calling the tool interface, the required data, that is, the event data corresponding to the abnormal event description information sample, is obtained from the database or application software outside the model, so as to perform more accurate reasoning based on the obtained data and obtain more accurate results. In this way, the model hallucination problem of models such as LLM is alleviated, and the model reasoning accuracy and efficiency are improved.
[0077] In addition, in an optional manner, the reasoning process information of the thought chain reasoning can also be sent to the user's user device, so as to display the reasoning process information of the thought chain reasoning to the user through the human-computer interaction interface in the user device. In this way, the processing using the generative domain model can be explained, and the user can also judge the rationality or accuracy of the processing, and perform more reasonable and accurate abnormal event processing according to the final output of the generative domain model.
[0078] In actual applications, the processing suggestions output by the generative domain model may deviate from the actual exception handling. Therefore, the data in the actual application can also be used as samples for further optimization training of the generative domain model, so that the generative domain model can be continuously optimized and improved based on these historical data. In an optional way, based on these historical data, the generative domain model that has been put into application can be further optimized and improved by reinforcement learning. Exemplarily, reinforcement learning of the generative domain model can be implemented by using methods such as policy gradient methods and DQN methods.
[0079] It can be seen that through this embodiment, for certain specific fields and service scenarios, especially in the abnormal event processing scenarios in certain fields, in order to make full use of the capabilities of generative basic models such as LLM, on the one hand, it is trained as a generative domain model that can serve these fields and scenarios, and the generative domain model can more effectively use its own semantic understanding and text generation capabilities to handle the tasks of these fields and scenarios; on the other hand, when using the generative domain model, the abnormal event description information of the abnormal events occurring in these fields and scenarios, the event data associated with the abnormal events, and the abnormal processing strategy for the abnormal events are integrated, thereby generating prompt information for the generative domain model to process, and the generative domain model performs corresponding generative processing based on the prompt information to obtain corresponding processing suggestions. Because the prompt information contains a variety of information, it can provide the generative domain model with relatively rich and objective information and processing basis from the aspects of the performance of the abnormal event (abnormal event description information), the relevant data involved (event data) and the processing principles or rules (exception processing strategy), so that the generative domain model can perform more accurate and effective generation processing based on the prompt information, and thus make the generated processing suggestions more objective, accurate and effective. Therefore, through the generative domain model, the generative basic models such as LLM can be applied to various actual application fields, effectively expanding the application scope and scenarios of the generative basic models; and by carrying prompt information with rich content that can solve practical problems and needs, the generative domain model can generate processing suggestions that fully meet the actual needs in the corresponding fields and service scenarios and solve practical problems, thereby improving the user experience.
[0080] In the following, the application of the above-mentioned exception handling method in a specific field is exemplified by taking power grid regulation as a scenario. In this case, the exception handling method includes: receiving power grid regulation abnormal event description information; obtaining event data and power dispatch rule data matching the power grid regulation abnormal event description information; generating prompt information based on the power grid regulation abnormal event description information, event data and power dispatch rule data; and generatively processing the prompt information through a generative power domain model to obtain processing suggestions for the abnormal event indicated by the power grid regulation abnormal event description information, wherein the generative power domain model is a model obtained by training based on a generative basic model.
[0081] Reference Figure 5 , assuming that a power grid tripping event (abnormal event) occurs in the M area of X, and the power grid system issues an abnormal alarm message "220kVA line tripped at 05:22 on April 23, 2024, phase B fault, two sets of longitudinal differential protection on both sides acted correctly, and the reclosing switch did not throw". In this example, the description information of the abnormal event of power grid regulation is generated based on the abnormal alarm message.
[0082] In this example, the generative domain model is used to obtain event data and power dispatch rule data that match the description information of abnormal power grid regulation events.
[0083] For example, after receiving the description information of the abnormal event of power grid regulation, the generative power domain model will first convert it into an SQL statement, perform the first data query on the database storing the power grid data for the station connected to the 220kVA line, and obtain relevant data. In the specific implementation, the system will generate corresponding prompt information for instructing the generative power domain model to generate SQL statements based on the description information of the abnormal event of power grid regulation, and the generative power domain model will perform generation processing to generate the corresponding SQL statement. Assume that the query result of the query through the SQL statement is "Station B, Station C. Station B is connected to: Station D (H line). Station C is connected to: Station D (JI line), Station E (G II line, G line)". However, because the query result cannot obtain the specific situation data of each station, the generative power domain model will generate SQL statements for instructing to query the relevant data of Station B and Station C again based on the description information of the abnormal event of power grid regulation and the query result of this time. Assume that the query result is "Station B: Line A, Phase B fault, distance to Station F is 12.7 km, .... Station C: Line A, Phase C fault, distance to Station F is 3.32 km, ... ". Based on this, the generative power domain model generates SQL statements for instructing to query Line A, Station B and Station C again, until the current power grid data of Line A, Station B and Station C are obtained, that is, the event data corresponding to the description information of abnormal power grid regulation events. As can be seen from the above, in this process, the generative power domain model obtains event data that matches the description information of abnormal power grid regulation events based on the thinking chain method.
[0084] On the other hand, the corresponding exception handling strategy will be obtained from the external knowledge base based on the description information of the abnormal event of power grid regulation. Because the handling of abnormal events of power grid regulation usually follows the power dispatching rules, in this example, the exception handling strategy is the power dispatching rule data, such as the power grid dispatching operation rules of the M area in X. In addition, the regulation files that may be flexibly modified, such as dispatching procedures, can also be stored in the external knowledge base, and the relevant dispatching regulations can be matched for verification and confirmation in the thinking chain reasoning process of the generative power domain model using the RAG method.
[0085] Furthermore, based on the acquired event data and power dispatch rule data, prompt information is generated to indicate the generation of processing suggestions, and is input into the generative power domain model for processing to generate processing suggestions for the abnormal event, such as "it is determined that the actual fault situation is consistent with the plan, and it is necessary to notify the M company to strengthen the operation and maintenance protection of the 220kVH line and JI line, and handle it according to the corresponding plan."
[0086] Although the generative power domain model has given handling suggestions, in an alternative approach, to determine that an abnormal event can be completely resolved, the handling suggestions can be used as preliminary suggestions. Further, feedback information on the handling of abnormal events by relevant departments in accordance with the handling suggestions can also be obtained. Suppose the company in location M gives the following feedback: "Two sets of protection devices on the B side of the 220 kVA line have sent control signals, and on-site inspections are underway. The conditions for forced power transmission are not yet available." Then the generative power domain model will also add this feedback information to the previous prompt information and process it again to generate new handling suggestions, such as "The control circuits of the two sets of protection devices on the B side of the 220 kVA line are disconnected. The conditions for forced power transmission are not yet available. Wait for on-site inspections. Query other conditions for forced power transmission <SQL statement>."
[0087] Based on this new handling suggestion, relevant data will be queried from the database according to the SQL statement therein and returned. Furthermore, the generative power domain model will also add the returned data to the prompt information and process it again.
[0088] In the scenario of this example, the above process may be repeated multiple times until a line that can be forced to transmit power is found and a handling suggestion is generated, such as "Line A meets the conditions for forced power transmission. It is recommended to perform forced power transmission."
[0089] In an alternative approach, the generation process of the above handling suggestions is inferred and generated by the generative power domain model using a thought chain method based on tree search. A partial process of an exemplary tree search is as Figure 6 shown.
[0090] Figure 6 In it, assume that the starting information for reasoning is "Substation S: Phase B fault on Line A, distance measurement to Substation W is 12.7 km; Substation T: Phase C fault on Line A, distance measurement to Substation W is 3.32 km." Based on this starting information, the generative power domain model can generate at least one SQL statement to obtain matching data from the relevant database, and then perform the first inference based on the obtained data to obtain an inference result. For example, Inference Result 11: "The sum of the fault distance measurements on both sides of Line A is 12.7 + 3.32 = 16.02 km, and the error from the actual line length of 15.23 km is less than 1 km. It is determined that the fault distance measurement is referenceable."; Inference Result 12: "The sum of the fault distance measurements on both sides of Line A is 12.7 + 3.32 = 16.02 km, and the error from the actual line length of 15.23 km is greater than 1 km.";...; Inference Result 1N:.... For the above inference results, they are evaluated by an evaluation model. Suppose Inference Result 11 is considered to be probably correct after evaluation and can be used as the basis for further reasoning (the target inference result), while Inference Result 12 is considered to be possibly incorrect after evaluation, and the subsequent processing for this inference result will end and no further reasoning will be based on it.
[0091] Based on the inference result 11, the generative power domain model will generate at least one SQL statement again, and use the SQL statement to obtain the corresponding data from the database, and then perform the second inference based on the obtained data and the inference result 11 to obtain the inference result. For example, the inference result 21: "The fault point is between poles #2 and #3, not within the cable segment. The fault distances on both sides are more than 2 kilometers, and the transformer near-area fault is excluded"; the inference result 22: "The fault point is between poles #3 and #4, not within the cable segment. The fault distances on both sides are more than 2 kilometers, and the transformer near-area fault is excluded"; ...; the inference result 2N: .... For the above inference results, they are evaluated by the evaluation model. Assume that the inference result 21 is considered to be correct with a high probability after evaluation, and the reasoning can be continued based on it (target reasoning result), while the inference result 22 is considered to be possibly wrong after evaluation, and the subsequent processing of the inference result will end, and no subsequent reasoning will be performed based on it.
[0092] The above reasoning process includes multiple times until the final reasoning result is obtained, such as reasoning result P1: "Line A meets the conditions for forced delivery, and forced delivery is recommended"; reasoning result P2: "Line A does not meet the conditions for forced delivery, and forced delivery is not recommended"; ...; reasoning result PN: "Line D meets the conditions for forced delivery, and forced delivery is recommended". The final reasoning result is evaluated by the evaluation model to obtain the evaluation result. Assume that the probability corresponding to the reasoning result P1 is 80% (confidence: 80%), the probability corresponding to the reasoning result P2 is 55% (confidence: 55%), the probability corresponding to the reasoning result PN is 25% (confidence: 25%), .... Then, the reasoning result P1 will be used as the final exception handling suggestion, that is, "Line A meets the conditions for forced delivery, and forced delivery is recommended".
[0093] Through this example, the generative power domain model, that is, the model of the large language model type, is applied to the field of power grid regulation, and its traditional knowledge question-and-answer function is upgraded to an intelligent control function. Because the generative power domain model integrates multiple technologies such as thinking chain COT, RAG, PRM tree search, tool call, etc., combined with the professional knowledge and dispatching rules of power grid dispatching, after a fault occurs in the power grid, it can automatically query the relevant database and call the relevant interface to obtain detailed information of the fault, and assist the dispatcher in processing, including fault location, classification, and giving operational processing suggestions, etc., to assist the dispatcher to complete the fault disposal (i.e., exception handling) better and faster. In addition, in the process of applying the generative power domain model to solve practical problems in the field of power grid dispatching, combined with the actual situation of power grid regulation, the local standard judgment logic block (such as the threshold judgment of some electrical quantity combination logic such as voltage and current) is abstracted and implemented into a tool interface that can be called by the generative power domain model, and the generative power domain model is called on demand according to the thinking chain reasoning process, instead of relying on the generative power domain model to statistically learn these complex threshold combination logics from massive samples, which greatly alleviates the small sample problem caused by the scarcity of actual sample data.
[0094] In addition, in practical applications, the PEFT (Parameter-Efficient Fine-Tuning) method can be used to efficiently fine-tune and train multiple generative power domain models for handling different tasks, so that they can assume multiple different control task roles such as forced transmission decision-making and fault classification. Exemplarily, the PEFT method can be implemented as methods such as LoRA (low-rank adaptive method), Prefix-tuning, Prompt-tuning, P-tuning, etc., and the embodiments of the present application do not impose specific restrictions on this. In this way, the generation of generative domain models for different tasks or different fields can be flexibly and efficiently achieved.
[0095] The following, combined Figure 7 and Figure 8 , the interaction between the user device and the cloud service end is explained from different end sides.
[0096] Reference Figure 7 , which shows the interaction process between the user device and the cloud service end for abnormal events. The interaction process includes the following steps: Step S402: receiving input abnormal event description information through the human-computer interaction interface.
[0097] In the user equipment, a human-computer interaction interface for interacting with the user is provided, and an interface for inputting abnormal event description information is provided in the human-computer interaction interface.
[0098] In one feasible embodiment, the human-computer interaction interface may provide a text input box for the user to input abnormal event description information; or, the human-computer interaction interface has an interface that connects with the alarm information in a specific task or transaction, and the alarm information obtained through the interface is used as the abnormal event description information, and optionally displayed in the human-computer interaction interface.
[0099] Step S404: Send the abnormal event description information to the abnormal processing interface of the cloud service end, so as to call the generative domain model through the abnormal processing interface to process the abnormal event indicated by the abnormal information to be processed.
[0100] The generative domain model is used to perform generative processing on the prompt information generated according to the abnormal event description information, the event data of the abnormal event and the abnormal handling strategy, so as to generate a handling suggestion for the abnormal event indicated by the abnormal event description information. The event data and the abnormal handling strategy are obtained according to the abnormal event description information.
[0101] The specific implementation of this step can refer to the description of the relevant parts in the above-mentioned exception handling method embodiment, which will not be repeated here.
[0102] Step S406: receiving processing suggestions fed back by the cloud server, and displaying the processing suggestions through the human-computer interaction interface.
[0103] After the generative domain model generates processing suggestions, the cloud server will feed back the processing suggestions to the user device through the exception handling interface, and the user device will display the processing suggestions through the human-computer interaction interface. However, it is not limited to this. In the case where the generative domain model uses a thought chain to generate processing suggestions, the information of the thought chain can also be fed back to the user device in real time through the exception handling interface and displayed through the human-computer interaction interface.
[0104] Further optionally, after receiving the processing suggestion, the user device may also generate corresponding processing instructions based on the processing suggestion, and send the processing instructions to the device that specifically executes the task or transaction, so that the device can perform the task or transaction recovery according to the processing instructions, thereby realizing automatic processing of abnormal events in the entire link.
[0105] Through this embodiment, only an interface and interface for inputting abnormal event description information need to be provided on the user device side to achieve effective handling of abnormal events. Users no longer need to manually analyze and process abnormal events, which reduces the user's processing burden and improves the user experience.
[0106] Reference Figure 8 , which shows the interaction process between the cloud service end and the user device for abnormal events. The interaction process includes the following steps: Step S502: Determine a corresponding exception handling interface according to the abnormal event description information sent by the user equipment.
[0107] A human-computer interaction interface and an information acquisition interface are set in the user device, which will send the abnormal event description information to the cloud server after obtaining it.
[0108] The cloud service end is provided with interfaces for providing a variety of different services, including an exception handling interface for handling abnormal events. The cloud service end receives abnormal event description information sent by the user device through the exception handling interface, wherein the exception handling interface can be implemented as any appropriate interface, such as an API interface, or other function call interface, etc. The embodiment of the present application does not limit the specific implementation form of the exception handling interface, as long as it can be called and can realize information reception and provide abnormal event handling services.
[0109] Step S504: Call the exception handling function through the exception handling interface to obtain event data and exception handling strategies that match the exception event description information; generate prompt information based on the exception event description information, event data and exception handling strategies; and call the generative domain model to perform generative processing on the prompt information to obtain processing suggestions for the exception event indicated by the exception event description information.
[0110] Among them, the generative domain model is a model obtained by training based on the generative basic model, such as the model obtained by training through the aforementioned model training method.
[0111] In the cloud service end, the event data and exception handling strategy that match the abnormal event description information are obtained, and prompt information is generated based on the abnormal event description information, event data and exception handling strategy. The call to the generative domain model can be encapsulated into a complete function, that is, the exception handling function, which provides services to the outside through the exception handling interface. Optionally, the function function can also include a generative domain model to call the generative domain model inside the function function.
[0112] The implementation of the above-mentioned specific operations by this function can refer to the description of the relevant parts in the aforementioned cloud service end exception handling method embodiment, which will not be repeated here.
[0113] Step S506: Feedback the processing suggestion to the user device through the exception processing interface.
[0114] After the cloud server generates processing suggestions through the generative domain model, it will feed back the processing suggestions to the user device through the exception handling interface so that the user device can process the processing suggestions, such as displaying the processing suggestions to the user, or generating corresponding processing instructions based on the processing suggestions.
[0115] In addition, when the generative domain model uses a thought chain method to generate processing suggestions, the cloud server can also feed back the reasoning information of the thought chain to the user device through the exception handling interface so as to display it to the user through the user device.
[0116] Through this embodiment, the cloud service end uses the exception handling interface and the exception handling function to effectively handle the exception event description information sent by the user device, generate processing suggestions that fully meet the actual needs in the corresponding fields and service scenarios and solve practical problems, and improve the user experience.
[0117] Reference Fig. 9 , shows a schematic diagram of the structure of an electronic device according to an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device.
[0118] like Fig. 9 As shown, the electronic device may include: a processor (processor) 602 , a communication interface (Communications Interface) 604 , a memory (memory) 606 , and a communication bus 608 .
[0119] in: The processor 602 , the communication interface 604 , and the memory 606 communicate with each other via a communication bus 608 .
[0120] The communication interface 604 is used to communicate with other electronic devices or servers.
[0121] The processor 602 is used to execute the program 610, and specifically can execute the relevant steps of any method embodiment in the above-mentioned multiple method embodiments.
[0122] Specifically, the program 610 may include program codes, which include computer operation instructions.
[0123] The processor 602 may be a CPU, or a GPU (Graphic Processing Unit) or an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0124] The memory 606 is used to store the program 610. The memory 606 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0125] The program 610 may include multiple computer instructions. Specifically, the program 610 may enable the processor 602 to execute operations corresponding to the method described in any of the aforementioned method embodiments through the multiple computer instructions.
[0126] The specific implementation of each step in program 610 can refer to the corresponding description of the corresponding steps and units in the above method embodiment, and has corresponding beneficial effects, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the above method embodiment, which will not be repeated here.
[0127] The present application also provides a computer storage medium on which a computer program is stored, and when the program is executed by a processor, the method described in any of the above-mentioned multiple method embodiments is implemented. The computer storage medium includes, but is not limited to: a compact disc read-only memory (CD-ROM), a random access memory (RAM), a floppy disk, a hard disk, or a magneto-optical disk, etc.
[0128] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to execute operations corresponding to any one of the above-mentioned multiple method embodiments.
[0129] In addition, it should be noted that the user-related information (including but not limited to user device information, enterprise or industry information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0130] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.
[0131] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD-ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a dedicated processor or programmable or dedicated hardware (such as an application-specific integrated circuit (ASIC) or a field programmable gate array (FPGA)). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., a random access memory (RAM), a read-only memory (ROM), a flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown herein, the execution of the code converts the general-purpose computer into a dedicated computer for executing the method shown herein.
[0132] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for specific applications, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.
[0133] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.
Claims
1. An exception handling method, comprising: Receive abnormal event description information; Acquire event data and exception handling strategies that match the abnormal event description information; Generate prompt information based on the abnormal event description information, the event data and the abnormality handling strategy; The prompt information is generatively processed through a generative domain model to obtain processing suggestions for the abnormal event indicated by the abnormal event description information, wherein the generative domain model is a model obtained by training based on a generative basic model.
2. The method according to claim 1, wherein: The acquiring of event data and an exception handling strategy matching the abnormal event description information includes: Generate a structured query statement according to the abnormal event description information; and query and obtain event data related to the abnormal event indicated by the abnormal event description information by using the structured query statement through an application program interface; and, According to the abnormal event description information, an abnormality handling strategy matching the abnormal event indicated by the abnormal event description information is retrieved from an external knowledge base through a retrieval enhanced generation method.
3. The method according to claim 1 or 2, wherein: The generatively processing the prompt information by using a generative domain model to obtain a processing suggestion for the abnormal event indicated by the abnormal event description information includes: The prompt information is input into the generative domain model, so that the generative domain model performs thought chain reasoning generation through tree search based on the prompt information to obtain processing suggestions for the abnormal event indicated by the abnormal event description information.
4. The method according to claim 3, wherein: The generating of thought chain reasoning through tree search to obtain processing suggestions for the abnormal event indicated by the abnormal event description information includes: For two adjacent reasonings in the thought chain reasoning, multiple reasoning results are generated for the previous reasoning through tree search; the multiple reasoning results are evaluated to determine the target reasoning result, and the target reasoning result is used as the reasoning basis for the next reasoning; Based on the inference results obtained by multiple inferences, a processing suggestion for the abnormal event indicated by the abnormal event description information is obtained.
5. The method according to claim 3, wherein: The method further comprises: The reasoning process information of the thought chain reasoning is sent to the user device to be displayed to the user through the human-computer interaction interface of the user device.
6. A model training method, comprising: Acquire a first training sample, wherein the first training sample includes: an abnormal event description information sample, an abnormal event handling suggestion annotation corresponding to the abnormal event description information sample, and a thinking chain reasoning information for obtaining the abnormal event handling suggestion annotation; A prompt information sample is generated based on the first training sample, and a general generative model of the field to which the first training sample belongs is fine-tuned based on the prompt information sample to obtain a generative domain model. The generative domain model is used to generatively process the prompt information generated according to the abnormal event description information, the event data of the abnormal event and the abnormal handling strategy, so as to generate a handling suggestion for the abnormal event indicated by the abnormal event description information.
7. The method according to claim 6, wherein: Before obtaining the first training sample, the method further includes: Acquire a second training sample, wherein the second training sample includes: a domain general knowledge sample; The generative basic model is pre-trained using the second training sample to obtain the general generative model.
8. The method according to claim 6 or 7, wherein: The thought chain reasoning information includes information of multiple reasoning processes based on the thought chain; The fine-tuning training of the general generative model in the field to which the first training sample belongs based on the prompt information sample includes: Inputting the prompt information sample into the general generative model, so that the general generative model performs multiple thinking reasonings based on the prompt information sample; According to the differences between the reasoning results of the multiple thinking reasonings and the exception handling suggestion annotations, the general generative model is fine-tuned and trained.
9. The method according to claim 8, wherein: Before fine-tuning the general generative model according to the difference between the reasoning results of the multiple thinking reasonings and the exception handling suggestion annotations, the method further includes: Through the evaluation model, the result of each thinking reasoning in the multiple thinking reasonings is evaluated, and the target reasoning result obtained by the current evaluation is used as the basis for the subsequent thinking reasoning until the reasoning result of the last thinking reasoning is obtained.
10. The method according to claim 9, wherein: The evaluation model is obtained in the following way: Before obtaining the first training sample, a third training sample is used to train a preset machine learning model to obtain the evaluation model, wherein the third training sample includes: a thinking chain reasoning sample and a corresponding reasoning result annotation.
11. The method according to claim 9, wherein: The evaluation model is used to evaluate the result of each of the multiple thinking inferences, including: In the process of multiple thinking reasonings, for each thinking reasoning, multiple reasoning results are generated through tree search, and the multiple reasoning results are evaluated through the evaluation model to determine the target reasoning result, and the target reasoning result is used as the reasoning basis for the next thinking reasoning.
12. A method for handling power system abnormalities, comprising: Receive description information of abnormal events in power grid regulation; Acquire event data and power dispatch rule data that match the description information of the abnormal event of power grid regulation; Generate prompt information based on the power grid regulation abnormal event description information, the event data and the power dispatch rule data; The prompt information is generatively processed through a generative power domain model to obtain processing suggestions for the abnormal event indicated by the power grid regulation abnormal event description information, wherein the generative power domain model is a model obtained by training based on a generative basic model.
13. An exception handling method, used in a cloud service end, the method comprising: Determine the corresponding exception handling interface according to the abnormal event description information sent by the user equipment; Calling an exception handling function through the exception handling interface to obtain event data and an exception handling strategy that match the exception event description information; Generate prompt information based on the abnormal event description information, the event data and the abnormality handling strategy; and calling a generative domain model to perform generative processing on the prompt information to obtain processing suggestions for the abnormal event indicated by the abnormal event description information, wherein the generative domain model is a model obtained by training based on a generative basic model; The processing suggestion is fed back to the user equipment through the exception processing interface.
14. An exception handling method, used in a user device, the method comprising: Receive input abnormal event description information through a human-computer interaction interface; Sending the abnormal event description information to the abnormal handling interface of the cloud service end, so as to call the generative domain model through the abnormal handling interface to process the abnormal event indicated by the to-be-processed abnormal event, wherein the generative domain model is used to perform generative processing on the prompt information generated according to the abnormal event description information, the event data of the abnormal event and the abnormal handling strategy, so as to generate a processing suggestion for the abnormal event indicated by the abnormal event description information, and the event data and the abnormal handling strategy are obtained according to the abnormal event description information; The processing suggestion fed back by the cloud service end is received, and the processing suggestion is displayed through a human-computer interaction interface.
15. An electronic device, comprising: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform an operation corresponding to the method described in any one of claims 1-7, or any one of claims 6-11, or claim 12, 13 or 14.
16. A computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the method as claimed in any one of claims 1 to 7, or any one of claims 6 to 11, or claim 12, 13 or 14.
17. A computer program product, comprising computer instructions, wherein the computer instructions instruct a computing device to perform operations corresponding to the method as claimed in any one of claims 1 to 7, or any one of claims 6 to 11, or claim 12, 13 or 14.
Citation Information
Patent Citations
Automatic service generation method and device, computer equipment and storage medium
CN116976640A
Maintenance suggestion generation method and system of automobile fault model based on deep learning
CN117522372A
Method and device for generating interpretable language of automobile anomaly detection result
CN117591646A
Server fault diagnosis method and device, storage medium and electronic equipment
CN118394561A
Inference state control method and device based on prior knowledge of large language model
CN118446322A
Cited By
Fault analysis, power equipment fault analysis and fault analysis model training method
CN119762290A
