A search enhancement generation method and device based on a power service scenario

CN122086963BActive Publication Date: 2026-08-07BEIJING SHUYANG SMART TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING SHUYANG SMART TECH CO LTD
Filing Date
2026-01-06
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

[0006]本公开的实施例提供了一种基于电力业务场景的检索增强生成方法及装置,以至少解决现有技术中存在的现有检索增强生成技术的检索成本过高并且缺乏业务场景适配性的技术问题

Benefits of technology

[0011]本申请通过“场景识别→知识解析→精准检索→增强生成”的连贯流程,实现了从模糊的自然语言查询到精准、可信的专业响应的完整转换。具体而言,首先,本申请通过预先训练的深度学习业务场景分析模型,对接收的电力业务场景下的文本查询信息进行解析,并输出量化查询与各电力业务元素关联度的业务标签向量。从源头过滤无关领域知识库,避免无差别全域检索带来的算力浪费,从而显著降低检索成本。进而,对查询进行细粒度语义解析,确定其包含的具体知识点及其所属的知识类别。此过程将非结构化查询转化为结构化的知识需求单元,实现了对用户意图的深层理解。接着,依据知识类别定位至特定专业知识库,并利用业务标签向量动态调整在不同知识库或分区的检索优先级,最终以知识点为核心键进行语义匹配,获取高度相关的上下文信息。最后,采用检索增强生成方法进行响应合成。从而,本申请实现了检索范围的精准划定与业务场景的深度适配,有效降低了检索过程的算力消耗与时间成本,提升了检索结果与电力业务需求的匹配度。进而解决了现有技术中存在的现有检索增强生成技术的检索成本过高并且缺乏业务场景适配性的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122086963B_ABST
    Figure CN122086963B_ABST
Patent Text Reader

Abstract

The application discloses a search enhancement generation method and device based on a power business scenario. It belongs to the technical field of deep learning. The method includes receiving query information related to the power business scenario; using a pre-trained deep learning-based business scenario analysis model to determine a business label vector corresponding to the query information according to the query information; determining a knowledge point contained in the query information and a knowledge category corresponding to the knowledge point; searching for context information corresponding to the knowledge point in a knowledge base corresponding to the knowledge category according to the business label vector; and returning a query result related to the query information based on the query information and the context information through a search enhancement generation method. Thus, the search range is accurately determined and the business scenario is deeply adapted, effectively reducing the computing power consumption and time cost of the search process and improving the matching degree of the search result and the power business demand.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of deep learning technology, and in particular to a retrieval enhancement generation method and apparatus based on power business scenarios. Background Technology

[0002] With the rapid development of artificial intelligence technology, intelligent dialogue systems based on large language models have been deeply integrated into numerous fields. Their functions have expanded from basic information retrieval to the planning and assisted execution of complex tasks, greatly improving the efficiency and convenience of human-computer interaction. In practical applications, users' demands for the responsiveness of intelligent dialogue systems are increasing. They not only require the accuracy and completeness of the output content but also demand that the response results match the user's cognitive style, knowledge background, and interests to achieve personalized interaction, thereby improving user experience, interaction efficiency, and user stickiness.

[0003] However, large language models inherently suffer from the "illusion" problem when generating responses, i.e., generating content that does not conform to objective facts. This problem is particularly prominent in complex query scenarios involving open domains, multiple layers, and dense information, severely limiting the reliability and application scope of intelligent dialogue systems. To address this issue, Retrieval-Augmented Generation (RAG) technology has emerged and become widely used. The core logic of RAG technology is that after receiving a user's query command, it first retrieves relevant factual knowledge from a pre-set knowledge base based on the query content. Then, it inputs the retrieved knowledge along with the user's query command into the large language model, guiding the model to generate a response based on real and valid knowledge. This effectively suppresses the "illusion" of the large language model and improves the accuracy of the response content.

[0004] However, existing RAG (Research Aggregator) solutions still have the following technical shortcomings in practical applications: First, the retrieval cost is too high. When processing user queries, existing RAG solutions typically determine the knowledge category based on the textual features of the query content, and then indiscriminately traverse various preset knowledge bases for retrieval and matching, without distinguishing the retrieval priority of knowledge bases. In application scenarios with multiple knowledge bases and large-scale data, this indiscriminate retrieval method generates a large amount of redundant retrieval calculations, which not only consumes a lot of computing resources, leading to increased retrieval latency and slower system response speed, but also significantly increases the operation and maintenance costs of knowledge bases, which is not conducive to the deployment and application of intelligent dialogue systems in large-scale and complex business scenarios. Second, there is a lack of adaptability to business scenarios. Existing RAG solutions only match the corresponding knowledge base based on the knowledge category of the user query content, completely ignoring the differentiated needs of different business scenarios for knowledge bases. In fact, in different business scenarios, the degree of dependence of intelligent dialogue systems on each knowledge base and the criteria for judging the importance of knowledge content vary significantly. Existing technologies do not take into account the differences in scenarios, resulting in a low degree of matching between the retrieved knowledge and the needs of the current business scenario. This makes it impossible to provide users with personalized responses that match their cognitive style and knowledge background, and thus makes it difficult to meet the actual needs of improving the user experience, interaction efficiency and user stickiness of intelligent dialogue systems.

[0005] To address the technical issues of high retrieval costs and lack of adaptability to business scenarios in existing retrieval enhancement generation technologies, no effective solution has yet been proposed. Summary of the Invention

[0006] The embodiments of this disclosure provide a retrieval enhancement generation method and apparatus based on power business scenarios, so as to at least solve the technical problems of high retrieval costs and lack of business scenario adaptability of existing retrieval enhancement generation technologies.

[0007] According to one aspect of the present disclosure, a retrieval enhancement generation method based on a power business scenario is provided, comprising: receiving query information related to a power business scenario, wherein the query information is in text form; using a pre-trained deep learning-based business scenario analysis model, determining a business tag vector corresponding to the query information based on the query information, wherein the elements of the business tag vector are used to indicate the degree of correlation between basic business elements of the power industry and the power business scenario; determining the knowledge points contained in the query information and determining the knowledge categories corresponding to the knowledge points; retrieving context information corresponding to the knowledge points in a knowledge base corresponding to the knowledge categories based on the business tag vector; and returning query results related to the query information based on the query information and the context information through the retrieval enhancement generation method.

