Data retrieval method and device in vertical field, equipment and medium

By constructing a vertical domain knowledge base and performing multi-level retrieval and verification, the problems of insufficient semantic understanding and retrieval illusion in existing technologies have been solved, achieving accurate and reliable information retrieval and meeting the needs of professional scenarios.

CN121958447APending Publication Date: 2026-05-01CSC FINANCIAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CSC FINANCIAL CO LTD
Filing Date
2025-12-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing vertical domain data retrieval technologies cannot meet the precise retrieval needs of professional scenarios. They suffer from insufficient semantic understanding, omissions in search results, or the inclusion of irrelevant information. Furthermore, existing large model technologies are prone to illusions during retrieval, failing to meet compliance and reliability requirements.

Method used

We build vertical domain knowledge bases, process data through classification, hierarchical, tagging and vectorization, and combine multi-level retrieval and verification mechanisms to optimize user questions and perform semantic matching, ensuring the accuracy and traceability of retrieval results.

Benefits of technology

It achieves precise vertical domain knowledge retrieval, improves the accuracy and reliability of retrieval results, solves the problems of vague retrieval scope and illusion, and meets the needs of professional scenarios such as compliance review and technology research and development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958447A_ABST
    Figure CN121958447A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data retrieval, and provides a data retrieval method and device for a vertical domain, equipment and a medium, the method comprises the following steps: collecting data of a target domain, and constructing a knowledge base of the vertical domain; receiving a target retrieval scene and a target question selected by the user, and determining a corresponding knowledge base retrieval range according to the target retrieval scene; performing optimization operation on the target problem to obtain an optimized problem; according to the optimization problem and the knowledge base retrieval range, related document names are retrieved and obtained; and performing multi-stage retrieval and verification on the related documents, including retrieval of original text fragments in the documents, judgment of question and answer correlation, verification of original text source accuracy and extraction of document version information, and finally assembling and outputting a retrieval result. According to the technical scheme, the problem that semantic understanding is insufficient due to the fact that traditional retrieval depends on keyword matching is effectively solved, the problems of illusion and indefinite origin existing in existing RAG retrieval are effectively solved, and accurate retrieval and origin query of vertical domain knowledge are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Data retrieval methods, devices, equipment and media in vertical fields Technical Field

[0001] This application relates to the field of data retrieval technology, and in particular to a data retrieval method, apparatus, device and medium for a vertical field. Background Technology

[0002] Vertical domain information retrieval is widely used in professional scenarios such as compliance review and technology research and development. Its core purpose is to retrieve key documents such as standard specifications, technical requirements, and operational guidelines. These scenarios place extremely high demands on the accuracy, relevance, and traceability of the search results. It is necessary not only to ensure that the search content accurately matches professional needs but also to clearly identify the original source and version information of the results to support the compliance and reliability of subsequent decisions.

[0003] However, existing vertical domain information retrieval technologies still suffer from numerous unresolved technical problems, failing to meet the stringent requirements of professional scenarios. On the one hand, traditional retrieval technologies rely on precise keyword matching to achieve information retrieval, which is essentially a surface-level retrieval logic based on string matching, lacking the ability to deeply understand the user's intent. This type of approach cannot identify synonyms, near-synonyms, or semantically related expressions, and it is also difficult to adapt to the specific context of professional terminology in vertical domains. This results in search results that either omit key relevant information or contain a large amount of irrelevant information, leading to insufficient accuracy and coverage, and failing to meet the core requirement of precise retrieval in professional scenarios.

[0004] On the other hand, with the application of large-scale model technology in the retrieval field, although related technologies have achieved an upgrade from "keyword matching" to "semantic understanding," different technical paths each have their own limitations: 1) Direct question-answering LLM retrieval method: This method relies entirely on the training corpus within the large model to generate answers, without accessing external knowledge bases. This method is simple to implement, but because the knowledge within the model is static and cannot be updated, it cannot retrieve the latest professional information; 2) Retrieval Augmentation Generation (RAG) method: Its typical implementation process includes first vectorizing the document and storing it in a vector database; after receiving the user's question, it matches several document fragments as references through semantic vector retrieval, and then feeds them into the generation model to generate question-answer content. This method improves the ability to connect to external knowledge to a certain extent. However, when the document volume is large or there are many semantically similar entries, search illusions can still easily occur, i.e., the large model cites irrelevant content. Furthermore, the generative model processes and logically restructures the referenced documents. In scenarios such as legal compliance and academic research, where strict verification of original sources and ensuring information accuracy are required, manual verification of the original documents is still necessary. 3) Knowledge Augmentation Generation (KAG): This method introduces a knowledge graph structure on top of RAG, achieving structured retrieval through entity relationship annotation, thereby improving the accuracy of relevance matching in complex logical scenarios. However, this method requires manual or semi-automatic construction and maintenance of the knowledge graph, and the high cost and difficulty in updating relationship annotation limit its widespread adoption across various fields. Summary of the Invention

