Method and system for dynamically updating large power transmission and distribution model based on plug-in knowledge base

By building an external knowledge base and dynamically updating the large-scale power transmission and distribution model, the problem of static lag in knowledge of the large model is solved, enabling real-time and accurate answers and low-cost knowledge updates, thus adapting to the rapid changes in the power transmission and distribution field.

CN121882196APending Publication Date: 2026-04-17广州南网科研技术有限责任公司
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
广州南网科研技术有限责任公司
Filing Date
2025-11-21
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing general-purpose power transmission and distribution models cannot automatically acquire and absorb the latest technical documents, fault reports, or policies and regulations, resulting in outdated responses that cannot meet real-time and accurate business needs. Furthermore, frequent full updates require huge computing resources and time costs.

Method used

An external knowledge base is constructed by acquiring knowledge documents in the field of power transmission and distribution. Semantic retrieval is used to match relevant knowledge fragments, which are then combined with user queries and input into a large language model to generate enhanced answers, supporting dynamic incremental updates.

Benefits of technology

It enables large models to acquire the latest information in near real-time, reduces the computational and time costs of knowledge updates, improves the professional accuracy and credibility of answers, and adapts to the rapid changes in the power transmission and distribution field.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121882196A_ABST
    Figure CN121882196A_ABST
Patent Text Reader

Abstract

The invention provides a power transmission and distribution large model dynamic updating method based on a plug-in knowledge base, and the method comprises the following steps: S1, obtaining a knowledge document of a power transmission and distribution field, and constructing the plug-in knowledge base according to the knowledge document of the power transmission and distribution field; s2, obtaining a query problem initiated by a user, and matching related knowledge fragments from the plug-in knowledge base by adopting semantic retrieval according to the query problem; s3, combining the knowledge fragments with the user query questions to form cue words, inputting the cue words into the power transmission and distribution large language model, and outputting an enhanced answer. Related knowledge fragments are accurately matched from the plug-in knowledge base through semantic retrieval and serve as a context basis for generating the answer; and the professional accuracy and credibility of answering are obviously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a method and system for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base. Background Technology

[0002] With the rapid development of artificial intelligence technology, large language models have demonstrated powerful natural language understanding and generation capabilities in general domains. In the critical infrastructure sector of power transmission and distribution, which is vital to the national economy and people's livelihood, how to leverage large language models to empower production operations, fault diagnosis, technical training, and customer service has become an important direction for the industry's intelligent transformation.

[0003] Existing general-purpose power transmission and distribution models rely on fixed training data, and their internal knowledge has "time stamps." They cannot automatically acquire and absorb the latest technical documents, fault reports, or policies and regulations, which may result in outdated or even incorrect answers, failing to meet real-time and accurate business needs.

[0004] Existing technologies use new domain data to perform full fine-tuning or retraining of the entire large model. This process requires enormous computing resources, time, and economic costs, and frequent full updates are not feasible, resulting in long model knowledge update cycles that cannot adapt to rapid business changes. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a method and system for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base.

[0006] The method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base provided by this invention includes the following steps: S1: Obtain knowledge documents in the field of power transmission and distribution, and build an external knowledge base based on these documents; S2: Obtain the query question initiated by the user, and use semantic retrieval to match relevant knowledge fragments from the external knowledge base based on the query question; S3: Combine knowledge fragments with user query questions to form prompt words, input the prompt words into the large language model, and output the enhanced answer.

[0007] Preferably, step S1 specifically includes: S11. Obtain knowledge documents in the field of power transmission and distribution, including technical standards, operation manuals and historical fault records; S12. Use an automatic text parsing tool to extract raw text data from documents of different formats; S13. Clean and standardize the extracted raw text, including segmentation, sentence splitting, removal of special characters, correction of spelling errors, standardization of power transmission and distribution terminology, and stop word filtering.

[0008] S14. Use a text slicing algorithm to divide the processed text content into multiple document fragments.

[0009] S15. Vectorize each document fragment to generate a high-dimensional vector embedding. Integrate and store the vectorized fragments, the corresponding original text, and metadata in the external knowledge base. At the same time, use the approximate nearest neighbor algorithm to build an index for the vectorized fragments to support fast retrieval of vector similarity.

