A Substation Maintenance Method and System Based on Hybrid Retrieval and Two-Stage Source Generation

By employing a hybrid retrieval and two-stage source generation method, the problems of low retrieval efficiency and insufficient traceability in substation equipment maintenance were solved, achieving efficient and accurate retrieval results output and ensuring the completeness and traceability of clause-level retrieval.

CN122132550APending Publication Date: 2026-06-02CHINA SOUTHERN POWER GRID EXTRA HIGH VOLTAGE POWER TRANSMISSION CO LIUZHOU BRANCH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINA SOUTHERN POWER GRID EXTRA HIGH VOLTAGE POWER TRANSMISSION CO LIUZHOU BRANCH
Filing Date
2026-01-28
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

Existing technologies suffer from low retrieval efficiency, incomplete results, and insufficient traceability in substation equipment maintenance. In particular, it is difficult to achieve efficient and accurate clause-level traceability when retrieving multiple industry standard documents and making maintenance decisions.

Method used

A hybrid retrieval method is adopted, combining the FAISS vector library and the BM25 index. Through token-level segmentation and large language model (LLM) reordering, combined with two-stage source generation, the retrieval results are aggregated and normalized to ensure the accuracy and traceability of the retrieval results.

Benefits of technology

It significantly improves the recall and precision of search results, ensures the completeness of clause-level recall and search accuracy, meets the traceability requirements of industrial applications, and enhances search efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122132550A_ABST
    Figure CN122132550A_ABST
Patent Text Reader

Abstract

This invention relates to the technical field of enhanced retrieval generation and power operation and maintenance decision-making, and in particular discloses a substation maintenance method and system based on hybrid retrieval and two-stage source generation. The method includes: parsing and identifying the document to be entered using a Docling parser or OCR enhancement method, followed by cleaning to obtain parent data; dividing the parent data into blocks based on a token-level block strategy to obtain individual sub-block data, thereby constructing a FAISS vector library and a BM25 index; performing hybrid retrieval on the fault description after the user inputs it, and aggregating it with the parent document using an RRF algorithm to obtain multiple aggregated retrieval results; outputting m reordered aggregated retrieval results based on a large language model, and standardizing and integrating the defect analysis results and maintenance analysis results based on a preset structure to form a structured decision result; performing page-number cross-validation on the structured decision result, and outputting the structured decision result after successful validation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of enhanced retrieval generation and power operation and maintenance decision-making, and in particular to a substation maintenance method and system based on hybrid retrieval and two-stage source generation. Background Technology

[0002] Currently, power companies rely on multiple industry standard documents (such as the "Q / GDW 1906-2013 Classification Standard for Defects in Primary Equipment of Transmission and Transformation" and various maintenance guidelines) for equipment defect classification and maintenance decision-making. Traditional manual methods suffer from the following problems: low search efficiency, insufficient consistency and traceability, and non-standardized fault descriptions further increase the difficulty of retrieval. With the rapid increase in the number of substation equipment and the increasingly complex operating environment, traditional manual maintenance plan formulation is inefficient and relies heavily on experience for quality, urgently requiring AI technology to improve the level of intelligent operation and maintenance.

[0003] In the past five years, research hotspots in intelligent power maintenance have focused on: large-scale modeling for standard clause understanding, complex PDF parsing, cross-document evidence alignment, retrieval ranking, and traceability generation. Existing research often emphasizes single-vector retrieval or template-based rule-based decision-making, resulting in overly simplistic, monotonous, and inefficient retrieval results (i.e., only a single phenomenon or method for solving a single phenomenon can be obtained at a time). Furthermore, there are significant shortcomings in the systematic implementation of two-stage source generation for clause-level traceability and page-level evidence verification (e.g., weak traceability and accuracy in power operation and maintenance decision retrieval).

[0004] Therefore, based on the above-mentioned technical problems, this application proposes a substation maintenance method and system based on hybrid retrieval and two-stage source generation, which is accurate in retrieval, efficient in retrieval, and allows for traceability of retrieval results. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a substation maintenance method and system based on hybrid retrieval and two-stage source generation, which is accurate, efficient, and allows for traceability of retrieval results.

[0006] To achieve the above objectives, the present invention provides a substation maintenance method based on hybrid retrieval and two-stage source generation, comprising the following steps: Step 1: Parse and identify the document to be entered to obtain multiple raw data items; Step 2: Clean the multiple original data sets to obtain multiple parent data sets, where each parent data set retains the page number index from the original data. Step 3: Divide the multiple parent data into blocks to obtain multiple child block data. When dividing the parent data into blocks, record the mapping relationship between the parent data and each corresponding child block data. Step 4: After obtaining the data for each sub-block, construct the FAISS vector library and the BM25 index respectively; Step 5: Based on Step 1-Step 2, the user's fault description is converted into data to be retrieved, and vector search and BM25 search are performed on the data to be retrieved to obtain multiple vector search results and multiple BM25 search results respectively. Then, the above vector search results and BM25 search results are merged to obtain multiple fused search results. Step 6: Based on the mapping relationship between parent data and each child block data, aggregate the child block data in multiple fusion search results to their respective parent data to obtain multiple aggregated search results; Step 7: Based on the preset large-scale language model, sort the aggregated search results to obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results. Step 8: Based on the pre-built defect classification standard library and maintenance guide library, perform defect analysis and maintenance analysis on the m re-ranked aggregated search results respectively to obtain the defect analysis results and maintenance analysis results; Step 9: The defect analysis results and maintenance analysis results are standardized and integrated based on a preset structure to form a structured decision result. The page numbers referenced in the structured decision result are cross-validated with the corresponding original page numbers in the parent data. After successful verification, the structured decision result is output.