[0005] This application provides a data retrieval method, apparatus, device, and medium for a vertical field, aiming to solve the technical problems in related technologies, such as the semantic understanding caused by retrieval dependence on keyword matching, and the retrieval illusion existing in the current RAG retrieval.

[0006] In a first aspect, embodiments of this application provide a data retrieval method for a vertical domain. The method includes: collecting data in a target domain and constructing a knowledge base for the vertical domain; receiving a target retrieval scenario and a target question selected by a user, and determining the corresponding knowledge base retrieval scope based on the target retrieval scenario; optimizing the target question to obtain an optimized question; retrieving relevant document names based on the optimized question and the knowledge base retrieval scope; performing multi-level retrieval and verification on the relevant documents, including retrieving original text fragments within the document, judging the relevance of questions and answers, verifying the accuracy of the original source, and extracting document version information; and determining and outputting the final retrieval results.

[0007] In one embodiment, optionally, the construction of a vertical domain knowledge base includes: sequentially classifying the data of the target domain into data types, classifying them by professional level, and labeling them with multi-dimensional tags to obtain processed target domain data; and vectorizing the processed target domain data and storing it in a vector database.

[0008] In one embodiment, optionally, the data types include standard specifications, self-compiled summaries, and theoretical books; the professional level classification includes professional level, practical level, and reference level; and the multi-dimensional tags include knowledge domain and specialized knowledge tags.

[0009] In one embodiment, optionally, the search scenarios include searching in standard specifications, searching in self-compiled summaries, and searching in theoretical books, with each search scenario mapping to a data range of a preset category in the knowledge base.

[0010] In one embodiment, the optimization operation may optionally include extracting, rewriting, and expanding the target problem using a general large model to obtain an optimization problem that includes relevant sub-topics.

[0011] In one embodiment, optionally, multi-level retrieval and verification of the relevant documents includes: using the RAG large model, sequentially retrieving target original text fragments related to the optimization problem in each relevant document according to the relevant document name; determining the relevance of the target original text fragments to the target problem using the general large model; verifying the authenticity of the target original text fragments in the corresponding relevant documents using the general large model based on a preset threshold; and extracting the version information and address information of the relevant documents, wherein the version information includes the document version number or publication date, and the address information is obtained from the knowledge base or directly linked to the server document file.

[0012] In one embodiment, optionally, determining and outputting the final search results includes: integrating the document names, version information, address information, and target original text fragments of all relevant documents, and outputting the final search results.

[0013] Secondly, embodiments of this application provide a data retrieval device for a vertical domain, comprising: a knowledge base construction module for collecting data in a target domain and constructing a knowledge base for the vertical domain; a user question and scenario selection module for receiving a target retrieval scenario and a target question selected by a user, and determining the retrieval scope of the knowledge base based on the target retrieval scenario; a question optimization module for optimizing the target question to obtain an optimized question; a multi-level retrieval module for obtaining relevant document names based on the optimized question and the retrieval scope of the knowledge base, and performing multi-level retrieval and verification on the relevant documents, including original text fragment retrieval within the document, question-answer relevance judgment, original source accuracy verification, and document version information extraction; and a result output module for integrating the results and outputting the final retrieval result.

[0014] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the aforementioned data retrieval method for the vertical field.

[0015] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the aforementioned data retrieval method for the vertical domain.