[0010] Preferably, the plug-in knowledge base supports dynamic incremental updates, specifically including: Establish a knowledge update monitoring mechanism to regularly scan designated document sources or receive manually submitted new documents; For newly added documents, a process of text extraction, cleaning, standardization, and slicing is performed to generate new document fragments. The new document fragments are vectorized and incrementally updated to the vector index of the external knowledge base, while the new metadata version and timestamp are recorded.

[0011] Preferably, step 2 specifically includes: S21. Preprocess the user query, including word segmentation, entity recognition, and intent parsing, to generate a query vector; S22. Based on the vector index pre-built in the external knowledge base in step S15, the approximate nearest neighbor search algorithm is used to quickly retrieve the set of candidate knowledge fragments most similar to the query vector and calculate their similarity score. S23. Sort the knowledge fragments according to their similarity scores, and select the top N fragments with the highest scores as the relevant knowledge fragments; S24. Perform deduplication and redundancy filtering on relevant knowledge fragments to ensure the diversity and relevance of search results.

[0012] Preferably, step S3 specifically includes the following steps: S31. Combine the user's query question with the sorted fragments to form structured prompt words; S32. Input the prompt words into the pre-trained power transmission and distribution large language model, and output an enhanced answer based on the content of the external knowledge base; S33. Post-process the generated answers, including format standardization, technical terminology verification, and confidence level labeling; S34. Return the enhanced answer to the user and indicate the source of the knowledge fragment on which the answer is based in the interactive interface.

[0013] The dynamic update system for a large-scale power transmission and distribution model based on an external knowledge base provided by this invention includes: The knowledge base construction module is used to acquire knowledge documents in the field of power transmission and distribution, and to parse, clean, standardize and segment the knowledge documents to generate document fragments; to vectorize each document fragment to generate vector embeddings; to store the vectorized fragments, the corresponding original text and metadata to the external knowledge base, and to build a vector index. The retrieval and matching module is used to receive user queries, preprocess the queries and generate query vectors; based on the vector index, it uses an approximate nearest neighbor search algorithm to retrieve knowledge fragments similar to the query vectors, sorts and filters them, and outputs the relevant knowledge fragments. The question-and-answer generation module combines user queries with relevant knowledge fragments to form prompts, which are then input into a pre-trained power transmission and distribution large language model to generate an enhanced answer. The generated answer is then post-processed and returned to the user. The dynamic update module is used to monitor the update status of document sources, automatically process new documents, generate new document fragments, and incrementally update the vector index of the external knowledge base, while recording version and timestamp information.

[0014] Preferably, the knowledge base construction module includes: The document acquisition unit is used to acquire technical standards, operation manuals, and historical fault record knowledge documents from multiple data sources; The text parsing and processing unit is used to extract raw text data and perform cleaning, standardization, and block processing. The vectorization and storage unit is used to convert text fragments into high-dimensional vectors and store them in a vector database.

[0015] Preferably, the retrieval and matching module includes: The query processing unit is used to perform word segmentation, entity recognition, and intent parsing on user queries, and generate query vectors. The semantic retrieval unit retrieves similar knowledge fragments from the external knowledge base based on the approximate nearest neighbor algorithm; The results optimization unit is used to sort, deduplicate, and filter redundancy in the search results.

[0016] Preferably, the question-and-answer generation module includes: The prompt word construction unit is used to concatenate user queries with relevant knowledge fragments into structured prompt words; The large model interface unit is used to call the pre-trained power transmission and distribution large language model and obtain the generation results; The post-processing and tracing unit is used to standardize the format of the answers, verify the terminology, and mark the knowledge sources.

[0017] Preferably, the dynamic update module includes: The monitoring unit is used to periodically scan document sources or receive newly submitted documents manually. The processing pipeline unit is used to perform text extraction, cleaning, chunking, and vectorization processing on new documents; The index update unit is used to incrementally update the newly generated vector fragments to the external knowledge base and maintain metadata and version information.

[0018] The dynamic update method for large-scale power transmission and distribution models based on an external knowledge base described in this invention has the following significant advantages compared with existing technologies: By constructing an external knowledge base independent of model parameters, knowledge storage is decoupled from model reasoning capabilities. When new knowledge is generated, it only needs to be incrementally updated to the external knowledge base, without requiring any retraining or fine-tuning of the underlying large model. This greatly reduces the computational and time costs of knowledge updates, enabling the large model to acquire the latest information in near real-time, effectively solving the problem of static lag in model knowledge. By using semantic retrieval to accurately match relevant knowledge fragments from the external knowledge base and using them as the context for generating answers, the professional accuracy and credibility of the answers are significantly improved. This invention can clearly identify the source of the knowledge fragments upon which the generated answer is based. It provides a means to verify the correctness of the answer, enhancing the trust foundation for human-computer collaboration.