[0008] According to another aspect of the present disclosure, a storage medium is also provided, the storage medium including a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0009] According to another aspect of the embodiments of this disclosure, a retrieval enhancement generation apparatus based on a power business scenario is also provided, comprising: a query information receiving module, configured to receive query information related to a power business scenario, wherein the query information is in text form; a business tag vector determination module, configured to determine a business tag vector corresponding to the query information based on the query information using a pre-trained deep learning-based business scenario analysis model, wherein the elements of the business tag vector are used to indicate the degree of correlation between basic business elements of the power industry and the power business scenario; a knowledge determination module, configured to determine the knowledge points contained in the query information and determine the knowledge categories corresponding to the knowledge points; a context information retrieval module, configured to retrieve context information corresponding to the knowledge points in a knowledge base corresponding to the knowledge categories based on the business tag vector; and a query result return module, configured to return query results related to the query information based on the query information and context information, using a retrieval enhancement generation method.

[0010] According to another aspect of the present disclosure, a retrieval enhancement generation apparatus based on a power business scenario is also provided, comprising: a processor; and a memory connected to the processor, configured to provide the processor with instructions for processing the following steps: receiving query information related to a power business scenario, wherein the query information is in text form; using a pre-trained deep learning-based business scenario analysis model, determining a business tag vector corresponding to the query information based on the query information, wherein the elements of the business tag vector are used to indicate the degree of correlation between basic business elements of the power industry and the power business scenario; determining the knowledge points contained in the query information and determining the knowledge categories corresponding to the knowledge points; retrieving context information corresponding to the knowledge points from a knowledge base corresponding to the knowledge categories based on the business tag vector; and returning query results related to the query information based on the query information and the context information through a retrieval enhancement generation method.

[0011] This application achieves a complete transformation from fuzzy natural language queries to accurate and reliable professional responses through a coherent process of "scene recognition → knowledge parsing → precise retrieval → enhanced generation." Specifically, firstly, this application uses a pre-trained deep learning business scenario analysis model to parse the received text query information in the power business scenario and outputs a business tag vector that quantifies the relevance of the query to various power business elements. This filters out irrelevant domain knowledge bases at the source, avoiding the waste of computational power caused by indiscriminate full-domain retrieval, thereby significantly reducing retrieval costs. Next, fine-grained semantic parsing is performed on the query to determine its specific knowledge points and their corresponding knowledge categories. This process transforms unstructured queries into structured knowledge requirement units, achieving a deep understanding of user intent. Then, based on knowledge categories, specific professional knowledge bases are located, and the retrieval priority in different knowledge bases or partitions is dynamically adjusted using business tag vectors. Finally, semantic matching is performed using knowledge points as the core key to obtain highly relevant contextual information. Finally, a retrieval-enhanced generation method is used for response synthesis. Thus, this application achieves precise definition of the search scope and deep adaptation to business scenarios, effectively reducing the computational power consumption and time cost of the search process, and improving the matching degree between search results and power business needs. It further solves the technical problems of existing search enhancement generation technologies having excessively high search costs and lacking adaptability to business scenarios. Attached Figure Description

[0012] The accompanying drawings, which are included to provide a further understanding of this disclosure and form part of this application, illustrate exemplary embodiments of this disclosure and are used to explain this disclosure, but do not constitute an undue limitation of this disclosure. In the drawings: Figure 1 This is a hardware structure block diagram of a computing device for implementing the method described in Embodiment 1 of this disclosure; Figure 2 This is a schematic diagram of a retrieval enhancement system based on a power business scenario, as described in Embodiment 1 of this disclosure. Figure 3 This is a flowchart illustrating the retrieval enhancement generation method based on power business scenarios as described in Embodiment 1 of this disclosure; Figure 4 This is a schematic diagram of the query analysis module of the retrieval enhancement generation method based on the power business scenario as described in Embodiment 1 of this disclosure; Figure 5 This is a schematic diagram of a business scenario analysis model based on the retrieval enhancement generation method for power business scenarios as described in Embodiment 1 of this disclosure; Figure 6 This is a schematic diagram of knowledge point identification based on the retrieval enhancement generation method for power business scenarios as described in Embodiment 1 of this disclosure; Figure 7This is a schematic diagram illustrating the determination of knowledge categories based on the retrieval enhancement generation method for power business scenarios as described in Embodiment 1 of this disclosure; Figure 8 This is a schematic diagram of the retrieval module of the retrieval enhancement generation method based on the power business scenario as described in Embodiment 1 of this disclosure; Figure 9 This is a schematic diagram of a retrieval enhancement generation device based on a power business scenario as described in Embodiment 2 of this disclosure; and Figure 10 This is a schematic diagram of a retrieval enhancement generation device based on a power business scenario as described in Embodiment 3 of this disclosure. Detailed Implementation

[0013] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this disclosure.

[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0015] Example 1 According to this embodiment, a method for enhancing retrieval based on power business scenarios is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0016] The method embodiments provided in this example can be executed on mobile terminals, computer terminals, servers, or similar computing devices. Figure 1A hardware block diagram of a computing device for implementing a retrieval enhancement generation method based on power business scenarios is shown. Figure 1 As shown, a computing device may include one or more processors (processors may include, but are not limited to, microprocessors such as MCUs or programmable logic devices such as FPGAs), a memory for storing data, a transmission device for communication functions, and an input / output interface. The memory, transmission device, and input / output interface are connected to the processor via a bus. In addition, it may also include a display, keyboard, and cursor control device connected to the input / output interface. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, a computing device may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0017] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element in a computing device. As involved in the embodiments of this disclosure, the data processing circuits serve as processor control (e.g., selection of a variable resistor termination path connected to an interface).

[0018] The memory can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the retrieval enhancement generation method based on the power business scenario in this embodiment of the present disclosure. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned application's retrieval enhancement generation method based on the power business scenario. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computing device via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0019] The transmission device is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the computing device's communication provider. In one example, the transmission device includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device may be a Radio Frequency (RF) module used for wireless communication with the Internet.

[0020] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows users to interact with the user interface of the computing device.

[0021] It should be noted here that, in some optional embodiments, the above... Figure 1 The computing device shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computing devices.

[0022] Figure 2 This is a schematic diagram of the retrieval enhancement system based on the power business scenario described in this embodiment. (Refer to...) Figure 2 As shown, the system includes: a terminal device, an intelligent agent system, and a knowledge base system. The terminal device receives text query information related to power business scenarios input by the user; the intelligent agent system receives the query information transmitted by the terminal device and performs a full-process processing operation of retrieval enhancement generation based on power business scenarios; the knowledge base system stores professional knowledge data across the entire power industry business chain, providing data support for the intelligent agent system's retrieval operations.