[0016] The above-mentioned solutions implemented by data retrieval methods, devices, equipment, and media in vertical domains involve: collecting data in the target domain to construct a knowledge base for the vertical domain; receiving user selections of target retrieval scenarios and target questions, and determining the corresponding knowledge base retrieval scope based on the target retrieval scenario; optimizing the target question to obtain an optimized question; retrieving relevant documents based on the optimized question and the knowledge base retrieval scope; and performing multi-level retrieval and verification on the relevant documents to determine and output the final retrieval results. The technical solution of this invention not only solves the problems of insufficient semantic understanding and ambiguous scope in traditional keyword retrieval by structurally integrating target domain data and accurately mapping retrieval scenarios, thus significantly improving the accuracy of retrieval results; it also enhances the accuracy of semantic matching through question optimization operations, and effectively filters irrelevant information by combining multi-level retrieval and verification mechanisms, fundamentally avoiding the retrieval illusion that is prone to occur in existing RAG technologies, and ensuring the authenticity of the retrieved content; at the same time, it links the original data of the knowledge base throughout the entire retrieval process, so that the final output results can be traced back to the source information of the corresponding document, completely solving the problem of unclear sources in existing technologies, and ultimately achieving accurate retrieval and source query of vertical domain knowledge, fully meeting the requirements of professional scenarios such as compliance review and technology research and development for retrieval results. Furthermore, this method adopts a pre-built knowledge base model, eliminating the need for secondary annotation, fine-tuning, or training of data within the RAG model, decoupling the retrieval logic from the large model, and allowing flexible integration with different types of RAG models, facilitating rapid deployment and application in multiple business scenarios. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 shows a schematic flowchart of a vertical domain data retrieval method according to an embodiment of this application.

[0019] Figure 2 shows a flowchart of a vertical domain knowledge base construction scheme according to an embodiment of this application.

[0020] Figure 3 shows an example diagram of a pre-built knowledge base representation according to an embodiment of this application.

[0021] Figure 4 shows a schematic flowchart of step S105 in a vertical domain data retrieval method according to an embodiment of this application.

[0022] Figure 5 shows a schematic flowchart of a vertical domain knowledge multi-level retrieval scheme according to an embodiment of this application.

[0023] Figure 6 shows an example diagram of vertical domain knowledge retrieval results according to an embodiment of this application.

[0024] Figure 7 shows a block diagram of a vertical domain data retrieval device according to an embodiment of this application.

[0025] Figure 8 shows a block diagram of a computer device according to an embodiment of this application. Detailed Implementation

[0026] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.

[0027] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0028] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0029] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0030] Please refer to Figure 1, which shows a schematic flowchart of a vertical domain data retrieval method according to an embodiment of this application.

[0031] As shown in Figure 1, the data retrieval method for vertical domains includes: Step S101, collecting data in the target domain and constructing a knowledge base for the vertical domain; the data in the target domain refers to various materials focusing on specific professional scenarios (such as compliance review and technology research and development), including standard specifications, self-compiled summaries, theoretical books and other types of materials; the knowledge base for the vertical domain is a systematic data storage collection constructed for the target domain, which achieves structured management and efficient retrieval adaptation of data through classification, hierarchical, tagging and vectorization processing.

[0032] In one embodiment, optionally, step S101 includes: step S1011, sequentially classifying the data in the target domain into data types, classifying them by professional level, and labeling them with multi-dimensional tags to obtain processed target domain data; step S1012, vectorizing the processed target domain data and storing it in a vector database.

[0033] Specifically, the construction of a vertical domain knowledge base is shown in Figure 2, and the pre-constructed knowledge base representation is shown in Figure 3. The specific steps include: A) Data integration and classification to build a systematic knowledge base: This includes collecting data from the target domain and classifying and storing it. Taking the testing domain as an example, the collection scope includes standards and specifications, self-compiled summaries, theoretical books, etc.; data storage can be in the form of tables or databases, and the main content includes information such as data category, name, overview, tags, links, and professional rating; B) Data classification to clarify data professionalism and assist in priority ranking: As similar data is continuously supplemented, the professional level of the data needs to be clarified to assist in priority ranking in intelligent retrieval. It can be classified and labeled according to three levels: professional level, practical level, and reference level; C) Data tagging to define data in multiple dimensions and assist in retrieval filtering: Data classification only solves the problem of single-dimensional management, while tagging enables multi-dimensional retrieval. For example, if the testing standards and specifications include types of specifications such as stress testing and security testing, multi-dimensional tagging is required. Tags can be labeled according to dimensions such as test type (functional test, stress test, security test, etc.), domain (test management, test technology, automation development, etc.), and specific knowledge type (test template, terminology definition, etc.); D) Vectorized storage of data, building a vector knowledge base for RAG retrieval: After classification, grading, and tagging, the documents are vectorized and stored in a vector database as the retrieval basis for the RAG model. At this point, the vertical domain knowledge base is completed.

