Search methods, electronic devices, storage media, and software products
By breaking down user queries into sub-questions and combining them with vector knowledge databases and large language models to integrate real-time status data, the problem of insufficient integration between target document data and real-time status data is solved, thereby improving the accuracy and adaptability of the answers.
Patent Information
- Application Number
- CN202511983857.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-05-26
- Estimated Expiration
- 2045-12-26
AI Technical Summary
In existing technologies, the target document data is not effectively integrated with real-time operation and maintenance status data, resulting in insufficient accuracy of the retrieved answers.
By acquiring a vector knowledge database and real-time status data of the target document set, user queries are broken down into multiple sub-questions, and intent is determined and vector encoded. These are then combined with a pre-set base large language model to generate answers, and structured prompt words are constructed to improve answer accuracy.
It improves the accuracy and reliability of answers in large-scale computing systems, adapts to the needs of operation and maintenance scenarios, and ensures the reliability and reusability of output results.
Smart Images

Figure CN121412357B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of operation and maintenance data processing technology, and more specifically, to a retrieval method, electronic device, storage medium, and program product. Background Technology
[0002] As the scale and complexity of computing systems continue to increase, providing 24 / 7 uninterrupted service to billions of users, operational reliability has become paramount. Against this backdrop, Large Language Models (LLMs), with their powerful language understanding and generation capabilities, have become a core support for the intelligent operation and maintenance of such systems and the implementation of Artificial Intelligence Generated Content (AIGC). However, the inherent knowledge base of LLMs is difficult to update, leading to information lag; and they are prone to creating illusions, potentially causing erroneous decisions in high-precision scenarios, all of which severely restrict their in-depth application. Meanwhile, traditional generative models combined with simple retrieval solutions also suffer from problems such as simplistic keyword matching logic and weak semantic capture capabilities. Therefore, Retrieval-Augmented Generation (RAG) technology has become a core solution to overcome this bottleneck.
[0003] Existing technologies employing Search Augmentation (RAG) techniques achieve a dual improvement in matching accuracy and the efficiency of structured knowledge utilization by integrating semantic search with hybrid query retrieval and knowledge graph with vector retrieval. In terms of system architecture, Modular RAG decouples components into single functional modules, enabling flexible configuration based on specific scenarios; Light RAG improves operational efficiency through lightweight design; and Graph RAG enhances entity relationship capture and multi-hop reasoning capabilities by leveraging graph structures in knowledge processing. Therefore, RAG technology can be migrated to the field of intelligent operation and maintenance of computing power systems. This can be achieved by combining operation and maintenance knowledge vector storage with cosine similarity retrieval to generate operation and maintenance responses using large models, or by introducing multimodal data processing and simple block-based strategies to improve efficiency. Furthermore, RAG systems for general or industry-specific question-answering scenarios are being attempted for reuse.
[0004] Although RAG technology has been initially applied in the field of operations and maintenance, the target document data has not been effectively integrated with real-time operations and maintenance status data, which reduces the accuracy of the search results. Summary of the Invention
[0005] The purpose of this application is to provide a retrieval method, electronic device, storage medium, and program product to solve the problem that the accuracy of the retrieval results is reduced because the target document data is not effectively integrated with real-time operation and maintenance status data.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, embodiments of this application provide a retrieval method, comprising: acquiring a vector knowledge database corresponding to a target document set and real-time status data of a target intelligent operation and maintenance scenario; responding to an initial question queried by a user, splitting the initial question into multiple sub-questions; performing intent judgment on the multiple sub-questions to determine a retrieval target set; performing second vector encoding on the multiple sub-questions, and then performing preset similarity matching based on the retrieval target set to obtain a first text block set; the first text block set consists of text blocks that meet a preset number and have the highest similarity score; based on a preset base large language model, fusing the real-time status data, the first text block set, and the general knowledge of the preset base large language model to construct structured prompt words, and then inputting them into the preset base large language model to generate an initial answer; evaluating the initial answer and outputting a standardized question processing result.
[0008] In a second aspect, embodiments of this application provide an electronic device, including: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the methods in the first aspect.
[0009] Thirdly, embodiments of this application provide a computer-readable storage medium that stores a program or instructions that cause a computer to perform the method as described in any of the first aspects.
[0010] Fourthly, embodiments of this application provide a computer program product for implementing the method as described in any of the first aspects.
[0011] Compared with the prior art, this application has the following beneficial effects:
[0012] This application provides a retrieval method, electronic device, storage medium, and program product. The retrieval method acquires a vector knowledge database corresponding to a set of target documents to transform unstructured operation and maintenance documents into semantically complete and searchable structured semantic units, providing an efficient knowledge foundation for subsequent retrieval. Responding to the initial question posed by the user, the method first breaks down the initial question into multiple sub-questions, addressing the low matching degree caused by the mismatch between complex questions and the granularity of retrieval units. Then, it performs intent judgment on the multiple sub-questions to determine the retrieval target set, avoiding inefficient and information-biased indiscriminate retrieval. Subsequently, after performing a second vector encoding on the multiple sub-questions, it selects a first set of text blocks with the highest similarity to the sub-questions and meeting a preset quantity, based on the retrieval target set, to control processing costs and improve retrieval efficiency while ensuring the integrity of core information. Next, it acquires real-time status data of the target intelligent operation and maintenance scenario, targeting the target documents in traditional solutions. The lack of effective integration of data with real-time operational status data leads to retrieval answers that are detached from reality and lack accuracy. This application addresses this issue by integrating real-time status data, the first text block set, and general knowledge from the pre-defined base language model during the answer generation stage. After constructing a structured prompt word standardization output logic, the input is used to generate the initial answer from the pre-defined base language model. This effectively compensates for the shortcomings of relying solely on static document knowledge, which results in answers that are out of touch with actual scenarios, thus improving the accuracy of the initial answer. Finally, the initial answer is evaluated, and standardized problem-solving results are output. This ensures that the final standardized problem-solving results are reliable, implementable, and reusable, solving current operational problems while standardizing operational knowledge. Through multi-stage collaborative optimization, the entire process achieves simultaneous improvements in retrieval efficiency, answer accuracy, and scenario adaptability. Attached Figure Description
[0013] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0014] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0015] Figure 2 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 1 ;
[0016] Figure 3 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 2 ;
[0017] Figure 4 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 3 ;
[0018] Figure 5 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 4 ;
[0019] Figure 6 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 5 ;
[0020] Figure 7 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 6 ;
[0021] Figure 8 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 7 ;
[0022] Figure 9 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 8 ;
[0023] Figure 10 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 9 ;
[0024] Figure 11 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 10 ;
[0025] Figure 12 This is a schematic diagram of the structure of a retrieval system provided in an embodiment of this application;
[0026] Figure 13 This is a schematic diagram of the structure of a retrieval device provided in an embodiment of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0028] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0029] To enable those skilled in the art to better understand the present application, the retrieval method, electronic device, storage medium, and program product provided in this application will be described in detail below with reference to the accompanying drawings and specific embodiments.
[0030] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 1 As shown, the electronic device 100 may include a processor 110 and a memory 120.
[0031] The memory 120 stores machine-executable instructions that can be executed by the processor 110. When the electronic device 100 is running, these machine-executable instructions are executed. The processor 110 and the memory 120 communicate via a bus. The processor 110 can execute the machine-executable instructions to implement the retrieval method.
[0032] The memory 120, processor 110, and bus components are electrically connected directly or indirectly to enable data transmission or interaction. For example, these components can be electrically connected to each other via one or more communication buses or signal lines. The mobile storage device includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or embedded in the operating system (OS) of the electronic device. The processor 110 is used to execute executable modules stored in the memory 120, such as software function modules and computer programs included in the method for retrieving mobile storage media.
[0033] The memory 120 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0034] The electronic device 100 can be selected according to the actual situation; for example, it can be a mobile terminal, a computer, etc. Furthermore, the electronic device 100 has software or an application program capable of executing retrieval methods.
[0035] The retrieval method provided in this application embodiment can be executed by a processor in the electronic device 100. The retrieval method provided in this application embodiment will be explained further below. Figure 2 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 1 .like Figure 2 As shown, the method may include:
[0036] S210. Obtain the vector knowledge database corresponding to the target document set and the real-time status data of the target intelligent operation and maintenance scenario.
[0037] The vector knowledge database is constructed from the encoding vectors corresponding to the text blocks obtained by dividing the target document set into text blocks. The encoding vector corresponding to any text block is the vector obtained by first vector encoding the text block. The target document set can be selected according to the actual situation.
[0038] The vector knowledge database may include at least: a set of content vectors, a set of summary vectors, and a set of vectors relating summary content.
[0039] In one possible approach, since the target document set consists of long, multi-topic unstructured texts containing multiple independent semantic units, direct retrieval of the target document set can easily lead to semantic fragmentation and information redundancy. Therefore, text segmentation is performed on the target document set to break it down into semantically complete and appropriately granular text blocks. This ensures that subsequent retrievals can match the core content directly related to the query and avoid interference from redundant text segments.
[0040] Based on text segmentation of the target document set, a first vector encoding is performed on each text segment to transform its semantic content into a pre-defined high-dimensional vector of fixed dimensions. This first vector encoding not only preserves the literal information of the text segment but also captures the deep semantic relationships between the text segments through the retrieval model's understanding of the context of the target document set. The pre-defined high-dimensionality can be selected according to the actual situation; for example, 768 dimensions.
[0041] It should be noted that, generally speaking, vectors with a dimension greater than 3 are called preset high-dimensional vectors; vectors with a dimension less than 3 but greater than or equal to 1 are called low-dimensional vectors. For the sake of simplicity in the following description, we will use a preset high-dimensional vector of 10 dimensions or more as an example. However, it should not be assumed that the dimension of a preset high-dimensional vector is limited to this range. In practical applications, the dimension of a preset high-dimensional vector can be extended to hundreds, thousands, or even tens of thousands of dimensions depending on the needs of the scenario. The example is only for the purpose of simplification.
[0042] Finally, the first vector of each text block is encoded to construct a vector knowledge database. This vector knowledge database provides a data foundation for implementing a hybrid retrieval mode that combines semantic vector matching and keyword filtering, ensuring retrieval accuracy and improving response efficiency in large-scale document scenarios.
[0043] In one possible implementation, after identifying the target intelligent operation and maintenance scenario within a large-scale computing power system intelligent operation and maintenance scenario, based on the intent of multiple sub-questions from the user, the original multi-dimensional time-series indicator sequence prior to the current moment is collected from the monitoring system. This method employs high-dimensional temporal feature extraction. After data preprocessing operations such as timestamp alignment and missing value imputation, it utilizes indicator correlation to select the most relevant temporal indicator sequences to the real-time state data. This reduces the number of temporal indicator sequences to be considered and removes redundancy. The global sequence of each temporal indicator sequence is divided into fixed-length or overlapping sliding windows to capture dynamic changes over different time periods. Within each overlapping sliding window, a preset trend detection algorithm is used for local pattern recognition. The preset trend detection algorithm can be selected based on the actual situation; for example, it could be a slope fitting and rate of change analysis algorithm, a Z-Score outlier detection algorithm, a local extremum and step detection algorithm, or a cross-correlation analysis algorithm.
[0044] Among them, the slope fitting and rate of change analysis algorithm is used to capture trends such as continuous rise, fall or plateau stability; the Z-Score outlier detection algorithm is used to identify sudden increases, sudden decreases or periodic fluctuations; the local extrema and step detection algorithm is used to extract stage peaks, step changes or jitter signals; and the cross-correlation analysis algorithm is used to characterize the collaborative change patterns between different nodes or indicators.
[0045] The process involves using a pre-defined trend detection algorithm to perform local pattern recognition on the original multi-dimensional time-series indicator sequence, obtaining trend pattern labels and trend statistical features. The trend pattern label may include at least: sudden increase / decrease, continuous rise / decrease, or periodic fluctuation, etc. The trend statistical features may include at least: mean, variance, and duration, etc.
[0046] Based on trend pattern labels and trend statistical characteristics, a structured feature set is formed using the following formula (1). .
[0047] Formula (1)
[0048] in, For trend pattern label type, For trend statistical characteristics, This represents the duration interval.
[0049] This structured feature set Perform semantic mapping to transform the structured feature set Transformed into a natural language description, an interpretable temporal semantic summary is obtained through the following formula (2). .
[0050] Formula (2)
[0051] Among them, the interpretable temporal semantic summary Using a fixed structure of target maintenance objects, target monitoring indicators, trend pattern label types, duration intervals, trend statistical characteristics, and target key node values, this system conveys the core information of time-series semantic data. It is clear, intuitive, and easily understood by the pre-defined base large language model (LLM). Specifically, it includes clearly defined maintenance objects (e.g., node A), target monitoring indicators (e.g., CPU utilization), duration intervals (e.g., within the past 5 minutes), trend pattern label types (e.g., continuously rising), and target key node values (e.g., 80% at the end of the window). An example could be expressed as: "The CPU utilization of node A has shown a continuous upward trend over the past 5 minutes. As of the end of the current overlapping sliding window, the target key node value has reached 80%." This retains the original maintenance object information while making the logic of time-series changes more rigorous by showing a continuous upward trend and specifying the end of the current window, thus adapting to the requirements of accurate and readable data descriptions in computing power maintenance scenarios.
[0052] Furthermore, historical system log data for different nodes A centralized summarization and semantic unification strategy is adopted to collect a large number of discrete log fragments within a specified time period (the specified time period before the current time), and input them into the preset base large language model LLM for semantic aggregation and summarization. The main events, abnormal behaviors and potential causal clues are extracted through the following formula (3).
[0053] Formula (3)
[0054] This includes historical system log data within a specified time period. Summarize into a highly readable natural language summary. Instead of simply listing log entries, it processes the data according to the first rule and outputs the first result. .
[0055] The first processing rule is as follows: First, process the historical system log data... This can be summarized as a sequence of key events (describing changes in system behavior by time or causality); secondly, historical system log data. These can be summarized as abnormal or fault characteristics (including error type, frequency, and scope of impact); Thirdly, historical system log data... These can be summarized as potential causal clues (such as resource exhaustion, dependency failure, anomalies caused by communication delays, etc.); fourth, historical system log data This can be categorized as either system recovery or a persistent abnormal state (if any).
[0056] The first output should be a string summarizing a natural language text. For example, historical system log data. The corresponding first output result is { }
[0057] It should be noted that the first output should avoid duplicating historical system log data. entry.
[0058] Finally, the real-time status data after multi-source integration is obtained according to the following formula (4). .
[0059] Formula (4)
[0060] This real-time status data Through structured feature set filtering, temporal semantic summarization abstraction, and historical system log data... Cross-source fusion enables the transformation of high-dimensional data into high-density semantic expressions.
[0061] S220. In response to the initial question of the user query, the initial question is split into multiple sub-questions.
[0062] In one possible implementation, in intelligent operation and maintenance scenarios of large-scale computing power systems, the user's initial question often contains multiple subjects, all pointing to the same core task. However, the text blocks in the vector knowledge database are mostly independent semantic units corresponding to a single task with a single subject, such as the scheduling parameter configuration description for task A. If the initial question is directly used for vector retrieval, the semantic overlap of multiple subjects will lead to a decrease in the matching degree with the text blocks of a single subject, resulting in distorted final retrieval results. Therefore, the initial question is split into multiple sub-questions to transform it into a simple structure of a single task corresponding to a single subject. This adapts the initial question to the text blocks in the vector knowledge database, avoids semantic interference caused by the overlap of multiple subjects, and improves the accuracy of subsequent retrieval.
[0063] S230. Perform intent judgment on multiple sub-questions to determine the set of retrieval targets.
[0064] The retrieval target set may include: a target content vector set and a target summary vector set.
[0065] In one possible implementation, within a large-scale computing power system intelligent operation and maintenance scenario, multiple sub-problems may share a core task, but the specific intent of each sub-problem may differ. The specific intent of each sub-problem includes at least two parts: a summary intent and a content intent. The summary intent focuses on conceptual information such as "why" and "what," while the content intent focuses on detailed information such as "how" and specific steps.
[0066] Skipping intent determination for multiple sub-questions and performing a unified search on all sub-questions will only allow searching the same target set (e.g., searching only the content vector set), leading to distorted or redundant search results. Furthermore, the two specific intents have completely different requirements for information granularity and detail: summary intent requires highly condensed summaries, while content intent requires complete steps or command details. Therefore, determining the intent for multiple sub-questions and identifying the target set allows for subsequent searches to find the corresponding target set based on the intent of each sub-question, improving search accuracy and efficiency.
[0067] S240. After performing second vector encoding on multiple sub-problems, perform preset similarity matching based on the retrieval target set to obtain the first text block set.
[0068] The preset similarity can be selected according to the actual situation. For example, the preset similarity can be selected as cosine similarity.
[0069] In one possible implementation, multiple sub-problems are encoded using a second vector. Then, text blocks most semantically relevant to the sub-problems are selected from the retrieval target set. These sub-problem requirements are then matched with resources in a vector knowledge database using cosine similarity to obtain a first set of text blocks. This first set of text blocks consists of a preset number of text blocks with the highest similarity scores. The preset number can be selected based on actual circumstances.
[0070] It should be noted that the first text block set only focuses on the text blocks with the highest similarity score to the sub-problem requirements, and strictly limits the preset number of text blocks, excluding other text blocks beyond this preset number. If the first text block set focuses on too many text blocks, it will introduce a large amount of low-relevance redundant information, increasing the computational cost of subsequent rearrangement, verification, and fusion, and reducing retrieval efficiency. In large-scale computing power system intelligent operation and maintenance scenarios, response speed is highly demanding. Therefore, selecting only a preset number of high-similarity text blocks to construct the first text block set can minimize processing costs and improve retrieval speed while ensuring the integrity of core information, ultimately achieving an optimal balance between information integrity and processing efficiency.
[0071] S250. Based on the preset base large language model, the real-time status data, the first text block set, and the general knowledge of the preset base large language model are integrated to construct structured prompt words. Then, the input is given to the preset base large language model to generate the initial answer.
[0072] The preset base large language model (LLM) can be selected according to the actual situation. General knowledge of the preset base large language model. You can choose according to the actual situation, for example, this general knowledge. It includes basic logic and operational specifications.
[0073] In one possible implementation, due to real-time state data Used to reflect the current state of the retrieval system; the first text chunk set is used to reflect the core information that best matches the semantics of the multi-sub-question, and is the core basis for the answer; the pre-set base large language model's general knowledge This provides the foundational logic and operational guidelines for intelligent operation and maintenance scenarios of large-scale computing power systems (such as the general principle of backing up logs before restarting), supplementing the missing connecting information in the first text block set (e.g., if a text block only contains steps, general knowledge supplements the principles behind those steps), ensuring logically coherent and seamless answers, while avoiding one-sided answers due to insufficient knowledge base information. Real-time status data will then be used. The first set of text chunks and the general knowledge of the pre-set base large language model Input the data into the preset base large language model LLM and fuse it to obtain the structured prompt word P.
[0074] Then, based on the structured prompt word P, the preset base large language model LLM is input again, and the initial answer corresponding to the user's initial question is output.
[0075] S260. Evaluate the initial answer and output the standardized problem processing results.
[0076] In one possible implementation, due to potential issues such as information bias, logical gaps, or non-standard formatting in the initial answer, it is necessary to evaluate the initial answer to ensure that the final standardized problem-solving results match the requirements of intelligent operation and maintenance scenarios for large-scale computing power systems. This evaluation verifies the accuracy of the initial answer's information (e.g., whether the steps match the current system status, whether the commands are valid), logical coherence (e.g., whether the troubleshooting process conforms to operation and maintenance specifications), and completeness of content (e.g., whether any key precautions are omitted). Statements that are out of touch with the intelligent operation and maintenance scenario or pose risks are eliminated.
[0077] The retrieval method provided in this application acquires a vector knowledge database corresponding to the target document set to transform unstructured operation and maintenance documents into semantically complete and searchable structured semantic units, providing an efficient knowledge foundation for subsequent retrieval. Responding to the initial question posed by the user query, the method first breaks down the initial question into multiple sub-questions, addressing the low matching degree caused by the mismatch between complex questions and the granularity of retrieval units. Then, intent judgment is performed on the multiple sub-questions to determine the retrieval target set, avoiding inefficient and information-biased indiscriminate retrieval. Subsequently, after performing a second vector encoding on the multiple sub-questions, a first text block set with the highest similarity to the sub-questions and meeting a preset quantity is selected based on the retrieval target set, thereby controlling processing costs and improving retrieval efficiency while ensuring the integrity of core information. Next, real-time status data of the target intelligent operation and maintenance scenario is acquired, addressing the shortcomings of traditional solutions. The lack of effective integration between standard document data and real-time operation and maintenance status data leads to retrieval answers that are out of touch with reality and lack accuracy. This application addresses this issue by integrating real-time status data, the first text block set, and general knowledge from the pre-set base language model during the answer generation stage. After constructing a structured prompt word standardization output logic, the input is fed into the pre-set base language model to generate initial answers. This effectively compensates for the shortcomings of relying solely on static document knowledge, which results in answers that are disconnected from actual scenarios, thus improving the accuracy of the initial answers. Finally, the initial answers are evaluated, and standardized problem-solving results are output, ensuring that the final output standardized problem-solving results are reliable, implementable, and reusable. This not only solves current operation and maintenance problems but also standardizes operation and maintenance knowledge. Through multi-stage collaborative optimization, the entire process achieves simultaneous improvements in retrieval efficiency, answer accuracy, and scenario adaptability.
[0078] Figure 3A flowchart illustrating a retrieval method provided in this application embodiment. Figure 2 .like Figure 3 As shown, the above method performs text segmentation processing on the target document set and corresponding first vector encoding to construct a vector knowledge database, including:
[0079] S310. After formatting the target document set, extract the text content to obtain the text content.
[0080] In one possible implementation, the multi-source target document set is first decomposed into formats, which can support processing various common formats such as portable document format (pdf), markup language document (md), word processing document (docx), and spreadsheet document (xlsx).
[0081] Next, text content is extracted from the target document set after format decomposition. This extraction utilizes OCR (Optical Character Recognition) and jieba (Jieba Chinese Word Segmentation Tool) tools to extract the text content from each document set, ensuring complete acquisition of the text content and laying the data foundation for subsequent processing. The extracted text content is then subjected to multi-constraint text segmentation based on semantic relationships, resulting in multiple text blocks.
[0082] S320. Perform multi-constraint text segmentation processing on the text content according to semantic relevance to obtain multiple text segments.
[0083] Among them, multiple constraints include at least: length constraints of a single text block, overlapping area constraints between adjacent text blocks, and punctuation priority constraints in a single text block.
[0084] In one possible implementation, to ensure the semantic integrity of multiple text blocks and the efficiency of subsequent processing, processing is performed character by character, starting from the beginning of the target document set. The length of each text block is... The overlapping areas of the blocks are dynamically adjusted by multiple constraints.
[0085] The starting position of the target document set is used as the starting position of the first text block. First, proceed to the maximum length. Within the text block, higher-order punctuation marks (such as periods and exclamation marks) are prioritized as dividing points, followed by lower-order punctuation marks (such as commas and semicolons). The ending position of the first text block is then determined. Then, by dynamically overlapping characters in reverse, the starting position of the next text block is obtained. .
[0086] The starting position of the first text block is known to be The end position is The maximum length of a single text block can then be determined using the following formula (5). .
[0087] Formula (5)
[0088] One constraint is that the length of a single text block must strictly adhere to the maximum and minimum requirements of the lengths of multiple text blocks, and the range of the length of a single text block is as follows: The minimum value It is 400, the maximum value. It is 600.
[0089] Constraint 2 is if the initial segmentation ends at the position If the length of a single text block exceeds the range, the end position can be corrected using the following formula (6). .
[0090] Formula (6)
[0091] Among them, if Then correct the ending position. = ;like Then correct the ending position. = .
[0092] Constraint 3 involves dynamically adjusting the overlapping area of each text block, including the length of the overlapping portion. It should not be less than the preset basic overlap length. And not less than the current text block length 10% of the current text block length, and not greater than the current text block length. The 15% overlap can be calculated using the following formula (7) to determine the length of the overlapping portion. .
[0093] Formula (7)
[0094] Among them, the preset basic overlap length This can be selected according to the actual situation; for example, the preset basic overlap length. The option is 50.
[0095] In summary, the combined effect of the three constraints ensures that each text block is within a fixed length range, thus maintaining controllable text block size while ensuring the integrity of text semantics.
[0096] S330. Based on multiple text blocks and their corresponding first vector encodings, a vector knowledge database is constructed.
[0097] In one possible implementation, based on a pre-defined base large language model, each text block is first vector encoded to transform the semantics of each text block into a pre-defined high-dimensional vector (e.g., 768-dimensional), capturing the deep semantic relationships of each text block, breaking through the limitations of keyword matching, solving the problem of missed detection in retrieval despite different expressions but consistent semantics, and then constructing a vector knowledge database to provide a foundation for subsequent implementation of hybrid retrieval of semantic matching and keyword filtering.
[0098] The retrieval method provided in this application decomposes the target document set into formats and extracts the text content. Then, it performs multi-constraint text segmentation processing on the text content according to semantic relevance. This solves the information redundancy problem of direct retrieval of raw unstructured text and ensures that the semantics of each text segment are independent and closed-loop, resulting in multiple text segments. On this basis, a first vector encoding is performed on each text segment to transform the semantics of each text segment into a preset high-dimensional vector to capture deep semantic relevance. This breaks through the limitations of traditional keyword matching and constructs a vector knowledge database. By configuring efficient indexes with structured text segments and corresponding vectors, semantic-level accurate matching is achieved. This provides a high-quality knowledge foundation for subsequent retrieval of multiple sub-questions and real-time data fusion, improving retrieval efficiency and the accuracy of answer generation.
[0099] Figure 4 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 3 .like Figure 4 As shown, the above method constructs a vector knowledge database based on multiple text blocks and their corresponding first vector encodings, including:
[0100] S410. Summarize the content of each text block and generate corresponding summary information.
[0101] In one possible implementation, a pre-defined base Large Language Model (LLM) is used to summarize the content of each text block and generate summary contextual information, i.e., the corresponding summary information.
[0102] S420. Associate and bind each text block with its corresponding summary information to form multiple structured text blocks.
[0103] In one possible implementation, the summary information corresponding to each text block is associated and bound to each text block to form multiple structured text blocks containing context.
[0104] S430. Based on a preset multilingual universal text vector model, semantic encoding is performed on multiple structured text blocks, multiple text segments, and corresponding summary information to obtain the content vector corresponding to each text segment, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block.
[0105] The preset multilingual universal text vector model can be selected according to the actual situation.
[0106] S440. Construct a vector knowledge database based on the content vector corresponding to each text block, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block.
[0107] In one possible implementation, a vector knowledge database is pre-established, comprising three sets: a content vector set, a summary vector set, and a summary-content association vector set. The summary vector set stores summary texts of multiple original text blocks; its primary key is a first unique identifier (id number), and other fields include the summary vector, the corresponding text block, source, and path. The content vector set has the same structure as the summary vector set but stores information about the original text blocks. The summary-content association vector set uses a third unique identifier (id number) as its primary key, and other fields include the first unique identifier (id number) of the summary vector set, the second unique identifier (id number) of the content vector set, and their corresponding vectors. For indexing, all vector fields in the three sets of this vector knowledge database use the Inner Product (IP) as the distance metric, and an AUTO INDEX is constructed for the vector fields. An inverted index is also configured for the source field of the summary vector set to balance the efficiency of vector similarity retrieval and structured condition filtering.
[0108] Specifically, for the content vector set, a preset multilingual general text vector model is used to semantically encode text blocks with contextual information, converting each text block into a preset high-dimensional vector (such as 768) and storing it in the content vector set.
[0109] Suppose that the structured text blocks with contextual information are... ,in, The block number is the number of the block. , This represents the total number of text blocks. The semantic encoding function of the preset multilingual universal text vector model is... The preset high-dimensional vector generated by the following formula (8) is: .
[0110] Formula (8)
[0111] in, This represents the core operation of a pre-defined multilingual universal text vector model that transforms a sequence of text blocks into high-dimensional semantic vectors. That is, the vector dimension is fixed at X, and each dimension value corresponds to a specific semantic feature of the text block.
[0112] Specifically, for the summary vector set, all text blocks are traversed, and summary vectors are generated and stored in the summary vector set based on a similarity-based greedy clustering strategy.
[0113] For the current text block, select four adjacent text blocks to participate in similarity greedy clustering. The vector similarity between text blocks is judged by a threshold. If the similarity is higher than the first similarity threshold and the group does not reach the preset maximum capacity (such as 3), they are classified into the same group.
[0114] Let the preset high-dimensional vectors of two adjacent text blocks be respectively .in, This is the sequence number of the previous text block. The semantic similarity between the two is calculated using the cosine similarity formula (9) below. And perform threshold judgment.
[0115] Formula (9)
[0116] Among them, molecules The dot product of two vectors, denominator This is the product of the magnitudes of the two vectors. If a threshold is passed, it indicates that two adjacent text blocks are semantically closely related and are grouped together. After the text blocks in the same group are concatenated into a complete text, a preset base model is called to generate summary text. A preset multilingual general text vector model is used to embed the summary vectors, and the summary is stored in the summary vector set. The preset multilingual general text vector model can be selected according to the actual situation.
[0117] Specifically, for the summary content association vector set, it is necessary to establish an association mapping between the summary and the original text blocks and store it in the summary content association vector set. Generally, one summary corresponds to three content blocks.
[0118] Let the adjacent text block vectors grouped into the same group be... ],in, Group number .in, This represents the total number of groups; , These are the sequence numbers of the first and last text blocks within the group. A summary text for this group is generated using a pre-defined base large language model, and after embedding through a pre-defined multilingual general text vector model, the vector is... The association mapping function is defined by the following formula (10). This enables the binding of the summary vector with the original text block vector group.
[0119] Formula (10)
[0120] in, Grouping The summary vector; Essentially, it's a key-value mapping relationship, where the key is the summary vector. The value is the corresponding original text block vector group. The data is stored in a set of vectors associated with the summary content, supporting bidirectional tracing of the summary and content. Ultimately, a vector database comprising three sets is constructed to achieve efficient storage and management of vector data.
[0121] The retrieval method provided in this application summarizes the content of each text block to generate corresponding summary information, thereby extracting the core semantics of the text block and adapting it to the retrieval scenario. Then, each text block and its corresponding summary information are linked and bound to form multiple structured text blocks with complete details and concise core information, enabling the linked retrieval of content and summary. Based on a pre-defined multilingual universal text vector model, semantic encoding is performed on multiple structured text blocks, multiple text segments, and their corresponding summary information, respectively, to obtain the content vector corresponding to each text block, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block. This captures semantic features from multiple dimensions, thereby overcoming the limitations of single encoding and improving the comprehensiveness of semantic matching. Based on the content vector corresponding to each text block, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block, a vector knowledge database is constructed. This database enables efficient retrieval of relevant blocks through summary vectors, ensures retrieval accuracy through content vectors and association vectors, and adapts to different retrieval intentions, providing knowledge support for subsequent retrieval of multiple sub-questions and multi-source information fusion.
[0122] Figure 5 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 4 .like Figure 5 As shown, the above method responds to the initial question of the user query by splitting the initial question into multiple sub-questions. The method also includes:
[0123] S510. In response to the initial question of the user query, judge the initial question to determine whether the initial question is a complex question.
[0124] Among them, a complex problem is a problem type in which the initial problem contains at least two subjects, and at least two subjects together correspond to a task.
[0125] S520. If the initial problem is confirmed to be a complex problem, then the initial problem is broken down into multiple sub-problems.
[0126] In one possible implementation, the initial configuration file of the retrieval unit is loaded, such as obtaining parameters like the database address, the preset base large language model, the reordering model and the path of the preset base large language model, and the retrieval threshold, to confirm the validity of the path of the local reordering model and initialize the reordering model and the preset base large language model.
[0127] In response to the user's initial query, the data structure of the initial query is a string, and the text is checked to be non-empty and of the correct length.
[0128] Regarding the user's initial question Define the conditional function `decompose`. It then calls a preset base language model to determine if the problem is complex. If the initial problem is a complex problem with multiple subjects and multiple tasks, it is broken down into multiple simpler sub-problems based on the subject or task type of the initial problem. ,in, The question number is... . This represents the total number of simple subproblems in the decomposition; if a subproblem is simple, the initial problem is retained. .
[0129] Among them, the judgment function decompose The criteria for judging a complex query are as follows: First, if the core object to be operated on or queried, or a clearly defined specific object, is the subject. Second, if the core action to be performed in the query is the task. Third, if the query contains two or more subjects but only one task, it is considered a complex query. Other queries, such as those with one subject and one task or one subject and two tasks, are considered simple queries.
[0130] The conditional function `decompose` The processing rules are divided into complex queries and simple queries. Complex queries are broken down into multiple simple subqueries based on a subject and a task, ensuring that each subquery focuses on only one combination of subject and original task. Simple queries directly return the original query.
[0131] It should be noted that the original task is not added or modified in this processing rule, and each subquery focuses on one information point.
[0132] The conditional function `decompose` The output must be a strict Python list, such as ["subquery 1", "subquery 2", "subquery 3"].
[0133] The retrieval method provided in this application responds to the initial question of a user query by judging whether the initial question is complex. If the initial question is confirmed to be complex, it is split into multiple sub-questions. This judgment and splitting logic can identify the characteristics of multi-subject collaborative task queries, transforming the fuzzy retrieval target with multiple superimposed subjects into a precise retrieval unit focused on a single subject. This effectively adapts to the semantic granularity of text blocks in vector knowledge databases, avoiding retrieval bias caused by semantic confusion of multiple subjects, while ensuring the semantic focus of each sub-question. This provides accurate input for subsequent intent judgment, vector encoding, and similarity matching, improving the relevance and information completeness of retrieval results, and ensuring the relevance and feasibility of subsequent answer generation.
[0134] Figure 6 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 5 .like Figure 6 As shown, in the above method, after performing second vector encoding on multiple sub-problems, a preset similarity matching is performed based on the retrieval target set to obtain the first text block set, including:
[0135] S610. Perform second vector encoding on multiple subproblems to obtain subproblem vectors corresponding to the multiple subproblems.
[0136] In one possible implementation, after obtaining multiple sub-questions, intent analysis is first performed on each sub-question to determine the specific query details, including commands, parameter configurations, and operation steps. If the query involves specific details, the content vector set is retrieved directly; otherwise, the summary vector set is retrieved.
[0137] The query of a vector-oriented knowledge database is known to be Define the intent judgment function The intention is to determine if the function returns a boolean value, i.e., if... If so, it indicates the intention is to query specific details; if If the intention is to perform a wide-ranging screening, it can be represented by the following formula (11).
[0138] Formula (11)
[0139] Among them, the intent judgment function The processing rules are as follows: If the content vector set is retrieved, the sub-question explicitly points to specific operation and maintenance commands, operation steps, parameter configurations, and other directly executable details, requiring the acquisition of specific implementation content, and the code is 1; if the summary vector set is retrieved, the sub-question only inquires about the overall scope, general process framework, core conclusions, or conceptual information of a certain type of operation and maintenance problem, without involving specific execution details, and the code is 0.
[0140] The output of the intent-determining function must be a strict code 0 or 1, and must not contain any additional text, symbols, or interpretations.
[0141] Then, a preset multilingual universal text vector model is invoked to transform the initial question or multiple sub-questions corresponding to the initial question into a preset high-dimensional vector.
[0142] Let the multiple subproblems be The semantic encoding function of the pre-defined multilingual universal text vector model is: The preset high-dimensional vector generated by the following formula (12) is: .
[0143] Formula (12)
[0144] in, This represents the core operation of a pre-defined multilingual universal text vector model that transforms a sequence of text blocks into high-dimensional semantic vectors. This means that the vector dimension is fixed at X, and X is greater than 3, with each dimension value corresponding to a specific semantic feature of the text. This represents the vector of subproblems corresponding to multiple subproblems.
[0145] S620. Construct a retrieval buffer based on the initial set of questions from historical user queries and the corresponding set of historical standardized question processing results.
[0146] In one possible implementation, to improve the response speed of vector retrieval and the efficiency of handling repeated queries, this application provides a multi-level retrieval acceleration buffer mechanism. This multi-level retrieval acceleration buffer mechanism is used to provide acceleration support for query tasks at different levels during the RAG process.
[0147] The multi-level retrieval acceleration buffer mechanism includes a buffer for storing and reusing various types of query results. These various types may include, but are not limited to, direct question-and-answer pairs from the upper layer, rewritten subquery question-and-answer pairs, and real-time data compression question-and-answer pairs.
[0148] The system utilizes an initial set of historical user queries, encompassing both simple past issues and their complex sub-issues, along with a corresponding set of standardized historical problem-solving results. These standardized results represent evaluated and validated, standardized, and implementable operational solutions. A lightweight retrieval cache is built based on a Key-Value structure to enable rapid result retrieval and reuse.
[0149] Among them, the query statement embedding vector The hash representation is defined as The retrieval buffer is represented by the following formula (13). .
[0150] Formula (13)
[0151] in, To retrieve cache keys, This is the corresponding set of query results.
[0152] The retrieval buffer Essentially, it establishes a precise mapping cache of historical query sub-problems and standardized problem processing results. When receiving new queries, this retrieval buffer can prioritize matching similar or identical historical queries and directly reuse verified standardized results. This eliminates the need to repeatedly execute the complete process of problem splitting, vector retrieval, multi-source information fusion, and answer generation. It can improve the response speed of repeated queries, reduce computing resource consumption, and reuse standardized results that have been verified in practice, ensuring the accuracy and reliability of the response. This is suitable for the dual requirements of efficient response and stable reliability in the intelligent operation and maintenance scenarios of large-scale computing power systems.
[0153] S630. Based on the retrieval buffer, perform cache hit judgment on each sub-problem vector to obtain the cache hit result for each sub-problem.
[0154] S640. If the cache hit result is a hit, then the historical text block set is used as the first text block set of the current subproblem.
[0155] S650. If the cache hit result is not found, then perform a preset similarity matching based on the search target set to obtain the first text block set.
[0156] In one possible implementation, based on the retrieval buffer The cache hit result of each subproblem vector is obtained by performing cache hit judgment on each subproblem vector using the following formula (14).
[0157] Formula (14)
[0158] in, This is the hit threshold.
[0159] If the cache hit result is true, then return the cache hit result directly. and the cache hit result The first text block set is used as the first text block set for the current sub-problem; if the cache hit result is a miss, then the preset similarity matching is performed according to the retrieval target set to obtain the first text block set.
[0160] The specific process of obtaining the first text block set by performing preset similarity matching based on the target search set is as follows:
[0161] Specifically, if the retrieval involves a set of target content vectors within a target set, then cosine similarity matching is performed on multiple sub-question vectors to obtain a first preset number of... The initial document block with the highest similarity score. Among them, the first preset number... The quantity can be selected according to the actual situation; for example, the first preset quantity. Option 5 is available.
[0162] Given that the vector of multiple subproblems is Let the target text block vector in the retrieval target set be... ( (where the text is segmented by its index), and the cosine similarity is... The initial document block is determined by the following formula (15).
[0163] Formula (15)
[0164] Among them, the first preset number is obtained in descending order of cosine similarity matching. (e.g., 5) corresponding initial document blocks, these initial document blocks correspond to vectors .in For vector dot product, It is the product of the magnitudes of vectors.
[0165] It should be noted that the first preset quantity These are dynamic parameters tailored to the needs of the retrieval scenario; if removed in subsequent reordering stages... Low-relevance documents, and the final output must be... When there are 1 content text block, the first preset number of initial document blocks. Should be .in, This refers to the proportion of low-relevance documents that need to be filtered out. It is a pre-set parameter in information retrieval / document ranking scenarios. Set to 30%.
[0166] If the search query is for the target summary vector set of the target set, then the first preset number of vectors obtained from the initial search will be used. The summary document block corresponding to each initial document block calls the preset multilingual text rearrangement model, and performs the first preset number of... Perform cosine similarity matching on each initial document block to obtain a second preset number of results. The second preset number of summary document blocks with the highest similarity scores. Each summary document block constitutes the first set of text blocks.
[0167] Specifically, let the initial search result be a first preset quantity. The set of initial document blocks is m is the first preset quantity The initial number of results; the scoring function of the preset multilingual text reordering model for the initial set of document blocks S is: The initial set of document blocks sorted in descending order of score .
[0168] The score of the initial document block should be: Then, the results are rearranged and filtered according to the following formula (16).
[0169] Formula (16)
[0170] in, The second preset quantity set in the configuration file You can choose according to the actual situation, such as 3. This is the final set of candidate document blocks after rearrangement. Second preset quantity. It involves dynamically adjusting parameters based on the search scenario and removing them as needed. Low relevance documents, their value is .
[0171] It should be noted that the second preset quantity Less than .
[0172] Additionally, it should be noted that within the target search set, if the search is based on the target summary vector, the content document block corresponding to the document ID associated with that summary vector is obtained; if the search targets the target content vector set, the content document block obtained from the initial search is first processed... The corresponding text blocks are reordered using a preset multilingual text reordering model, taking the second preset number of elements. The content text blocks are sorted in descending order by cosine similarity, and then the summary text blocks associated with the content text blocks are obtained.
[0173] The retrieval method provided in this application obtains sub-question vectors corresponding to multiple sub-questions by performing second vector encoding on multiple sub-questions, ensuring that they are in the same semantic space as the vectors in the retrieval buffer and vector knowledge database, laying the foundation for subsequent matching. At the same time, a retrieval buffer is constructed based on the initial question set of historical user queries and the corresponding historical standardized question processing result set to establish a mapping cache of associated text blocks of historical queries and standardized results, providing data support for rapid reuse. Subsequently, according to the retrieval buffer, a cache hit judgment is performed on each sub-question vector to obtain the cache hit result for each sub-question. If the cache hit result is a hit, the historical text block set is used as the first text block set of the current sub-question, without repeating the subsequent retrieval process. If the cache hit result is a miss, a preset similarity match is performed from the retrieval target set according to the predetermined logic to obtain the first text block set. Therefore, this application accelerates the retrieval mechanism by constructing a retrieval buffer and then performing multi-level retrieval. This not only allows for the direct reuse of historically valid data that has been verified in practice, reducing redundant computation overhead, but also ensures the reliability of results in scenarios where no match is found, significantly improving retrieval response speed and thus effectively enhancing the overall performance of the retrieval system and the user query experience.
[0174] Figure 7 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 6 .like Figure 7 As shown, after performing second vector encoding on multiple sub-problems in the above method, and after obtaining the first text block set by performing preset similarity matching based on the retrieval target set, the method further includes:
[0175] S710. Extract the set of keywords corresponding to multiple sub-problem vectors.
[0176] S720. Based on the preset keyword rule verification algorithm, calculate the matching score between the text content of the first text block set and the corresponding keyword set.
[0177] The preset keyword rule verification algorithm can be selected according to the actual situation. For example, the preset keyword rule verification algorithm can be selected as the BM25 algorithm.
[0178] S730. Based on the matching score, filter the first text block set to obtain the verification text block set.
[0179] In one possible implementation, for the retrieved target summary text blocks and content text blocks, to ensure they are indeed relevant to the query content and contain matching keywords, a simple retrieval verification using the BM25 algorithm is performed. Keyword matching using the BM25 algorithm is then performed based on rules, filtering out text blocks that do not conform to the rules.
[0180] Let the set of keywords in the user's multiple subproblems be . ,in, Text is divided into blocks based on the number of keywords. The text content is Each keyword is calculated using the BM25 algorithm. The matching score with text block D is the final score, which is the weighted sum of the scores of each keyword. The following formula (17) is used to determine whether to retain the current text block.
[0181] Formula (17)
[0182] Formula (17) above ensures that the final output text block contains at least one content that conforms to the rules, thus improving the relevance of the search results. It also removes duplicate document blocks returned by different subqueries.
[0183] The optimized text blocks are then organized into a list[Document] data structure. This list[Document] is the collection of validation text blocks.
[0184] Finally, the total time from receiving multiple sub-questions to outputting the results is calculated, and the results are returned to the downstream LLMs enhancement generation unit. This provides the downstream LLMs enhancement generation unit with a reference for retrieval timeliness and a basis for dynamic optimization. If the total time is short, it indicates that the retrieval results are real-time and highly available. The LLMs can prioritize the deep integration of the first text block set and real-time status data to generate a more accurate and detailed operation and maintenance solution. If the total time is long, the LLMs can dynamically adjust the generation strategy (such as outputting the basic solution first as a fallback, and then supplementing the retrieved details, or prioritizing the reuse of general knowledge and cached results) to avoid overall response delays caused by retrieval waiting. At the same time, the total time data can also support the LLMs in optimizing resource allocation, reducing invalid waiting overhead, and ensuring efficient collaboration between the generation and retrieval stages. This not only ensures the accuracy and feasibility of the operation and maintenance solution, but also further compresses the end-to-end response time, ultimately improving the overall performance of the entire retrieval and generation process and the user query experience.
[0185] The retrieval method provided in this application extracts keyword sets corresponding to multiple sub-problem vectors to accurately pinpoint the core requirements and key technical terms of each sub-problem. Based on a preset keyword rule verification algorithm, it calculates the matching score between the text content of the first text block set and the corresponding keyword set, achieving a secondary verification of the relevance of the text blocks and compensating for semantic biases that may exist in single vector similarity matching. Then, based on the matching score, the first text block set is filtered to remove redundant or irrelevant blocks with low matching degree, resulting in a highly relevant verification text block set. Thus, through secondary verification and filtering at the keyword level, this application not only further improves the accuracy of retrieval results and avoids invalid information interfering with downstream generation processes, but also effectively compresses the scope of subsequent data processing, reduces the computational overhead of LLM, and provides high-quality and reliable knowledge material support for generating accurate and implementable operation and maintenance solutions.
[0186] Figure 8 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 7 .like Figure 8 As shown, after performing second vector encoding on multiple sub-problems in the above method, and after obtaining the first text block set by performing preset similarity matching based on the retrieval target set, the method further includes:
[0187] S810. Determine the number of text blocks in the first text block set.
[0188] In one possible implementation, based on the semantic similarity scores between multiple sub-questions and text blocks, a first preset number is selected. The initial document block with the highest similarity score is selected, and then a preset multilingual text reordering model is applied to this initial document block for reordering. The second preset number of elements is then selected. A set of text blocks, ordered by cosine similarity, constitutes the first set of text blocks. The number of text blocks in the first set is the second preset number. .
[0189] Among them, the second preset quantity It must be less than the first preset quantity. Simultaneously, it needs to be dynamically adjusted in conjunction with the constraints of computing power operation and maintenance scenarios. On the one hand, it is necessary to ensure the second preset quantity. Sufficiently cover text blocks that are highly relevant to the sub-problem requirements, avoiding issues caused by the second preset number. Too few items will result in the loss of key information, affecting the accuracy of subsequent information fusion and problem solving; on the other hand, the number of the second preset items needs to be strictly controlled. The upper limit is set to avoid including too many redundant text blocks with low similarity, thereby reducing the computational complexity of subsequent steps such as reordering, verification, and fusion, and ensuring the efficiency of retrieval and processing.
[0190] S820. If the number of text blocks is not 0, then the first set of text blocks is output in a standardized manner.
[0191] S830. If the number of text blocks is 0, the problem rewriting process is triggered.
[0192] In one possible implementation, if the number of text blocks is determined to be non-zero, then the first set of text blocks is output in a standardized manner, that is, the summary text blocks and content text blocks in the first set of text blocks are output in a standardized manner; if the number of relevant document blocks retrieved is zero, the original query initial question Q is rewritten using a preset base large language model, that is, the question rewriting process is triggered.
[0193] The retrieval method provided in this application first determines the number of text blocks in the first text block set as the basis for decision-making in subsequent processes. If the number of text blocks is not zero, the first text block set is output in a standardized manner to unify the format and information presentation logic of the first text block set, reduce the cost of downstream LLM fusion processing, and improve the efficiency and standardization of the generation process. If the number of text blocks is zero, it means that the current retrieval has not obtained a valid matching text block, and the question rewriting process is triggered to optimize the semantic expression of the sub-question or supplement key information to re-initiate the retrieval, avoiding answer generation failure or deviation due to lack of effective knowledge support, ensuring the continuity and reliability of the entire retrieval and generation process, and further improving the stability of the retrieval system response and user experience.
[0194] Figure 9 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 8 .like Figure 9 As shown, the problem rewriting process in the above method includes:
[0195] S910: Based on the preset base large language model, rewrite the sub-problem vectors corresponding to multiple sub-problems and generate multiple new sub-problem vectors.
[0196] In one possible implementation, based on a pre-defined base large language model, the rewritten function expand is used. Based on the preset prompts, multiple sub-problems are rewritten to generate 2 to 3 semantically similar problem variants, i.e., new sub-problem vectors.
[0197] The preset prompts require generating variants that are semantically similar to the original query. The core intent must be strictly preserved, and the expression must be adjusted only through synonym replacement, sentence transformation, etc., to avoid being completely identical to the original query. Two valid variants must be generated. If the original query is short or difficult to expand, the limit can be appropriately relaxed to three.
[0198] Overwrite the function expand The output must strictly follow the Python list format, such as ["query 1", "query 2", "query 3"], with no extra punctuation inside.
[0199] S920. Re-search the multiple new sub-problem vectors to obtain the second text block set.
[0200] In one possible implementation, multiple new sub-problem vectors are re-searched to obtain a second set of text blocks.
[0201] If the rewritten search results (second text block set) still do not have a matching document block, then the default string of no matching content in the configuration will be returned.
[0202] It should be noted that this rewritten function expand By expanding the search coverage through semantic variants, the system effectively compensates for the missed detections caused by inappropriate original query expressions. At the same time, the clear process branches and output specifications ensure the continuity of the search process, which not only increases the probability of obtaining effective knowledge, but also avoids invalid searches consuming too many resources, further enhancing the reliability and efficiency of the system response.
[0203] Additionally, it should be noted that if exceptions such as failure to connect to the vector knowledge database or failure to call the embedded model API occur, the system will automatically retry 3 times. If the retry fails, a preset message indicating that the service is temporarily unavailable will be returned, interrupting the current search process and logging the error.
[0204] The retrieval method provided in this application, based on a pre-defined base large language model, rewrites the sub-question vectors corresponding to multiple sub-questions, generating multiple new sub-question vectors. By optimizing the semantic expression, it generates multiple new sub-question vectors with semantic consistency with the atomic question vectors but stronger adaptability, effectively avoiding the expression limitations or semantic deviations that may exist in the atomic question vectors. Re-retrieval based on these new sub-question vectors can expand the retrieval coverage, capture highly relevant knowledge units that were not matched in the first retrieval, and obtain a second text block set. This not only supplements more comprehensive and high-quality knowledge materials for subsequent multi-source information fusion and answer generation, but also further improves the completeness and effectiveness of the retrieval results, avoiding the omission of effective information due to a single expression.
[0205] Figure 10 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 9 .like Figure 10 As shown, the above method, based on a preset base large language model, integrates real-time state data, the first text chunk set, and the general knowledge of the preset base large language model to construct structured prompt words. These prompt words are then input into the preset base large language model to generate the initial answer, including:
[0206] S1010: Based on the preset base large language model, real-time status data, verification text block set and general knowledge of the preset base large language model are integrated to generate integrated input knowledge.
[0207] In one possible implementation, semantic compression is performed based on a pre-defined large language model (LLM). Through context aggregation and semantic abstraction, only core information and potential causal relationships are retained. This is done by first compressing real-time state data containing a large number of features and event descriptions. Transform into concise and coherent natural language description text This significantly reduces the input scale.
[0208] Among them, real-time status data Convert to natural language description text The processing rules are as follows: First, the overall operating status of the system can be summarized (normal, high load, abnormal, etc.); second, the main trend changes can be summarized (such as increased resource usage, increased communication latency, etc.); third, potential causal relationships or suspicious correlations can be summarized.
[0209] Among them, natural language description text The output should be in string format, and the output content should be semantically concise, logically clear, and interpretable, without containing raw numerical values or log fragments.
[0210] Then, through semantic similarity matching and pattern alignment, the natural language description text corresponding to the current real-time state is identified. With the set of validation text chunks The fusion process identifies the complementarity and redundancy of information from different sources by calculating the semantic similarity and distribution differences between them, and assigns fusion weights to each knowledge source based on this. The retrieval system adaptively adjusts the weight ratio according to the intensity of changes in real-time state data. When the state fluctuation is large, the contribution of real-time state data is strengthened, while the proportion of near-real-time and general knowledge is increased when the environment is stable. Finally, the fusion input knowledge can be obtained according to the following formula (18). This integrates input knowledge This indicates semantic consistency and timeliness adaptability, providing high-density and context-consistent knowledge input for subsequent generation stages.
[0211] Formula (18)
[0212] in, .
[0213] in The weights are related to the intensity of changes in real-time status data, with the remaining weights determined by... The result is obtained through calculation and can be expressed by the following formula (19).
[0214] , Formula (19)
[0215] in, It represents the change in the state of the retrieval system at time t; It is the preset scaling weight. You can choose according to the actual situation.
[0216] To verify the text chunk set Information content ratio, input enhancement and fusion of input knowledge It retains key information about the dynamic operation of the retrieval system with minimal character count cost and achieves semantic fusion and contextual unification of multi-source heterogeneous knowledge.
[0217] S1020: Based on fused input knowledge, multiple sub-question vectors, and a set of verification text blocks, construct structured prompt words.
[0218] In one possible implementation, enhancing the output quality by integrating retrieved document information and real-time status data at the input layer of a pre-built large language model (LLM) is a key step. The retrieval system uses the retrieved document content as background knowledge, organically integrates it with the user's initial question, jointly constructs structured prompt words, and then passes the entire set of prompts to the pre-built LLM.
[0219] Let the user's initial question be The retrieved relevant document set is ,in, To the number of documents retrieved, Indicates the first The text content of this document, and the fusion input knowledge of intelligent operation and maintenance scenarios for large-scale computing power systems. Define prompt word fusion function Structured prompts are Then, structured prompt words are constructed using the following formula (20).
[0220] Formula (20)
[0221] Among them, the structured prompt words This approach aims to integrate and connect questions, documents, and data, providing structured contextual support for the pre-defined base-based Large Language Model (LLM). This method offers richer contextual support to the model, effectively compensating for the limitations of the pre-defined base-based Large Language Model (LLM) in terms of domain-specific knowledge or timely information, resulting in more targeted and accurate generated responses.
[0222] Among them, structured prompt words The processing rules are as follows: First, prioritize reading and extracting relevant content from the search information and system status / job data as the core basis for the answer. Second, if the search information or system status / job data is empty, or the relevant content is insufficient, it can be supplemented based on personal experience, but it is necessary to clearly indicate which parts are supplemented based on experience. Third, filter and retain content that conforms to the facts, and for conflicting information, the search information and system status / job data shall prevail. Fourth, logically organize and optimize the language of the retained content to ensure clear and accurate expression.
[0223] Among them, structured prompt words The output has two requirements: First, the summary answer must be a single text paragraph (no limit on the number of paragraphs), and no line breaks are allowed within the paragraph. Second, when involving specific scripts, commands, or solutions, first summarize the solution to the problem, then start a new paragraph to list the commands and solutions in bullet points (1, 2, 3...).
[0224] S1030. Input the structured prompts into the preset base language model to generate the initial answer.
[0225] In one possible approach, structured prompts are input into a pre-defined base language model. Leveraging the model's semantic understanding and logical organization capabilities, initial answers to user questions are generated that are relevant to the current operational scenario, supported by authoritative knowledge, conform to standardized formats, and are readily applicable. This approach avoids the logical inconsistencies and information omissions that can occur with unstructured prompts, and significantly reduces the probability of the pre-defined base language model generating invalid or off-target content, thereby improving the accuracy and practicality of the initial answers.
[0226] The retrieval method provided in this application, based on a pre-defined large-scale language model, integrates real-time status data, a set of verification text blocks, and the general knowledge of the pre-defined large-scale language model to generate fused input knowledge that is timely, accurate, and complete. This effectively compensates for the limitations of a single knowledge dimension and avoids answers that are out of touch with reality or contain one-sided information. Subsequently, structured prompts are constructed by combining the fused input knowledge, multiple sub-question vectors, and the set of verification text blocks. Finally, the structured prompts are input into the pre-defined large-scale language model to generate initial answers. By leveraging the semantic integration and logical organization capabilities of the pre-defined large-scale language model, initial answers that are both relevant to the current operational status and supported by authoritative knowledge, and are formatted in a standardized and directly applicable way, are generated. This significantly reduces the probability of the pre-defined large-scale language model generating invalid or biased content and improves the adaptability and practical value of the initial answers, laying the foundation for subsequent evaluation and standardized output.
[0227] Figure 11 A flowchart illustrating a retrieval method provided in this application embodiment. Figure 10 .like Figure 11As shown, the above method evaluates the initial answer and outputs standardized problem processing results, including:
[0228] S1110. Based on the initial answer, multiple sub-question vectors, and the set of verification text blocks, the evaluation is performed on the preset base large language model to obtain the evaluation result.
[0229] The evaluation results include: whether the initial answer is the same as the set of validation text chunks and whether the initial answer can solve multiple sub-problems.
[0230] In one possible implementation, based on the initial answer, multiple sub-question vectors focusing on the core requirements, and a set of highly relevant verification text blocks that have undergone secondary verification, a secondary evaluation mechanism is introduced relying on a pre-set base large language model. The evaluation is performed in conjunction with pre-set evaluation prompts to obtain evaluation results covering whether the initial answer is consistent with the set of verification text blocks (i.e., whether it is based on authoritative retrieval facts) and whether the initial answer effectively solves multiple sub-questions.
[0231] The evaluation of preset prompts requires first assessing whether the initial answer is based on the retrieved facts and whether there is any content that does not match the retrieved document. Then, it is determined whether the answer is relevant to the original sub-question and provides an effective solution. Finally, it is determined whether the answer solves the problem with a "yes" or "no". At the same time, the revised answer is required to conform to factual logic and writing style.
[0232] S1120. After correcting the evaluation results, output the standardized problem handling results.
[0233] In one possible implementation, during the evaluation process, the pre-set base language model not only verifies the relevance, completeness, and accuracy of the retrieved information, but also judges the utilization of the retrieved resources by the initial answer and whether there are information biases or logical omissions. Then, based on the evaluation results, the initial answer is dynamically corrected, such as supplementing missing information, correcting erroneous expressions, and strengthening logical coherence, and finally outputs standardized problem processing results.
[0234] The retrieval method provided in this application evaluates the initial answer, multiple sub-question vectors, and a set of verification text blocks based on a pre-set large language model. The evaluation results include whether the initial answer matches the set of verification text blocks and whether the initial answer effectively solves multiple sub-questions. During this evaluation process, the pre-set large language model verifies whether the initial answer conforms to the retrieval criteria, whether there are information biases or logical omissions, and whether it adequately responds to the core needs of the sub-questions. The evaluation results are then corrected based on the evaluation results before outputting standardized problem-solving results. Thus, this application, through a closed loop of evaluation and correction, effectively avoids problems such as initial answers deviating from the retrieval criteria, straying from the core of the problem, or exhibiting logical inconsistencies. This ensures that the final output conforms to factual norms, accurately addresses operational needs, and has direct applicability, thereby improving the reliability and practical value of the retrieval system.
[0235] To facilitate understanding of the above retrieval methods, this application also provides an example of a retrieval system, which will be further described below. Figure 12 This is a schematic diagram of the structure of a retrieval system provided in an embodiment of this application. For example... Figure 12 As shown, the retrieval system may include: a vector knowledge database 1210, a retrieval unit 1220, and an enhancement generation unit 1230.
[0236] The vector knowledge database 1210 is responsible for building a searchable structured knowledge reserve, providing a foundation for subsequent accurate retrieval. The vector knowledge database 1210 includes segmented text blocks, which involves performing format parsing, text block processing, adding context, and embedding into the database on the original target document set. This process splits unstructured documents into semantically complete and appropriately granular text blocks, which are then converted into vector forms with computable semantic similarity through vector encoding (implicit in the database embedding process), forming a text block vector library.
[0237] The vector knowledge database 1210 is mainly used to construct a set of summary vectors, a set of content vectors, and a set of summary content association vectors. Based on this vector knowledge database 1210, a set of retrieval targets is constructed to ensure that subsequent retrievals can efficiently locate highly relevant knowledge.
[0238] The retrieval unit 1220 is responsible for semantic parsing and knowledge retrieval of the user's initial query question (Q), and outputting a highly relevant first set of text chunks. The retrieval unit 1220 includes: query decomposition, intent recognition and query embedding, reordering matching and retrieval buffer, and BM25 verification and question rewriting.
[0239] The decomposition query (Q→Q1) involves receiving the user's initial question (Q) and determining whether it is a complex question. If it is a complex question, it is broken down into multiple sub-questions (Q1) to ensure that the semantic granularity of the retrieval unit 1220 matches the granularity of the text blocks in the database.
[0240] Intent recognition and query embedding involve determining the intent of each sub-question (Q1) to identify the set of retrieval targets (such as the set of text blocks for troubleshooting corresponding to the sub-question of computing node failure); at the same time, each sub-question (Q1) is vector-encoded (i.e., query embedding) and transformed into a sub-question vector in the same space as the text block vector.
[0241] The rearranged matching and retrieval buffer is based on multiple sub-question vectors. It performs similarity matching in the vector knowledge database and recalls a preset number of corresponding text blocks with high similarity. At the same time, it combines the retrieval buffer to determine whether the cache is hit. If it is hit, the historical text block is directly reused to reduce redundant calculations.
[0242] The BM25 verification and rewriting process involves calculating keyword matching scores on the recalled text chunks and filtering out the verification text chunks. If the search results are empty, the question rewriting process is triggered, generating semantically similar question variants based on the preset base large language model and re-initiating the search to ensure the integrity of knowledge recall.
[0243] The enhanced generation unit 1230 is responsible for fusing multi-source information and generating standardized, actionable problem-solving answers. The enhanced generation unit 1230 includes knowledge fusion and answer generation. Knowledge fusion involves deeply integrating the verification text chunks output by the retrieval unit 1220, the real-time status data of the target intelligent operation and maintenance scenario, and the general knowledge of the base large language model to construct structured prompt words and clarify the output format and content boundaries.
[0244] The answer generation process involves inputting structured prompts into a pre-defined base language model to generate an initial answer. Subsequently, based on the initial answer, sub-question vectors, and a set of verification text blocks, a secondary evaluation is triggered to verify whether the initial answer is based on the retrieved facts and whether it solves the sub-questions. After correcting the initial answer, a standardized problem processing result is output to ensure the accuracy, feasibility, and standardization of the answer.
[0245] The retrieval system provided in this application consists of a vector knowledge database, a retrieval unit, and an enhanced generation unit. The vector knowledge database constructs a knowledge foundation and outputs it to the retrieval unit. After accurately recalling the knowledge, the retrieval unit outputs it to the enhanced generation unit. The enhanced generation unit integrates and generates the answer, realizing a closed-loop process from user query to standardized solution. This ensures the accuracy of knowledge retrieval and guarantees the scenario adaptability and reliability of the answer through multi-source information fusion and secondary evaluation.
[0246] Optionally, this application provides a retrieval device. Figure 13 This is a schematic diagram of a retrieval device provided in an embodiment of this application. Figure 13 As shown, the retrieval device 1300 includes:
[0247] Module 1310 is used to acquire the vector knowledge database corresponding to the target document set and the real-time status data of the target intelligent operation and maintenance scenario;
[0248] The splitting module 1320 is used to respond to the initial question of a user query by splitting the initial question into multiple sub-questions;
[0249] The judgment module 1330 is used to judge the intent of multiple sub-questions and determine the set of retrieval targets;
[0250] The matching module 1340 is used to perform second vector encoding on multiple sub-questions, and then perform preset similarity matching based on the retrieval target set to obtain the first text block set;
[0251] The acquisition module 1350 is used to acquire real-time status data of the target intelligent operation and maintenance scenario;
[0252] The fusion module 1360 is used to fuse real-time status data, the first text block set, and the general knowledge of the preset base big language model based on the preset base big language model. After constructing structured prompt words, the input to the preset base big language model generates the initial answer.
[0253] Evaluation module 1370 is used to evaluate the initial answer and output standardized problem processing results.
[0254] In one possible implementation, the construction module 1310 is specifically used for: performing format decomposition on the target document set and extracting text content to obtain text content; performing multi-constraint text segmentation processing on the text content according to semantic relevance to obtain multiple text segments; the multiple constraints include at least: length constraints of a single text segment, overlapping area constraints between adjacent text segments, and punctuation priority constraints in a single text segment; and constructing a vector knowledge database based on the multiple text segments and the corresponding first vector encoding.
[0255] In one possible implementation, the construction module 1310 is specifically used for: summarizing the content of each text block to generate corresponding summary information; associating and binding each text block and its corresponding summary information to form multiple structured text blocks; semantically encoding the multiple structured text blocks, multiple text blocks, and their corresponding summary information based on a preset multilingual universal text vector model to obtain the content vector corresponding to each text block, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block; and constructing a vector knowledge database based on the content vector corresponding to each text block, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block.
[0256] In one possible implementation, the splitting module 1320 is further configured to: in response to the initial question queried by the user, determine whether the initial question is a complex question; a complex question is one in which the initial question contains at least two subjects, and at least two subjects correspond to a question type of a task; if the initial question is confirmed to be a complex question, then the initial question is split to obtain multiple sub-questions.
[0257] In one possible implementation, the splitting module 1320 is specifically used for: performing second vector encoding on multiple sub-problems to obtain sub-problem vectors corresponding to the multiple sub-problems; constructing a retrieval buffer based on the initial set of questions queried by historical users and the corresponding set of historical standardized question processing results; performing cache hit judgment on each sub-problem vector according to the retrieval buffer to obtain the cache hit result for each sub-problem; if the cache hit result is a hit, then using the historical text block set as the first text block set for the current sub-problem; if the cache hit result is a miss, then performing preset similarity matching according to the retrieval target set to obtain the first text block set.
[0258] In one possible implementation, the matching module 1340 is further configured to: extract the keyword set corresponding to multiple sub-question vectors; calculate the matching score between the text content of the first text block set and the corresponding keyword set based on a preset keyword rule verification algorithm; and filter the first text block set according to the matching score to obtain the verification text block set.
[0259] In one possible implementation, the matching module 1340 is further configured to: determine the number of text blocks in the first text block set; if the number of text blocks is not 0, perform normalized output on the first text block set; if the number of text blocks is 0, trigger the problem rewriting process.
[0260] In one possible implementation, the matching module 1340 is specifically used to: rewrite the sub-question vectors corresponding to multiple sub-questions based on a preset base large language model, and generate multiple new sub-question vectors; and re-retrieve the multiple new sub-question vectors to obtain a second text block set.
[0261] In one possible implementation, the fusion module 1360 is specifically used to: fuse real-time state data, a set of verification text blocks, and general knowledge of the preset base large language model based on a preset base large language model to generate fused input knowledge; construct structured prompt words based on the fused input knowledge, multiple sub-question vectors, and the set of verification text blocks; and input the structured prompt words into the preset base large language model to generate an initial answer.
[0262] In one possible implementation, the evaluation module 1370 is specifically used to: evaluate based on a preset base large language model according to the initial answer, multiple sub-question vectors and a set of verification text blocks, and obtain an evaluation result; the evaluation result includes: whether the initial answer is the same as the set of verification text blocks and whether the initial answer can solve multiple sub-questions; after correcting the evaluation result, output a standardized problem processing result.
[0263] Optionally, embodiments of this application also provide a computer-readable storage medium storing a computer program. When the computer program is run by a processor, the processor executes the steps of the removable storage medium retrieval method described in the above embodiments. The specific implementation and technical effects are similar and will not be repeated here.
[0264] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0265] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described retrieval method embodiments.
[0266] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described retrieval method embodiments.
[0267] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0268] The foregoing has provided a detailed description of a retrieval method and electronic device provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only intended to help understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A retrieval method characterized by, include: Obtain the vector knowledge database corresponding to the target document set and the real-time status data of the target intelligent operation and maintenance scenario; The vector knowledge database includes at least: a content vector set, a summary vector set, and a summary content association vector set; the real-time status data includes: a multi-dimensional time-series indicator sequence and historical system log data. In response to the initial question queried by the user, the initial question is judged to determine whether the initial question is a complex question; the complex question is one in which the initial question contains at least two subjects, and the at least two subjects together correspond to a question type of a task; If the initial problem is confirmed to be a complex problem, then the initial problem is broken down into multiple sub-problems; Intent determination is performed on the multiple sub-questions to determine the set of retrieval targets; After performing second vector encoding on the multiple sub-problems, a preset similarity matching is performed based on the retrieval target set to obtain a first text block set; Based on a preset base large language model, the real-time state data, the first text block set, and the general knowledge of the preset base large language model are fused together to allocate fusion weights and generate fused input knowledge. Based on the fused input knowledge, multiple sub-question vectors, and the set of verification text blocks, after constructing structured prompt words, the initial answer is generated by inputting them into the preset base large language model. The initial answer is evaluated, and the standardized problem processing results are output. The method further includes, after performing second vector encoding on the plurality of sub-problems, performing preset similarity matching based on the retrieval target set to obtain the first text block set, the method further includes: Extract the set of keywords corresponding to the multiple sub-problem vectors; Based on the preset keyword rule verification algorithm, the matching score between the text content of the first text block set and the corresponding keyword set is calculated; Based on the matching score, the first text block set is filtered to obtain the verification text block set.
2. The method according to claim 1, characterized in that, The step of obtaining the vector knowledge database corresponding to the target document set includes: After formatting the target document collection, the text content is extracted to obtain the text content. The text content is processed by multi-constraint text segmentation according to semantic relevance to obtain multiple text blocks; the multi-constraint includes at least: length constraint of a single text block, overlap area constraint between adjacent text blocks, and punctuation priority constraint in the single text block. Based on the multiple text blocks and their corresponding first vector codes, the vector knowledge database is constructed.
3. The method according to claim 2, characterized in that, The construction of the vector knowledge database based on the multiple text blocks and their corresponding first vector codes includes: Summarize the content of each text block and generate corresponding summary information; Each text block and its corresponding summary information are associated and bound together to form multiple structured text blocks; Based on a preset multilingual universal text vector model, semantic encoding is performed on the multiple structured text blocks, the multiple text segments, and the corresponding summary information to obtain the content vector corresponding to each text segment, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block. The vector knowledge database is constructed based on the content vector corresponding to each text block, the summary vector corresponding to each summary information, and the summary content association vector corresponding to each structured text block.
4. The method according to claim 1, characterized in that, After performing second vector encoding on the multiple sub-questions, based on the retrieval target set, a preset similarity matching is performed to obtain a first text block set, including: The multiple sub-problems are encoded using a second vector to obtain sub-problem vectors corresponding to the multiple sub-problems; A retrieval buffer is constructed based on the initial set of questions queried by historical users and the corresponding set of historical standardized question processing results; Based on the retrieval buffer, a cache hit judgment is performed on each sub-question vector to obtain the cache hit result of each sub-question; If the cache hit result is a hit, then the historical text block set is used as the first text block set of the current subproblem; If the cache hit result is a miss, then according to the retrieval target set, a preset similarity matching is performed to obtain the first text block set.
5. The method according to claim 1, characterized in that, After performing second vector encoding on the multiple sub-problems, and after obtaining the first text block set by performing preset similarity matching based on the retrieval target set, the method further includes: Determine the number of text blocks in the first text block set; If the number of text blocks is not 0, then the first set of text blocks is output in a standardized manner; If the number of text blocks is 0, the problem rewriting process is triggered.
6. The method according to claim 5, characterized in that, The problem rewriting process includes: Based on the preset base large language model, the sub-problem vectors corresponding to the multiple sub-problems are rewritten to generate multiple new sub-problem vectors; The multiple new sub-problem vectors are re-searched to obtain the second text block set.
7. The method according to claim 1, characterized in that, The evaluation of the initial answer and the output of standardized problem processing results include: Based on the initial answer, the multiple sub-question vectors, and the set of verification text blocks, an evaluation is performed using the preset base large language model to obtain an evaluation result. The evaluation result includes: whether the initial answer is the same as the set of verification text blocks and whether the initial answer can solve the multiple sub-questions. After correcting the evaluation results, the standardized problem-solving results are output.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the method as claimed in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a program or instructions that cause a computer to perform the method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product is used to implement the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Knowledge retrieval enhancement generation method and system based on large language model
CN118394890A
Wind power fault diagnosis operation and maintenance method based on multi-source data and knowledge retrieval enhancement
CN120297410A