[0023] Furthermore, such as Figure 2 As shown, the intelligent agent system includes an interface module, a query analysis module, a retrieval module, an enhancement module, and a generation module. The interface module receives query information transmitted from the terminal device; the query analysis module performs deep parsing processing on the query information; the retrieval module performs precise retrieval operations based on the query analysis results; the enhancement module constructs input prompts for the Large Language Model (LLM); and the generation module drives the LLM to generate and output the final query results.

[0024] Under the aforementioned operating environment, according to the first aspect of this embodiment, a retrieval enhancement generation method based on a power business scenario is provided. This method consists of... Figure 2 The intelligent agent system and knowledge base system shown are implemented. Figure 3 A flowchart illustrating the method is shown below. (Refer to...) Figure 3 As shown, the method includes: S302: Receive query information related to power business scenarios, wherein the query information is in text format; S304: Using a pre-trained deep learning-based business scenario analysis model, determine the business label vector corresponding to the query information based on the query information. The elements of the business label vector are used to indicate the degree of correlation between the basic business elements of the power industry and the power business scenario. S306: Determine the knowledge points contained in the query information and determine the knowledge categories corresponding to the knowledge points; S308: Retrieve contextual information corresponding to knowledge points from the knowledge base corresponding to the knowledge category based on the business tag vector; and S310: Based on query information and context information, return query results related to the query information through a retrieval enhancement generation method.

[0025] Specifically, in combination Figure 2 As shown, the interface module of the intelligent agent system first receives query information from the terminal device. This query information specifically refers to core business scenarios involved in the entire power industry chain of "source, grid, load, and storage" and its collaborative management, covering key aspects such as power generation, transmission, distribution, consumption, operation and maintenance, and marketing. Specific business scenarios include, but are not limited to, the following types: Power grid operation and maintenance scenarios: such as "troubleshooting the spontaneous explosion of insulators on 110kV transmission lines" and "handling abnormal oil temperature of main transformers in substations".

[0026] New energy consumption scenarios: such as "power prediction methods for distributed photovoltaic grid connection" and "the impact of wind power output fluctuations on distribution networks".

[0027] Electricity service scenarios: such as "peak-valley electricity price calculation rules for industrial users" and "application process for high-voltage electricity customers".

[0028] Fault reporting scenarios: such as "locating the cause of a large-scale power outage in a residential area" and "response time limit for power emergency repairs".

[0029] Equipment management scenarios: such as "insulation testing standards for high-voltage switchgear" and "communication protocol configuration for smart meters".

[0030] It should be noted that such query information is typically input in natural language text format (corresponding to step S302), originating from channels such as the power intelligent customer service system or the input box of the operation and maintenance APP, conforming to the actual interaction habits of power industry users such as operation and maintenance personnel, ordinary electricity customers, and enterprise electricians. Its textual expression can be categorized as follows: Question-based queries, such as "How to prevent power grid line tripping during thunderstorms?" and "What materials are needed for grid connection of distributed photovoltaic systems?"

[0031] Command-based queries: such as "Query the 2025 industrial electricity price policy for XX region" or "Generate a 10kV distribution network fault handling process document".

[0032] Declarative queries: such as "The calculation basis for the power regulation fee in the company's electricity bill is unclear" or "Oil leakage occurs in the bushing of the substation".

[0033] In this way, the query text of each expression contains clear business scenario requirements (for example, "oil leakage phenomenon" points to the equipment operation and maintenance scenario), thus making up for the shortcomings of the traditional method that "only relies on keyword matching and ignores the semantics of the scenario".

[0034] Furthermore, to achieve accurate semantic understanding of unstructured query information, the intelligent agent system first invokes its query analysis module to perform deep parsing of the query information, such as... Figure 4 As shown, the query analysis module includes a business scenario analysis unit and a knowledge point analysis unit. The business scenario analysis unit calls a pre-trained deep learning-based business scenario analysis model to perform deep semantic analysis and feature extraction on the input text, outputting a structured business tag vector (corresponding to step S304). The values ​​of each element in this business tag vector quantitatively represent the degree of correlation between the basic business elements of the power industry and the business scenario to which the current query belongs.

