An intelligent algorithm-based power multi-knowledge base question and answer integration method
Patent Information
- Application Number
- CN202610957318.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-20
AI Technical Summary
但该类方案通常更关注“能否回答”,而对“回答依据是否充分、答案结构是否稳定、术语和表述是否符合电力业务规范”关注不足
[0040]本发明提出的方法,围绕“多知识库场景下如何提升检索质量并稳定生成可追溯答案”这一核心问题,建立了从查询增强、跨库检索、候选融合、动态重排到证据驱动答案整合的完整处理链路,为电力知识库智能问答提供了新的技术支撑。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of information system technology, specifically to a method for integrating multiple knowledge bases in the power industry based on intelligent algorithms. Background Technology
[0002] Currently, power companies continuously accumulate a large number of unstructured documents in their business activities, including regulations, procedures, standards, project documents, technical specifications, and acceptance materials. These documents come from diverse sources and are typically in formats such as Word, PDF, and scanned copies. Different knowledge bases exhibit significant differences in document structure hierarchy, terminology, information density, and expression methods. To enable these documents to serve intelligent question answering, processing steps such as query understanding, document slicing, semantic retrieval, result ranking, and answer generation are usually required to create a searchable, locatable, and answerable knowledge service capability. Meanwhile, user questions in power business scenarios are often colloquial, abbreviated, and contextualized. The same question often requires comprehensive searching across regulation, procedure, standard, and project document databases to obtain a complete answer. Therefore, achieving high-quality retrieval and stable answer integration across multiple knowledge bases has become a key issue in power knowledge question answering technology.
[0003] In existing technologies, the closest approach to this invention is a first-class solution based on keyword retrieval or full-text retrieval for a single knowledge base. This type of solution primarily achieves document location through inverted indexes, keyword matching, or rule-based retrieval. Its advantages lie in its simplicity, fast response time, and ability to support precise queries based on policy names, clause numbers, or standard terminology. However, in power business Q&A scenarios, user queries often do not use standard expressions but rather colloquialisms, abbreviations, or scenario descriptions. Relying solely on keyword retrieval can easily lead to insufficient recall and makes it difficult to handle related evidence content stored across different knowledge bases.
[0004] The second type of solution is a question-answering solution based on semantic vector retrieval or general retrieval enhancement. This type of solution typically captures the semantic relationship between the query and the text fragment through vector representation, and then combines this with a large language model to generate the answer. It can handle synonymous expressions and ambiguous questions well and has strong adaptability in general knowledge question-answering scenarios. However, in the power business scenario, when multiple knowledge bases participate in the retrieval simultaneously, the authority, version validity, chapter structure, and business adaptability of the results returned by different knowledge bases are inconsistent. If only semantic similarity is relied upon for recall and ranking, problems such as redundant and conflicting candidate results, high-value segments being ranked lower, and low-authority content being mistakenly placed higher can easily occur, thus affecting the accuracy of the answer.
[0005] The third type of solution directly concatenates the results from multiple retrieval paths to generate the answer. This type of solution typically inputs several candidate slices directly into a large language model, which then organizes and outputs the answer. Its advantage lies in its shorter development path and faster formation of end-to-end question-answering capabilities. However, this type of solution usually focuses more on "whether an answer can be given" and pays insufficient attention to "whether the basis for the answer is sufficient, whether the answer structure is stable, and whether the terminology and expression conform to power business specifications." Especially in power scenarios such as systems, procedures, and standards, the same question often involves multiple source documents, multiple versions of rules, and multiple pieces of evidence. If there is a lack of cross-database fusion, duplication resolution, scenario-based rearrangement, and evidence-driven answer integration mechanisms, problems such as duplicate answers, logical confusion, version mixing, and missing evidence are likely to occur.
[0006] Therefore, existing technologies have at least the following shortcomings: First, their query comprehension capabilities are insufficient, making it difficult to form a stable and unified retrieval expression for colloquial, abbreviated, and semantically incomplete power business queries; second, the lack of a unified mapping and fusion mechanism for results returned from multiple knowledge bases leads to scattered search results, incomparable scores, and difficulty in eliminating duplicate content across databases; third, existing ranking methods typically employ fixed strategies, making it difficult to dynamically adjust the ranking priorities based on different question types such as definition-based, process-based, and basis-based questions, resulting in unstable ranking of high-value evidence slices; fourth, existing answer generation methods lack summary integration, role organization, and compliance verification of evidence materials, making it difficult to guarantee the readability, standardization, and traceability of the output answers. Based on this, we have invented a power multi-knowledge base question-answering integration method based on intelligent algorithms, which establishes a complete link between retrieval, fusion, reordering, and answer integration in multiple power knowledge bases, thereby improving the comprehensive service capabilities of the power knowledge question-answering system in multi-knowledge base scenarios. Summary of the Invention
[0007] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0008] A method for integrating multiple knowledge bases in the power industry based on intelligent algorithms includes the following steps:
[0009] S1, Query Normalization and Retrieval Enhancement Steps: Convert the natural language question entered by the user into an enhanced query object suitable for unified retrieval of multiple power knowledge bases;
[0010] S2, Parallel Retrieval and Unified Mapping Steps of Multiple Knowledge Bases: Parallel retrieval is performed on multiple power knowledge bases for the enhanced query object, and the heterogeneous results returned by different knowledge bases are uniformly converted into standard candidate records that can be fused and processed.
[0011] S3, Candidate Slice Fusion, Duplication Elimination and Initial Screening Steps: Unified fusion and quality control of candidate slices returned from multiple knowledge bases, eliminating duplicate, low-relevance and low-completeness results, forming a set of candidate evidence that can be used for fine ranking;
[0012] S4, Scenario-based dynamic rearrangement step: The candidate evidence set after initial screening is finely sorted so that the evidence slices that best match the current query scenario and business needs are given priority to enter the answer integration stage;
[0013] S5, Evidence Integration, Answer Generation and Compliance Verification Steps: Organize the priority evidence slices into a final answer that is well-structured, accurate, and traceable.
[0014] As a preferred embodiment of the intelligent algorithm-based power multi-knowledge base question-answering integration method described in this invention, the specific steps of S1 are as follows:
[0015] S11, perform character cleaning and format standardization on the original query text; when the query length is lower than the minimum effective length threshold L... min At the same time, complete the business object words or action words based on the conversation context;
[0016] S12, using word segmentation tools combined with a power business dictionary to identify terms, standardize the mapping of professional abbreviations, and extract the core term set and the extended term set;
[0017] S13, for the normalized query execution intent identification, a rule-based judgment first, supplemented by lightweight classification, approach is adopted. When the rule match is unclear, the lightweight classification model is called for supplementary judgment. The model input is the normalized query text and its terminology features, and the output is the intent label and the corresponding confidence score P. intent When P intent The threshold T is greater than the intended value. intent If the model result is used, the rule result is used; otherwise, the rule result is used.
[0018] As a preferred embodiment of the power multi-knowledge base question-answering integration method based on intelligent algorithms described in this invention, the specific steps of S2 are as follows:
[0019] S21, Generate retrieval requests for each knowledge base based on the core terms, extended terms, and intent tags in the enhanced query;
[0020] S22, perform keyword retrieval and semantic retrieval in each knowledge base to obtain candidate slice results;
[0021] S23, After each knowledge base returns the results, they are uniformly mapped to standard candidate slice records;
[0022] S24, let the original score of the i-th candidate slice be s. i The maximum raw score in the current search result set is s max The minimum original score is s min Then the normalized score s i'Defined as:
[0023]
[0024] in, For smoothing terms;
[0025] S25, Set the minimum effective recall threshold N for a single knowledge base. min When the number of duplicate candidates in a knowledge base is less than N min At that time, the constraints on extended terms were relaxed and a recall was added.
[0026] As a preferred embodiment of the power multi-knowledge base question-answering integration method based on intelligent algorithms described in this invention, the specific steps of S3 are as follows:
[0027] S31, based on document identifiers, slice identifiers, and slice text similarity, aggregate candidate slices, identify cross-database duplicate content, and form evidence clusters;
[0028] S32, Calculate the fusion score s for each candidate slice or evidence cluster. fuse ;
[0029] S33. After completing the fusion scoring, the candidate results are initially screened.
[0030] As a preferred embodiment of the power multi-knowledge base question-answering integration method based on intelligent algorithms described in this invention, the specific steps of step S4 are as follows:
[0031] S41, extract rearrangement features for each candidate slice;
[0032] S42, dynamically set weights based on query intent;
[0033] S43, calculate the rearrangement score, and sort the candidate slices according to the rearrangement score to obtain the set of priority evidence slices.
[0034] As a preferred embodiment of the power multi-knowledge base question-answering integration method based on intelligent algorithms described in this invention, the specific steps of S5 are as follows:
[0035] S51, deduplication and priority division of the priority evidence slices, distinguishing them into primary evidence and supplementary evidence;
[0036] S52, perform summary extraction and logical integration on the main evidence and supplementary evidence to form the initial draft of the answer;
[0037] S53: Based on the initial draft of the answer, the large language model is called to organize the language and unify the format, generating the final answer text;
[0038] S54. After generation, perform compliance verification on the answer, calculate the answer credibility score, and output the final answer.
[0039] Compared with existing technologies:
[0040] The method proposed in this invention focuses on the core issue of "how to improve retrieval quality and stably generate traceable answers in multi-knowledge base scenarios". It establishes a complete processing link from query enhancement, cross-database retrieval, candidate fusion, dynamic reordering to evidence-driven answer integration, providing new technical support for intelligent question answering of power knowledge base.
[0041] First, by adopting query normalization and retrieval enhancement mechanisms, it achieves unified processing of colloquial, abbreviated, and semantically incomplete queries, solving the problem of unstable user query expression leading to retrieval direction deviation in existing technologies, thereby improving query interpretability and retrieval entry consistency in multi-knowledge base scenarios.
[0042] Second, by adopting a multi-knowledge-base parallel retrieval and unified mapping mechanism, a unified structured representation of the results returned by different knowledge bases such as the system base, procedure base, standard base, and project data base has been realized. This solves the problems of inconsistent result fields, incomparable scores, and difficulty in merging cross-base results in existing technologies, thus establishing a standard candidate basis for subsequent unified sorting and answer integration.
[0043] Third, by adopting candidate slice fusion, duplicate elimination and initial screening mechanisms, it achieves unified fusion of multi-path recall results, merging of duplicate content and elimination of low-quality results, and solves the problems of cross-database result redundancy conflict, low-relevance result interference and old version or low-completeness content mixed into the answer link in the existing technology, thereby improving the quality and usability of candidate evidence.
[0044] Fourth, by adopting a scenario-based dynamic reordering mechanism, the priority of sorting can be dynamically adjusted according to different question types such as definition type, process type, and basis type. This solves the problem that the traditional fixed sorting logic is difficult to adapt to different power Q&A scenarios, resulting in high-value evidence slices not being placed in the front row, thereby improving the hit rate of core evidence in the front row.
[0045] Fifth, by adopting an evidence-driven answer integration and compliance verification mechanism, the system achieves summary extraction, logical integration, answer generation, and pre-output verification of the main evidence and supplementary evidence. This solves the problems of answer duplication, logical confusion, non-standard terminology, and unclear version basis caused by direct splicing of multiple slices in the existing technology, making the final answer more in line with power business rules and usage habits.
[0046] Sixth, because this invention forms a complete closed-loop processing chain from query understanding to answer output, it no longer optimizes query processing, retrieval recall, result sorting and answer generation as isolated modules. Therefore, it can reduce configuration fragmentation and capability mismatch between links and improve the stability, maintainability and scalability of the power knowledge question-and-answer system during long-term operation.
[0047] In summary, this invention effectively solves the core problems of insufficient query understanding, scattered search results, inaccurate sorting, and unstable answer integration in power multi-knowledge base question-and-answer scenarios, and provides a new technical solution for intelligent question-and-answer applications of power knowledge bases. Attached Figure Description
[0048] Figure 1 This is an overall flowchart of the present invention;
[0049] Figure 2 This is a schematic diagram of the system structure of the present invention;
[0050] Figure 3 This is a block diagram illustrating the principle of multi-knowledge base fusion and answer integration in this invention. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
[0052] This invention provides a method for integrating multiple knowledge bases in the power industry based on intelligent algorithms, the process of which is shown in the attached figure. Figure 1 As shown, the process includes: S1, standardizing and semantically enhancing power business queries to form a unified cross-knowledge base retrieval query; S2, performing parallel retrieval on multiple power knowledge bases based on the unified retrieval query, and uniformly mapping the results returned by each knowledge base to standard candidate slice records; S3, performing cross-database fusion, duplication elimination, and initial screening on candidate slices to form a set of candidate evidence that can be used for fine ranking; S4, dynamically rearranging the candidate evidence set based on the query scenario and slice characteristics to obtain a set of priority evidence slices; S5, performing summary integration, answer generation, and compliance verification on the set of priority evidence slices, and outputting the final answer and corresponding evidence records. The above steps aim to solve the problems of non-standard query expression, scattered cross-database results, redundant and conflicting evidence, low ranking of high-value evidence, and unstable answer integration in power multi-knowledge base scenarios, thereby improving question-answering retrieval hit rate, answer readability, and evidence traceability. To achieve the above-mentioned objectives, the present invention adopts the following technical solution:
[0053] S1, Query Normalization and Retrieval Enhancement Steps: The user-input natural language question is converted into an enhanced query object suitable for unified retrieval of multiple power knowledge bases, solving the problems of colloquialism, abbreviation, and semantic incompleteness in the original query.
[0054] The inputs for this step are the user's original query text, a business dictionary, and conversation context information. First, the original query text undergoes character cleaning and format standardization, including removing invalid symbols, standardizing number and time expressions, and standardizing common colloquial question phrasing; when the query length is below the minimum effective length threshold L... min At the same time, the business object words or action words are completed in combination with the session context to avoid search target drift. Preferably, L min The threshold is set to 6. This threshold is set because queries that are too short usually only contain action words such as "process," "basis," and "requirement," lacking a clear business object. Using them directly for retrieval would result in overly scattered candidate results.
[0055] Then, using word segmentation tools combined with a power business dictionary, terminology recognition is performed. Professional abbreviations such as "safety regulations," "feasibility study," and "two-ticket" are standardized and mapped, and core and extended terminology sets are extracted. Preferably, the query object Q is enhanced. enh It should include at least the following fields: query identifier, original text, normalized text, core term set, extended term set, intent label, and query vector. The core terms are used for precise constraint recall, the extended terms are used to broaden semantic coverage, and the query vector is used for subsequent semantic retrieval.
[0056] Furthermore, the normalized query execution intent is identified to distinguish between definition-based, process-based, condition-based, and basis-based questions. A preferred approach is "rule-based judgment first, supplemented by lightweight classification." When the rule match is unclear, a lightweight classification model is invoked for supplementary judgment. The model input is the normalized query text and its terminology features, and the output is the intent label and corresponding confidence score P. intent When P intent The threshold T is greater than the intended value. intent When T is the optimal timeframe, the model result is used; otherwise, the rule result is used. Preferably, T... intent The value is set to 0.72. This setting is intended to balance stability and generalization ability in small-sample business scenarios, and to prevent low-confidence model results from corrupting subsequent weight allocation.
[0057] This step outputs the enhanced query object Q. enh And use it as a unified input for the next step.
[0058] S2, Parallel Retrieval and Unified Mapping Steps: Perform parallel retrieval on multiple power knowledge bases for the enhanced query object, and unify the heterogeneous results returned by different knowledge bases into standard candidate records that can be fused and processed.
[0059] The input for this step is the enhanced query object and the configuration of multiple knowledge bases. The knowledge bases include at least a system database, a procedure database, a standards database, and a project data database. First, based on the core terms, extended terms, and intent tags in the enhanced query, search requests are generated for each knowledge base. Then, keyword search and semantic search are performed in each knowledge base to obtain candidate slice results. Keyword search is used to locate system names, clause names, and explicit terms, while semantic search is used to handle colloquial expressions and synonyms.
[0060] After each knowledge base returns results, they are uniformly mapped to standard candidate slice records. The standard candidate slice record includes at least: knowledge base identifier, document identifier, slice identifier, slice text, title, chapter path, original score, normalized score, and source location.
[0061] Since the original scores from different knowledge bases and retrieval paths have different units, they cannot be directly compared; therefore, normalization is required. Let the original score of the i-th candidate slice be s. i The maximum raw score in the current search result set is s max The minimum original score is s min Then the normalized score s i' Defined as:
[0062]
[0063] in, For smoothing, a value of 0.001 is preferred to avoid errors when s... max =s min The denominator is zero.
[0064] Through the above normalization process, the scores of different knowledge bases and different search paths can be uniformly mapped to the [0,1] interval, which facilitates cross-database fusion in the next step.
[0065] In addition, to avoid imbalance in fusion caused by too few results from a certain knowledge base, a minimum effective recall threshold N for a single knowledge base is set. min When the number of duplicate candidates in a knowledge base is less than N min At that time, the constraints on the extended terminology are relaxed and an additional recall is added. Preferably, N min The threshold is set to 8. This threshold is used to ensure that each knowledge base provides at least a reasonably comparable candidate set during the fusion phase, so as not to be completely marginalized due to insufficient results from individual knowledge bases.
[0066] This step outputs a unified candidate slice set c across knowledge bases. all This serves as the input for the next step.
[0067] S3, Candidate Slice Fusion, Duplication Resolution and Initial Screening Steps: The candidate slices returned from multiple knowledge bases are uniformly fused and quality controlled to eliminate duplicate, low-relevance and low-completeness results, forming a set of candidate evidence that can be used for fine ranking.
[0068] The input for this step is a cross-knowledge base candidate slice set c. all First, candidate slices are aggregated based on document identifiers, slice identifiers, and slice text similarity to identify cross-database duplicate content and form evidence clusters. Preferably, when the text similarity between two slices is greater than the duplicate determination threshold T... dup At that time, it was determined that the two belonged to the same cluster of evidence. dup The optimal threshold is 0.88. This threshold serves two purposes: if the threshold is too low, it will incorrectly merge slices that are semantically similar but have different content; if the threshold is too high, it will not effectively eliminate duplicate content copied across libraries.
[0069] Then, a fusion score s is calculated for each candidate slice or evidence cluster. fuse The fusion score comprehensively reflects the retrieval relevance of candidate slices, the credibility of the knowledge base, the reliability of the retrieval path, and the rule hit rate. Preferably, the fusion score is defined as:
[0070]
[0071] in:
[0072] Normalized retrieval scores for candidate slices;
[0073] Knowledge base weights are used to characterize the authority of different knowledge bases.
[0074] This is used as the retrieval path weight to differentiate the reliability of keyword retrieval from semantic retrieval.
[0075] The rule hit score is used to indicate whether the rule name, core terms, chapter path, or intent-related fields are hit.
[0076] , γ and δ are weighting coefficients.
[0077] Preferably, α=0.48, β=0.20, γ=0.12, and δ=0.20.
[0078] The rationale for this setting is as follows: search relevance should still be the dominant factor, so it is given the highest weight; the authority of the knowledge base and the rule hit rate will significantly affect the credibility of the answer, so they are given the second highest weight; and the search path type is mainly used as an auxiliary distinguishing factor, so it is given a relatively low weight.
[0079] Among them, rule hit score It can be further defined as:
[0080]
[0081] in:
[0082] This indicates the hit score for the system name or standard name;
[0083] Indicates the hit score for core terms;
[0084] This indicates a hit in the chapter path or clause number;
[0085] This indicates that the field corresponding to the intent has been hit.
[0086] Preferably, when the above four items are matched, values of 0.25, 0.20, 0.15, and 0.15 are assigned respectively; if no match is found, the score is recorded as 0, and the total score is restricted to the interval [0,1]. The purpose of this formula is not to introduce a complex model, but to transform "why this slice is worth keeping" into an interpretable rule score.
[0087] After the fusion scoring is completed, the candidate results are initially screened. Preferably, when Less than the initial screening threshold τ fuse When this happens, the candidate slice is discarded. fuse The preferred value is 0.58. The remaining candidate slices also need to pass version and completeness checks: if there are multiple versions of the same system, the valid and latest version will be retained first; if the slice is too short and lacks a title, chapter or valid terminology, it will not proceed to the next step.
[0088] To ensure the traceability of subsequent answers, this step also calculates the completeness of evidence, s. evi Preferably, the completeness of evidence is defined as:
[0089]
[0090] in:
[0091] Indicates the completeness of the location field;
[0092] Indicates the completeness of the chapter path;
[0093] Indicates the completeness of the version field;
[0094] Indicates the completeness of the source information.
[0095] All four items above take values in the range [0,1]. This indicator is used to prioritize retaining evidence slices that are more suitable for citation and backtracking when the relevance is close.
[0096] This step outputs the initial set of candidate evidence c. pre and corresponding evidence records e rec This serves as the input for the next step.
[0097] S4, Scenario-based dynamic rearrangement step: The candidate evidence set after initial screening is finely sorted so that the evidence slices that best match the current query scenario and business needs are given priority to enter the answer integration stage.
[0098] The input for this step is the candidate evidence set c. pre Evidence Records e rec And query intent tags. First, rearranged features are extracted for each candidate slice, including at least: semantic similarity, core term hit rate, title matching, chapter path matching, authority level, version validity, and evidence completeness. Then, weights are dynamically set according to query intent. For criteria-based questions, term hit rate, authority level, and evidence completeness are emphasized; for process-based questions, chapter path and information organization are emphasized; for definition-based questions, semantic similarity and title matching are emphasized.
[0099] Preferably, the scores are rearranged. Defined as:
[0100]
[0101] in, This represents the m-th rearrangement feature. This represents the weight of the feature under the current intent type, and satisfies:
[0102]
[0103] The significance of this formula lies in achieving scenario-based reordering by mapping different question types to different weight configurations, rather than applying the same fixed sorting logic to all questions.
[0104] To further improve sorting accuracy, it is preferable to introduce a rearrangement model to output the score s based on the rule-weighted sorting. model This score, along with the rule-based rearrangement score, forms the final rearrangement score. :
[0105]
[0106] This combination approach is adopted because rule rearrangement has strong interpretability and is suitable for reflecting industry constraints; model rearrangement has strong fine-grained discriminative ability and is suitable for distinguishing semantically similar candidate slices. Combining the two can balance stability and accuracy.
[0107] according to The candidate slices are sorted, and the candidates with the highest scores are selected as the priority evidence slice set c. top Preferably, the first 12 candidates are retained, with the first 5 as primary evidence candidates and the rest as supplementary evidence candidates.
[0108] This step outputs the set of priority evidence slices, c. top This serves as the input for the next step.
[0109] S5, Evidence Integration, Answer Generation and Compliance Verification Steps: Organize the priority evidence slices into a final answer that is clearly structured, accurate in content and traceable, solving the problems of answer duplication, confusion and non-standardization caused by directly splicing multiple slices.
[0110] The input for this step is the set of priority evidence slices c. top Evidence Records e rec And query intent tags. First, the priority evidence slices are deduplicated and prioritized, distinguishing them into primary evidence and supplementary evidence. Then, the primary evidence and supplementary evidence are summarized and logically integrated to form the initial draft of the answer. For definition-type questions, the priority organization is "definition - scope of application - source basis"; for process-type questions, the priority organization is "preconditions - step description - precautions - source basis"; for basis-type questions, the priority organization is "conclusion - basis clause - source location".
[0111] Based on the initial draft of the answer, a large language model is used to organize the language and standardize the format, generating the final answer text. This model does not perform retrieval functions in this step; it is only used to optimize the expression of the selected evidence materials. After generation, compliance verification is performed on the answer. Compliance verification includes at least evidence coverage checks, terminology standardization checks, version consistency checks, and structural integrity checks.
[0112] Preferably, an answer credibility score is defined. for:
[0113]
[0114] in:
[0115] Indicates the coverage of evidence;
[0116] Indicates the degree of standardization of terminology;
[0117] Indicates version consistency;
[0118] It indicates structural integrity.
[0119] All four items above take values in the range [0,1]. The reason for setting this formula is that the reliability of the answer depends first on whether it is adequately covered by evidence, so evidence coverage has the highest weight; terminology, version, and structure together determine whether the answer conforms to the expression specifications of power business.
[0120] Preferably, the answer is set to pass a threshold τ. ans =0.76. When s ans ≥τ ans When s < , output the final answer; when s < , output the final answer. ans <τ ans In such cases, the system may revert to a conservative answer or directly output an evidence summary to avoid generating definitive conclusions lacking supporting evidence.
[0121] This step outputs the final answer text and evidence mapping record. The evidence mapping record includes at least: answer fragment identifier, corresponding slice identifier, document title, chapter path and source location, thereby ensuring the traceability of the final answer.
[0122] In summary, the present invention includes, but is not limited to, the following embodiments:
[0123] To verify the feasibility, effectiveness, and technical advantages of the proposed method for multi-knowledge base retrieval and answer integration optimization in the power industry, this implementation case is based on anonymized real business data from a power company's knowledge-based question-and-answer scenario. The selected data comes from knowledge documents such as policy documents, regulations, standards, project materials, and technical specifications, covering various formats including Word, editable PDFs, and scanned PDFs. The implementation objective is to verify the practical effects of this invention in query standardization, parallel retrieval across multiple knowledge bases, candidate slice fusion and rearrangement, and answer integration and output.
[0124] This embodiment selects 120 anonymized business documents as knowledge samples, including 50 policy documents, 25 procedure documents, 20 standard documents, 15 project materials, and 10 technical specifications. These documents are stored in policy, procedure, standard, and project material databases respectively, forming a multi-knowledge base retrieval environment. The implementation environment uses Python 3.9, document parsing tools include python-docx, PyPDF2, and pdfplumber, scanned document recognition uses PP-OCRv4, semantic vector retrieval uses an Elasticsearch vector database, and metadata storage uses MySQL. To verify the question-answering effect, 50 typical business questions, including policy queries, process queries, and basis queries, are selected as test queries. This testing method is consistent with the "Top 50 Most Searched Policy Documents" scenario in the project materials.
[0125] Step S1: Query Normalization and Retrieval Enhancement
[0126] First, the test query was input into the system. The system performed character cleaning, number normalization, and colloquial question grammar normalization on the original query. When the query length was less than the minimum effective length, the system supplemented the business object terms based on the conversation context. Subsequently, the system used a business dictionary to identify the system names, business objects, clause keywords, and abbreviations in the query, mapping the abbreviations to standard terms and generating a core terminology set and an extended terminology set. For typical questions such as "What is the process?", "Based on which clause?", and "How is the feasibility study reported?", the system further identified their intent type and formed enhanced query objects. The implementation results show that the colloquial expressions and abbreviations in the test query can be converted into standard query representations suitable for unified retrieval across multiple knowledge bases.
[0127] Step S2: Parallel Retrieval and Unified Mapping of Multiple Knowledge Bases
[0128] After obtaining the enhanced query object, the system simultaneously initiates search requests to the institutional database, procedure database, standard database, and project data database, performing keyword search and semantic search in each database. For questions with clear institutional names, clause numbers, and standard terminology, keyword search prioritizes matching the corresponding slices; for colloquial descriptions or synonymous questions, semantic search supplements and recalls semantically similar content. Subsequently, the system uniformly maps the results returned by each database to standard candidate slice records, including fields such as database identifier, document identifier, slice identifier, title, chapter path, score, and source location, and normalizes the scores of the search path results. Implementation results show that heterogeneous results returned by multiple databases can be uniformly incorporated into the same candidate set, forming a unified input for subsequent fusion and ranking.
[0129] Step S3: Candidate slice fusion, repeated digestion and initial screening
[0130] The system performs cross-database fusion and duplicate resolution on a unified candidate slice set. For candidate content with consistent title paths and similar body text, the system constructs and aggregates evidence clusters; slices with low relevance, low completeness, or invalid versions are removed. Then, the system calculates a fusion score based on normalized retrieval scores, knowledge base weights, retrieval path types, and rule hit rates, and generates evidence records. Implementation results show that after fusion and initial screening, cross-database redundant slices are significantly reduced, and the relevance and traceability of the candidate evidence set are significantly improved, providing higher-quality input for subsequent fine-tuning.
[0131] Step S4: Contextualized Dynamic Rearrangement
[0132] For the initial screening of candidate evidence, the system extracts re-ranking features such as semantic similarity, core terminology hit rate, title matching, chapter path matching, authority level, version validity, and evidence completeness, and dynamically adjusts the ranking weights based on the query intent. For evidence-based questions, the system increases the weights of terminology hit rate, authority level, and evidence completeness; for process-based questions, the system increases the weights of chapter path and organizational structure-related features; and for definition-based questions, the system increases the weights of semantic similarity and title matching. Implementation results show that after dynamic re-ranking, high-value evidence slices can consistently rank highly, meeting the design goal of "improving slice hit accuracy" in the project materials.
[0133] Step S5: Evidence integration, answer generation, and compliance verification
[0134] The system performs primary and secondary segmentation and abstract extraction on the top-ranked candidate slices, and organizes the initial draft answers according to question type. For definition-type questions, the priority organization is "definition—scope of application—source basis"; for process-type questions, the priority organization is "preconditions—step description—precautions—source basis"; for basis-type questions, the priority organization is "conclusion—basis clause—source location". Based on this, a large language model is used to organize the language and standardize the format, and the final answer is checked for evidence coverage, terminology standardization, version consistency, and structural integrity. If the check passes, the final answer and its evidence mapping are output; if the check fails, a conservative answer or evidence abstract is output. The implementation results show that this invention can output answers with clear structure, explicit basis, and traceability based on multi-knowledge base joint retrieval, which meets the goals of "improving the accuracy of answer generation" and "the output content conforming to the power grid business specifications" in the project materials.
[0135] As can be seen from the above implementation examples, the present invention can realize the complete chain processing from query understanding, cross-database retrieval, candidate fusion, scenario rearrangement to answer integration and output in the scenario where multiple knowledge bases in the power industry exist in parallel. This enables evidence content that is scattered in different knowledge bases to be uniformly recalled, uniformly sorted and stably organized into the final answer, which verifies the feasibility and technical effect of the present invention in the intelligent question answering scenario of power knowledge base.
[0136] Although the present invention has been described above with reference to embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of the invention. In particular, as long as there is no structural conflict, the features in the disclosed embodiments can be combined with each other in any manner. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, the present invention is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.
Claims
1. A method for integrating multiple knowledge bases in the power industry based on intelligent algorithms, characterized in that, Includes the following steps: S1, Query Normalization and Retrieval Enhancement Steps: Convert the natural language question entered by the user into an enhanced query object suitable for unified retrieval of multiple power knowledge bases; S2, Parallel Retrieval and Unified Mapping Steps of Multiple Knowledge Bases: Parallel retrieval is performed on multiple power knowledge bases for the enhanced query object, and the heterogeneous results returned by different knowledge bases are uniformly converted into standard candidate records that can be fused and processed. S3, Candidate Slice Fusion, Duplication Elimination and Initial Screening Steps: Unified fusion and quality control of candidate slices returned from multiple knowledge bases, eliminating duplicate, low-relevance and low-completeness results, forming a set of candidate evidence that can be used for fine ranking; S4, Scenario-based dynamic rearrangement step: The candidate evidence set after initial screening is finely sorted so that the evidence slices that best match the current query scenario and business needs are given priority to enter the answer integration stage; S5, Evidence Integration, Answer Generation and Compliance Verification Steps: Organize the priority evidence slices into a final answer that is well-structured, accurate, and traceable.
2. The method for integrating multiple knowledge bases in the power industry based on intelligent algorithms according to claim 1, characterized in that, The specific steps of S1 are as follows: S11, perform character cleaning and format standardization on the original query text; when the query length is lower than the minimum effective length threshold L... min At the same time, complete the business object words or action words based on the conversation context; S12, using word segmentation tools combined with a power business dictionary to identify terms, standardize the mapping of professional abbreviations, and extract the core term set and the extended term set; S13, for the normalized query execution intent identification, a rule-based judgment first, supplemented by lightweight classification, approach is adopted. When the rule match is unclear, the lightweight classification model is called for supplementary judgment. The model input is the normalized query text and its terminology features, and the output is the intent label and the corresponding confidence score P. intent When P intent The threshold T is greater than the intended value. intent If the model result is used, the rule result is used; otherwise, the rule result is used.
3. The method for integrating multiple knowledge bases in the power industry based on intelligent algorithms according to claim 1, characterized in that, The specific steps of S2 are as follows: S21, Generate retrieval requests for each knowledge base based on the core terms, extended terms, and intent tags in the enhanced query; S22, perform keyword retrieval and semantic retrieval in each knowledge base to obtain candidate slice results; S23, After each knowledge base returns the results, they are uniformly mapped to standard candidate slice records; S24, let the original score of the i-th candidate slice be s. i The maximum raw score in the current search result set is s max The minimum original score is s min Then the normalized score s i' Defined as: in, For smoothing terms; S25, Set the minimum effective recall threshold N for a single knowledge base. min When the number of duplicate candidates in a knowledge base is less than N min At that time, the constraints on extended terms were relaxed and a recall was added.
4. The power multi-knowledge base question-answering integration method based on intelligent algorithms according to claim 1, characterized in that, The specific steps of S3 are as follows: S31, based on document identifiers, slice identifiers, and slice text similarity, aggregate candidate slices, identify cross-database duplicate content, and form evidence clusters; S32, Calculate the fusion score s for each candidate slice or evidence cluster. fuse ; S33. After completing the fusion scoring, the candidate results are initially screened.
5. The power multi-knowledge base question-answering integration method based on intelligent algorithms according to claim 1, characterized in that, The specific steps of S4 are as follows: S41, extract rearrangement features for each candidate slice; S42, dynamically set weights based on query intent; S43, calculate the rearrangement score, and sort the candidate slices according to the rearrangement score to obtain the set of priority evidence slices.
6. The power multi-knowledge base question-answering integration method based on intelligent algorithms according to claim 1, characterized in that, The specific steps of S5 are as follows: S51, deduplication and priority division of the priority evidence slices, distinguishing them into primary evidence and supplementary evidence; S52, perform summary extraction and logical integration on the main evidence and supplementary evidence to form the initial draft of the answer; S53: Based on the initial draft of the answer, the large language model is called to organize the language and unify the format, generating the final answer text; S54. After generation, perform compliance verification on the answer, calculate the answer credibility score, and output the final answer.