CN-122021847-A - Flood prevention and platform prevention power grid emergency response plan text rule formalized extraction method and device based on large language model and related products
Abstract
The application provides a large language model-based method and device for regularly extracting emergency response plans of a flood control and station control power grid text and related products, and relates to the technical field of data processing. The method takes emergency response of the flood prevention power grid as an object, and realizes formalized extraction of the emergency response plan text rules of the flood prevention power grid, improves the efficiency of emergency response of the power grid and the capability of coping with emergencies, and provides assistance for intelligent decision-making of emergency response of natural disasters of the power grid through the steps of formalized description definition of the emergency response plan text rules of the flood prevention power grid, instruction set construction, rule extraction corpus construction flow design assisted by a large language model, multi-layer negative example perception and difference item weighting collaborative fine-tuning strategy, result output and the like.
Inventors
- FEI ZHENGMING
- REN MAOXIN
- SHEN MENG
- Xiu Xueyun
Assignees
- 国家电网有限公司华东分部
Dates
- Publication Date
- 20260512
- Application Date
- 20251209
Claims (10)
- 1. A method for regularly extracting emergency response plans of a flood control and station prevention power grid based on a large language model is characterized by comprising the following steps: collecting a plurality of flood prevention platform power grid emergency response plan files; Defining a formal description mode of a flood prevention power grid emergency response plan text rule, defining a complete flood prevention power grid emergency response plan text analysis rule as an analysis rule quadruple comprising a subject, an object, conditions and results, and defining an application range, an object and an effect of extraction of the flood prevention power grid emergency response plan text rule; Based on the defined rule-formed description mode of the emergency response plan text of the flood control and station control power grid and the rule-formed extraction task of the emergency response plan text of the flood control and station control power grid, an instruction set comprising a task target, an adjustment mode and a data format is constructed; based on a preset first large language model, a constructed instruction set and a plurality of collected flood control and station control power grid emergency response plan files, constructing a flood control and station control power grid emergency response plan text rule-based formalized extraction corpus; designing a multi-layer negative example perception and difference item weighting collaborative fine tuning strategy, and carrying out fine tuning training on a preset second large language model by utilizing the constructed corpus and the designed multi-layer negative example perception and difference item weighting collaborative fine tuning strategy to obtain a trained flood control and station prevention power grid emergency response plan text rule formalized extraction model; and inputting a trained emergency response plan text regular form extraction model of the flood prevention power grid to be extracted, and outputting an emergency response plan text regular form extraction result of the flood prevention power grid.
- 2. The method of claim 1, wherein constructing a rule template-based flood control grid emergency response plan text rule-formalized extraction corpus based on the preset first large language model, the constructed instruction set, and the collected plurality of flood control grid emergency response plan files comprises: designing a labeling template of an extraction rule according to a task target in the constructed instruction set; The constructed instruction set and the designed labeling template are used as model prompting words, the model prompting words and the collected emergency response plan files of the plurality of flood control and station prevention power grids are input into a preset first large language model, and text data of the emergency response plan of the flood control and station prevention power grids are automatically labeled by the aid of the first large language model, so that labeling results are obtained; generating a standard flood control and station control power grid emergency response plan text structured label based on the labeling result; Based on the collected emergency response plan files of the plurality of flood control and station electric network and the standard text structured labels of the emergency response plans of the flood control and station electric network, a rule template-based text rule-formed extraction corpus of the emergency response plans of the flood control and station electric network is constructed.
- 3. The method of claim 2, wherein generating a standard flood control station grid emergency response plan text structured tag based on the labeling result comprises: Checking the marking result, and if the checking is passed, taking the marking result as a standard flood prevention and station prevention power grid emergency response plan text structured label; and if the verification is not passed, adjusting the labeling result, and taking the adjusted labeling content as a standard flood prevention and station prevention power grid emergency response plan text structured label.
- 4. The method of claim 1, wherein designing a multi-layer negative example perception and difference term weighting collaborative tuning strategy comprises: Training and weight assignment are carried out by utilizing the positive examples and the multi-layer negative examples at the same time, and the identification accuracy of the model on the type of the critical error negative example is enhanced; and designing a difference term weighting strategy, and carrying out differentiated loss weight assignment on the contribution of the negative examples according to different categories including field errors, logic errors and fact errors and error degrees.
- 5. The method of claim 4, wherein performing fine tuning training on a preset second large language model by using a constructed corpus, a designed multi-layer negative example perception and difference term weighting collaborative fine tuning strategy to obtain a trained flood control and station prevention power grid emergency response plan text regularized extraction model, comprising: generating error negative example labels and positive example standard labels by using the constructed corpus; analyzing the difference of each field through the error negative example label and the positive example standard label, and further constructing multi-layer difference alignment data structural information of a flood prevention and platform prevention power grid emergency response plan text, wherein the multi-layer difference alignment data comprises a rule text, a negative example label, a positive example label and a difference description; And carrying out fine tuning training on a preset second large language model based on the multi-layer difference alignment data structural information and a difference item weighting collaborative fine tuning strategy to obtain a trained flood control and station control power grid emergency response plan text rule formalized extraction model.
- 6. The utility model provides a flood prevention platform electric wire netting emergency response plan text rule formalization extraction device based on big language model which characterized in that, the device includes: The collecting unit is used for collecting a plurality of flood control and station control power grid emergency response plan files; The definition unit is used for defining a text rule formalized description mode of the emergency response plan of the flood prevention power grid, defining a complete text analysis rule of the emergency response plan of the flood prevention power grid as an analysis rule quadruple comprising a subject, an object, conditions and results, and defining the application range, objects and actions of text rule extraction of the emergency response plan of the flood prevention power grid; the first construction unit is used for constructing an instruction set comprising a task target, an adjustment mode and a data format based on the defined flood control and station control power grid emergency response plan text rule formalized description mode and the flood control and station control power grid emergency response plan text rule formalized extraction task; The second construction unit is used for constructing a flood control and station prevention power grid emergency response plan text rule formalized extraction corpus based on the rule template based on the preset first large language model, the constructed instruction set and the collected multiple flood control and station prevention power grid emergency response plan files; the fine tuning unit is used for designing a multi-layer negative example perception and difference item weighting collaborative fine tuning strategy, and carrying out fine tuning training on a preset second large language model by utilizing the constructed corpus and the designed multi-layer negative example perception and difference item weighting collaborative fine tuning strategy to obtain a trained flood prevention and platform prevention power grid emergency response plan text rule formalized extraction model; The extraction unit is used for inputting the emergency response plan file of the flood control and station control power grid to be extracted, inputting a trained rule-formed extraction model of the emergency response plan text of the flood control and station control power grid, and outputting an extraction result of the rule-formed extraction of the emergency response plan text of the flood control and station control power grid.
- 7. The apparatus of claim 6, wherein the second building unit is further configured to: designing a labeling template of an extraction rule according to a task target in the constructed instruction set; The constructed instruction set and the designed labeling template are used as model prompting words, the model prompting words and the collected emergency response plan files of the plurality of flood control and station prevention power grids are input into a preset first large language model, and text data of the emergency response plan of the flood control and station prevention power grids are automatically labeled by the aid of the first large language model, so that labeling results are obtained; generating a standard flood control and station control power grid emergency response plan text structured label based on the labeling result; Based on the collected emergency response plan files of the plurality of flood control and station electric network and the standard text structured labels of the emergency response plans of the flood control and station electric network, a rule template-based text rule-formed extraction corpus of the emergency response plans of the flood control and station electric network is constructed.
- 8. An electronic device comprising a processor and a memory, wherein the memory has a computer program stored therein, the processor being configured to run the computer program to perform the large language model based flood control and anti-grid emergency response protocol text rule formalization extraction method of any one of claims 1 to 5.
- 9. A storage medium, wherein the storage medium has a computer program stored therein, and wherein the computer program is configured to execute the large language model-based flood control and anti-station grid emergency response plan text rule formalization extraction method according to any one of claims 1 to 5 at runtime.
- 10. A computer program product comprising a computer program, characterized in that the computer program is configured to perform the large language model based flood control stage grid emergency response plan text regularization extraction method of any one of claims 1 to 5 when run.
Description
Flood prevention and platform prevention power grid emergency response plan text rule formalized extraction method and device based on large language model and related products Technical Field The application relates to the technical field of data processing, in particular to a flood prevention and platform prevention power grid emergency response plan text rule formalization extraction method and device based on a large language model and related products. Background The emergency response plan text of the flood prevention and typhoon prevention power grid is an important manual for ensuring emergency treatment of the power grid under the emergency conditions of natural disasters such as flood, typhoon and the like, and the content of the emergency response plan text is in an unstructured natural language text form. With the rapid development of national and local power infrastructures and the continuous improvement of information and management intelligent level demands, the depth of content, difficulty and workflow of emergency response plan texts of flood control and station control power grid emergency response treatment for cooperation of multiple departments are increasingly complex, formal rules representing the power grid emergency response plan texts are rapidly and efficiently extracted from the flood control and station control power grid emergency response plan texts, and inferable and computable power grid emergency plan knowledge is constructed, so that the improvement of the treatment efficiency, national economic construction and social stability of emergency situations of the flood control and station control power grid are important. The flood prevention platform is used as an important application scene of emergency response of natural disasters and large-area power failure events of the power grid, and currently, manual collection or labeling of data set labels is not available, so that formal extraction work of text rules of emergency response plans of the power grid of the flood prevention platform cannot be developed in a targeted manner. The traditional power grid emergency plan generally depends on manual review of decision-making staff, existing subjective experience and subjective understanding decision of a power grid emergency plan text, and has the problems of low efficiency, easiness in missing key information, poor decision consistency and the like, and has poor timeliness for emergency response of a large-scale power grid natural disaster accident such as flood prevention and platform prevention. Therefore, how to automatically and quickly convert unstructured emergency response plan text of the flood control and station control power grid into computer identifiable, inferable and executable structured rule knowledge becomes an important premise for improving the intelligent level of extraction of emergency response plan text information of the power grid. Particularly, with the development of new generation artificial intelligence technology, a large language model has become a powerful means for structured extraction of text rules of emergency response plans of large-area multi-scale flood prevention and platform prevention power grids. At present, the novel unstructured pre-proposal text rule extraction can be summarized into two ideas based on a traditional natural language processing pipeline and on a pre-training language model for fine adjustment. The rule extraction task is decomposed into a plurality of serialized subtasks by means of large-scale marking data, so that the rule extraction task has the advantages of being strong in interpretability and free of training data, and is high in accuracy under the conditions of standard text format and fixed language of a plan, and the defects of being too dependent on expert knowledge, being difficult to process complex logic and being poor in generalization capability. The rule extraction is realized by regarding the rule extraction as a sequence labeling or text generation task, and the method has the advantages of high automation precision and accuracy and strong generalization, is the current mainstream, but has the disadvantages of high data labeling cost and poor model interpretability. In summary, at present, the research related to formalized extraction of text rules of emergency response plans of flood control and station prevention power grids is less. Most of the prior art schemes focus on the structural extraction under the premise of the format specification of the pre-arranged case text, obvious short plates exist in performance, cost or flexibility, and formal rules of long-spread unstructured obvious power grid emergency response pre-arranged case text cannot be extracted accurately. Therefore, there is a need to solve this technical problem. Disclosure of Invention In view of the above, the present application is directed to a method, an apparatus, and a related product for formalized extraction of text r