[0035] Specifically, each element of this business tag vector corresponds to a relevance score between different knowledge categories and the business scenario to which the current query information belongs. Furthermore, to achieve precise quantification of the relevance, the values ​​of each element in this business tag vector are quantized as continuous values ​​between 0 and 1, and its vector form can be represented as R=[r1, r2, r3, ..., r...]. m ] T (where r1~r m The values ​​range from 0 to 1. Each dimension in the vector directly corresponds to a basic business element. The closer the value is to 1, the higher the correlation between the current query content and the basic business element represented by that dimension; conversely, the closer the value is to 1, the lower the correlation. Basic business elements include: power transmission, equipment operation and maintenance, substation, and fault handling. Those skilled in the art can define each basic business element according to actual circumstances. For example, for the query "substation bushing oil leakage treatment," the correlation score between the "equipment operation and maintenance" and "fault handling" dimensions in the vector will approach 1, while the score for the "user electricity fee" dimension will approach 0.

[0036] Then, the knowledge point analysis unit of the query analysis module performs knowledge point analysis on the query information with a clearly defined business scenario. That is, it accurately identifies and extracts the specific, discrete professional concepts or problem focuses (knowledge points) contained in the query information from unstructured text. For example, in the scenario of "distribution fault investigation", for the query information "fault investigation process after 10kV distribution network line tripping", the knowledge point analysis unit can extract the knowledge points including "10kV distribution network line" and "tripping fault investigation".

[0037] Next, the knowledge point analysis unit will further categorize each knowledge point into its corresponding knowledge category (corresponding to step S306). The knowledge category is a higher-level logical division of the knowledge point's position and attributes within the professional system, defining its organizational framework and cognitive dimensions. Common knowledge categories include, but are not limited to: "Equipment Principles and Structures," "Technical Standards and Specifications," "Operating Procedures and Processes," "Fault Phenomena and Diagnosis," "Policies, Regulations, and Systems," and "Safety Precautions." Continuing the previous example, the knowledge point "10kV distribution network line" belongs to the "Power Distribution" category, and the knowledge point "Troubleshooting Trip" belongs to the "Fault Handling" category.

[0038] Furthermore, after clarifying the knowledge points and knowledge categories, the retrieval module of the intelligent agent system retrieves the context information corresponding to the knowledge points in the knowledge base corresponding to the knowledge categories based on the business tag vectors (corresponding to step S308). For example, based on the business tag vectors, it retrieves the knowledge corresponding to the knowledge point "10kV distribution network line" in the "power distribution" knowledge base as context information, and retrieves the knowledge corresponding to the knowledge point "tripping fault troubleshooting" in the "fault handling" knowledge base as context information.

[0039] The knowledge base corresponding to each knowledge category is a pre-defined cluster of professional knowledge bases for the power industry. Each knowledge category corresponds to a unique dedicated knowledge base, which stores professional knowledge data for that category. The granularity of the knowledge base is adapted to the practical needs of power industry operations. Contextual information refers to the complete set of technical content directly related to the knowledge point, including but not limited to the technical principles, implementation steps, operating specifications, related parameters, business processes, and other relevant information that supports user needs. Then, based on the determined knowledge category, the search scope is locked, and the search is initiated only for the dedicated knowledge base corresponding to that knowledge category, rather than traversing all pre-defined knowledge bases. This effectively avoids the waste of computing resources and the extension of search latency caused by indiscriminate searching in existing technologies, thereby solving the technical problem of excessively high search costs. At the same time, combined with the relevance score of the business tag vector, knowledge content matching the high relevance scenario is prioritized in the locked knowledge category's dedicated knowledge base, ensuring that the retrieved contextual information is highly consistent with the current query's business scenario, thus solving the problem of lack of business scenario adaptability in existing technologies.

[0040] Finally, the enhancement module of the intelligent agent system deeply integrates the user's original query with the professional knowledge (contextual information) obtained from precise retrieval, and the generation module of the intelligent agent system generates an accurate and professional answer (corresponding to step S310). Specifically, the enhancement module of the intelligent agent system performs semantic-level fusion processing on the above query information and contextual information to form an input sequence containing user needs and factual basis, and then inputs this input sequence into a pre-deployed large language model. This fusion processing is not a simple text splicing, but a correlational integration based on the business logic of the power industry. Specifically, it prioritizes the content in the contextual information that has the highest matching degree with the core needs of the query information, while removing redundant content in the contextual information that is irrelevant to the current query needs, ensuring the relevance and effectiveness of the input sequence. Furthermore, after receiving the fused input sequence, the generation module of the large language model responds and generates based on the factual content in the contextual information, rather than creating something out of thin air without factual basis. Its generation process strictly follows the professional terminology standards and business process requirements of the power industry, ensuring the professionalism and rigor of the output content.

[0041] As described in the background section, existing RAG (Research Aggregator) solutions still suffer from the following technical shortcomings in practical applications: First, the retrieval cost is too high. When processing user queries, existing RAG solutions typically determine the knowledge category based on the textual features of the query content and then indiscriminately traverse various preset knowledge bases for retrieval and matching, without distinguishing the retrieval priority of knowledge bases. In application scenarios with multiple knowledge bases and large-scale data, this indiscriminate retrieval method generates a large amount of redundant retrieval calculations, which not only consumes a lot of computing resources, leading to increased retrieval latency and slower system response speed, but also significantly increases the operation and maintenance costs of knowledge bases, hindering the deployment and application of intelligent dialogue systems in large-scale and complex business scenarios. Second, there is a lack of adaptability to business scenarios. Existing RAG solutions only match the corresponding knowledge base based on the knowledge category of the user query content, completely ignoring the differentiated needs of different business scenarios for knowledge bases. In fact, in different business scenarios, the degree of dependence of intelligent dialogue systems on various knowledge bases and the criteria for judging the importance of knowledge content vary significantly. Existing technologies do not take into account the differences in scenarios, resulting in a low degree of matching between the retrieved knowledge and the needs of the current business scenario. This makes it impossible to provide users with personalized responses that match their cognitive style and knowledge background, and thus makes it difficult to meet the actual needs of improving the user experience, interaction efficiency and user stickiness of intelligent dialogue systems.

[0042] In view of this, this application achieves a complete transformation from fuzzy natural language queries to accurate and reliable professional responses through a coherent process of "scene recognition → knowledge parsing → precise retrieval → enhanced generation". Specifically, firstly, this application uses a pre-trained deep learning business scenario analysis model to parse the received text query information in the power business scenario and outputs a business tag vector that quantifies the relevance of the query to various power business elements. This filters out irrelevant domain knowledge bases from the source, avoiding the waste of computing power caused by indiscriminate full-domain retrieval, thereby significantly reducing retrieval costs. Next, fine-grained semantic parsing is performed on the query to determine its specific knowledge points and their corresponding knowledge categories. This process transforms unstructured queries into structured knowledge requirement units, achieving a deep understanding of user intent. Then, based on the knowledge category, specific professional knowledge bases are located, and the retrieval priority in different knowledge bases or partitions is dynamically adjusted using business tag vectors. Finally, semantic matching is performed using knowledge points as the core key to obtain highly relevant contextual information. Finally, a retrieval-enhanced generation method is used for response synthesis. Thus, this application achieves precise definition of the search scope and deep adaptation to business scenarios, effectively reducing the computational power consumption and time cost of the search process, and improving the matching degree between search results and power business needs. It further solves the technical problems of existing search enhancement generation technologies having excessively high search costs and lacking adaptability to business scenarios.

[0043] Optionally, the business scenario analysis model is trained by: collecting query information samples and constructing a query information sample set; manually labeling the query information samples to determine the power business scenario and business label vector corresponding to each query information sample; and training the initialized business scenario analysis model using the query information samples and the corresponding business label vector.

[0044] Specifically, to enable the business scenario analysis model to accurately identify and quantify the attributes of electricity query business, a high-quality training dataset is first required. Specifically, the samples of query information collected by the business scenario analysis unit are all derived from real-world interaction data within the electricity business scenario, covering the entire electricity business chain, including power generation, transmission, distribution, consumption, equipment operation and maintenance, fault repair, electricity pricing policies, and new energy grid connection. This includes various types of text data such as user consultation work orders from the electricity customer service system, fault diagnosis records from maintenance personnel, business application texts from electricity customers, and technical consultation scripts for power equipment, forming a broadly representative set of query information samples. The comprehensiveness and diversity of this set directly determine the model's generalization ability in future applications.

[0045] Subsequently, the query information samples W were manually labeled to determine the power business scenario type Y and business label vector R corresponding to each query information sample, as shown in Table 1: Table 1 The annotation work must be completed by technical personnel with professional knowledge and business experience in the power industry. The annotation is based on pre-established power business scenario classification standards and business label vector definition rules. Specifically, the technical personnel first need to determine the specific power business scenario to which the sample belongs based on the text content. Secondly, based on a pre-set list of basic power business elements, they evaluate the correlation between the sample and each basic business element, assigning a correlation score to each basic business element according to a numerical range of 0 to 1. The combination of these scores forms a business label vector uniquely corresponding to the sample. After annotation is completed, the annotation results must undergo consistency verification and quality review to remove incorrectly annotated or unclear sample data, ensuring the accuracy and standardization of the annotated data and providing high-quality supervisory data for model training.

[0046] Finally, the business scenario analysis unit uses the labeled samples and corresponding business label vectors to train the initialized business scenario analysis model. For example... Figure 5As shown, during training, the labeled query information samples W are first input into the word embedding layer of the initialized business scenario analysis model, converting the text-based samples into dense vectors that can be processed by a computer. Then, feature vectors of the samples are extracted through semantic encoding (using BERT encoding). Next, the feature vectors are enhanced and their dimensions transformed by a feedforward neural network before being input into a fully connected layer to complete the prediction output. The number of units in the fully connected layer is set to match the dimension of the business label vector (both are m), ensuring that the dimension of the final output predicted business label vector R completely matches the dimension of the manually labeled real business label vector, and the output value of each unit in the fully connected layer is constrained to the range of 0 to 1, conforming to the quantization standard of the business label vector.

[0047] The loss between the predicted label vector and the manually labeled label vector is then calculated, and the model parameters are optimized using backpropagation based on the gradient descent algorithm. This training process is repeated until the model's loss converges to a preset threshold and the prediction accuracy on the validation set reaches the expected standard. After training, the model performance is comprehensively evaluated using a test set. Issues identified during the evaluation are iteratively optimized to ultimately obtain a business scenario analysis model with stable power business scenario identification and correlation quantification capabilities.

[0048] Through the above methods, this business scenario analysis model can reliably identify and analyze query scenarios in practical applications, laying a solid foundation for subsequent accurate retrieval.

[0049] Optionally, the operation of determining the knowledge points contained in the query information and determining the knowledge categories corresponding to the knowledge points includes: using a pre-trained entity-relationship joint extraction model to determine the entities in the query information and the relationships between entities; determining the knowledge points based on the entities and relationships; and using a pre-trained deep learning-based knowledge analysis model to determine the knowledge categories corresponding to the knowledge points.

[0050] Specifically, such as Figure 6 and Figure 7 As shown, the knowledge point analysis unit uses a joint extraction model to perform named entity recognition and relation extraction on the query information W, thereby determining the knowledge points K (K=[K1,K2,...K1]) contained in the query information W. k ] T And identify the knowledge type Y corresponding to each knowledge point.