[0007] Furthermore, the parsing and recognition process in step 1 can employ a Docling parser or an OCR enhancement method.

[0008] Furthermore, the block processing in step 3 adopts a token-level block splitting strategy.

[0009] Furthermore, in step 5, after obtaining multiple vector retrieval results and multiple BM25 retrieval results, the multiple vector retrieval results and multiple BM25 retrieval results are fused based on the RRF algorithm to obtain multiple fused retrieval results. Furthermore, in step 7, the specific steps for sorting the various aggregated search results are as follows: Step 7.1: After obtaining multiple aggregated search results, based on the semantic relevance of each aggregated search result to the data to be searched, a relevance score is calculated for each aggregated search result; and combined with score weighting, the relevance score of each aggregated search result is optimized to obtain the final relevance score of multiple aggregated search results. Step 7.2: After obtaining the final relevance scores of multiple aggregated search results, sort the multiple aggregated search results according to the preset sorting order to obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results after obtaining multiple reordered aggregated search results.

[0010] Furthermore, the specific steps for page number cross-validation in step 9 are as follows: Step 9.1: Based on the multiple fusion search results in Step 5 and the parent data related to the multiple fusion search results, collect the page numbers referenced by the multiple fusion search results and aggregate them to form the first page number set; Step 9.2: After obtaining the analysis result set, collect the page numbers referenced by each analysis result in the analysis result set and aggregate them to form a second page number set; Step 9.3: Set a minimum page number threshold and perform cross-validation on the first and second page number sets. If the number of referenced pages that pass cross-validation is less than the preset minimum page number threshold, select a corresponding number of relevant pages as supplementary pages based on the relevance sorting of the multiple fusion search results in Step 5.

[0011] Furthermore, step 9 also includes confidence verification of the final search results, the specific steps of which are as follows: Step 9.4: Obtain the page number cross-validation results of the final search results that have passed verification. Based on the page number cross-validation results, set a first confidence level criterion. Based on the first confidence level criterion, evaluate the first confidence level of the final search results that have passed verification and obtain the first confidence level value. The first confidence level criterion includes: all referenced page numbers have passed verification, the number of page numbers that have passed verification is greater than or equal to a first preset number, and the number of page numbers that have not passed verification is less than a second preset number. Step 9.5: Obtain the relevance scores of multiple aggregated search results after sorting in Step 7, calculate their average score, and set a second confidence criterion for the average score. Based on the second confidence criterion, evaluate the second confidence of the multiple aggregated search results to obtain the second confidence evaluation value. The second confidence criterion includes: determining whether the average score is greater than or equal to 0.8, whether the average score is in the range of 0.5-0.8, or whether the average score is less than 0.5. Step 9.6: Obtain the final search results and the data to be searched, analyze the matching situation between the terms in the final search results and the data to be searched, and set the third confidence level judgment criteria for the matching situation. Then, based on the above third confidence level judgment criteria, evaluate the third confidence level of the matching situation and obtain the third confidence level evaluation value. The third confidence level judgment criteria include: whether the above matching situation accurately matches the original text of the standard terms, whether the matching situation is semantically similar but not a match of the original text, or whether the matching situation fails to match the explicit terms. Step 9.7: Obtain the final search result output structure. Based on the preset six-field output structure, analyze the completeness of the final search result output structure and set the fourth confidence level evaluation criterion for the completeness. Then, based on the above fourth confidence level evaluation criterion, evaluate the completeness with the fourth confidence level and obtain the fourth confidence level evaluation value. The third confidence level evaluation criterion includes: the above completeness belongs to all 6 fields being valid output, 5 fields being valid output, or less than 5 fields being valid output. Step 9.8: After completing steps 9.4-9.7, count the confidence scores above. If the number of scores with a high confidence score is greater than or equal to 3, output a high overall confidence score. If the number of scores with a low confidence score is greater than or equal to 2, output a low overall confidence score. If the number of scores with a low confidence score does not fall into the above categories, output a medium overall confidence score.

