A Generative Method and System for Enhancing Electricity Knowledge Retrieval Based on Generative Large Models

By constructing a power knowledge retrieval model and optimizing the segmentation of query content, the problems of lagging knowledge updates and insufficient professional depth in power knowledge retrieval were solved, achieving highly accurate power knowledge retrieval and meeting the needs of power grid business.

CN122087069APending Publication Date: 2026-05-26STATE GRID INFORMATION & TELECOMM GRP CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610089137.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-22
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing generative large models suffer from problems in power knowledge retrieval, such as lagging knowledge updates, inconsistencies between generated content and professional standards, biases in contextual understanding, and insufficient professional depth, resulting in inadequate retrieval accuracy and practicality.

Method used

By constructing an electricity knowledge retrieval model, including a query text vector conversion model and a knowledge text conversion model, and fine-tuning it in combination with BERT and an electricity pre-trained model, the query content splitting is optimized, and semantic similarity and keyword similarity are used for comprehensive evaluation to obtain the final query results.

Benefits of technology

It improves the accuracy and precision of power knowledge retrieval, meets the core business needs of the power grid, and enhances the reliability and practicality of knowledge services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087069A_ABST
    Figure CN122087069A_ABST
Patent Text Reader

Abstract

This invention provides an enhanced generation method and system for power knowledge retrieval based on a generative large model, belonging to the field of power knowledge retrieval technology. The method includes: acquiring text data of power knowledge; preprocessing the text data; constructing and training a power knowledge retrieval model based on the preprocessed text data, wherein the power knowledge retrieval model includes a query text vector conversion model and a knowledge text conversion model; acquiring the current query content; and optimizing and splitting the query content to obtain multiple retrieval results. By employing the query text vector conversion model and the knowledge text conversion model to perform vector conversion on the query text and power knowledge text respectively, the accuracy of subsequent matching is improved. The method of splitting the query content and obtaining query results based on multiple retrieval results can effectively improve the precision and accuracy of power knowledge retrieval.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power knowledge retrieval technology, and specifically to a power knowledge retrieval enhancement generation method and system based on a generative large model. Background Technology

[0002] With the accelerated digital transformation of the power industry, the demand for intelligent knowledge services in grid dispatching, operation and maintenance, and marketing is becoming increasingly urgent. Generative large models provide a new technical path for power knowledge services, but existing technologies have significant limitations in practical applications: First, knowledge updates lag behind, making it difficult to synchronize with dynamically updated professional information such as power industry policies, standards, and equipment parameters; second, they are prone to generating factual illusions, producing erroneous content that does not conform to power professional standards; third, they suffer from contextual comprehension biases, failing to accurately capture the core demands of complex business problems in power scenarios; and fourth, they lack professional depth, failing to delve deeply enough into professional knowledge in vertical fields such as grid control and equipment operation and maintenance.

[0003] Retrieval Enhanced Generation (RAG) technology, by combining retrieval and generation capabilities, offers a solution to the aforementioned problems, and related research has been conducted both domestically and internationally. The Facebook AI Research team first proposed the concept of RAG in 2020, and universities and enterprises both at home and abroad have subsequently explored its application in question-answering systems, intelligent assistants, and other scenarios, proposing enhancement methods such as query transformation and recursive retrieval. However, existing RAG technologies lack adaptability in the power industry: they lack targeted processing solutions for multi-source heterogeneous power documents (including Markdown technical manuals, equipment parameter JSON files, dispatching procedure LaTeX documents, etc.); there is a difficulty in balancing recall and precision during the retrieval process; and the professional and time-sensitive characteristics of power knowledge are not fully considered, resulting in the reliability and practicality of knowledge services failing to meet the core business needs of the power grid.

[0004] In the process of realizing this invention, the inventors of this application discovered that the above-mentioned solutions in the prior art have the defect of poor accuracy in power knowledge retrieval. Summary of the Invention

[0005] The purpose of this invention is to provide a power knowledge retrieval enhancement generation method and system based on a generative large model, which has the function of high power knowledge retrieval accuracy.