[0051] Specifically, the knowledge point analysis unit first uses a pre-trained entity-relationship joint extraction model to perform an initial deep analysis of the query information, identifying the entities and the relationships between them. The entity-relationship joint extraction model is a deep learning model customized and pre-trained for the business characteristics of the power industry. Its training dataset comes from real text data across the entire business chain of the power industry. The model architecture adopts a joint extraction paradigm, enabling simultaneous entity recognition and relationship determination, effectively avoiding the error propagation problem in a sequential model. For example... Figure 6 As shown, the received text query information W from the power business scenario is input into the model. The model extracts the feature vector of the query text through semantic encoding, and then, based on the power business knowledge learned during training, accurately identifies the power-related entities and their relationships in the query information. These power-related entities include, but are not limited to, power equipment entities (such as 10kV distribution lines, main transformers, and smart meters), business object entities (such as peak-valley electricity pricing, distributed photovoltaic grid connection, and fault repair procedures), and parameter indicator entities (such as transformer oil temperature thresholds and distribution line current carrying capacity). The relationships between entities include, but are not limited to, typical power business logical relationships such as "equipment-fault type," "business-processing procedure," and "parameter-calculation rule."

[0052] Next, the identified entities and relationships are integrated to remove redundant modifiers from the query information, retaining only the core business logic. This yields the knowledge points K1, K2, ... K directly corresponding to the user's query requirements. k For example, if the query is "troubleshooting process after a 10kV distribution line trips", the entities identified by the entity relationship joint extraction model are "10kV", "distribution line", "trips", and "troubleshooting". The relationship between entities "10kV" and "distribution line" is a "line type" relationship; the relationship between entities "trips" and "troubleshooting" is a "fault handling" relationship. Therefore, the integrated and refined knowledge points include "10kV distribution line" and "trip fault troubleshooting".

[0053] Finally, a pre-trained deep learning-based knowledge analysis model is invoked to classify the aforementioned knowledge points at the conceptual level. This knowledge analysis model is a deep learning classification model customized and trained for the power industry's knowledge classification system. Its training dataset consists of a list of pre-defined knowledge categories in the power industry and corresponding labeled knowledge point samples. These pre-defined knowledge categories are based on the entire business chain of "source, grid, load, and storage," specifically including generation, transmission, distribution, consumption, equipment operation and maintenance, fault handling, electricity pricing policies, and new energy grid connection, etc., with each category having clear business boundaries and classification standards. For example... Figure 7 As shown, in actual execution, each determined knowledge point K will be... i(i=1~k) are sequentially input into the knowledge analysis model. The model extracts semantic features from the knowledge points, matches them with the feature vectors of preset knowledge categories, and outputs the knowledge category with the highest matching degree, thus completing the precise mapping from knowledge points to knowledge categories. For example, after matching the knowledge point "10kV distribution network line," the corresponding knowledge category is determined to be "power distribution," and after matching the knowledge point "tripping fault troubleshooting," the corresponding knowledge category is determined to be "fault handling." In this way, the user's core needs can be accurately anchored to specific knowledge categories, completing the precise conversion from unstructured natural language to structured and typified knowledge requirement elements, and building a clear semantic map and navigation path for subsequent precise knowledge retrieval for business scenarios.

[0054] Optionally, the operation of retrieving context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category based on a business tag vector includes: determining a first feature vector corresponding to a knowledge point; concatenating the first feature vector with a business tag vector to determine a corresponding first concatenation vector; and using the first concatenation vector to retrieve context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category.