[0012] A substation maintenance system based on hybrid retrieval and two-stage source generation includes a document parsing module, a data cleaning module, a block segmentation module, a FAISS vector library, a BM25 index construction module, a hybrid retrieval module, a mapping aggregation module, an LLM reordering module, a two-stage generation module, and a standardization and verification module. The document parsing module is used to clean and process multiple original data to obtain multiple parent data, wherein each parent data retains the page number index from the original data. The block segmentation module is used to segment multiple parent data into blocks to obtain multiple child block data. When segmenting the parent data, the mapping relationship between the parent data and each corresponding child block data is recorded. The FAISS vector library and BM25 index building module are used to build the FAISS vector library and BM25 index respectively after obtaining the data of each sub-block; The hybrid retrieval module is used in conjunction with the document parsing module, data cleaning module, block segmentation module, FAISS vector library, and BM25 index construction module to convert the user's fault description into data to be retrieved, and to perform vector retrieval and BM25 retrieval on the data to be retrieved to obtain multiple vector retrieval results and multiple BM25 retrieval results respectively, and then merge the above vector retrieval results and BM25 retrieval results to obtain multiple fused retrieval results. The mapping aggregation module is used to aggregate the sub-block data in multiple fusion search results into their respective parent data based on the mapping relationship between parent data and each sub-block data, thereby obtaining multiple aggregated search results; The LLM reordering module is used to sort the aggregated search results based on a preset large language model, obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results. The two-stage generation module is used to perform defect analysis and maintenance analysis on m reordered aggregated search results based on a pre-built defect classification standard library and maintenance guide library, and obtain defect analysis results and maintenance analysis results. The standardization and verification module is used to standardize and integrate the defect analysis results and maintenance analysis results based on a preset structure to form a structured decision result. The module also cross-verifies the page numbers referenced in the structured decision result with the corresponding original page numbers in the parent data. Once the verification is successful, the structured decision result is output.

[0013] Based on the same inventive concept, this application also provides a data processing device for a substation maintenance method based on hybrid retrieval and two-stage source generation, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the steps of the substation maintenance system based on hybrid retrieval and two-stage source generation as described above.

[0014] Based on the same inventive concept, this application also provides a computer-readable storage medium storing a computer program. Based on the same inventive concept, this application also provides the steps of a substation maintenance method based on hybrid retrieval and two-stage source generation.

[0015] The present invention adopts the above-described solution, and its beneficial effects are as follows: By combining hybrid retrieval (vector retrieval and BM25 retrieval) with RRF fusion mechanism, and taking into account both semantic understanding and precise matching, the recall rate of relevant terms is significantly improved. Combined with parent data aggregation, the context loss caused by block division is avoided, ensuring retrieval accuracy. Then, the retrieval results are further reordered through LLM reordering to ensure that the retrieval results with higher relevance scores are selected, thereby improving retrieval accuracy. At the same time, the macro average accuracy of the A-type task reaches 91% to 95%, and the similarity of the B-type task reaches 0.88 to 0.92.

[0016] Through a two-stage source retrieval and generation mechanism, the defect classification / basis and maintenance-related fields (diagnostic analysis, maintenance content, maintenance classification and maintenance time) are strictly processed separately to ensure that the fields correspond strictly to the literature sources, avoid confusion in classification / maintenance information, achieve clear field sources and accurate clause-level citations, and meet the traceability requirements of industrial applications.

[0017] By using structured and standardized output mechanisms, the generated results are processed to standardize terminology and format, prioritizing the copying of the original clauses (rather than rewriting them, which can avoid affecting the authority of the search results), thereby improving the accuracy of the evaluation and the practical application capability of the method or system.

[0018] By performing page number cross-validation on the output search results and setting a minimum page number threshold, page number cross-validation is performed on the referenced page numbers to suppress page number illusion. When the cross-validation results are less than the minimum page number threshold, relevant page numbers can be selected as a supplement according to relevance sorting to ensure that sufficient parent data can be provided to support LLM in generating the final search results. This is different from traditional search methods and enhances traceability and auditability.

[0019] In summary, this invention differs from traditional manual processing, which suffers from drawbacks such as overly simplistic, monotonous, and inefficient search results due to its single-method approach. By combining hybrid retrieval and parent document aggregation, it improves the coverage of search results, ensuring the completeness and accuracy of clause recall. Furthermore, addressing the weaknesses in traceability and accuracy inherent in traditional manual processing, this invention combines two-stage source generation and page number cross-validation to enforce precise clause-level traceability, avoiding page number illusions. This resolves the pain points of insufficient traceability and low accuracy at the industry clause level in manual processing. Attached Figure Description

[0020] Figure 1 This is a flowchart illustrating the substation maintenance method based on hybrid retrieval and two-stage source generation in this embodiment.

[0021] Figure 2 This is a schematic diagram of the substation maintenance system based on hybrid retrieval and two-stage source generation in this embodiment. Detailed Implementation

[0022] To facilitate understanding of the present invention, a more complete description is given below with reference to the accompanying drawings. Preferred embodiments of the invention are shown in the drawings. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. These embodiments are provided to provide a thorough and complete understanding of the disclosure of the invention. Example 1

[0023] See appendix Figure 1 As shown in this embodiment, a substation maintenance method based on hybrid retrieval and two-stage source generation includes the following steps: Step 1: Based on the Docling parser or OCR enhancement method (Optical Character Recognition), the document to be entered is parsed and recognized (a fallback fault tolerance mechanism is provided here; when the Docling parser fails, the OCR enhancement method can be used for text parsing, and similarly, if the OCR enhancement method fails, the Docling parser can be used for text parsing), to obtain the original data (i.e., extract the text). The document to be entered includes defect classification standard documents and various equipment maintenance guidelines documents (the above documents all comply with industry standards, thus ensuring the compliance of subsequent searches and the accuracy of search results). The data types of the above documents include page data, table data, image data, and text block data, thereby improving the usability of standard clauses and quantitative conditions and avoiding the omission of key information (when the entered document is a table or contains tables, the table can be serialized first, and then the text can be extracted). It should be noted that when parsing and recognizing the document to be entered, and the document is a PDF document, if the PDF structure is damaged or parsing fails, the HTML table can be converted into recognizable natural language text through the Large Language Model (LLM), thereby improving the recognition rate and collection efficiency of the document to be entered.