[0006] To achieve the above objectives, embodiments of the present invention provide an enhanced generation method for power knowledge retrieval based on a generative large model, comprising: Acquire textual data containing electricity knowledge; The text data is preprocessed; A power knowledge retrieval model is constructed and trained based on the preprocessed text data, wherein the power knowledge retrieval model includes a query text vector conversion model and a knowledge text conversion model; Retrieve the current query results; The query content is optimized and split to obtain multiple search results; The query results are obtained based on the multiple search contents and the power knowledge retrieval model.

[0007] Optionally, preprocessing the text data includes: The text data is divided into documents according to power business scenarios and topic attributes; The text data is augmented, and special data is processed. Metadata supplementation is performed on the text data.

[0008] Optionally, preprocessing the text data further includes: Sentence segmentation is used to segment the sentences in the preprocessed text data; Progressive segmentation of text blocks exceeding length limits; Perform semantic calibration on the segmented text.

[0009] Optionally, constructing and training an electricity knowledge retrieval model based on the preprocessed text data includes: Obtain the BERT model and select the power pre-trained model; The BERT model and the power pre-trained model are fine-tuned using the pre-processed text data; The finely tuned BERT model is used as the query text vector transformation model; The fine-tuned power pre-trained model is used as a knowledge text vector conversion model.

[0010] Optionally, the query content can be optimized and split to obtain multiple search results, including: Extract a list of core elements from the query content; The query content is split according to the core element list to obtain multiple sub-queries; Perform semantic validation on the multiple subqueries after splitting; The structure of multiple subqueries is standardized to obtain multiple search results.

[0011] Optionally, obtaining query results based on multiple search terms and the power knowledge retrieval model includes: Obtain a database of power knowledge vectors; The semantic similarity between each retrieved content and each document block in the power knowledge vector database is obtained according to formula (1). (1) in, For the first The search content mentioned above is compared with the first item in the power knowledge vector database. Semantic similarity of document blocks, For the first A vectorized vector of the retrieved content. For the first in the power knowledge vector database Vectorized vectors of document blocks , Numbered by integer; A vector retrieval candidate set is obtained based on the semantic similarity between each of the retrieved contents and each document block in the power knowledge vector database.

[0012] Optionally, obtaining query results based on multiple search terms and the power knowledge retrieval model further includes: Obtain the keywords from each of the search results; Retrieve the corresponding document block based on the keywords; The BM25 algorithm is used to obtain the keyword similarity between the retrieved content and the corresponding document block; The search results are sorted in descending order based on the keyword similarity between the searched content and the corresponding document blocks; A first preset number of document blocks are filtered to construct a candidate set for keyword retrieval.

[0013] Optionally, obtaining query results based on multiple search terms and the power knowledge retrieval model further includes: Obtain the unique identifiers of the document blocks in the vector retrieval candidate set and the keyword retrieval candidate set; The overall similarity of each document block is obtained according to formula (2). (2) in, For the first The overall similarity of document blocks, For the first Semantic similarity of document blocks, For vector weights, For the first Keyword similarity of document blocks Keyword weight; Sort the overall similarity scores of each document block in descending order; Retrieve the first second preset number of document blocks to obtain the search results.

[0014] Optionally, obtaining query results based on multiple search terms and the power knowledge retrieval model further includes: Obtain search results for multiple search terms; The search results from multiple search terms are integrated to obtain the query results; The query results are reordered.

[0015] On the other hand, the present invention also provides an enhanced generation system for power knowledge retrieval based on a generative large model, comprising: The data acquisition module is used to collect textual data related to electricity knowledge. The controller, connected to the data acquisition module, is used to execute any of the above-described power knowledge retrieval enhancement generation methods.

[0016] Through the above technical solution, the enhanced generation method for power knowledge retrieval based on a generative large model provided by this invention involves preprocessing the textual data of power knowledge, then constructing and training a power knowledge retrieval model based on the preprocessed textual data. A query text vector conversion model and a knowledge text conversion model are used to perform vector conversion on the query text and power knowledge text, respectively, to improve the accuracy of subsequent matching. Simultaneously, after obtaining the current query content, the query content is optimized and split into multiple retrieval contents. The corresponding retrieval results are obtained based on each of the multiple retrieval contents, and then the multiple retrieval results are comprehensively analyzed to obtain the final query result. By splitting the query content and obtaining the query result based on multiple retrieval results, the accuracy and precision of power knowledge retrieval can be effectively improved.