[0019] The external knowledge base supports dynamic incremental updates and can easily integrate new knowledge documents from various sources and formats. The entire system architecture is flexible, easy to maintain and expand, and can adapt to the continuous growth and changes in knowledge in the future power transmission and distribution field. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention are provided below.

[0021] Figure 1 The flowchart of the method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base provided by the present invention is shown. Detailed Implementation

[0022] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments, so that those skilled in the art can better understand the present invention and implement it. However, the embodiments are not intended to limit the present invention.

[0023] refer to Figure 1 This invention provides a method for dynamically updating a large-scale power transmission and distribution model based on an external knowledge base, comprising the following steps: S1: Obtain knowledge documents in the field of power transmission and distribution, and build an external knowledge base based on these documents; S2: Obtain the query question initiated by the user, and use semantic retrieval to match relevant knowledge fragments from the external knowledge base based on the query question; S3: Combine knowledge fragments with user query questions to form prompt words, input the prompt words into the large language model, and output the enhanced answer.

[0024] In a preferred embodiment, step S1 specifically includes: S11. Obtain knowledge documents in the field of power transmission and distribution, including technical standards, operation manuals and historical fault records; S12. Use an automatic text parsing tool to extract raw text data from documents of different formats; S13. Clean and standardize the extracted raw text, including: segmentation, sentence splitting, removal of special characters, correction of spelling errors, standardization of power transmission and distribution terminology, and stop word filtering.

[0025] S14. Using a text segmentation method, the processed text content is divided into multiple continuous document fragments with complete semantics.

[0026] S15. Vectorize each document fragment to generate a high-dimensional vector embedding. Integrate and store the vectorized fragment, the corresponding original text, and metadata (including source document, version, and update timestamp) into the external knowledge base. At the same time, use the approximate nearest neighbor algorithm to build an index for the vectorized fragment to support fast retrieval of vector similarity.

[0027] Specifically, this involves acquiring structured and unstructured knowledge documents related to power transmission and distribution from multiple channels. These include, but are not limited to: national and industry technical standards and specifications, power grid company equipment operation manuals and inspection procedures, and detailed historical fault records and handling reports. After acquiring the documents, the process proceeds to step S12, the text extraction stage. To handle documents of different formats, appropriate automatic text parsing tools are used (e.g., libraries such as Apache POI and Apache Tika). The extracted raw text data often contains noise, therefore step S13 performs rigorous cleaning and standardization. Several classic Natural Language Processing (NLP) preprocessing techniques are employed: Segmentation and sentence segmentation: Using sentence segmentation and paragraph detection technology, large sections of original text are initially segmented according to natural paragraphs and sentence boundaries to form basic semantic units.

[0028] Remove special characters: Use regular expressions for matching and replacement to clean up garbled characters, extra spaces, line breaks, headers and footers, etc. that do not contribute to semantics.

[0029] Correct spelling mistakes: A spell checker based on the edit distance algorithm or pre-trained language model automatically detects and corrects possible spelling mistakes in the text.

[0030] Standardize power transmission and distribution professional terms: According to a predefined dictionary in the power transmission and distribution field, synonyms, abbreviations, full names, etc. appearing in the text are unified. For example, "circuit breaker" and "switch" are unified into the standard term "circuit breaker" according to the context, or "PT" is unified into "voltage transformer".

[0031] Stop word filtering: Load a general and domain-specific stop word list for filtering, removing common but low-information stop words such as "of", "is", "in", etc., to reduce data dimensionality and noise.

[0032] The text after cleaning and standardization is further segmented into finer units suitable for retrieval in step S14. This process is called text chunking. Directly using long documents for retrieval is inefficient and inaccurate. The goal of text chunking is to generate text chunks of appropriate size while maintaining semantic integrity. In practice, two mainstream strategies are usually adopted: Fixed-size chunking: Set a fixed number of tokens or characters (such as 256 tokens) as the chunk size and set an overlap area (such as 50 tokens), and traverse the text in a sliding window manner to ensure that context information is not split at the chunk boundaries.