[0055] Specifically, the retrieval module constructs a composite retrieval command that integrates business scenario semantics and specific knowledge point semantics based on the business tag vectors, knowledge points, and corresponding knowledge categories from the query analysis module. For more details, refer to... Figure 8 As shown, the retrieval module includes a knowledge point feature extraction unit, a feature concatenation unit, and a retrieval unit. The knowledge point feature extraction unit is used to extract the first feature vector corresponding to the knowledge point, for example: K1: 10kV distribution network line; K2: tripping fault troubleshooting.

[0056] Then, continuing from the previous example, based on the preset semantic encoding rules for the power sector, the extracted first feature vector is encoded to obtain standardized feature codes (X1 corresponds to K1) and X2 (corresponding to K2) for each knowledge point, ensuring the uniformity of the feature vector format and semantic accuracy. Next, the feature concatenation unit is used to concatenate the feature codes X1 and X2 with the business tag vector output by the query analysis module, respectively, to generate composite concatenated vectors Z1 and Z2 with dual semantic constraints. Specifically, the concatenation form is Z1=[X1, R1]. T And Z2=[X2, R2] T The retrieval unit is used to perform searches in the corresponding knowledge bases based on the first concatenated vector. For example, Z1 is searched in the knowledge base corresponding to "power distribution", Z2 is searched in the knowledge base corresponding to "fault handling", and so on.

[0057] It should be noted that the first concatenated vector contains both specific semantic information of the knowledge points and quantitative information on the relevance of the business scenario, which can ensure that the subsequent retrieval process simultaneously meets the dual requirements of knowledge point matching and scenario adaptation.

[0058] By using the above methods, abstract business rules and priorities are transformed into computable search constraints, achieving an upgrade from semantic matching to matching under both semantic and business constraints. At the same time, limiting search partitions avoids redundant calculations of full database traversal, balancing search accuracy and efficiency.

[0059] Optionally, the operation of retrieving context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category using the first concatenation vector includes: calculating the semantic similarity between the first concatenation vector and the second concatenation vector of candidate knowledge in the knowledge base, wherein the second concatenation vector is formed by concatenating the second feature vector and the business tag vector corresponding to the candidate knowledge; and sorting the candidate knowledge according to the semantic similarity score, and selecting a preset number of candidate knowledge as context information.

[0060] Specifically, the knowledge in the knowledge base is stored in the form of Table 2 (denoted by L): Table 2 Therefore, the retrieval unit matches the spliced ​​vector Z1 corresponding to the knowledge point "10kV distribution network line" with the spliced ​​vectors of various knowledge in the "distribution" knowledge base to calculate semantic similarity; and matches the spliced ​​vector Z2 corresponding to the knowledge point "tripping fault investigation" with the spliced ​​vectors of various knowledge in the "fault handling" knowledge base to calculate semantic similarity.

[0061] When calculating semantic similarity, the cosine similarity algorithm is preferred. It quantifies the degree of matching between the first concatenated vector of the knowledge point in the query information and the second concatenated vector of the candidate knowledge in the knowledge base by calculating the cosine value of the angle between the two. The closer the cosine value is to 1, the higher the semantic and scene fit between the two.

[0062] The final step in completing the retrieval operation is to rank candidate knowledge based on semantic similarity scores and select a predetermined number N of candidate knowledge as context information. After obtaining the similarity scores between all candidate knowledge and the query vector, the system ranks the candidate knowledge in descending order of scores, and then selects the top N knowledge as the final context information based on actual business needs. The predetermined number N can be flexibly adjusted according to the complexity of the power business scenario. For example, in scenarios with extremely high requirements for knowledge accuracy, such as fault repair, the top 5 knowledge can be selected; in information-intensive scenarios such as electricity price policy consultation, the top 10 knowledge can be selected. By ranking and selecting, it is ensured that the final obtained context information is the core content with the highest matching degree with the current knowledge point and business scenario, providing high-quality factual support for subsequent retrieval enhancement generation.

[0063] By using the above methods, we can ensure that the search results are highly compatible with business scenarios and knowledge points, and significantly reduce computing power consumption by limiting the search scope.

[0064] Optionally, the operation of returning query results related to the query information through a retrieval enhancement generation method based on query information and context information includes: constructing prompt information for input into a large language model based on the query information and context information; and inputting the prompt information into the large language model and returning query results related to the query information from the large language model.

[0065] Specifically, the prompts constructed based on query and contextual information for input into the large language model are not simply mechanically concatenated with the query text and retrieved contextual information. Instead, they are integrated and structured according to the business logic and problem-solving paradigms of the power industry. When these prompts are input into the large language model, the model, based on the instruction constraints within the prompts and solely on the factual content provided by the contextual information, accurately parses the user's query requirements and generates corresponding query results. This large language model is preferably a version fine-tuned and optimized using a professional corpus of the power industry, enabling it to possess a deep understanding of power industry terminology and business logic, and better adapt to the response generation needs of power business scenarios.

[0066] The above methods effectively solve the problem of fabricated facts that may exist in traditional generative models, while ultimately reflecting the value of the early-stage contextual retrieval in reliable response content that can directly serve users.

[0067] Optionally, the operation of constructing prompt information for input to the large language model based on query information and context information includes: constructing structured prompt information, wherein the prompt information includes at least: a user query part, used to provide the original text of the query information; a reference knowledge part, used to select content semantically related to the query information from the context information, and output it after organizing it according to the power business logic; and a system instruction part, used to control the large language model to generate a response based on the context information, and the response must comply with the professional standards of the power industry and prohibit the generation of content beyond the scope of the context information.

[0068] Specifically, a structured prompt message is constructed, which adopts a three-layer structured architecture of "requirement description + knowledge support + instruction constraints": The first layer is the requirement description (user query section), which fully preserves the core intent of the user's original query information, ensuring that the model accurately understands the user's needs. The second layer is the knowledge support (reference knowledge section), which selects the core content from the context information that best matches the query requirements and presents it, eliminating redundant information irrelevant to the user's needs. Simultaneously, it organizes and sorts the knowledge content according to the logical order of power business. For example, if the user's query is "fault troubleshooting process after a 10kV distribution network line trip," and the retrieved context information contains complete process knowledge including "fault location, cause analysis, handling steps, and safety regulations," the constructed prompt information will first clearly state the instruction "Based on the following distribution network fault troubleshooting knowledge, generate detailed step-by-step guidance, and do not add any content not mentioned," then fully present the user's query requirements, and finally list the core fault troubleshooting content from the context information in logical order, forming a clear and well-defined input prompt. The third layer is the instruction constraint (system instruction section), which explicitly requires the large language model to generate a response based on the provided context information, prohibits the creation of content not included, and requires the output results to conform to the professional terminology standards and business operation requirements of the power industry.

