Substation model generation method, device and equipment based on large language model
By textualizing and segmenting substation operation and maintenance information, and combining it with fine-tuning training using the low-rank adaptation method, the fragmentation problem of model fine-tuning process in the field of substation operation and maintenance is solved, and efficient and accurate substation question-and-answer model generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-30
- Publication Date
- 2026-04-07
AI Technical Summary
The fine-tuning process of traditional large language models in the field of substation operation and maintenance has three core steps: data preprocessing, question-answer pair generation, and model fine-tuning. These steps are discrete, resulting in a fragmented process, low efficiency, and the need for a lot of manual intervention, which leads to low modeling efficiency.
By converting substation operation and maintenance information into text descriptions, performing hierarchical text segmentation, generating a set of question-answer pairs, and using low-rank adaptation to fine-tune the initial model, a closed-loop automated process is formed, reducing computational requirements and improving modeling efficiency.
It achieves automation and high efficiency in substation model generation, ensures the accuracy and reliability of the generated models, reduces reliance on manual operation, and improves modeling efficiency.
Smart Images

Figure CN121809690A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of substation technology, and in particular to a method, apparatus and equipment for generating substation models based on large language models. Background Technology
[0002] In the process of intelligent upgrading of substation operation and maintenance, large language models have become a core tool for improving operation and maintenance efficiency due to their ability to answer professional knowledge questions and generate fault solutions; however, the implementation of large language models in the field of substation operation and maintenance needs to be adapted through domain fine-tuning.
[0003] Traditional large language models have significant drawbacks in the fine-tuning process in the field of substation operation and maintenance: On the one hand, the three core steps of data preprocessing, question-answer pair generation, and model fine-tuning are discrete and require manual switching of data formats and transmission of intermediate results between different tools, resulting in a fragmented process and low efficiency; on the other hand, substation operation and maintenance data is highly specialized, and traditional fine-tuning requires manual data cleaning, terminology calibration, and question-answer sample labeling. Single model development often requires a large investment of manpower, resulting in low task efficiency. Summary of the Invention
[0004] This application provides a method, apparatus, and equipment for generating substation models based on large language models, which solves the technical problem that existing technologies have discrete processes and cannot complete different stages of operations without manual intervention, resulting in low modeling efficiency.
[0005] In view of this, the first aspect of this application provides a method for generating substation models based on large language models, including:
[0006] Various substation operation and maintenance information is converted into text descriptions to obtain operation and maintenance text documents;
[0007] The inspection text document is processed into hierarchical text blocks according to preset segmentation levels, character limits, and fixed character counts to obtain hierarchical text blocks.
[0008] The hierarchical text blocks and preset prompts are input into a large language model for knowledge analysis, and a set of question-answer pairs is generated.
[0009] The initial low-rank adaptation model is fine-tuned and trained using the question-answer pair set to generate an optimized question-answer model for substations.
[0010] Preferably, the step of converting various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents includes:
[0011] Extract key information from the operation and maintenance data of substations in different modes;
[0012] The substation operation and maintenance information is converted into text content based on the constructed text prompts and key information using a large language model.
[0013] The text content is cleaned and filtered using regular expression matching to obtain the inspection text document.
[0014] Preferably, the step of performing text hierarchical block processing on the inspection text document according to a preset segmentation level, character limit, and fixed number of characters to obtain hierarchical text blocks includes:
[0015] Based on the title format, the text in the operation and inspection text document is coarsely segmented to obtain initial text blocks;
[0016] If the number of characters in the initial text block exceeds the character limit, it is determined whether the initial text block has a secondary heading. If so, the initial text is further divided into secondary sections to obtain secondary text blocks.
[0017] If the initial text block does not contain the subheading, then the initial text block is divided into fixed text blocks by a fixed number of characters.
[0018] The hierarchical text block includes secondary text blocks and fixed text blocks.
[0019] Preferably, the step of performing text hierarchical block processing on the inspection text document according to a preset segmentation level, character limit, and fixed number of characters to obtain hierarchical text blocks further includes:
[0020] The hierarchical text blocks are stored in a structured format to obtain a text block dictionary, wherein the text blocks in the text block dictionary include block numbers.
[0021] Preferably, the step of fine-tuning the initial low-rank adaptation model using the question-answer pair set to generate a substation optimized question-answer model includes:
[0022] An initial low-rank fitting model is generated using the low-rank fitting method and the quantized low-rank fitting method.
[0023] Based on a preset optimizer, cross-entropy loss function, and regularization technique, the initial low-rank adaptation model is fine-tuned and trained using the question-answer pair set to generate a fine-tuned question-answer model.
[0024] The fine-tuned question-answering model is evaluated according to pre-set evaluation criteria to obtain a model score. The pre-set evaluation criteria include knowledge accuracy analysis, answer completeness analysis, and semantic consistency analysis.
[0025] The substation optimization question-and-answer model was selected based on the model score.
[0026] The second aspect of this application provides a substation model generation device based on a large language model, including:
[0027] The text conversion unit is used to convert various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents.
[0028] The text segmentation unit is used to perform hierarchical text segmentation on the inspection text document according to a preset segmentation level, character limit and fixed number of characters to obtain hierarchical text blocks;
[0029] The question-and-answer generation unit is used to input the hierarchical text blocks and preset prompt statements into a large language model for knowledge analysis and to generate a set of question-and-answer pairs.
[0030] The fine-tuning training unit is used to fine-tune the initial low-rank adaptation model using the question-answer pair set to generate a substation optimized question-answer model.
[0031] Preferably, the text conversion unit is specifically used for:
[0032] Extract key information from the operation and maintenance data of substations in different modes;
[0033] The substation operation and maintenance information is converted into text content based on the constructed text prompts and key information using a large language model.
[0034] The text content is cleaned and filtered using regular expression matching to obtain the inspection text document.
[0035] Preferably, the text segmentation unit is specifically used for:
[0036] Based on the title format, the text in the operation and inspection text document is coarsely segmented to obtain initial text blocks;
[0037] If the number of characters in the initial text block exceeds the character limit, it is determined whether the initial text block has a secondary heading. If so, the initial text is further divided into secondary sections to obtain secondary text blocks.
[0038] If the initial text block does not contain the subheading, then the initial text block is divided into fixed text blocks by a fixed number of characters.
[0039] The hierarchical text block includes secondary text blocks and fixed text blocks.
[0040] Preferably, the fine-tuning training unit is specifically used for:
[0041] An initial low-rank fitting model is generated using the low-rank fitting method and the quantized low-rank fitting method.
[0042] Based on a preset optimizer, cross-entropy loss function, and regularization technique, the initial low-rank adaptation model is fine-tuned and trained using the question-answer pair set to generate a fine-tuned question-answer model.
[0043] The fine-tuned question-answering model is evaluated according to pre-set evaluation criteria to obtain a model score. The pre-set evaluation criteria include knowledge accuracy analysis, answer completeness analysis, and semantic consistency analysis.
[0044] The substation optimization question-and-answer model was selected based on the model score.
[0045] A third aspect of this application provides a substation model generation device based on a large language model, the device including a processor and a memory;
[0046] The memory is used to store program code and transmit the program code to the processor;
[0047] The processor is used to execute the substation model generation method based on a large language model as described in the first aspect, according to the instructions in the program code.
[0048] As can be seen from the above technical solutions, the embodiments of this application have the following advantages:
[0049] This application provides a method for generating substation models based on a large language model, including: converting various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents; performing hierarchical text block processing on the operation and maintenance text documents according to preset segmentation levels, character limits, and fixed character counts to obtain hierarchical text blocks; inputting the hierarchical text blocks and preset prompt statements into a large language model for knowledge analysis and generating a question-answer pair set; and using the question-answer pair set to fine-tune and train the initial low-rank adaptation model to generate an optimized substation question-answer model.
[0050] The substation model generation method based on a large language model provided in this application offers a closed-loop automated process for data processing, question-answer pair generation, and model fine-tuning training, overcoming the problems of fragmented processes and excessive reliance on manual labor in existing technologies. During question-answer pair generation, preset prompts constrain the model generation; and in the fine-tuning training phase, low-rank adaptation is used for model optimization and adjustment, significantly reducing computational requirements. These operations simultaneously ensure the accuracy, reliability, and efficiency of the generated model. Therefore, this application solves the technical problem of existing technologies having discrete processes and being unable to eliminate manual intervention in different stages, leading to low modeling efficiency. Attached Figure Description
[0051] Figure 1 A flowchart illustrating the substation model generation method based on a large language model provided in this application embodiment;
[0052] Figure 2 A schematic diagram of the substation model generation device based on a large language model provided in this application embodiment;
[0053] Figure 3 This is a schematic diagram of the text segmentation process provided in an embodiment of this application. Detailed Implementation
[0054] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present application.
[0055] For easier understanding, please refer to Figure 1 The embodiments of the substation model generation method based on a large language model provided in this application include:
[0056] Step 101: Convert various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents.
[0057] Further, in step 101, various substation operation and maintenance information is converted into text descriptions to obtain operation and maintenance text documents, including:
[0058] Extract key information from the operation and maintenance data of substations in different modes;
[0059] The substation operation and maintenance information is converted into text content based on the constructed text prompts and key information using a large language model.
[0060] The text content is cleaned and filtered using regular expression matching to obtain the operation and inspection text document.
[0061] It should be noted that the substation operation and maintenance information in this embodiment includes, but is not limited to, equipment maintenance records, fault reports, and operation and maintenance procedures; and this information will be presented in different formats such as tables, diagrams, and PPTs. In order to meet the requirements of the model for plain text content and facilitate the generation of question-and-answer pairs, it is necessary to convert this information in different expression formats into the form of text documents; specifically, this can be done through a multimodal large model, that is, converting non-text data into text descriptions.
[0062] Specifically, key information in different formats can be extracted first, and then the data can be converted into text using a large language model based on this key information and the set text prompts. For tabular data, the structured information of the expression can be extracted first, including but not limited to table headers, row indices, column indices, and cell values; then, based on the corresponding text prompts, such as "clearly describe the contents of the table in text form to ensure no content is omitted," the large language model can convert the table content into a text document.
[0063] For diagrams, a text prompt can be used to guide the model to convert the diagram into a text document, ensuring that the information contained in the diagram is clearly described in text form, respecting the content of the diagram and avoiding arbitrary digressions. For PPT format information, key information such as the title, text boxes, and image descriptions of each PPT page can be extracted. Then, a text prompt can be constructed, such as "Integrate the content of this PPT into text paragraphs, highlighting key information in the field of substation operation and maintenance," to guide the model in generating the corresponding text document.
[0064] Furthermore, to address the issues of garbled characters and inconsistent document title formats during text conversion, this embodiment can also filter out semantically meaningless special symbols or garbled characters using regular expression matching and replacement, and then remove these contents. Then, it uses a preset title format regular expression table to filter document titles of different formats and replaces them with a unified title format. Through these methods, the text is clearly optimized to obtain the inspection text document; thus avoiding semantic interference from irrelevant symbols and ensuring the accuracy of subsequent block segmentation.
[0065] Step 102: Perform text hierarchical segmentation on the inspection text document according to the preset segmentation level, character limit and fixed number of characters to obtain hierarchical text blocks.
[0066] Further, in step 102, the text document to be inspected is processed into hierarchical text blocks according to preset segmentation levels, character limits, and a fixed number of characters, resulting in hierarchical text blocks, including:
[0067] Based on the title format, the text in the operation and inspection text document is coarsely segmented to obtain the initial text blocks;
[0068] If the number of characters in the initial text block exceeds the character limit, then it is determined whether the initial text block has a secondary heading. If so, the initial text is split into secondary headings to obtain secondary text blocks.
[0069] If the initial text block does not have a subheading, then the initial text block is divided into fixed text blocks by a fixed number of characters.
[0070] Hierarchical text blocks include secondary text blocks and fixed text blocks.
[0071] Furthermore, step 102, followed by:
[0072] The hierarchical text blocks are stored in a structured format to obtain a text block dictionary, in which the text blocks include block numbers.
[0073] It should be noted that, based on the heading format in the operation and inspection text document, such as "2." and "2.2", the document can be first roughly divided into blocks to obtain initial text blocks. The specific rough block division process is based on regular expression matching, which is a content division operation based on headings after the text has been formatted in a unified manner. These heading levels can be marked with paragraph levels, for example, "2." is marked as a first-level heading, and "2.2" is marked as a second-level heading.
[0074] Then, the characters in each initial text block are statistically analyzed to determine if the number of characters exceeds the character limit. If it does, further segmentation is needed. If it does not exceed the character limit, it can be directly used as the target text block. For the initial text blocks that exceed the character limit, it is further checked to see if there are subheadings. If so, segmentation is continued based on the subheadings. If no subheadings are found, fixed segmentation with a fixed number of characters is required. By completing the segmentation of all initial text blocks in the above manner, the hierarchical text blocks can be obtained. It is understood that the heading hierarchy and the fixed character count can be set according to the actual situation and are not limited here.
[0075] Furthermore, when encountering a heading at a level higher than the segmentation heading, its sibling headings can be used to update it. This ensures that the parent heading information of the segmentation heading is supplemented during segmentation, giving the text block complete hierarchical information and improving its semantics. Based on the above strategies, highly semantically related text blocks can be obtained by dividing the text into paragraphs. By supplementing the parent heading information, the text includes its source domain information. At the same time, character count is used as a supervisor to prevent the text blocks from being too broad, resulting in text blocks that are semantically complete and highly focused.
[0076] Please refer to the block division process in this embodiment. Figure 3 The resulting hierarchical text blocks can be visualized through heading level indentation, and can also be manually edited and split manually. They are then stored in a structured format, including heading levels, source documents, text content, and block numbers, thereby generating a text block dictionary.
[0077] Step 103: Input the hierarchical text blocks and preset prompts into the large language model for knowledge analysis and generate a set of question-answer pairs.
[0078] To improve the accuracy and reliability of the generated question-and-answer pairs, this embodiment pre-sets prompts that conform to the characteristics of the substation field, clearly defining content requirements and format, such as "Generate 3-5 sets of question-and-answer pairs, covering key knowledge such as fault handling and procedural requirements; the answers must cite specific substation procedural clauses or operating procedures," etc. The preset prompts can also be verified for accuracy to ensure their accuracy.
[0079] The hierarchical text blocks and their corresponding preset prompts are input into a large language model, which learns the domain knowledge features of the text blocks and the instructional constraints of the prompts. Then, the model accurately matches the logical association between the two, generating question-and-answer pairs that meet the requirements of the substation domain. These generated question-and-answer pairs can be directly standardized in format before being output as a set of question-and-answer pairs. In this embodiment, the output data is uniformly expressed in a dictionary format of {instruction';input';output'}.
[0080] The generated question-and-answer pair set can be stored in batches in the database and marked as "pending review". This embodiment can also perform random screening of question-and-answer pairs at a preset ratio. Specifically, the quality of the question-and-answer pairs is first locally evaluated to determine their quality, and the preset prompts are adjusted in reverse according to the evaluation results, thereby optimizing the question-and-answer pair generation effect; manual optimization of question-and-answer pairs can also improve model performance.
[0081] Step 104: Use a set of question-answer pairs to fine-tune and train the initial low-rank adaptation model to generate an optimized question-answer model for the substation.
[0082] Further, step 104 includes:
[0083] An initial low-rank fitting model is generated using the low-rank fitting method and the quantized low-rank fitting method.
[0084] Based on a pre-defined optimizer, cross-entropy loss function, and regularization technique, the initial low-rank fitting model is fine-tuned and trained using a question-answer pair set to generate a fine-tuned question-answer model.
[0085] The fine-tuned question-answering model is evaluated based on pre-defined evaluation criteria to obtain a model score. The pre-defined evaluation criteria include knowledge accuracy analysis, answer completeness analysis, and semantic consistency analysis.
[0086] The substation optimization question-and-answer model was selected based on the model score.
[0087] The core of the model in this embodiment is the low-rank fitting method and the quantized low-rank fitting method. These are two lightweight fine-tuning methods. The core idea is to insert a low-rank matrix into the model parameter layer and replace the full update of the high-dimensional original parameter matrix with the multiplication of low-rank matrices.
[0088]
[0089] Where h is the calculation result and x is the input. The original parameter matrix is a high-dimensional matrix. , It is a low-rank matrix, and , The dimension is much smaller than the original parameter matrix. The dimension, frozen during training. Update only , The training parameters account for only 0.1%-1% of the total parameters of the model; at the same time, the basic model weights can be compressed by combining 4-bit / 8-bit quantization technology, freezing the original model parameters and not participating in the update, and only training the quantization scaling factor synchronously. Under the premise of significantly reducing the consumption of computing resources and training costs, the domain adaptation effect is comparable to that of full parameter fine-tuning.
[0090] The training process in this embodiment uses a lightweight large language model with 7B / 14B parameters as the base model. The question-answer pair set is divided into training set, validation set and test set according to the proportion. The cross-entropy loss function is used as the optimization objective. It is combined with AdamW optimizer and adaptive learning rate scheduling strategy. Regularization technology is used to suppress overfitting and ensure that the model learns domain knowledge stably. Fine-tuning is then performed to obtain a fine-tuned question-answer model.
[0091] The fine-tuned question-answering model can then be evaluated and analyzed using assessment scores and secondary manual review of challenging examples. Specific assessment dimensions include knowledge accuracy, answer completeness, and semantic consistency. The evaluation analysis yields a corresponding model score, which in this embodiment ranges from 0 to 1. Then, challenging examples with appropriate scores (0.5-0.8) can be used for secondary review and calibration based on empirical knowledge. Manual review balances verification efficiency and accuracy, thereby ensuring the accuracy and reliability of the selected substation optimization question-answering model.
[0092] To facilitate application, this application also designs an integrated interactive architecture for substation model generation based on a large language model, specifically comprising an "interaction layer - core function layer - data layer". The interaction layer is responsible for user command input, process status display, manual screening operations, and expert Q&A interaction. The core function layer integrates three modules: domain data textual preprocessing, intelligent question-and-answer pair generation, and lightweight model fine-tuning, as well as an independent large language model dialogue system. The data layer is divided into a raw data area, a text preprocessing data area, a question-and-answer sample library, and a model file library according to processing stages, and uses distributed storage to achieve data persistence.
[0093] The substation model generation method based on a large language model provided in this application offers a closed-loop automated process for data processing, question-answer pair generation, and model fine-tuning training, overcoming the problems of fragmented processes and excessive reliance on manual labor in existing technologies. During question-answer pair generation, preset prompts constrain the model generation; and during the fine-tuning training phase, low-rank adaptation is used for model optimization and adjustment, significantly reducing computational requirements. These operations simultaneously ensure the accuracy, reliability, and efficiency of the generated model. Therefore, this application can solve the technical problem of low modeling efficiency caused by the discrete processes and the inability to complete different stages manually in existing technologies.
[0094] For easier understanding, please refer to Figure 2 This application provides an embodiment of a substation model generation device based on a large language model, including:
[0095] The text conversion unit 201 is used to convert various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents.
[0096] The text segmentation unit 202 is used to perform hierarchical text segmentation on the inspection text document according to the preset segmentation level, character limit and fixed number of characters to obtain hierarchical text blocks.
[0097] The question-and-answer generation unit 203 is used to input hierarchical text blocks and preset prompt statements into a large language model for knowledge analysis and to generate a set of question-and-answer pairs.
[0098] The fine-tuning training unit 204 is used to fine-tune the initial low-rank adaptation model using a set of question-answer pairs to generate a substation optimized question-answer model.
[0099] Furthermore, the text conversion unit 201 is specifically used for:
[0100] Extract key information from the operation and maintenance data of substations in different modes;
[0101] The substation operation and maintenance information is converted into text content based on the constructed text prompts and key information using a large language model.
[0102] The text content is cleaned and filtered using regular expression matching to obtain the operation and inspection text document.
[0103] Furthermore, the text segmentation unit 202 is specifically used for:
[0104] Based on the title format, the text in the operation and inspection text document is coarsely segmented to obtain the initial text blocks;
[0105] If the number of characters in the initial text block exceeds the character limit, then it is determined whether the initial text block has a secondary heading. If so, the initial text is split into secondary headings to obtain secondary text blocks.
[0106] If the initial text block does not have a subheading, then the initial text block is divided into fixed text blocks by a fixed number of characters.
[0107] Hierarchical text blocks include secondary text blocks and fixed text blocks.
[0108] Furthermore, the fine-tuning of training unit 204 is specifically used for:
[0109] An initial low-rank fitting model is generated using the low-rank fitting method and the quantized low-rank fitting method.
[0110] Based on a pre-defined optimizer, cross-entropy loss function, and regularization technique, the initial low-rank fitting model is fine-tuned and trained using a question-answer pair set to generate a fine-tuned question-answer model.
[0111] The fine-tuned question-answering model is evaluated based on pre-defined evaluation criteria to obtain a model score. The pre-defined evaluation criteria include knowledge accuracy analysis, answer completeness analysis, and semantic consistency analysis.
[0112] The substation optimization question-and-answer model was selected based on the model score.
[0113] This application also provides a substation model generation device based on a large language model, the device including a processor and a memory;
[0114] The memory is used to store program code and transfer the program code to the processor;
[0115] The processor is used to execute the substation model generation method based on a large language model in the above method embodiment according to the instructions in the program code.
[0116] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0117] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0118] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0119] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for executing all or part of the steps of the methods described in the various embodiments of this application through a computer device (which may be a personal computer, server, or network device, etc.). The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0120] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for generating substation models based on a large language model, characterized in that, include: Various substation operation and maintenance information is converted into text descriptions to obtain operation and maintenance text documents; The inspection text document is processed into hierarchical text blocks according to preset segmentation levels, character limits, and fixed character counts to obtain hierarchical text blocks. The hierarchical text blocks and preset prompts are input into a large language model for knowledge analysis, and a set of question-answer pairs is generated. The initial low-rank adaptation model is fine-tuned and trained using the question-answer pair set to generate an optimized question-answer model for substations.
2. The substation model generation method based on a large language model according to claim 1, characterized in that, The process of converting various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents includes: Extract key information from the operation and maintenance data of substations in different modes; The substation operation and maintenance information is converted into text content based on the constructed text prompts and key information using a large language model. The text content is cleaned and filtered using regular expression matching to obtain the inspection text document.
3. The substation model generation method based on a large language model according to claim 1, characterized in that, The text document is divided into hierarchical blocks according to a preset segmentation level, character limit, and fixed number of characters to obtain hierarchical text blocks, including: Based on the title format, the text in the operation and inspection text document is coarsely segmented to obtain initial text blocks; If the number of characters in the initial text block exceeds the character limit, it is determined whether the initial text block has a secondary heading. If so, the initial text is further divided into secondary sections to obtain secondary text blocks. If the initial text block does not contain the subheading, then the initial text block is divided into fixed text blocks by a fixed number of characters. The hierarchical text block includes secondary text blocks and fixed text blocks.
4. The substation model generation method based on a large language model according to claim 1, characterized in that, The process of dividing the inspection text document into hierarchical text blocks according to a preset segmentation level, character limit, and fixed number of characters to obtain hierarchical text blocks further includes: The hierarchical text blocks are stored in a structured format to obtain a text block dictionary, wherein the text blocks in the text block dictionary include block numbers.
5. The substation model generation method based on a large language model according to claim 1, characterized in that, The step of fine-tuning the initial low-rank adaptation model using the question-answer pair set to generate an optimized question-answer model for the substation includes: An initial low-rank fitting model is generated using the low-rank fitting method and the quantized low-rank fitting method. Based on a preset optimizer, cross-entropy loss function, and regularization technique, the initial low-rank adaptation model is fine-tuned and trained using the question-answer pair set to generate a fine-tuned question-answer model. The fine-tuned question-answering model is evaluated according to pre-set evaluation criteria to obtain a model score. The pre-set evaluation criteria include knowledge accuracy analysis, answer completeness analysis, and semantic consistency analysis. The substation optimization question-and-answer model was selected based on the model score.
6. A substation model generation device based on a large language model, characterized in that, include: The text conversion unit is used to convert various substation operation and maintenance information into text descriptions to obtain operation and maintenance text documents. The text segmentation unit is used to perform hierarchical text segmentation on the inspection text document according to a preset segmentation level, character limit and fixed number of characters to obtain hierarchical text blocks; The question-and-answer generation unit is used to input the hierarchical text blocks and preset prompt statements into a large language model for knowledge analysis and to generate a set of question-and-answer pairs. The fine-tuning training unit is used to fine-tune the initial low-rank adaptation model using the question-answer pair set to generate a substation optimized question-answer model.
7. The substation model generation device based on a large language model according to claim 6, characterized in that, The text conversion unit is specifically used for: Extract key information from the operation and maintenance data of substations in different modes; The substation operation and maintenance information is converted into text content based on the constructed text prompts and key information using a large language model. The text content is cleaned and filtered using regular expression matching to obtain the inspection text document.
8. The substation model generation device based on a large language model according to claim 6, characterized in that, The text segmentation unit is specifically used for: Based on the title format, the text in the operation and inspection text document is coarsely segmented to obtain initial text blocks; If the number of characters in the initial text block exceeds the character limit, it is determined whether the initial text block has a secondary heading. If so, the initial text is further divided into secondary sections to obtain secondary text blocks. If the initial text block does not contain the subheading, then the initial text block is divided into fixed text blocks by a fixed number of characters. The hierarchical text block includes secondary text blocks and fixed text blocks.
9. The substation model generation device based on a large language model according to claim 6, characterized in that, The fine-tuning training unit is specifically used for: An initial low-rank fitting model is generated using the low-rank fitting method and the quantized low-rank fitting method. Based on a preset optimizer, cross-entropy loss function, and regularization technique, the initial low-rank adaptation model is fine-tuned and trained using the question-answer pair set to generate a fine-tuned question-answer model. The fine-tuned question-answering model is evaluated according to pre-set evaluation criteria to obtain a model score. The pre-set evaluation criteria include knowledge accuracy analysis, answer completeness analysis, and semantic consistency analysis. The substation optimization question-and-answer model was selected based on the model score.
10. A substation model generation device based on a large language model, characterized in that, The device includes a processor and a memory; The memory is used to store program code and transmit the program code to the processor; The processor is used to execute the substation model generation method based on any one of claims 1-5 according to the instructions in the program code.