[0033] Semantic-aware chunking: Use natural language processing techniques to identify natural breakpoints in the text (such as paragraph endings, headings, full stops, etc.) and chunk according to semantic boundaries. More advanced methods can adopt recursive chunking or topic segmentation algorithms, striving to make each text chunk revolve around a subtopic and have stronger semantic cohesion.

[0034] Finally, in step S15, a machine-readable numerical representation, i.e., vectorization, is generated for each text chunk. Specifically, a pre-trained semantic model (such as Sentence-BERT, text-embedding model) is used to convert each text chunk into a high-dimensional vector embedding (for example, a floating-point vector of 768 dimensions or 1024 dimensions). This vector encodes the semantic information of the text chunk in the mathematical space. Chunks with similar semantics have closer vector distances. The vectorized representation of each chunk, the corresponding original text content, and metadata including the source document, version number, and update timestamp are integrated and stored in a dedicated external knowledge base (i.e., a vector database such as Milvus). To support millisecond-level retrieval in a large number of vectors, approximate nearest neighbor algorithms (such as HNSW, IVF-PQ) are used to build an efficient index structure for all vectors.

[0035] In a preferred embodiment, the external knowledge base supports dynamic incremental updates, specifically including: Establish a knowledge update monitoring mechanism to regularly scan designated document sources or receive manually submitted new documents; For newly added documents, a process of text extraction, cleaning, standardization, and slicing is performed to generate new document fragments. The new document fragments are vectorized and incrementally updated to the vector index of the external knowledge base, while the new metadata version and timestamp are recorded.

[0036] Specifically, dynamic incremental updates establish an automated knowledge update monitoring mechanism. This mechanism operates in parallel in two ways: Regular scanning: Deploy a background scheduled task to automatically scan a specified document source directory, version control system (such as Git) repository, or enterprise content management system API interface according to a preset cycle (e.g., daily or weekly) to discover newly added technical standards, operation manuals, and other documents.

[0037] Manual submission channel: To address urgent regulatory updates or temporary knowledge supplements, the system provides a management interface that allows operations or domain experts to proactively upload and submit new documents, providing an immediate response and triggering the processing flow.

[0038] Once the monitoring mechanism detects a new document, it automatically initiates the same processing pipeline as steps S12 to S14, vectorizing these newly generated text blocks and generating high-dimensional vector embeddings using the Sentence-BERT embedding model. These new vectorized fragments, along with their original text and metadata recording the latest version number and update timestamp, are incrementally updated to the vector index of the external knowledge base in an append-only manner.

[0039] This incremental update process relies on the native capabilities of vector databases (such as Milvus). It calls the vector database's index incremental update interface to add the new vector to the existing Approximate Nearest Neighbor (ANN) index (such as HNSW or IVF-PQ). This process only modifies the incremental part of the index, without rebuilding the entire index, thus achieving efficient and low-latency knowledge updates with minimal impact on the performance of online retrieval services. Simultaneously, new metadata (such as version numbers and update timestamps) is updated synchronously, ensuring the possibility of knowledge traceability.

[0040] In a preferred embodiment, step 2 specifically includes: S21. Preprocess the user query, including word segmentation, entity recognition, and intent parsing, to generate a query vector; S22. Based on the vector index pre-built in the external knowledge base in step S15, the approximate nearest neighbor search algorithm is used to quickly retrieve the set of candidate knowledge fragments most similar to the query vector and calculate their precise similarity score. S23. Sort the knowledge fragments according to their similarity scores, and select the top N fragments with the highest scores as the relevant knowledge fragments; S24. Perform deduplication and redundancy filtering on relevant knowledge fragments to ensure the diversity and relevance of search results.

[0041] Specifically, in step S21, the user-initiated query is subjected to in-depth preprocessing, which employs several fundamental natural language processing technologies: Word segmentation: Using word segmentation tools based on dictionaries or statistical models (such as jieba and LTP), continuous Chinese queries are divided into independent lexical units.

[0042] Entity recognition: A pre-trained named entity recognition model is used to identify and extract key entities in the query, such as equipment name (e.g., "main transformer"), fault type (e.g., "single-phase grounding"), etc., which helps to understand the professional focus of the query.