[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of an enhanced generation method for power knowledge retrieval based on a generative large model according to an embodiment of the present invention; Figure 2 This is a flowchart of text data preprocessing in a power knowledge retrieval enhancement generation method based on a generative large model according to an embodiment of the present invention. Figure 3 This is a flowchart of text data segmentation in a power knowledge retrieval enhancement generation method based on a generative large model according to an embodiment of the present invention. Figure 4 This is a flowchart of training a power knowledge retrieval model in a power knowledge retrieval enhancement generation method based on a generative large model according to an embodiment of the present invention. Figure 5 This is a flowchart of query content splitting in a power knowledge retrieval enhancement generation method based on a generative large model according to an embodiment of the present invention. Figure 6 This is a flowchart of obtaining retrieval results in a power knowledge retrieval enhancement generation method based on a generative large model according to an embodiment of the present invention; Figure 7 This is a flowchart illustrating the process of obtaining query results in a power knowledge retrieval enhancement generation method based on a generative large model according to an embodiment of the present invention. Detailed Implementation

[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.

[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0021] Figure 1 This is a flowchart of an enhanced generation method for power knowledge retrieval based on a generative large model according to an embodiment of the present invention. Figure 1 In this context, the enhanced generation method for power knowledge retrieval may include: In step S1, textual data of electricity knowledge is acquired. This textual data may include sources such as electricity technology documents, electricity-related papers, technical documents, electricity operation guides, electricity knowledge bases, and electricity industry corpora.

[0022] In step S2, the text data is preprocessed. This preprocessing may include text segmentation, data augmentation, and chunking. Specifically, after preprocessing the text data for the power knowledge base, a power knowledge vector database can be obtained.

[0023] In step S3, a power knowledge retrieval model is constructed and trained based on the preprocessed text data. This model includes a query text vector conversion model and a knowledge text conversion model. Specifically, the query text vector conversion model effectively captures the complex semantics of the query text, while the knowledge text conversion model preserves the professionalism of the power knowledge text, thereby improving the accuracy of the professional matching between the query text and the knowledge text. Specifically, the power knowledge retrieval model may include a matching module and a power knowledge vector database to perform matching calculations between the query text vector, the knowledge text vector, and the power knowledge vector database / power knowledge base, thereby obtaining the corresponding retrieval results.

[0024] In step S4, the current query content is obtained. This query content can include voice, commands, text, etc., and represents the user's retrieval needs for electricity knowledge.

[0025] In step S5, the query content is optimized and split to obtain multiple search results. Specifically, for simple, single query text, it is optimized into professional or standardized expressions. For complex queries, such as those with multiple query requirements, the query content can be split to obtain multiple search results.

[0026] In step S6, query results are obtained based on multiple search terms and the power knowledge retrieval model. For multiple search terms, they can be input into the power knowledge retrieval model to obtain corresponding search results. After obtaining multiple search results, they are integrated to obtain the final query result.

[0027] In steps S1 to S6, textual data of electricity knowledge is first acquired and preprocessed to obtain better training samples. Then, an electricity knowledge retrieval model is constructed, and the preprocessed text data is used to train / fine-tune this model. This involves training / fine-tuning the query text vector conversion model and the knowledge text conversion model vectors to improve the matching accuracy of subsequent query texts, knowledge texts, and the electricity knowledge base while ensuring natural language semantic recognition and the professionalism of the knowledge text. The current query content is obtained and optimized by splitting it into multiple retrieval contents. Each retrieval content is input into the electricity knowledge retrieval model to obtain the corresponding retrieval results. The retrieval results from multiple retrieval contents are then integrated to obtain accurate and reliable query results.

[0028] Traditional power knowledge retrieval uses RAG technology, but existing RAG technology lacks adaptability to the power industry and fails to fully consider the professional and time-sensitive characteristics of power knowledge, resulting in the reliability and practicality of knowledge services failing to meet the core business needs of the power grid. In this embodiment of the invention, by separately training / fine-tuning the query text vector conversion model and the knowledge text conversion model, the semantics of the query text and the professionalism of the knowledge text can be taken into account, thereby improving the accuracy of professional matching. Simultaneously, by splitting the query content and obtaining query results based on multiple search results, the precision and accuracy of power knowledge retrieval can be effectively improved.

[0029] In this embodiment of the invention, after obtaining the power knowledge text data, the text data can be preprocessed. The preprocessing steps can be as follows: Figure 2 As shown. Specifically, in Figure 2 In this process, the preprocessing step may include: In step S20, the text data is divided into documents according to power business scenarios and thematic attributes. Before dividing the text data into documents, entity parsing can be performed, including using a standardized mapping mechanism and constructing a power professional terminology dictionary based on industry standards such as "DL / T 2424-2021 Smart Grid Terminology," uniformly labeling synonyms such as "LLM" and "large language model," as well as equipment aliases, to eliminate entity ambiguity. Furthermore, document division of the text data can include classifying and storing documents according to power business scenarios (dispatch, operation and maintenance, marketing, etc.) and thematic attributes, establishing a multi-level indexing system.

[0030] In step S21, data augmentation is performed on the text data, and special data is processed. For text data augmentation, this can be achieved through methods such as replacing synonyms for power industry terminology, rewriting technical document definitions, multilingual translation, and automated expansion using deep learning generation models to enrich the diversity of the knowledge base. For special data, this can include adding timestamps to time-sensitive data such as power policies and equipment parameters, and using automated monitoring tools to detect outdated documents or dynamically update them.

[0031] In step S22, metadata is added to the text data. Specifically, for each text data / document, metadata such as a content summary, updated timestamps, and typical query questions can be added to improve retrieval and filtering efficiency.

[0032] In this embodiment of the invention, after document segmentation, enhancement, and metadata supplementation of the text data, the text data can also be processed by block division, as follows: Figure 3 As shown. Specifically, in Figure 3 In addition, the preprocessing of this text data may also include: In step S23, sentence segmentation is used to segment the sentences in the preprocessed text data. Specifically, sentence segmentation techniques can be employed, utilizing tools like jieba and HanLP combined with the sentence structure features of power documents to achieve accurate sentence segmentation.

[0033] In step S24, the text block exceeding the length limit is progressively segmented. Specifically, for text blocks exceeding the length limit, the progressive segmentation can be performed in the order of "paragraph newline character → single newline character → space → period", flexibly adjusting the size of the text block.

[0034] In step S25, semantic calibration is performed on the segmented text. This includes calculating the cosine similarity of the vectorized text, identifying semantic breakpoints, and ensuring semantic coherence within blocks and significant differences between blocks. Furthermore, preprocessing for special structures may include: segmenting Markdown documents by heading level, cutting JSON files by array structure, preserving the structural integrity of LaTeX documents such as formulas and tables, and developing a dedicated segmenter to handle heterogeneous formats.

[0035] In this embodiment of the invention, after processing the text data, training text data samples can be obtained. These text data samples are then labeled to obtain corresponding training samples. After obtaining the training samples, the power knowledge retrieval model can be trained, specifically as follows: Figure 4 As shown. Specifically, in Figure 4 In this process, the training step may include: In step S30, a BERT model is obtained, and a pre-trained power model is selected. A BERT-like model with a self-attention mechanism can be used to achieve dynamic semantic representation of polysemous terms in the power field, such as the differentiated representation of "CD-ROM" in different power scenarios. Specifically, the core of the BERT-like model is the self-attention mechanism in the Transformer architecture, which can effectively achieve accurate semantic matching. Furthermore, for the power knowledge retrieval model, in addition to query-based question-and-answer retrieval, it can also include knowledge base document retrieval. For this knowledge base document retrieval, more standardized professional written language is required. Therefore, a power-domain customized embedding model can be used for the power pre-training model, such as a BioBERT variant fine-tuned from the power corpus. Furthermore, this invention uses BERT model embedding to capture complex semantics during user queries and uses the pre-trained power model embedding during document retrieval in the power knowledge base, forming a hybrid embedding to improve the accuracy and precision of matching user needs. Furthermore, the vector transformation of documents in the power knowledge base can also be achieved using the above method.

[0036] In step S31, the BERT model and the power industry pre-trained model are fine-tuned using preprocessed text data. The BERT model is a pre-trained model, which can be fine-tuned using training samples / text data from a power industry corpus to make it suitable for the power sector. Specifically, this power industry corpus can include technical manuals, scheduling procedures, operation and maintenance records, etc., which can enhance the semantic capture capability of professional terminology. The power industry pre-trained model can also be fine-tuned using training samples / text data from the power industry corpus, and may include BioBERT variants fine-tuned from the power industry corpus.

[0037] In step S32, the fine-tuned BERT model is used as the query text vector transformation model. Specifically, when the user query is in natural language, the BERT model can capture the user's complex semantics.

[0038] In step S33, the fine-tuned power pre-trained model is used as a knowledge text vector conversion model. Specifically, when the user query is a knowledge base document, the professional written language vector can be obtained through the power pre-trained model.

[0039] In this embodiment of the invention, after obtaining the query content, the query content can be analyzed and optimized. For complex query content, it is also necessary to break it down, specifically as follows: Figure 5 As shown. Specifically, in Figure 5 In this context, the steps for splitting the query content may include: In step S50, a list of core elements from the query content is extracted. The identification of core elements can be achieved using a power industry terminology dictionary and a Named Entity Recognition (NER) model (based on BERT fine-tuning) to extract core elements such as equipment names, voltage levels, service types, time points, and operation instructions from complex query content, thereby generating a list of core elements. Specifically, complex query content often contains multiple key information points, and these elements constitute the skeleton of the query content.

[0040] In step S51, the query content is split according to the core element list to obtain multiple subqueries. Specifically, after obtaining the core element list, the complex query content is split into multiple subqueries based on the aforementioned splitting criteria and a certain priority order. This priority order can include "business dimension → logical relationship → element completeness". Specifically, splitting by business dimension first ensures that subqueries match their corresponding subsets; splitting by logical relationship ensures that each subquery contains only one logical unit, facilitating retrieval; finally, the element completeness of each subquery is checked to avoid inaccurate retrieval due to missing elements.

[0041] In step S52, semantic validation is performed on the multiple subqueries after splitting. Specifically, the semantic validation of the split subqueries is performed using an LLM fine-tuned for the power sector to determine whether there are missing elements, logical contradictions, or semantic ambiguities. If so, the splitting dimensions are adjusted backtrackingly until all subqueries meet the requirements of "single semantics, complete elements, and suitable for retrieval".

[0042] In step S53, the structure of multiple subqueries is standardized to obtain multiple search results. A structured format of "[Time Limit] + [Business Scenario] + [Core Elements] + [Query Intent]" can be uniformly adopted, such as "2024 Dispatch Procedure + Residential Electricity Consumption Scenario + 110kV Transformer + Overload Judgment Criteria".

[0043] In this embodiment of the invention, optimizing the query content may further include query rewriting. Specifically, a fine-tuned small Transformer model or LLM can be used to rewrite the vague, colloquial electricity query into a precise and professional retrieval statement. Specifically, the user's query content is in colloquial language, while the electricity knowledge base generally contains professional data. Therefore, rewriting the colloquial content can effectively improve query accuracy and reduce semantic errors.

[0044] In this embodiment of the invention, the optimization of the query content may further include a back button suggestion. Specifically, an abstract general question (such as "Application of New Technologies in State Grid Renewable Energy Projects in 2024" corresponding to "Technological Development Trends in the State Grid Renewable Energy Field") is generated for specific power issues and retrieved in conjunction with the original query. Specifically, when a specific query lacks a directly matching document, relevant or background knowledge can be obtained through the abstract question to avoid generating zero results.

[0045] In this embodiment of the invention, the optimization of the query content may further include related supplementation. Specifically, related queries can be generated by combining Follow-Up Questions with the dialogue history, and hypothetical answers to the queries can be generated using HyDE to extract knowledge patterns for retrieval. Specifically, in subsequent dialogues, subsequent queries often rely on previous content, requiring the maintenance of the dialogue state; simultaneously, hypothetical answers to the queries are generated using HyDE, and these hypothetical answers are used to retrieve real documents. Furthermore, complex queries can be decomposed into multiple sub-queries (e.g., a query for electricity promotion activities can be decomposed into sub-questions such as residential / commercial user discounts), as shown in steps S50 to S53.

[0046] In this embodiment of the invention, document blocks segmented from the power knowledge base / power knowledge vector database may contain fragments of varying lengths. Direct retrieval may be affected by incomplete information or noise. Therefore, different optimization strategies can be adopted for long and short document blocks. Specifically, for long document blocks, LLM compression can be used to filter irrelevant information; for short document blocks, sentence window search can be used to extract related blocks and supplement contextual information.

[0047] In this embodiment of the invention, since many power documents have a hierarchical structure, such as a two-layer structure of "main document-sub-document", the user's query content can be matched with the sub-document, and the corresponding main document can be retrieved. For more complex documents, a three-layer tree structure can be included (top layer 1024 characters, middle layer 512 characters, bottom layer 128 characters). After matching the bottom layer leaf nodes, the parent documents to which most matching nodes belong can be merged.

[0048] In this embodiment of the invention, after obtaining multiple search terms, document blocks matched by each search term can be obtained. These document blocks may include document data from the power knowledge base / power knowledge vector database, i.e., the split text blocks. For each search term, the multiple document blocks matched need to be filtered to obtain the final search results. Specifically, this can be done as follows: Figure 6 As shown. Specifically, in Figure 6 In this context, the steps for obtaining the search results for the search content may include: In step S60, an electricity knowledge vector database is obtained. This electricity knowledge vector data may include multiple preprocessed document blocks / document block vectors from the electricity knowledge base.

[0049] In step S61, the semantic similarity between each retrieved content and each document block in the power knowledge vector database is obtained according to formula (1). (1) in, For the first The first search result is related to the electricity knowledge vector database. Semantic similarity of document blocks, For the first A vectorized representation of each retrieved item. For the first in the power knowledge vector database Vectorized vectors of document blocks , The identifier is an integer. Specifically, vector retrieval is based on semantic similarity, which reflects the degree of semantic association between the retrieved content and the document block. The semantic similarity value range can include [0, 1], with values ​​closer to 1 indicating a stronger semantic association.

[0050] Further, the execution steps may include: calling the BERT model corresponding to the user query content to convert the optimized query (including subqueries) into a 768-dimensional semantic vector; traversing the document block vector library in the power knowledge base after being processed by the domain fine-tuning embedding model, and calculating the cosine similarity between the query vector and each document block vector.

[0051] In step S62, a vector retrieval candidate set is obtained based on the semantic similarity between each search content and each document block in the power knowledge vector database. A semantic similarity threshold of ≥0.65 can be set to filter out document blocks that exceed the threshold, forming the vector retrieval candidate set.

[0052] In step S63, keywords are obtained from each search result. This can be done by extracting keywords from the query (including subqueries) based on a power industry terminology dictionary, filtering out common function words (such as "of / and / etc."), and retaining core keywords such as equipment model, voltage level, standard number, and operating verbs.

[0053] In step S64, the corresponding document blocks are obtained based on the keywords. This can be achieved by calling the inverted index of the knowledge base (built by keyword → document block mapping) to match document blocks containing the target keywords. This inverted index can identify which document blocks contain the keywords, enabling quick location of all document blocks containing these keywords.

[0054] In step S65, the BM25 algorithm is used to obtain the keyword similarity between the searched content and the corresponding document block. Keyword retrieval is based on literal similarity, focusing on the degree of literal matching of electrical engineering terms (equipment models, standard numbers, parameter indicators, etc.) in the core search query. Furthermore, this BM25 algorithm is an improvement on TF-IDF, capable of outputting a score reflecting the degree of literal matching.

[0055] In step S66, the keyword similarity between the retrieved content and the corresponding document block is sorted in descending order.

[0056] In step S67, a first preset number of document blocks are filtered to construct a keyword retrieval candidate set. This first preset number of document blocks may include the top 20% of the document blocks.

[0057] In step S68, unique identifiers for document blocks in the vector retrieval candidate set and the keyword retrieval candidate set are obtained. Since there are partially overlapping document blocks in the vector retrieval candidate set and the keyword retrieval candidate set, a unique identifier (ID) for each document block can be extracted.

[0058] In step S69, the comprehensive similarity of each document block is obtained according to formula (2). (2) in, For the first The overall similarity of document blocks, For the first Semantic similarity of document blocks, For vector weights, For the first Keyword similarity of document blocks For keyword weight, Numbered by integer. and It can be set according to the actual situation, such as Specifically, the BM25 results are normalized to the [0, 1] interval, making them the same order of magnitude as the vector similarity. Integrating vector retrieval (capturing semantic associations) with keyword retrieval (locating technical terms such as device models and standard numbers) maximizes fact recall.

[0059] In step S70, the comprehensive similarity of each document block is sorted in descending order. This may involve merging two candidate sets and removing duplicate document blocks.

[0060] In step S71, the first second preset number of document blocks are obtained to obtain the search results. The first second preset number of document blocks may include the first 30 document blocks, which are used as the final search results.

[0061] In this embodiment of the invention, after obtaining multiple search results, further processing is required based on these results to obtain the final query result. This can be achieved as follows: Figure 7 As shown. Specifically, in Figure 7 In this context, the steps for obtaining the query results may include: In step S72, the search results for multiple search terms are obtained.

[0062] In step S73, the search results of multiple search contents are integrated to obtain the query results. Since the search contents are split according to priority, the results can be integrated in reverse order of priority based on the split dimensions. First, subquery results under the same logical relationship are merged, then summarized by business dimension, and finally sorted based on the relevance of core elements. Furthermore, when subquery results (search results of search contents) have semantic conflicts, the subquery results containing "power industry standard numbers (such as DL / T 2424-2021), equipment parameter settings, and official regulation references" are prioritized, retaining information with strong factual basis. In addition, for search results of different search contents, which may include identical or highly similar documents, to avoid redundancy, semantic similarity clustering (cosine similarity threshold ≥ 0.85) can be used to merge duplicate or highly similar subquery results, remove redundant information, and form a structured integrated result.

[0063] In step S74, the query results are reordered. This can be done using a fine-tuned reordering model specific to the power sector, combining multi-dimensional features such as query intent, power-related semantics, and user business scenarios to reorder the initial query results based on relevance, ensuring highly relevant documents are ranked higher.

[0064] Furthermore, the query results can include multi-turn dialogue support: storing the dialogue history context to enable continuous interactive answers to electricity-related questions. It also includes intelligent follow-up questions: when an answer cannot be given based on the search results, up to three guiding questions are automatically generated to clarify the user's needs. In addition, it includes a feedback loop: collecting user feedback on the accuracy and relevance of the answers to optimize retrieval model parameters and update the knowledge base content.

[0065] On the other hand, the present invention also provides an enhanced generation system for power knowledge retrieval based on a generative large model, which may include a data acquisition module and a controller. Specifically, the data acquisition module is used to acquire textual data of power knowledge, and the controller is connected to the data acquisition module to execute any of the power knowledge retrieval enhanced generation methods described above.

[0066] Through the above technical solution, the enhanced generation method for power knowledge retrieval based on a generative large model provided by this invention involves preprocessing the textual data of power knowledge, then constructing and training a power knowledge retrieval model based on the preprocessed textual data. A query text vector conversion model and a knowledge text conversion model are used to perform vector conversion on the query text and power knowledge text, respectively, to improve the accuracy of subsequent matching. Simultaneously, after obtaining the current query content, the query content is optimized and split into multiple retrieval contents. The corresponding retrieval results are obtained based on each of the multiple retrieval contents, and then the multiple retrieval results are comprehensively analyzed to obtain the final query result. By splitting the query content and obtaining the query result based on multiple retrieval results, the accuracy and precision of power knowledge retrieval can be effectively improved.

[0067] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0068] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0069] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0070] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0071] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0072] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0073] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0074] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0075] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A power knowledge retrieval enhancement generation method based on a generative large model, characterized in that, include: Acquire textual data containing electricity knowledge; The text data is preprocessed; A power knowledge retrieval model is constructed and trained based on the preprocessed text data, wherein the power knowledge retrieval model includes a query text vector conversion model and a knowledge text conversion model; Retrieve the current query results; The query content is optimized and split to obtain multiple search results; The query results are obtained based on the multiple search contents and the power knowledge retrieval model.