[0069] By using the above methods, the high-quality information obtained from the initial scenario-based retrieval is input into the large language model in an efficient and controllable manner, guiding and constraining its generation process. Ultimately, this systematically ensures the quality and reliability of the output results of the Retrieval Enhanced Generation (RAG) process in rigorous professional fields such as power.

[0070] In addition, refer to Figure 1 As shown, according to a second aspect of this embodiment, a storage medium is provided. The storage medium includes a stored program, wherein, when the program is executed, a processor performs any of the methods described above.

[0071] Thus, this application achieves precise definition of the search scope and deep adaptation to business scenarios, effectively reducing the computational power consumption and time cost of the search process, and improving the matching degree between search results and power business needs. It further solves the technical problems of existing search enhancement generation technologies having excessively high search costs and lacking adaptability to business scenarios.

[0072] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the present invention is not limited to the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to the present invention.

[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0074] Example 2 Figure 9 This embodiment illustrates a retrieval enhancement generation apparatus based on a power business scenario, which corresponds to the method described in Embodiment 1. (Reference) Figure 9 As shown, the device includes: a query information receiving module 910, used to receive query information related to power business scenarios, wherein the query information is in text form; a business tag vector determination module 920, used to determine the business tag vector corresponding to the query information based on the query information using a pre-trained deep learning-based business scenario analysis model, wherein the elements of the business tag vector are used to indicate the degree of correlation between basic business elements of the power industry and power business scenarios; a knowledge determination module 930, used to determine the knowledge points contained in the query information and determine the knowledge categories corresponding to the knowledge points; a context information retrieval module 940, used to retrieve the context information corresponding to the knowledge points in the knowledge base corresponding to the knowledge categories based on the business tag vector; and a query result return module 950, used to return query results related to the query information based on the query information and context information through a retrieval enhancement generation method.

[0075] Optionally, the business scenario analysis model is trained by: collecting query information samples and constructing a query information sample set; manually labeling the query information samples to determine the power business scenario and business label vector corresponding to each query information sample; and training the initialized business scenario analysis model using the query information samples and the corresponding business label vector.

[0076] Optionally, the operation of determining the knowledge points contained in the query information and determining the knowledge categories corresponding to the knowledge points includes: using a pre-trained entity-relationship joint extraction model to determine the entities in the query information and the relationships between entities; determining the knowledge points based on the entities and relationships; and using a pre-trained deep learning-based knowledge analysis model to determine the knowledge categories corresponding to the knowledge points.

[0077] Optionally, the operation of retrieving context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category based on a business tag vector includes: determining a first feature vector corresponding to a knowledge point; concatenating the first feature vector with a business tag vector to determine a corresponding first concatenation vector; and using the first concatenation vector to retrieve context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category.

[0078] Optionally, the semantic similarity between the first concatenated vector and the second concatenated vector of candidate knowledge in the knowledge base is calculated, wherein the second concatenated vector is formed by concatenating the second feature vector corresponding to the candidate knowledge and the business tag vector; and the candidate knowledge is sorted according to the semantic similarity score, and a preset number of candidate knowledge is selected as context information.

[0079] Optionally, the operation of returning query results related to the query information through a retrieval enhancement generation method based on query information and context information includes: constructing prompt information for input into a large language model based on the query information and context information; and inputting the prompt information into the large language model and returning query results related to the query information from the large language model.

[0080] Optionally, the operation of constructing prompt information for input to the large language model based on query information and context information includes: constructing structured prompt information, wherein the prompt information includes at least: a user query part, used to provide the original text of the query information; a reference knowledge part, used to select content semantically related to the query information from the context information, and output it after organizing it according to the power business logic; and a system instruction part, used to control the large language model to generate a response based on the context information, and the response must comply with the professional standards of the power industry and prohibit the generation of content beyond the scope of the context information.

[0081] Therefore, according to this embodiment, this application achieves precise definition of the search scope and deep adaptation to business scenarios, effectively reducing the computational power consumption and time cost of the search process, and improving the matching degree between search results and power business needs. This solves the technical problems of excessively high search costs and lack of business scenario adaptability in existing search enhancement generation technologies.

[0082] Example 3 Figure 10 This embodiment illustrates a retrieval enhancement generation apparatus based on a power business scenario, which corresponds to the method described in Embodiment 1. (Reference) Figure 10 As shown, the device includes: a processor 1010; and a memory 1020 connected to the processor 1010, for providing the processor 1010 with instructions to perform the following processing steps: receiving query information related to a power business scenario, wherein the query information is in text form; using a pre-trained deep learning-based business scenario analysis model, determining a business tag vector corresponding to the query information based on the query information, wherein the elements of the business tag vector are used to indicate the degree of correlation between basic business elements of the power industry and the power business scenario; determining the knowledge points contained in the query information and determining the knowledge categories corresponding to the knowledge points; retrieving context information corresponding to the knowledge points from a knowledge base corresponding to the knowledge categories based on the business tag vector; and returning query results related to the query information based on the query information and context information through a retrieval enhancement generation method.

[0083] Optionally, the business scenario analysis model is trained by: collecting query information samples and constructing a query information sample set; manually labeling the query information samples to determine the power business scenario and business label vector corresponding to each query information sample; and training the initialized business scenario analysis model using the query information samples and the corresponding business label vector.

[0084] Optionally, the operation of determining the knowledge points contained in the query information and determining the knowledge categories corresponding to the knowledge points includes: using a pre-trained entity-relationship joint extraction model to determine the entities in the query information and the relationships between entities; determining the knowledge points based on the entities and relationships; and using a pre-trained deep learning-based knowledge analysis model to determine the knowledge categories corresponding to the knowledge points.

[0085] Optionally, the operation of retrieving context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category based on a business tag vector includes: determining a first feature vector corresponding to a knowledge point; concatenating the first feature vector with a business tag vector to determine a corresponding first concatenation vector; and using the first concatenation vector to retrieve context information corresponding to a knowledge point from a knowledge base corresponding to a knowledge category.

[0086] Optionally, the semantic similarity between the first concatenated vector and the second concatenated vector of candidate knowledge in the knowledge base is calculated, wherein the second concatenated vector is formed by concatenating the second feature vector corresponding to the candidate knowledge and the business tag vector; and the candidate knowledge is sorted according to the semantic similarity score, and a preset number of candidate knowledge is selected as context information.