[0043] The training process of the named entity recognition model includes: defining entity types in the power transmission and distribution field, including equipment entities, fault entities, parameter entities, standard entities, and operation entities; collecting text data in the power transmission and distribution field, which is then labeled by domain experts according to the defined entity types to construct a high-quality labeled dataset; Using the BERT language model as the foundation, the model is jointly fine-tuned using a labeled dataset through a masked language model task and a downstream sequence labeling task, enabling the model to master the professional vocabulary and semantic features of the power transmission and distribution field. Based on the fine-tuned pre-trained model, a fully connected layer and a conditional random field layer are added to form a sequence labeling model. The model parameters are optimized using the backpropagation algorithm with a labeled dataset. The training objective is to minimize the difference between the predicted sequence and the real labeled sequence. The training data is augmented using synonym replacement, entity replacement, and sentence restructuring methods to improve the model's generalization ability; adversarial training and multi-task learning methods are used to further improve the model's robustness and accuracy. The trained named entity recognition model is deployed as an inference service. After receiving user query text, it outputs the recognized entities and their types, providing structured semantic information for subsequent intent parsing and knowledge retrieval.

[0044] The segmented query text is input into an intent classifier based on the Transformer architecture. This classifier uses its self-attention mechanism to capture key sentence structures and core words in the query and outputs a probability distribution across predefined intent categories. The category with the highest probability is ultimately determined as the user's intent. A key technical feature in determining whether the intent is "standard consultation" lies in the model's ability to recognize standard number entities such as "GB / T 1234" and "DL / T 567," or sentence patterns containing normative constraints such as "should comply with what specifications" or "based on which standard."

[0045] Using the same embedding model as the knowledge base fragment, the preprocessed query text is converted into a query vector.

[0046] Perform efficient vector retrieval. Based on the vector index pre-built in the external knowledge base in step S15, an approximate nearest neighbor search algorithm is used to quickly retrieve data from the vast vector space, centered on the query vector. This algorithm can find the set of candidate knowledge fragments most similar to the query vector from millions of knowledge fragments within milliseconds. After the initial retrieval, the precise similarity score between the query vector and each candidate fragment vector is calculated, and the similarity score is quantified using cosine similarity.

[0047] Subsequently, in step S23, the system sorts all candidate knowledge fragments in descending order based on the calculated similarity scores. To ensure the accuracy and conciseness of the answer, the system sets a similarity threshold and selects the top N fragments with the highest scores (e.g., Top-5) as the final selected relevant knowledge fragments.

[0048] In a preferred embodiment, step S3 specifically includes the following steps: S31. Combine the user's query question with the sorted fragments to form structured prompt words; S32. Input the prompt words into the pre-trained power transmission and distribution large language model, and output an enhanced answer based on the content of the external knowledge base; the training process of the power transmission and distribution large language model is as follows: We collect large-scale professional text data in the field of power transmission and distribution to build a domain corpus. On top of the general basic language model, we use the domain corpus for further pre-training so that the model can master the professional knowledge, terminology and language patterns in the field of power transmission and distribution. Construct a high-quality instruction dataset for the power transmission and distribution field. The instruction dataset contains question-answer pairs. Based on this instruction dataset, supervise and fine-tune the model that has been pre-trained with domain adaptability, so that the model learns to follow human instructions and generate answers that conform to domain norms. Based on the model fine-tuned by instructions, multiple answers are generated by the model, domain experts rank these answers by quality to train the reward model, and finally reinforcement learning algorithms are used to optimize the model parameters based on the reward model.

[0049] S33. Post-process the generated answers, including format standardization and technical terminology verification; S34. Return the enhanced answer to the user and indicate the source of the knowledge fragment on which the answer is based in the interactive interface.

[0050] For example, a user might ask: "What risks are associated with the distribution transformer's load rate reaching 135%? How should this be handled?" Answer Requirements: Based on your background knowledge, please explain the risks and corresponding mitigation measures, prioritizing them in order of importance. Your answer should be professional, accurate, and provide a direct conclusion.