2. The power knowledge retrieval enhancement generation method according to claim 1, characterized in that, Preprocessing the text data includes: The text data is divided into documents according to power business scenarios and topic attributes; The text data is augmented, and special data is processed. Metadata supplementation is performed on the text data.

3. The power knowledge retrieval enhancement generation method according to claim 1, characterized in that, Preprocessing the text data further includes: Sentence segmentation is used to segment the sentences in the preprocessed text data; Progressive segmentation of text blocks exceeding length limits; Perform semantic calibration on the segmented text.

4. The power knowledge retrieval enhancement generation method according to claim 3, characterized in that, The process of constructing and training an electricity knowledge retrieval model based on the preprocessed text data includes: Obtain the BERT model and select the power pre-trained model; The BERT model and the power pre-trained model are fine-tuned using the pre-processed text data; The finely tuned BERT model is used as the query text vector transformation model; The fine-tuned power pre-trained model is used as a knowledge text vector conversion model.

5. The power knowledge retrieval enhancement generation method according to claim 1, characterized in that, The query content is optimized and split to obtain multiple search results, including: Extract a list of core elements from the query content; The query content is split according to the core element list to obtain multiple sub-queries; Perform semantic validation on the multiple subqueries after splitting; The structure of multiple subqueries is standardized to obtain multiple search results.