[0024] Step 2: After obtaining multiple sets of raw data, clean the raw data to obtain multiple parent data. Each parent data retains the page number index from the original data. The cleaning process includes removing redundant formatting, merging pagination text, and marking page boundaries. This cleaning process makes it easier to divide the relevant data into blocks while preserving its integrity, thus improving data processing efficiency.

[0025] Step 3: Based on the token-level segmentation strategy, multiple parent data are segmented into multiple child data blocks. When segmenting the parent data, the mapping relationship between the parent data and each corresponding child data block is recorded (i.e., the same parent data can be split into multiple smaller-granularity child data blocks). When segmenting the parent data, the length of each child data block can be set to 200-500 tokens (tokens are basic units in text processing, usually corresponding to one or more Chinese characters in Chinese processing), and the length of the overlapping part between adjacent child data blocks can be set to 20-80 tokens.

[0026] Step 4: After obtaining the data for each sub-block, construct the FAISS vector library and the BM25 index based on the Index Flat IP and the rank-bm25 library, respectively. The Index Flat IP is the inner product (equivalent to cosine similarity), which is vectorized using DashScope text-embedding-v1 or OpenAI text-embedding-3-large, and is suitable for many similarity-based retrieval tasks (FAISS: Facebook AI Similarity Search, a high-efficiency vector similarity search library that supports large-scale vector database construction and retrieval). Secondly, the BM25 index uses the rank-bm25 library and Jieba for Chinese word segmentation (Best Matching 25, a word frequency-based retrieval ranking algorithm used for precise keyword matching, commonly used in information retrieval systems). Step 5: After completing the construction of the FAISS vector library and BM25 index, ask the user to input a fault description. Based on Step 1-2, convert the user's fault description into data to be retrieved, and perform vector retrieval and BM25 retrieval on the data to be retrieved to obtain multiple vector retrieval results and multiple BM25 retrieval results respectively. Then, based on the RRF algorithm, fuse the above vector retrieval results and BM25 retrieval results to obtain multiple fused retrieval results. It should be noted that the retrieval process of power-related texts may contain a large number of technical terms and abbreviations, as well as a lot of descriptive language. For example, when a user searches for transformer fault handling, keyword search may return documents containing both "transformer" and "fault handling". In order to comprehensively improve the accuracy of the search and ensure the user's search purpose, it is necessary to use both keyword search and semantic search. Therefore, by using the RRF algorithm to merge the vector search results with the BM25 search results, the above documents can be reordered according to relevance, providing more comprehensive search results. This ensures the accuracy of the search while meeting the user's search purpose.

[0027] Step 6: After obtaining multiple fused search results, based on the mapping relationship between the parent data and each sub-block data, the sub-block data within the multiple fused search results is aggregated to its parent data to obtain multiple aggregated search results; that is, multiple (sub-block data-like) fused search results are mapped to complete parent data to preserve the complete context and avoid semantic fragmentation caused by block division, thereby balancing search accuracy and context integrity, and supporting clause-level traceability for subsequent page number verification; It should be noted that the aforementioned vector retrieval is characterized by its ability to understand semantically similar expressions, while BM25 retrieval is characterized by its ability to match precise terms and clause numbers. Furthermore, the RRF (Reciprocal Rank Fusion) algorithm, which employs inverse ranking fusion, combines the results of vector retrieval and BM25 retrieval, thereby improving the overall clause recall rate. Combined with the feature that parent data can be aggregated with child block data (i.e., parent document retrieval, specifically: the aforementioned vector retrieval and BM25 retrieval use small-granularity child block data to broaden the retrieval scope, and after completing the two retrieval methods, aggregation is performed based on the mapping relationship between parent data and child block data), the retrieval accuracy is ensured. This multi-faceted collaboration significantly improves the recall rate, completeness, and stability of relevant clauses. Additionally, given the existing FAISS vector library, by additionally setting up the BM25 index, retrieval can be performed using the BM25 index when the FAISS vector library is unavailable, meeting user retrieval needs and ensuring the usability of this method.