[0034] The above solution first comprehensively collects authoritative and effective materials within the field to ensure data coverage of core needs. Then, it clarifies data categories through categorized storage, differentiates data authority through professional hierarchical labeling (professional, practical, reference level), and achieves multi-dimensional data definition through multi-dimensional tagging (field sub-directions, specialized knowledge types, etc.). Finally, it vectorizes the processed data, mapping textual information into computer-recognizable vector forms and storing them in a vector database, forming a knowledge base with both structured management and semantic retrieval capabilities. This addresses the shortcomings of existing technologies, such as scattered and disordered field materials and a lack of systematic management. Through classification, hierarchical processing, and tagging, it achieves precise data positioning, and vectorized storage provides the foundation for subsequent semantic retrieval, significantly improving matching efficiency and accuracy during retrieval. It also provides data support for limiting the search scope and prioritizing results.

[0035] In this step, a pre-built knowledge base model is adopted instead of secondary annotation, fine-tuning, or training of data within the RAG model. This decouples the retrieval logic from the large model, allowing for flexible integration with different types of RAG models and facilitating rapid deployment and application in multiple business scenarios.

[0036] Step S102: Receive the target retrieval scenario and target question selected by the user, and determine the corresponding knowledge base retrieval scope according to the target retrieval scenario; in one embodiment, optionally, the retrieval scenario includes retrieval in standard specifications, retrieval in self-compiled summaries, and retrieval in theoretical books, and each retrieval scenario maps to the data range of preset categories in the knowledge base.

[0037] The standard and specification search is designed for users searching within standard and specification documents; the self-compiled summary search is designed for users searching within practical summaries and guidance materials written by team members; and the theoretical book search is designed for users searching within industry-specific books. This optional solution clearly defines the specific types of search scenarios and their data mapping relationships. The three preset search scenarios comprehensively cover the core needs of the vertical field, with each scenario corresponding one-to-one with preset data categories in the knowledge base. Users can precisely select a scenario based on their needs, and the system automatically matches the corresponding data range, enabling rapid locking of the search scope. Through precise mapping between scenarios and data categories, the search scope is further refined, avoiding interference from irrelevant data and improving search efficiency and relevance. Simultaneously, the diverse scenario settings adapt to the personalized needs of different users, reducing the difficulty of user operation and enhancing the search experience.

[0038] The knowledge base retrieval scope is a set of data of a specific category in the knowledge base mapped to the target retrieval scenario; that is, retrieval is only performed within the data range that matches the scenario.

[0039] This step achieves precise matching between search requirements and knowledge base data. First, it provides users with multiple preset search scenarios to choose from, each corresponding to a predefined data category in the knowledge base (e.g., searching for standards and specifications corresponds to standards and specifications data in the knowledge base). After the user selects a scenario and enters their target question, the system automatically locks onto the corresponding data range in the knowledge base based on the mapping relationship between the scenario and the data category, avoiding the inefficiency and irrelevant information interference caused by searching the entire database. This avoids the inefficiency and poor relevance issues caused by the fuzzy search scope in existing search technologies. By limiting the scope to specific scenarios, it focuses on core data, reduces the amount of irrelevant data retrieved, improves search response speed, and ensures that the search results highly match the user's needs, laying a solid foundation for accurate retrieval.

[0040] Step S103: Optimize the target problem to obtain the optimized problem.

[0041] Optimization refers to the semantic adjustment and expansion of the user's original query using a general-purpose model. This includes extracting, rewriting, and expanding the core question points. The optimized question is a semantically expanded version that includes relevant sub-topics and better fits the search logic. The general-purpose model is an AI model with powerful semantic understanding and text generation capabilities, capable of semantic expansion and optimization based on context. Relevant sub-topics are derived topics or sub-fields related to the core needs of the target question, supplementing and improving upon the target question's requirements.