[0087] Optionally, the operation of returning query results related to the query information through a retrieval enhancement generation method based on query information and context information includes: constructing prompt information for input into a large language model based on the query information and context information; and inputting the prompt information into the large language model and returning query results related to the query information from the large language model.

[0088] Optionally, the operation of constructing prompt information for input to the large language model based on query information and context information includes: constructing structured prompt information, wherein the prompt information includes at least: a user query part, used to provide the original text of the query information; a reference knowledge part, used to select content semantically related to the query information from the context information, and output it after organizing it according to the power business logic; and a system instruction part, used to control the large language model to generate a response based on the context information, and the response must comply with the professional standards of the power industry and prohibit the generation of content beyond the scope of the context information.

[0089] Therefore, according to this embodiment, this application achieves precise definition of the search scope and deep adaptation to business scenarios, effectively reducing the computational power consumption and time cost of the search process, and improving the matching degree between search results and power business needs. This solves the technical problems of excessively high search costs and lack of business scenario adaptability in existing search enhancement generation technologies.

[0090] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0091] In the above embodiments of the present invention, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0092] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0093] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0094] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0095] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.

[0096] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A retrieval enhancement generation method based on power business scenarios, characterized in that, include: Receive query information related to power business scenarios, wherein the query information is in text format; Using a pre-trained deep learning-based business scenario analysis model, a business tag vector corresponding to the query information is determined based on the query information, wherein the elements of the business tag vector are used to indicate the degree of correlation between the basic business elements of the power industry and the power business scenario; Determine the knowledge points contained in the query information, and determine the knowledge category corresponding to the knowledge points; Based on the business tag vector, retrieve the context information corresponding to the knowledge point in the knowledge base corresponding to the knowledge category; as well as Based on the query information and the context information, a retrieval enhancement generation method is used to return query results related to the query information, wherein... The operation of retrieving context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category based on the business tag vector includes: Determine the first feature vector corresponding to the knowledge point; The first feature vector is concatenated with the business label vector to determine the corresponding first concatenation vector; and The first concatenated vector is used to retrieve context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category.

2. The method according to claim 1, characterized in that, The business scenario analysis model is trained through the following operations: Collect query information samples and construct a query information sample set; The query information samples are manually labeled to determine the power business scenarios and business tag vectors corresponding to each query information sample. as well as The initial business scenario analysis model is trained using the query information samples and the corresponding business tag vectors.

3. The method according to claim 1, characterized in that, The operation of determining the knowledge points contained in the query information and determining the knowledge category corresponding to the knowledge points includes: Using a pre-trained entity relationship joint extraction model, the entities in the query information and the relationships between them are determined; Based on the entities and relationships, the knowledge points are determined; and Using a pre-trained deep learning-based knowledge analysis model, the knowledge category corresponding to the knowledge point is determined.

4. The method according to claim 1, characterized in that, The operation of retrieving context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category using the first concatenated vector includes: Calculate the semantic similarity between the first concatenated vector and the second concatenated vector of candidate knowledge in the knowledge base, wherein the second concatenated vector is formed by concatenating the second feature vector corresponding to the candidate knowledge and the business tag vector; and Candidate knowledge is sorted according to the semantic similarity score, and a preset number of candidate knowledge is selected as the context information.

5. The method according to claim 1, characterized in that, Based on the query information and the context information, the operation of returning query results related to the query information through a retrieval enhancement generation method includes: Based on the query information and the context information, construct prompt information for input into the large language model; and The prompt information is input into the large language model, and query results related to the query information are returned from the large language model.

6. The method according to claim 5, characterized in that, The operation of constructing prompt information for input into a large language model based on the query information and the context information includes: Construct structured prompt information, wherein the prompt information includes at least: The user query section is used to provide the original text of the query information; The reference knowledge section is used to select content semantically related to the query information from the context information, organize it according to power business logic, and then output it. The system instruction section is used to control the large language model to generate a response based on the context information, and the response must comply with the professional standards of the power industry and is prohibited from generating content that exceeds the scope of the context information.

7. A storage medium, characterized in that, The storage medium includes a stored program, wherein, when the program is executed, the method described in any one of claims 1 to 6 is performed by a processor.

8. A retrieval enhancement generation device based on power business scenarios, characterized in that, include: The query information receiving module is used to receive query information related to power business scenarios, wherein the query information is in text form; The business tag vector determination module is used to determine the business tag vector corresponding to the query information based on the query information using a pre-trained deep learning-based business scenario analysis model, wherein the elements of the business tag vector are used to indicate the correlation between the basic business elements of the power industry and the power business scenario. The knowledge determination module is used to determine the knowledge points contained in the query information and to determine the knowledge category corresponding to the knowledge points; The context information retrieval module is used to retrieve context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category based on the business tag vector. as well as The query result return module is used to return query results related to the query information based on the query information and the context information, using a retrieval enhancement generation method. The operation of retrieving context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category based on the business tag vector includes: Determine the first feature vector corresponding to the knowledge point; The first feature vector is concatenated with the business label vector to determine the corresponding first concatenation vector; and The first concatenated vector is used to retrieve context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category.

9. A retrieval enhancement generation device based on power business scenarios, characterized in that, include: processor; as well as A memory, connected to the processor, for providing the processor with instructions to perform the following processing steps: Receive query information related to power business scenarios, wherein the query information is in text format; Using a pre-trained deep learning-based business scenario analysis model, a business tag vector corresponding to the query information is determined based on the query information, wherein the elements of the business tag vector are used to indicate the degree of correlation between the basic business elements of the power industry and the power business scenario; Determine the knowledge points contained in the query information, and determine the knowledge category corresponding to the knowledge points; Based on the business tag vector, retrieve the context information corresponding to the knowledge point in the knowledge base corresponding to the knowledge category; as well as Based on the query information and the context information, a retrieval enhancement generation method is used to return query results related to the query information, wherein... The operation of retrieving context information corresponding to the knowledge point from the knowledge base corresponding to the knowledge category based on the business tag vector includes: Determine the first feature vector corresponding to the knowledge point; The first feature vector is concatenated with the business tag vector to determine the corresponding first concatenation vector; and the first concatenation vector is used to retrieve the context information corresponding to the knowledge point in the knowledge base corresponding to the knowledge category.

Citation Information

Patent Citations

  • Method and system for optimizing man-machine conversation based on LLM model

    CN117271735A

  • Power field question and answer method and device based on local text embedding retrieval

    CN118278521A