[0028] Step 7: After obtaining multiple aggregated search results, sort each aggregated search result based on the preset Large Language Model (LLM) to obtain multiple reordered aggregated search results. After obtaining multiple reordered aggregated search results, output the first m reordered aggregated search results (the number m can be set according to the actual situation). The specific steps for sorting the various aggregated search results are as follows: Step 7.1: After obtaining multiple aggregated search results, based on the semantic relevance of each aggregated search result to the data to be retrieved, a relevance score is assigned to each aggregated search result (step size 0.1). The relevance scoring criteria can be set to exact match, moderately relevant, and completely irrelevant, with corresponding scores of 1, 0.5, and 0 points, respectively. Then, a weighted average is used to optimize the relevance score of each aggregated search result, resulting in the final relevance score for all aggregated search results. Specifically, the weighted average formula is as follows: Final score = 0.3 × vector score + 0.7 × LLM score Among them, Final score is the final relevance score, vector score is the vector retrieval score, and LLMscore is the metric output by the large language model; Step 7.2: After obtaining the final relevance scores of multiple aggregated search results, sort the multiple aggregated search results according to a preset sorting order (usually set to descending order) to obtain multiple re-sorted aggregated search results. After obtaining multiple re-sorted aggregated search results, output the first m re-sorted aggregated search results based on a preset selection number (this can be set according to the actual situation, for example, selecting the top 30). By using a relevance score and score weighting method, the search accuracy is improved. Step 8: After obtaining m reordered aggregated search results, based on the pre-built defect classification standard library and maintenance guide library, perform defect analysis and maintenance analysis on the m reordered aggregated search results respectively to obtain defect analysis results and maintenance analysis results. The defect analysis results include: defect classification conclusions and the basis for judging the classification conclusions of this type of defect. The defect analysis results and maintenance analysis results are generated through two-stage source separation to ensure that the fields strictly correspond to the literature sources and avoid source confusion. The aforementioned defect classification standard library and maintenance guide library can be constructed based on steps 1-4. Step 9: After obtaining the defect analysis results and maintenance analysis results, the defect analysis results and maintenance analysis results are standardized and integrated based on a preset structure to form a structured decision result. The page numbers referenced in the structured decision result are cross-validated with the corresponding original page numbers in the parent data. After successful verification, the structured decision result is output. Specifically, the above standardization and integration process involves integrating the above defect analysis results and maintenance analysis results into six preset structured output fields. Furthermore, the above defect classification conclusion can be expressed as: critical / serious / general; the format of the judgment basis is: standard. Clause Number - Specific Content of this Clause; The maintenance analysis results include: diagnostic analysis conclusions (i.e., fault cause analysis), maintenance content (i.e., specific maintenance operations), maintenance classification, and maintenance time. The maintenance classification can be expressed as Class A maintenance / Class B maintenance / Class C maintenance / Class D maintenance, and the maintenance time can be expressed as immediately / as soon as possible / next maintenance, etc. Simultaneously, full-width characters in the analysis results will be converted to half-width characters, and redundant spaces and line breaks will be removed to standardize the overall format, making it easier for users to understand and reducing score deductions due to formatting errors. The specific format can be referenced in Table 1. Table 1. Schematic diagram of the final search results for a specific maintenance analysis.

[0029] Cross-validation is performed by referencing page numbers to ensure that the page numbers are within the standardized analysis result set. If the number of pages is less than the minimum page number threshold, the page numbers are padded according to the order of the multiple fused search results in step 5 to suppress page number illusion and enhance traceability and auditability (page number illusion here refers to the incorrect generation, referencing, or assumption of non-existent page numbers when processing or referencing related documents, which affects the accuracy of the related analysis results). The specific steps for page number cross-validation in step 9 are as follows: Step 9.1: Based on the multiple fusion search results in Step 5 and the parent data related to the multiple fusion search results, collect the page numbers referenced by the multiple fusion search results and aggregate them to form the first page number set; Step 9.2: After obtaining the analysis result set, collect the page numbers referenced by each analysis result in the analysis result set and aggregate them to form a second page number set; Step 9.3: Set a minimum page number threshold (this minimum page number threshold can be set according to the actual situation), and verify the first page number set and the second page number set based on cross-validation technology. If the number of referenced pages that pass cross-validation is less than the preset minimum page number threshold, then based on the multiple fusion search results in Step 5, select a corresponding number of relevant pages as supplements according to the sorting of the multiple fusion search results, so that the number of referenced pages that pass cross-validation is equal to the above minimum page number threshold, thereby ensuring that sufficient parent data can be provided to support the LLM to generate the final search results.

[0030] Specifically, assuming the minimum page count threshold is 2 pages, the second page set includes pages 12 and 45. However, after cross-validation, only page 12 passes the validation (page 45 fails). At this point, the cross-validation results show only 1 page passing, which is less than the minimum page count threshold. Therefore, from the multiple fused search results in step 5, the next most relevant page is selected to supplement the results, sorted by relevance. If the multiple fused search results are sorted as 12, 45, 23, ..., then page 23 is selected as the supplement. After the above supplementation, the validated pages become 12 and 23, satisfying the minimum page count threshold, thus generating the final search results. The confidence level may be adjusted (because some of the supplemented page numbers are not directly referenced by the LLM, the confidence level may be lowered accordingly).