[0042] This step optimizes user queries to address potential issues such as vague wording and incomplete coverage. Leveraging the semantic understanding capabilities of a general-purpose model, it deeply analyzes the target question, uncovers potential user needs, and expands a single-word question into a complete question encompassing related subtopics. For example, "automated testing" is expanded to "query automated testing technologies, such as UI automation and API automation," ensuring the question comprehensively covers core user needs while adapting to the semantic retrieval logic of the knowledge base. This solves the problem of retrieval omissions caused by non-standardized user query wording and narrow coverage in traditional retrieval. Semantic expansion improves the matching coverage between the question and knowledge base data, resulting in more comprehensive search results. Furthermore, the optimized question better aligns with the input requirements of the semantic retrieval model, further enhancing search relevance.

[0043] Step S104: Based on the optimization problem and the knowledge base retrieval scope, retrieve relevant document names; relevant documents refer to target domain materials that are semantically related to the optimization problem within the limited retrieval scope; the retrieval is achieved by using RAG retrieval technology to calculate the similarity between the semantic vector of the optimization problem and the vector of data in the knowledge base, and then filtering out documents that meet the similarity criteria.

[0044] This step is the core retrieval execution stage, performing precise matching based on the pre-determined search scope and optimized questions. Utilizing the semantic matching capabilities of RAG retrieval technology, the optimized questions are converted into semantic vectors. Within the limited knowledge base search scope, similarity is compared with stored vectorized data to filter documents whose semantic relevance meets preset standards, serving as the foundational material for subsequent multi-level searches. This approach overcomes the limitations of traditional keyword matching's surface-level retrieval, achieving deep semantic relevance retrieval through semantic vector matching. Combined with a limited search scope, it significantly improves the relevance and efficiency of document retrieval, reduces interference from irrelevant documents, and provides high-quality candidate materials for subsequent multi-level searches.

[0045] Step S105: Perform multi-level retrieval and verification on the relevant documents, including retrieval of original text fragments within the documents, judgment of question-and-answer relevance, verification of the accuracy of the original source, and extraction of document version information, and determine and output the final retrieval results.

[0046] As shown in Figure 4, in one embodiment, optionally, step S105 includes: step S401, using the RAG large model, sequentially retrieving original text fragments related to the optimization problem from each relevant document according to the relevant document name; the RAG large model is an artificial intelligence model that integrates retrieval and generation capabilities, capable of accurately extracting relevant content from documents based on semantic association; the target original text fragment is a text fragment in the relevant document that is directly related to the optimization problem, and is the core basis for supporting the retrieval answer. Based on the previously obtained relevant documents, the RAG large model uses its semantic matching and text extraction capabilities to traverse the documents one by one, accurately locate and extract original text fragments that are directly semantically related to the problem, ensuring that the extracted target original text closely adheres to the problem requirements, and providing core materials for subsequent verification.

[0047] This step enables precise extraction of core information from relevant documents, avoids interference from irrelevant text, improves the relevance of search results, and provides a clear target for subsequent relevance judgment and authenticity verification.

[0048] Step S402: Determine the relevance of the target text fragment to the target question using a general large model.

[0049] Relevance assessment refers to evaluating the degree of fit between the target text and the user's original target question using the semantic understanding capabilities of a general-purpose model, determining whether the text can answer the user's question. The general-purpose model simultaneously receives the target text and the user's original target question. Through deep semantic analysis, it determines the degree of correlation between the two. If the core content of the text can directly or indirectly answer the target question, it is judged as relevant; if the text content has no substantial connection with the target question, it is judged as irrelevant and subsequently filtered. This approach further filters out information unrelated to user needs, addressing the defect of potentially irrelevant fragments in relevant documents, and improving the relevance and purity of search results.

[0050] Step S403: Verify the authenticity of the target original text fragment in the corresponding relevant document using a general large model based on a preset threshold, so as to obtain the real relevant original text.

[0051] Authenticity verification verifies whether the target original text truly exists in the corresponding relevant document and whether there is any fabrication or tampering. The preset threshold is a judgment standard set based on the parsing accuracy of the large model document; the higher the parsing accuracy, the higher the threshold setting. The real relevant original text is the target original text that has been confirmed by both relevance judgment and authenticity verification.