6. The power knowledge retrieval enhancement generation method according to claim 5, characterized in that, The query results obtained based on the multiple search contents and the power knowledge retrieval model include: Obtain a database of power knowledge vectors; The semantic similarity between each retrieved content and each document block in the power knowledge vector database is obtained according to formula (1). ,(1) in, For the first The search content mentioned above is compared with the first item in the power knowledge vector database. Semantic similarity of document blocks, For the first A vectorized vector of the retrieved content. For the first in the power knowledge vector database Vectorized vectors of document blocks , Numbered by integer; A vector retrieval candidate set is obtained based on the semantic similarity between each of the retrieved contents and each document block in the power knowledge vector database.

7. The power knowledge retrieval enhancement generation method according to claim 6, characterized in that, Obtaining query results based on multiple search contents and the power knowledge retrieval model also includes: Obtain the keywords from each of the search results; Retrieve the corresponding document block based on the keywords; The BM25 algorithm is used to obtain the keyword similarity between the retrieved content and the corresponding document block; The search results are sorted in descending order based on the keyword similarity between the searched content and the corresponding document blocks; A first preset number of document blocks are filtered to construct a candidate set for keyword retrieval.

8. The power knowledge retrieval enhancement generation method according to claim 7, characterized in that, Obtaining query results based on multiple search contents and the power knowledge retrieval model also includes: Obtain the unique identifiers of the document blocks in the vector retrieval candidate set and the keyword retrieval candidate set; The overall similarity of each document block is obtained according to formula (2). ,(2) in, For the first The overall similarity of document blocks, For the first Semantic similarity of document blocks, For vector weights, For the first Keyword similarity of document blocks Keyword weight; Sort the overall similarity scores of each document block in descending order; Retrieve the first second preset number of document blocks to obtain the search results.

9. The power knowledge retrieval enhancement generation method according to claim 8, characterized in that, Obtaining query results based on multiple search contents and the power knowledge retrieval model also includes: Obtain search results for multiple search terms; The search results from multiple search terms are integrated to obtain the query results; The query results are reordered.

10. A power knowledge retrieval enhancement generation system based on a generative large model, characterized in that, include: The data acquisition module is used to collect textual data related to electricity knowledge. The controller, connected to the data acquisition module, is used to execute the power knowledge retrieval enhancement generation method as described in any one of claims 1-9.