[0051] Step S32: Model generates response. The pre-trained power transmission and distribution large language model generates the following response based on the prompt words: "This situation is due to severe overload of the distribution transformer, and the following risks and handling suggestions exist:" Key risks: Accelerated insulation aging: Long-term overload will significantly shorten the life of winding insulation. Excessive temperature rise: The temperature of the insulating oil and windings may exceed the permissible limits. Equipment damage risk: Continuous operation may cause faults such as insulation breakdown. Handling measures (in order of priority): Immediate measures: Adjust the load transfer mode within 2 hours, prioritizing the use of backup transformers. Monitoring requirements: Closely monitor the top oil temperature and winding temperature to ensure they do not exceed the limits. Long-term plan: Assess load growth trends and develop capacity expansion or load splitting plans. Step S33: Post-response processing Standardize the format: Organize the answer into two clear parts: risks and mitigation measures, using hierarchical headings. Terminology verification: Confirm that terms such as "load rate," "insulation aging," and "load transfer" conform to standard expressions; Step S34: Result Return and Source Tracing The system returns a processed response to the user and implements a source tracing function in the interactive interface. When the user hovers the mouse over the "Accelerated Insulation Aging" risk item, the source tracing information is displayed: "Based on the 'Distribution Transformer Operation and Maintenance Regulations' v2.1"; when hovering over the "Load Transfer" measures, the system displays: "Based on Case DT-2024-078 in the 'Distribution Network Fault Handling Case Library'".

[0052] This invention provides a dynamic update system for a large-scale power transmission and distribution model based on an external knowledge base, comprising: The knowledge base construction module is used to acquire knowledge documents in the field of power transmission and distribution, and to parse, clean, standardize and segment the knowledge documents to generate document fragments; to vectorize each document fragment and generate vector embeddings; to store the vectorized fragments, the corresponding original text and metadata in the external knowledge base, and to build a vector index. The retrieval and matching module receives user queries, preprocesses the queries, and generates query vectors. Based on the vector index, it uses an approximate nearest neighbor search algorithm to retrieve knowledge fragments similar to the query vectors, sorts and filters them, and outputs the relevant knowledge fragments. The question-and-answer generation module combines user queries with relevant knowledge fragments to form prompts, which are then input into a pre-trained power transmission and distribution large language model to generate an enhanced answer. The generated answer is then post-processed and returned to the user. The dynamic update module is used to monitor the update status of document sources, automatically process new documents, generate new document fragments, and incrementally update the vector index of the external knowledge base, while recording version and timestamp information.

[0053] In a preferred embodiment, the knowledge base construction module includes: The document acquisition unit is used to acquire technical standards, operation manuals, and historical fault record knowledge documents from multiple data sources; The text parsing and processing unit is used to extract raw text data and perform cleaning, standardization, and block processing. The vectorization and storage unit is used to convert text fragments into high-dimensional vectors and store them in a vector database.

[0054] In a preferred embodiment, the retrieval and matching module includes: The query processing unit is used to perform word segmentation, entity recognition, and intent parsing on user queries, and generate query vectors. The semantic retrieval unit retrieves similar knowledge fragments from the external knowledge base based on the approximate nearest neighbor algorithm; The results optimization unit is used to sort, deduplicate, and filter redundancy in the search results.

[0055] In a preferred embodiment, the question-and-answer generation module includes: The prompt word construction unit is used to concatenate user queries with relevant knowledge fragments into structured prompt words; The large model interface unit is used to call the pre-trained power transmission and distribution large language model and obtain the generation results; The post-processing and tracing unit is used to standardize the format of the answers, verify the terminology, and mark the knowledge sources.

[0056] In a preferred embodiment, the dynamic update module includes: The monitoring unit is used to periodically scan document sources or receive newly submitted documents manually. The processing pipeline unit is used to perform text extraction, cleaning, chunking, and vectorization processing on new documents; The index update unit is used to incrementally update the newly generated vector fragments to the external knowledge base and maintain metadata and version information.

Claims

1. A method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base, characterized in that: Includes the following steps: S1: Obtain knowledge documents in the field of power transmission and distribution, and build an external knowledge base based on these documents; S2: Obtain the query question initiated by the user, and use semantic retrieval to match relevant knowledge fragments from the external knowledge base based on the query question; S3: Combine knowledge fragments with user query questions to form prompt words, input the prompt words into the power transmission and distribution big language model, and output the enhanced answer.

2. The method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base as described in claim 1, characterized in that, Step S1 specifically includes: S11. Obtain knowledge documents in the field of power transmission and distribution, including technical standards, operation manuals and historical fault records; S12. Use an automatic text parsing tool to extract raw text data from documents of different formats; S13. Clean and standardize the extracted raw text, including segmentation, sentence splitting, removal of special characters, correction of spelling errors, standardization of power transmission and distribution terminology, and stop word filtering. S14. Use the text segmentation method to divide the processed text content into multiple document fragments; S15. Vectorize each document fragment to generate a high-dimensional vector embedding. Integrate and store the vectorized fragments, the corresponding original text, and metadata in the external knowledge base. At the same time, use the approximate nearest neighbor algorithm to build an index for the vectorized fragments to support fast retrieval of vector similarity.