[0052] The implementation method involves decomposing the target original text fragment output in step S401 into multiple keywords using a general large model. These keywords are then matched against the full text of relevant documents. When the proportion of successfully matched keywords exceeds a preset threshold, the original text is considered to genuinely exist in the relevant documents. If the threshold is not reached, the information is judged to be fictitious or erroneous and is removed, ultimately retaining only the genuine and relevant original text fragments. This fundamentally solves the search illusion problem that easily occurs in existing RAG technologies. By verifying the authenticity of the original text, the reliability of search results is ensured, preventing fictitious information from misleading users' decisions and improving the credibility of the search method.

[0053] Step S404: Extract the relevant document version information and address information, wherein the version information includes the document version number or publication date, and the address information is obtained from the knowledge base or directly linked to the server document file.

[0054] Version information is used to identify the document's update status, including the document version number (such as V1.0) or publication date; address information is a link or path to the original storage location of the document, making it easier for users to obtain the complete document; target related documents are related documents that contain the actual relevant original text.

[0055] After identifying the authentic and relevant original text, the system automatically extracts the version and address information of the document to which it belongs. The version information clarifies the document's authority and update status, while the address information provides the complete document retrieval path, ensuring that every search result can be traced back to the original document. This solves the pain point of unclear source information in existing technologies. By extracting version and address information, the system achieves traceability and verifiability of search results, meeting the stringent requirements for source accuracy in vertical industries, while also providing users with convenient access to complete documents.

[0056] Step S405: Integrate the document name, version information, address information and target original text fragments of all relevant documents, and output the final search results.

[0057] The system aggregates all target-related documents containing authentic original texts, sorts them by their level of professionalism or relevance, and integrates the name, version information, address information, and corresponding authentic original texts of each document to form structured search results. These results are presented to users in a clear and intuitive format, facilitating quick access to core information and source tracing. This step achieves a structured presentation of search results, making core information and source information readily apparent. It not only helps users quickly obtain answers but also facilitates verification of the results' authenticity and access to complete documents, fully meeting the comprehensive needs of vertical fields for accurate, reliable, and traceable search results.

[0058] In the above scheme, the target original text fragments directly related to the optimization question are first retrieved in each relevant document using the RAG large model; then, the relevance between the target original text and the user's original question is determined by the general large model, and irrelevant original text is filtered out; next, the authenticity of the target original text in the corresponding document is verified based on a preset threshold, and fictitious or erroneous information is excluded to obtain the real relevant original text; finally, the version information (version number or publication date) and address information (such as document links) of the document to which the real relevant original text belongs are extracted to complete the multi-level retrieval and verification process.

[0059] In this way, the problem of search illusion in existing RAG technology is solved at its root. By using dual filtering of relevance judgment and authenticity verification, the authenticity and relevance of search content are ensured. At the same time, by extracting source information, a one-to-one correspondence between search results and original documents is established, solving the pain point of unclear sources in existing technologies and providing users with traceable and verifiable search results.

[0060] The above technical solution of the present invention will be described in detail below with reference to a specific embodiment.