[0031] In this embodiment, the method further includes confidence verification of the final search results (which can improve the accuracy of evaluation and the system's practical application capabilities, and realize a closed loop of industrial evaluation with clause-level alignment, audit traceability, and consistent format), the specific steps of which are as follows: Step 9.4: Obtain the page number cross-validation results of the final search results that have passed verification. Based on the page number cross-validation results, set a first confidence level criterion, and evaluate the first confidence level of the final search results that have passed verification based on the first confidence level criterion to obtain a first confidence level value. The first confidence level criterion includes: all referenced page numbers have passed verification, the number of page numbers that have passed verification is greater than or equal to a first preset number, and the number of page numbers that have not passed verification is less than a second preset number (the corresponding confidence level values ​​are high, medium, and low, respectively; the preset number can be set according to the actual situation), as shown in Table 2 below: Table 2 First Confidence Level Judgment Criteria

[0032] Step 9.5: Obtain the relevance scores of multiple aggregated search results after sorting in Step 7, calculate their average score, and set a second confidence criterion for this average score. Based on the second confidence criterion, evaluate the second confidence of the multiple aggregated search results to obtain the second confidence evaluation value. The second confidence criterion includes: determining whether the average score is greater than or equal to 0.8, whether the average score is in the range of 0.5-0.8, or whether the average score is less than 0.5 (the corresponding confidence evaluation values ​​are high, medium, and low, respectively), as shown in Table 3 below. Table 3 Second Confidence Level Judgment Criteria

[0033] Step 9.6: Obtain the final search results and the data to be searched (or the fault description entered by the user), analyze the matching situation between the terms in the final search results and the data to be searched, and set a third confidence level for the matching situation. Then, based on the above third confidence level, evaluate the matching situation to obtain the third confidence level value. The third confidence level includes: whether the above matching situation exactly matches the original text of the standard terms, whether the matching situation is semantically similar but not a match of the original text, or whether the matching situation fails to match a specific term (the corresponding confidence level values ​​are high, medium, and low, respectively), as shown in Table 4 below: Table 4 Third Confidence Rating Criteria

[0034] Step 9.7: Obtain the final search result output structure. Based on the preset six-field output structure, analyze the completeness of the final search result output structure and set a fourth confidence criterion for this completeness. Then, based on the above fourth confidence criterion, evaluate the completeness with a fourth confidence level to obtain the fourth confidence evaluation value. The third confidence criterion includes: the above completeness belongs to all 6 fields being valid output, 5 fields being valid output, or less than 5 fields being valid output (the corresponding confidence evaluation values ​​are high, medium, and low, respectively), as shown in Table 5 below: Table 5 Fourth Confidence Rating Criteria

[0035] Step 9.8: After completing steps 9.4-9.7, count the confidence scores above. If the number of scores with a high confidence score is greater than or equal to 3, output a high overall confidence score. If the number of scores with a low confidence score is greater than or equal to 2, output a low overall confidence score. If the number of scores with a low confidence score does not fall into the above categories, output a medium overall confidence score.

[0036] For ease of explanation, the following detailed description is provided in conjunction with specific embodiments: Actual situation: Abnormal noise fault inside oil-immersed transformer The system's specific retrieval and generation process: Based on steps 1-4, standard documents such as "Q / GDW 1906-2013 Classification Standard for Defects in Primary Transmission and Transformation Equipment" and "Maintenance Guidelines for Oil-Immersed Transformers" are parsed in advance using the Docling parser to extract structured information such as text data and tabular data, forming parent data (retaining page number index), and then divided into blocks according to 300 tokens to build a FAISS vector library and BM25 index; Based on the data to be retrieved after transformation in step 5: Oil-immersed transformer exhibits abnormal noise and vibration, internal popping sounds, and abnormal chromatogram of insulating oil. Perform a mixed search on the data to be retrieved: Vector retrieval: The fault description is vectorized, and 15 relevant sub-blocks of data are retrieved from the FAISS vector library; BM25 Search: Perform a BM25 search using keywords such as transformer, cracking sound, and noise to obtain 15 relevant sub-blocks. RRF Fusion: The RRF algorithm is used to fuse the two search results, resulting in 30 fused search results. Parent document aggregation: Based on the mapping relationship between sub-block data and parent data, the retrieved sub-block data is aggregated into parent data (complete page content), resulting in 30 aggregated search results; LLM reordering: Perform LLM re-ranking on 30 aggregated search results and select the top 10 most relevant results (re-ranked aggregated search results). Two-stage question-and-answer generation: Phase 1: Search Q / GDW 1906-2013 and match clauses containing internal discharge or popping sounds; Phase 2: Retrieve diagnostic analysis and maintenance decisions from the maintenance guidelines for oil-immersed transformers; Output result:

[0037] By using the above method, the macro-average accuracy of Class A tasks (classification and judgment tasks, the output of which is a limited number of categories, such as defect classification, maintenance classification and maintenance time) can reach 91% to 95%, and the average similarity of Class B tasks (text generation tasks, the output of which is free text generation tasks, such as judgment criteria, diagnostic analysis and maintenance content) can reach 0.88 to 0.92. It should be noted that the formula for evaluating macro average accuracy is: Macro average accuracy = (1 / C) × Σ (number of correct predictions / total number of samples) Where C represents the total number of categories; The formula for evaluating average similarity is: Average similarity score = (1 / N) × Σ sim (standard answer, generated result) Where sim is a text similarity function (such as BERTScore, cosine similarity, ROUGE, etc.). Example 2

[0038] See appendix Figure 2 As shown, a substation maintenance system based on hybrid retrieval and two-stage source generation includes a document parsing module, a data cleaning module, a block generation module, a FAISS vector library, a BM25 index construction module, a hybrid retrieval module, a mapping aggregation module, an LLM reordering module, a two-stage generation module, and a standardization and verification module. The document parsing module is used to parse and identify the documents to be entered, and obtain multiple raw data. The data cleaning module is used to clean and process multiple sets of raw data to obtain multiple sets of parent data. Each set of parent data retains the page number index from the original data. The block segmentation module is used to segment multiple parent data into blocks to obtain multiple child block data. When segmenting the parent data, the mapping relationship between the parent data and each corresponding child block data is recorded. The FAISS vector library and BM25 index building module are used to build the FAISS vector library and BM25 index respectively after obtaining the data of each sub-block; The hybrid retrieval module works in conjunction with the document parsing module, data cleaning module, block segmentation module, FAISS vector library, and BM25 index building module to convert the user's fault description into data to be retrieved. Vector retrieval and BM25 retrieval are then performed on the data to be retrieved to obtain multiple vector retrieval results and multiple BM25 retrieval results. Finally, the vector retrieval results and BM25 retrieval results are merged to obtain multiple fused retrieval results. The mapping and aggregation module is used to aggregate the sub-block data in multiple fusion search results to their respective parent data based on the mapping relationship between parent data and each sub-block data, thereby obtaining multiple aggregated search results; The LLM reordering module is used to sort the aggregated search results based on a preset large language model, obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results. The two-stage generation module is used to perform defect analysis and maintenance analysis on m reordered aggregated search results based on a pre-built defect classification standard library and maintenance guide library, and obtain defect analysis results and maintenance analysis results respectively. The standardization and verification module is used to standardize and integrate the defect analysis results and maintenance analysis results based on a preset structure to form a structured decision result. The module also cross-validates the page numbers referenced in the structured decision result with the corresponding original page numbers in the parent data. Once the verification is successful, the structured decision result is output. Example 3

[0039] Based on the same inventive concept, this application also provides a data processing device for a substation maintenance system based on hybrid retrieval and two-stage source generation, including: a memory and a processor, wherein the memory is used to store a computer program; and the processor is used to execute the computer program to implement the steps of the substation maintenance system based on hybrid retrieval and two-stage source generation as described above. Example 4

[0040] Based on the same inventive concept, this application also provides a computer-readable storage medium storing a computer program. Based on the same inventive concept, this application also provides the steps of a substation maintenance system based on hybrid retrieval and two-stage source generation.

[0041] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the present invention in any way. Any modifications or variations made by those skilled in the art, without departing from the scope of the present invention, using the disclosed technical content, are equivalent embodiments of the present invention. Therefore, all equivalent changes made based on the concept of the present invention without departing from the scope of the present invention should be covered within the protection scope of the present invention.

Claims

1. A substation maintenance method based on hybrid retrieval and two-stage source generation, characterized in that, Includes the following steps: Step 1: Parse and identify the document to be entered to obtain multiple raw data items; Step 2: Clean the multiple original data sets to obtain multiple parent data sets, where each parent data set retains the page number index from the original data. Step 3: Divide the multiple parent data into blocks to obtain multiple child block data. When dividing the parent data into blocks, record the mapping relationship between the parent data and each corresponding child block data. Step 4: After obtaining the data for each sub-block, construct the FAISS vector library and the BM25 index respectively; Step 5: Based on Step 1-Step 2, the user's fault description is converted into data to be retrieved, and vector search and BM25 search are performed on the data to be retrieved to obtain multiple vector search results and multiple BM25 search results respectively. Then, the vector search results and BM25 search results are merged to obtain multiple fused search results. Step 6: Based on the mapping relationship between parent data and each child block data, aggregate the child block data in multiple fusion search results to their respective parent data to obtain multiple aggregated search results; Step 7: Based on the preset large language model (LLM), sort the aggregated search results to obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results; Step 8: Based on the pre-built defect classification standard library and maintenance guide library, perform defect analysis and maintenance analysis on the m re-ranked aggregated search results respectively to obtain the defect analysis results and maintenance analysis results; Step 9: Standardize and integrate the defect analysis results and maintenance analysis results based on a preset structure to form a structured decision result. Cross-validate the page numbers referenced in the structured decision result with the corresponding original page numbers in the parent data. Output the structured decision result after successful verification.

2. The substation maintenance method based on hybrid retrieval and two-stage source generation according to claim 1, characterized in that: The parsing and recognition process in step 1 can employ a Docling parser or an OCR enhancement method.

3. The substation maintenance method based on hybrid retrieval and two-stage source generation according to claim 1, characterized in that: The block processing in step 3 adopts a token-level block splitting strategy.

4. The substation maintenance method based on hybrid retrieval and two-stage source generation according to claim 1, characterized in that: In step 5, after obtaining multiple vector retrieval results and multiple BM25 retrieval results, the multiple vector retrieval results and multiple BM25 retrieval results are fused based on the RRF algorithm to obtain multiple fused retrieval results.

5. The substation maintenance method based on hybrid retrieval and two-stage source generation according to claim 1, characterized in that: In step 7, the specific steps for sorting the aggregated search results are as follows: Step 7.1: After obtaining multiple aggregated search results, based on the semantic relevance of each aggregated search result to the data to be searched, a relevance score is calculated for each aggregated search result; and combined with score weighting, the relevance score of each aggregated search result is optimized to obtain the final relevance score of multiple aggregated search results. Step 7.2: After obtaining the final relevance scores of multiple aggregated search results, sort the multiple aggregated search results according to the preset sorting order to obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results after obtaining multiple reordered aggregated search results.

6. The substation maintenance method based on hybrid retrieval and two-stage source generation according to claim 1, characterized in that: The specific steps for page number cross-validation in step 9 are as follows: Step 9.1: Based on the multiple fusion search results in Step 5 and the parent data related to the multiple fusion search results, collect the page numbers referenced by the multiple fusion search results and aggregate them to form the first page number set; Step 9.2: After obtaining the analysis result set, collect the page numbers referenced by each analysis result in the analysis result set and aggregate them to form a second page number set; Step 9.3: Set a minimum page number threshold and perform cross-validation on the first and second page number sets. If the number of referenced pages that pass cross-validation is less than the preset minimum page number threshold, select a corresponding number of relevant pages as supplementary pages based on the relevance sorting of the multiple fusion search results in Step 5.

7. The substation maintenance method based on hybrid retrieval and two-stage source generation according to claim 6, characterized in that: Step 9 also includes confidence verification of the final search results, the specific steps of which are as follows: Step 9.4: Obtain the page number cross-validation results of the final search results that have passed verification. Based on the page number cross-validation results, set a first confidence level criterion. Based on the first confidence level criterion, evaluate the first confidence level of the final search results that have passed verification and obtain the first confidence level value. The first confidence level criterion includes: all referenced page numbers have passed verification, the number of page numbers that have passed verification is greater than or equal to a first preset number, and the number of page numbers that have not passed verification is less than a second preset number. Step 9.5: Obtain the relevance scores of multiple aggregated search results after sorting in Step 7, calculate their average score, and set a second confidence criterion for the average score. Based on the second confidence criterion, evaluate the second confidence of the multiple aggregated search results to obtain the second confidence evaluation value. The second confidence criterion includes: determining whether the average score is greater than or equal to 0.8, whether the average score is in the range of 0.5-0.8, or whether the average score is less than 0.

5. Step 9.6: Obtain the final search results and the data to be searched, analyze the matching situation between the terms in the final search results and the data to be searched, and set the third confidence level judgment criteria for the matching situation. Then, based on the above third confidence level judgment criteria, evaluate the third confidence level of the matching situation and obtain the third confidence level evaluation value. The third confidence level judgment criteria include: whether the above matching situation accurately matches the original text of the standard terms, whether the matching situation is semantically similar but not a match of the original text, or whether the matching situation fails to match the explicit terms. Step 9.7: Obtain the final search result output structure. Based on the preset six-field output structure, analyze the completeness of the final search result output structure and set the fourth confidence level evaluation criterion for the completeness. Then, based on the above fourth confidence level evaluation criterion, evaluate the completeness with the fourth confidence level and obtain the fourth confidence level evaluation value. The third confidence level evaluation criterion includes: the above completeness belongs to all 6 fields being valid output, 5 fields being valid output, or less than 5 fields being valid output. Step 9.8: After completing steps 9.4-9.7, count the confidence scores above. If the number of scores with a high confidence score is greater than or equal to 3, output a high overall confidence score. If the number of scores with a low confidence score is greater than or equal to 2, output a low overall confidence score. If the number of scores with a low confidence score does not fall into the above categories, output a medium overall confidence score.

8. A substation maintenance system based on hybrid retrieval and two-stage source generation, characterized in that: It includes modules for document parsing, data cleaning, chunking, the FAISS vector library, BM25 index building, hybrid retrieval, mapping and aggregation, LLM re-ranking, two-stage generation, and standardization and validation. The document parsing module is used to parse and identify the document to be entered, and obtain multiple raw data. The data cleaning module is used to clean multiple sets of raw data to obtain multiple sets of parent data, wherein each set of parent data retains the page number index from the original data. The block segmentation module is used to segment multiple parent data into blocks to obtain multiple child block data. When segmenting the parent data, the mapping relationship between the parent data and each corresponding child block data is recorded. The FAISS vector library and BM25 index building module are used to build the FAISS vector library and BM25 index respectively after obtaining the data of each sub-block; The hybrid retrieval module is used in conjunction with the document parsing module, data cleaning module, block segmentation module, FAISS vector library, and BM25 index construction module to convert the user's fault description into data to be retrieved, and to perform vector retrieval and BM25 retrieval on the data to be retrieved to obtain multiple vector retrieval results and multiple BM25 retrieval results respectively, and then merge the above vector retrieval results and BM25 retrieval results to obtain multiple fused retrieval results. The mapping aggregation module is used to aggregate the sub-block data in multiple fusion search results into their respective parent data based on the mapping relationship between parent data and each sub-block data, thereby obtaining multiple aggregated search results; The LLM reordering module is used to sort the aggregated search results based on a preset large language model, obtain multiple reordered aggregated search results, and output the first m reordered aggregated search results. The two-stage generation module is used to perform defect analysis and maintenance analysis on m reordered aggregated search results based on a pre-built defect classification standard library and maintenance guide library, and obtain defect analysis results and maintenance analysis results. The standardization and verification module is used to standardize and integrate the defect analysis results and maintenance analysis results based on a preset structure to form a structured decision result. The module also cross-verifies the page numbers referenced in the structured decision result with the corresponding original page numbers in the parent data. Once the verification is successful, the structured decision result is output.

9. A data processing device for a substation maintenance system based on hybrid retrieval and two-stage source generation, characterized in that, include: A memory and a processor, wherein the memory is used to store computer programs; When the processor executes the computer program, it implements the steps of the substation maintenance method based on hybrid retrieval and two-stage source generation as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the substation maintenance method based on hybrid retrieval and two-stage source generation as described in any one of claims 1 to 7.