3. The method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base as described in claim 2, characterized in that, The aforementioned plug-in knowledge base supports dynamic incremental updates, specifically including: Establish a knowledge update monitoring mechanism to regularly scan designated document sources or receive manually submitted new documents; For newly added documents, a process of text extraction, cleaning, standardization, and slicing is performed to generate new document fragments. The new document fragments are vectorized and incrementally updated to the vector index of the external knowledge base, while the new metadata version and timestamp are recorded.

4. The method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base as described in claim 2, characterized in that, Step 2 specifically includes: S21. Preprocess the user query, including word segmentation, entity recognition, and intent parsing, to generate a query vector; S22. Based on the vector index pre-built in the external knowledge base in step S15, the approximate nearest neighbor search algorithm is used to quickly retrieve the set of candidate knowledge fragments most similar to the query vector and calculate their similarity score. S23. Sort the knowledge fragments according to their similarity scores, and select the top N fragments with the highest scores as the relevant knowledge fragments; S24. Perform deduplication and redundancy filtering on relevant knowledge fragments to ensure the diversity and relevance of search results.

5. The method for dynamic updating of a large-scale power transmission and distribution model based on an external knowledge base as described in claim 4, characterized in that, Step S3 specifically includes the following steps: S31. Combine the user's query question with the sorted fragments to form structured prompt words; S32. Input the prompt words into the pre-trained power transmission and distribution large language model, and output an enhanced answer based on the content of the external knowledge base; S33. Post-process the generated answers, including format standardization, technical terminology verification, and confidence level labeling; S34. Return the enhanced answer to the user and indicate the source of the knowledge fragment on which the answer is based in the interactive interface.

6. A dynamic update system for a large-scale power transmission and distribution model based on an external knowledge base, used to implement the method described in any one of claims 1 to 5, characterized in that, The system includes: The knowledge base construction module is used to acquire knowledge documents in the field of power transmission and distribution, and to parse, clean, standardize and segment the knowledge documents to generate document fragments; to vectorize each document fragment to generate vector embeddings; to store the vectorized fragments, the corresponding original text and metadata to the external knowledge base, and to build a vector index. The retrieval and matching module is used to receive user queries, preprocess the queries and generate query vectors; based on the vector index, it uses an approximate nearest neighbor search algorithm to retrieve knowledge fragments similar to the query vectors, sorts and filters them, and outputs the relevant knowledge fragments. The question-and-answer generation module combines user queries with relevant knowledge fragments to form prompts, which are then input into a pre-trained power transmission and distribution large language model to generate an enhanced answer. The generated answer is then post-processed and returned to the user. The dynamic update module is used to monitor the update status of document sources, automatically process new documents, generate new document fragments, and incrementally update the vector index of the external knowledge base, while recording version and timestamp information.

7. The system according to claim 6, characterized in that, The knowledge base construction module includes: The document acquisition unit is used to acquire technical standards, operation manuals, and historical fault record knowledge documents from multiple data sources; The text parsing and processing unit is used to extract raw text data and perform cleaning, standardization, and block processing. The vectorization and storage unit is used to convert text fragments into high-dimensional vectors and store them in a vector database.

8. The system according to claim 6, characterized in that, The retrieval and matching module includes: The query processing unit is used to perform word segmentation, entity recognition, and intent parsing on user queries, and generate query vectors. The semantic retrieval unit retrieves similar knowledge fragments from the external knowledge base based on the approximate nearest neighbor algorithm; The results optimization unit is used to sort, deduplicate, and filter redundancy in the search results.

9. The system according to claim 6, characterized in that, The question-and-answer generation module includes: The prompt word construction unit is used to concatenate user queries with relevant knowledge fragments into structured prompt words; The large model interface unit is used to call the pre-trained power transmission and distribution large language model and obtain the generation results; The post-processing and tracing unit is used to standardize the format of the answers, verify the terminology, and mark the knowledge sources.

10. The system according to claim 6, characterized in that, The dynamic update module includes: The monitoring unit is used to periodically scan document sources or receive newly submitted documents manually. The processing pipeline unit is used to perform text extraction, cleaning, chunking, and vectorization processing on new documents; The index update unit is used to incrementally update the newly generated vector fragments to the external knowledge base and maintain metadata and version information.