[0061] The process of a multi-level knowledge retrieval scheme in a vertical domain is shown in Figure 5. Based on the completed knowledge base, the multi-level retrieval scheme mainly includes stages such as specialized retrieval scenario construction, preprocessing before retrieval, multi-level retrieval, result evaluation, and original text review. The implementation method for each stage is mainly "Prompt + LLM / RAG", where the purple steps use the RAG retrieval method, and the yellow steps use the general large model method. The actual retrieval results are shown in Figure 6. The specific steps are as follows: A) Construct specialized retrieval scenarios: Combine user scenarios and data types to predefine multiple retrieval scenarios and map different ranges of data. Taking the testing domain as an example, three main retrieval scenarios are divided, including standards and specifications, self-compiled summaries, and theoretical books; B) The user selects a specialized retrieval scenario and enters a question; C) Determine the retrieval scope: Based on the specialized retrieval scenario selected by the user, determine the scope of data involved in the pre-built knowledge base; D) Rewrite the user question: Connect to the general large model to rewrite and expand the user question. For example, expanding "automated testing" to "query automated testing technologies, such as UI automation, API automation, etc." ensures more comprehensive search coverage; E) Retrieving relevant documents: Connecting to the RAG large model, assembling a prompt based on optimized user questions and a limited scope of search documents, and retrieving relevant documents; F) Multi-level retrieval, result evaluation, and original text review: a) Original text retrieval: In relevant documents, connect to the RAG large model and sequentially limit detailed retrieval to each document, requiring the return of original texts related to the question; b) Question-answer relevance judgment: Connect to the general large model to determine whether the original text information returned by RAG is relevant to the user's question; c) Original text review: If the question and answer are confirmed to be relevant, search for the existence of the original text information returned by the large model in the target document according to a preset threshold, judge the authenticity of the result source, and avoid the illusion of the large model (the preset threshold refers to the accuracy of the large model's document parsing; the more accurate the parsing, the higher the threshold can be set); d) Source document version information extraction: If the source is indeed the target document, extract the document's version information and assemble the answer; e) Retrieval completion judgment: Determine whether all relevant documents have been traversed. If not, repeat the process from step a); g) Answer assembly and return, clearly displayed according to the source: Integrate and return the document name, version information, document link, and original document (version information includes document version number or publication date).

[0062] Figure 7 shows a block diagram of a vertical domain data retrieval device according to an embodiment of this application.

[0063] As shown in Figure 7, in a second aspect, this application provides a vertical domain data retrieval device 70, comprising: a knowledge base construction module 71, used to collect data in a target domain and construct a vertical domain knowledge base; a user question and scenario selection module 72, used to receive a target retrieval scenario and target question selected by a user, and determine the knowledge base retrieval scope based on the retrieval scenario; a question optimization module 73, used to optimize the target question to obtain an optimized question; and a multi-level retrieval module 74, used to obtain relevant document names based on the optimized question and the knowledge base retrieval scope, and perform multi-level retrieval and verification of relevant documents, including document fragment retrieval, question-answer relevance judgment, original source accuracy verification, and document version information extraction.

[0064] The results output module 75 is used to integrate the results and output the final search results in a standardized format.

[0065] In one embodiment, optionally, the knowledge base construction module 71 includes: a processing unit, used to sequentially classify the data of the target domain into data types, classify them by professional level, and label them with multi-dimensional tags to obtain processed target domain data; and a storage unit, used to vectorize the processed target domain data and store it in a vector database.

[0066] In one embodiment, optionally, the scenario selection includes searching in standard specifications, searching in self-compiled summaries, and searching in theoretical books, with each search scenario mapping to a data range of a preset category in the knowledge base.

[0067] In one embodiment, optionally, the question optimization operation includes extracting, rewriting, and expanding the target question using a general large model to obtain an optimization question containing relevant subtopics.

[0068] In one embodiment, optionally, the multi-level retrieval module 74 includes: a retrieval unit, used to retrieve, according to the relevant document name, a target original text fragment related to the optimization problem in each relevant document using a RAG large model; a judgment unit, used to judge the relevance of the target original text fragment to the target problem using a general large model; a verification unit, used to verify the authenticity of the target original text in the corresponding relevant document using a general large model based on a preset threshold, so as to obtain the true relevant original text; and an extraction unit, used to extract the version information and address information of the relevant documents, wherein the version information includes the document version number or publication date, and the address information is obtained from the knowledge base or directly linked to the server document file; in one embodiment, optionally, the result output module 75 further includes: an integration unit, used to integrate the document name, version information, address information and target original text fragment of all relevant documents, and output the final retrieval result.

[0069] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the aforementioned data retrieval method for the vertical field.

[0070] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the aforementioned data retrieval method for the vertical domain.

[0071] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the data retrieval device and its modules in the vertical field described above can be referred to the corresponding processes in the aforementioned embodiments of the data retrieval method in the vertical field, and will not be repeated here.

[0072] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the model training device and each module described above can be referred to the corresponding process in the aforementioned data retrieval method embodiment in the vertical field, and will not be repeated here.

[0073] The aforementioned vertical domain data retrieval device can be implemented as a computer program that can run on the computer device shown in Figure 8.

[0074] Figure 8 shows a block diagram of a computer device according to an embodiment of this application.

[0075] Referring to Figure 8, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include storage media and internal memory.

[0076] The storage medium may store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor to perform any of the multi-source data vertical domain data retrieval methods provided in the embodiments of this application.

[0077] The processor provides computing and control capabilities, supporting the operation of the entire computer device.

[0078] The internal memory provides an environment for the execution of computer programs stored in the storage medium. When executed by a processor, this computer program enables the processor to perform any data retrieval method for a vertical domain of multi-source data. The storage medium can be non-volatile or volatile.

[0079] This network interface is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that the structure shown in Figure 8 is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0080] It should be understood that the processor can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, a general-purpose processor can be a microprocessor or any conventional processor.

[0081] In addition, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for performing the steps of the method in the first aspect embodiment.

[0082] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or electronic device described above can be referred to the relevant descriptions in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.

[0083] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0084] It should be understood that although the terms "first," "second," etc., may be used to describe the setting units in the embodiments of this application, these setting units should not be limited to these terms. These terms are only used to distinguish the setting units from each other. For example, without departing from the scope of the embodiments of this application, the first setting unit may also be referred to as the second setting unit, and similarly, the second setting unit may also be referred to as the first setting unit.

[0085] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

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

[0087] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in a combination of hardware and software functional units.

[0088] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0089] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A data retrieval method for a vertical domain, characterized in that, The method includes: collecting data from the target domain and constructing a vertical domain knowledge base; receiving the target retrieval scenario and target question selected by the user, and determining the corresponding knowledge base retrieval scope based on the target retrieval scenario; optimizing the target question to obtain an optimized question; retrieving relevant document names based on the optimized question and the knowledge base retrieval scope; performing multi-level retrieval and verification on the relevant documents, including retrieving original text fragments within the document, judging the relevance of questions and answers, verifying the accuracy of the original source, and extracting document version information, and determining and outputting the final retrieval results.

2. The method according to claim 1, characterized in that, The construction of a knowledge base for a vertical domain includes: sequentially classifying the data in the target domain into data types, classifying them by professional level, and labeling them with multi-dimensional tags to obtain processed target domain data; and vectorizing the processed target domain data and storing it in a vector database.

3. The method according to claim 2, characterized in that, The types of materials include standards and specifications, self-compiled summaries, and theoretical books; the professional level classification includes professional level, practical level, and reference level; the multi-dimensional tags include knowledge domain and specialized knowledge tags.

4. The method according to claim 1, characterized in that, The search scenarios include searching in standard specifications, searching in self-compiled summaries, and searching in theoretical books. Each search scenario maps to a data range of a preset category in the knowledge base.

5. The method according to claim 1, characterized in that, The optimization operation includes extracting, rewriting, and expanding the target problem using a general large model to obtain an optimization problem that includes relevant sub-topics.

6. The method according to claim 1, characterized in that, The relevant documents are subjected to multi-level retrieval and verification, including: using the RAG large model, according to the relevant document name, sequentially retrieving target original text fragments that are related to the optimization problem in each relevant document; using the general large model to determine the relevance of the target original text fragments to the target problem; using the general large model to verify the authenticity of the target original text fragments in the corresponding relevant documents based on a preset threshold; and extracting the version information and address information of the relevant documents, wherein the version information includes the document version number or publication date, and the address information is obtained from the knowledge base or directly linked to the server document file.

7. The method according to claim 6, characterized in that, The process of determining and outputting the final search results includes: integrating the document names, version information, address information, and target original text fragments of all relevant documents, and outputting the final search results.

8. A data retrieval device for a vertical field, characterized in that, include: The knowledge base building module is used to collect data from the target domain and build a knowledge base for the vertical domain. The user question and scenario selection module is used to receive the target search scenario and target question selected by the user, and determine the knowledge base search scope based on the target search scenario; The question optimization module is used to optimize the target question to obtain an optimized question; The multi-level retrieval module is used to obtain relevant document names based on the optimization question and the retrieval scope of the knowledge base, and to perform multi-level retrieval and verification of relevant documents, including the retrieval of original text fragments within the document, judgment of question-answer relevance, verification of the accuracy of the original source, and extraction of document version information; the result output module is used to integrate the results and output the final retrieval results.

9. A computer device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being configured to perform the method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The device stores computer-executable instructions for performing the method as described in any one of claims 1 to 7.