A retrieval method, a data location information generation method, and related apparatus.
Patent Information
- Application Number
- CN202610654589.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-13
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2046-05-13
AI Technical Summary
当用户输入用户查询进行检索时,系统往往无法精准定位各检索结果(命中记录)对应的具体数据源位置,也难以高效获取命中记录对应的核心内容片段,导致检索过程缺乏明确的来源指向
[0008] The above solution involves the application side performing data source matching based on the user query, filtering out a set of target data sources relevant to the query, and then generating a targeted execution plan. The source side receives this execution plan, performs data retrieval operations, accurately identifies the matching records, and provides the location information of each matching record. The application side directly obtains the matching segments corresponding to the matching records by calling the data source interface corresponding to this location information, integrating all matching segments into a matching segment set, thus achieving centralized presentation of content from multiple data sources. Furthermore, a conflict checking step is added to compare and analyze each matching segment, identify segments with content conflicts, and generate discrepancy entries. Based on the integrated matching segment set and the identified discrepancy entries, the final search results corresponding to the user query are generated. This allows users to clearly understand the data source and the differences in content from different data sources, avoiding result deviations caused by conflicting definitions, and effectively improving the accuracy and consistency of search results.
Smart Images

Figure CN122173532B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information retrieval technology, and in particular to a retrieval method, a data location information generation method, and related apparatus. Background Technology
[0002] In traditional retrieval systems, data sources are typically diverse, including multiple heterogeneous data sources such as documents, workflows, and work order records. When a user enters a query, the system often struggles to accurately pinpoint the specific data source corresponding to each search result (hit record) and to efficiently retrieve the core content fragments corresponding to the hit records, resulting in a lack of clear source identification during the retrieval process. Furthermore, because multiple heterogeneous data sources may offer conflicting descriptions of the same transaction, the system fails to perform conflict checks on the hit content from different data sources during the retrieval process, making it impossible to identify inconsistent entries and thus compromising the accuracy and consistency of the retrieval results. Summary of the Invention
[0003] This application provides at least one retrieval method, a data location information generation method, and related apparatus, which can improve the accuracy and consistency of retrieval results.
[0004] The first aspect of this application provides a retrieval method, which includes: an application receiving location information sent by a source, wherein the location information is the location of the hit record obtained by the source receiving an execution plan sent by the application for data retrieval, and the execution plan is generated by the application matching data sources based on user queries to obtain a set of target data sources; based on the location information corresponding to each hit record, calling the data source interface corresponding to the hit record to obtain the matching fragment corresponding to the hit record; integrating the matching fragments corresponding to each hit record into a matching fragment set, and performing conflict checks on each matching fragment to obtain at least one difference entry, wherein the difference entry represents at least two matching fragments that have content conflicts; and generating retrieval results corresponding to the user query based on the matching fragment set and the difference entry.
[0005] The second aspect of this application provides a method for generating data location information, which includes: receiving an execution plan sent by an application, wherein the execution plan is generated by the application based on a set of target data sources obtained by matching data sources based on user queries; performing data retrieval in at least one data source based on the execution plan to obtain a set of candidate records; selecting at least one candidate record from the set of candidate records as the hit record; and generating corresponding location information based on the document identifier and version identifier corresponding to the hit record.
[0006] A third aspect of this application provides an electronic device including a memory and a processor coupled to each other. The processor is used to execute program instructions stored in the memory to implement the retrieval method in the first aspect or the data location information generation method in the second aspect.
[0007] The fourth aspect of this application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a processor, implement the retrieval method of the first aspect above, or the data location information generation method of the second aspect above.
[0008] The above solution involves the application side performing data source matching based on the user query, filtering out a set of target data sources relevant to the query, and then generating a targeted execution plan. The source side receives this execution plan, performs data retrieval operations, accurately identifies the matching records, and provides the location information of each matching record. The application side directly obtains the matching segments corresponding to the matching records by calling the data source interface corresponding to this location information, integrating all matching segments into a matching segment set, thus achieving centralized presentation of content from multiple data sources. Furthermore, a conflict checking step is added to compare and analyze each matching segment, identify segments with content conflicts, and generate discrepancy entries. Based on the integrated matching segment set and the identified discrepancy entries, the final search results corresponding to the user query are generated. This allows users to clearly understand the data source and the differences in content from different data sources, avoiding result deviations caused by conflicting definitions, and effectively improving the accuracy and consistency of search results.
[0009] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this application. Attached Figure Description
[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with this application and, together with the specification, serve to explain the technical solutions of this application.
[0011] Figure 1 This is a flowchart illustrating an embodiment of the retrieval method of this application; Figure 2 This is a flowchart illustrating an embodiment of the data location information generation method of this application; Figure 3 This is a schematic diagram of the framework of an embodiment of the retrieval system of this application; Figure 4 This is a schematic diagram of the framework of an embodiment of the electronic device of this application; Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0012] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0013] In the following description, specific details such as particular system architectures, interfaces, and technologies are presented for illustrative purposes rather than for limiting purposes, in order to provide a thorough understanding of this application.
[0014] In this document, the term "and / or" 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 " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this document means two or more. Moreover, the term "at least one" in this document means any combination of at least two of any one or more of a plurality of objects. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.
[0015] Traditional retrieval systems typically return search results directly to users, lacking clear sources and supporting evidence for each result. This approach results in poor traceability and verifiability of the answers, especially when there are inconsistencies or conflicts in the data from multiple sources, making it difficult to ensure the accuracy of the answers. For example, multiple documents may provide different answers or data for the same question, and the lack of an effective mechanism to label different values and versions makes it difficult for users to clearly determine which results are correct and which are unreliable due to data conflicts or obsolescence. To address these issues, this application provides a retrieval method.
[0016] Please see Figure 1 , Figure 1 This is a flowchart illustrating an embodiment of the retrieval method of this application. The application side of the retrieval system is the executing entity of this method. Specifically, it may include the following steps: Step S110: The application receives the location information sent by the source.
[0017] The location information is the location of the hit record obtained by the source end through data retrieval using the execution plan sent by the application end. The execution plan is generated by the application end through data source matching based on user queries, resulting in a set of target data sources.
[0018] This application is primarily applied to the field of information or data retrieval, particularly relating to a data retrieval system based on a large language model, applicable to enterprise office scenarios. The retrieval system comprises an application end and a source end. The application end, acting as the data requester, establishes data interaction with the source end through an execution plan, which is generated based on a set of target data sources matching the user's query. The source end, acting as the data provider, receives the execution plan, performs data retrieval, and outputs the matched records and their location information. The location information includes a data source identifier, a version identifier, and a location identifier, used to precisely indicate the position of the matched record in the original data. Based on the location information, the application end calls the corresponding data source interface to obtain matching fragments, which are text contents related to the query extracted from the document. These matching fragments are integrated to form a matching fragment set, and then conflict checks are performed on the fragments within the set to generate discrepancy entries. Based on the matching fragment set and the discrepancy entries, the application end can use a large language model to generate retrieval results including citation identifiers.
[0019] Before the application receives the location information sent by the source, the application also needs to send the execution plan corresponding to the data source to be located (i.e., the target data source set) to the source. The method of generating the execution plan can be found in steps S111 to S113.
[0020] Step S111: Preprocess the user query to obtain the word segmentation results and retrieval constraint information of the user query.
[0021] Among them, the retrieval constraint information represents the types of data that the user is allowed to access.
[0022] In some implementations, after receiving a user query, the application can normalize the query to obtain a normalized query question. This normalization includes character standardization, whitespace merging, number and unit normalization, and time expression normalization. Character standardization uses Unicode NFKC normalization; whitespace merging compresses consecutive spaces and tabs into a single space, removes leading and trailing whitespace, and compresses consecutive blank lines into a single blank line; time expression normalization converts relative time expressions into absolute date ranges, using session timestamps as the baseline. Next, the normalized query question is segmented into words to obtain the segmentation results. The segmentation process divides the continuous character stream in the normalized query question into a word sequence and retains the word position index. The segmentation uses a dictionary-based longest matching Chinese word segmentation method. In an enterprise office scenario, the dictionary includes three types of custom entries: enterprise organization name, system name, and process node name, with a maximum word length of 12 characters. The segmented word sequence is output, and the starting and ending character offsets (i.e., word position indexes) of each word in the normalized query question are recorded. In financial scenarios, the dictionary includes three categories of custom entries: financial institution names, business rule names, and business node names. It is understood that this solution can be applied not only to enterprise office scenarios but also to financial and educational scenarios, without specific limitations here.
[0023] Simultaneously, user queries can be parsed to obtain the user's corresponding authorization attributes. These authorization attributes are then mapped to obtain retrieval constraint information. Specifically, after obtaining the authorization attributes, a permission context can be generated by matching the authorization attributes with a pre-defined access policy. The pre-defined access policy is stored in JSON format, and matching rules are executed in a pre-defined priority order. The first rule hit generates a permission context, which records each field and the policy version number. Retrieval constraints can include constraint parameters and de-identification parameters. A constraint policy is generated within the permission context, mapping the authorization attributes to a computable filtering expression and solidifying it as constraint parameters. A de-identification policy is also generated within the permission context, mapping the authorization attributes to sensitive content replacement rules and solidifying them as de-identification parameters. The filtering expression uses a field condition conjunction form, outputting structured constraint parameters. De-identification parameters include mobile phone numbers and ID card numbers, retaining only a portion of the content according to preset rules, with the remainder replaced by "*".
[0024] By standardizing user query inputs and eliminating format differences, user queries become semantically and expressively consistent, improving the accuracy of subsequent word segmentation and the reliability of semantic matching. Including word position indexes in the segmentation results preserves the precise location of each word in the original text, facilitating accurate association during subsequent matching segment location and citation. Parsing user queries directly retrieves authorization attributes, avoiding the complexity of parsing permissions within the query text, ensuring the accuracy of authorization attributes and the reliability of retrieval constraints. Mapping authorization attributes to structured filtering expressions enables the system to automatically apply access control rules, effectively mitigating cross-source privilege escalation risks in multi-source data retrieval.
[0025] Step S112: Select several candidate data sources that are relevant to the user's query from several data sources.
[0026] In one implementation, to select several candidate data sources relevant to a user query, intent tags can be calculated using a normalized query question to obtain an intent tag set. A routing key is then generated based on this intent tag set, where the routing key is a feature extracted from the user query (e.g., question type, keywords, department, permissions, etc.). The routing key is used to retrieve data from a routing configuration table, resulting in several candidate data sources. The intent tag calculation employs a word matching rule. A pre-set intent dictionary includes three categories: a policy query dictionary, a process query dictionary, and a work order query dictionary. Each word is matched and the dictionary with the highest hit count is used as the intent tag. The routing key is formed by concatenating the intent tag with a business domain identifier, which is determined by the business domain dictionary entry matched in the word segmentation results. The routing configuration table includes multiple data sources and is used to determine which data source or retrieval module a user query request should be routed to. Essentially, it is a request routing rule; the retrieval system needs to send the query request to the most suitable data source based on the type, topic, department, and permissions of the user query request.
[0027] Step S113: Use retrieval constraint information to filter several candidate data sources to obtain at least one target data source, and the at least one target data source forms a target data source set.
[0028] In one embodiment, several candidate data sources can be filtered using retrieval constraint information to obtain at least one target data source. Specifically, it can be verified whether the data source identifier corresponding to the candidate data source falls into the allowed data set in the retrieval constraint information, and whether the security level threshold of the retrieval constraint information meets the data source access threshold.
[0029] In one embodiment, after obtaining at least one target data source, a scheduling score corresponding to each target data source can be obtained based on a preset priority score and a preset weight parameter. The preset priority score is a pre-defined value in a data source priority configuration table, used to identify the inherent importance of the data source. The preset weight parameter is a pre-defined coefficient in a weight parameter table, used to dynamically adjust the relative influence of the data source. The target data sources are sorted based on their scheduling scores to obtain a sorting result. Based on the sorting result, the corresponding concurrent batch and timeout parameter for each target data source are determined. A corresponding query instruction is generated for each target data source. The query instruction, concurrent batch, and timeout parameter are written into the execution plan.
[0030] Specifically, the scheduling score is calculated by multiplying a preset priority score by a preset weight parameter to form a comprehensive score that quantifies the priority of the data source. The sorting process arranges target data sources in descending order based on the scheduling score, ensuring that high-scoring data sources are processed first. Concurrent batches are segmented based on the sorting results, for example, using a fixed batch size of 3 to group data sources for parallel queries. Timeout parameters are set for each batch, for example, dynamically set to 30 seconds based on historical response times. Query instructions are generated according to the data source type and retrieval requirements, such as structured query statements or API (Application Programming Interface) calls. The execution plan integrates all information for use by the source end. Furthermore, dynamic timeout parameters can be calculated using historical average response times to adapt to changes in data source load, the concurrent batch size can be set to the system's maximum parallelism to improve resource utilization, and weighted algorithms can be used to adjust weight parameters to address data source conflict scenarios.
[0031] By calculating scheduling scores, the system can integrate the inherent priority and dynamic weight of data sources, thereby optimizing resource allocation and improving the response speed and system throughput of multi-source queries. Sorting ensures that target data sources are processed in order of importance, reducing resource consumption by low-priority data sources and improving the retrieval efficiency of critical data sources. Determining concurrent batches and timeout parameters enables parallel query tasks to execute efficiently and avoid long waiting times, thus improving the system's real-time performance and stability.
[0032] After the application sends the execution plan to the source server, the source server parses the execution plan to obtain the query command. The source server then uses the query command to retrieve and filter the corresponding data source to determine the hit record and its corresponding location information.
[0033] Step S120: Based on the location information corresponding to each hit record, call the data source interface corresponding to the hit record to obtain the matching fragment corresponding to the hit record.
[0034] In one implementation, after the receiving end sends the hit record and the corresponding location information to the source end, it parses the location information one by one to obtain the data source identifier, version identifier, and location identifier information. Based on the data source identifier, it calls the data source interface corresponding to the hit record, and then uses the data source interface based on the version identifier and location identifier information to obtain the matching fragment corresponding to the hit record. The matching fragment carries the data source identifier, version identifier, and location identifier information.
[0035] Step S130: Integrate the matching segments corresponding to each hit record into a matching segment set, and perform conflict checks on each matching segment to obtain at least one difference entry.
[0036] Among them, the difference entries represent at least two matching segments that have content conflicts.
[0037] In one implementation, the matching fragments corresponding to all the obtained hit records are integrated to obtain a set of matching fragments.
[0038] At the same time, conflict checks are performed on each matching segment, as detailed in steps S131 to S133.
[0039] Step S131: Perform part-of-speech extraction based on the matching fragment to obtain the topic key of the matching fragment, and obtain the target content related to the topic key in the matching fragment.
[0040] The topic key represents the topic focus of the content corresponding to the matched fragment.
[0041] The target content refers to the values within the neighborhood of the attribute word in the matched segment. The neighborhood can be a preset range, for example, the preset range can be the 10 characters to the left and right of the attribute word.
[0042] In one implementation, to obtain the topic key of the matching segment, the matching segment needs to be segmented into sentence boundaries to obtain candidate sentences. Sentence boundary segmentation is performed using punctuation marks as delimiters, preserving the start and end character offsets of each candidate sentence within the matching segment. Then, the hit count of each candidate sentence for the user's query is counted. The candidate sentence with the highest hit count is selected as the target sentence for the matching segment.
[0043] After obtaining the target sentence, attribute words are extracted from the target sentence in the matching segment to obtain several attribute words. The target sentence is the sentence in the matching segment that is related to the user's query. For example, a pre-set attribute dictionary is used to locate the position of attribute words in the target sentence, and a value extraction pattern is used to extract values in the neighborhood of the attribute word position and record the position of the value segment. The value extraction pattern includes numerical unit pattern and enumerated phrase pattern; the attribute dictionary is initialized by extracting noun phrases from the titles of institutional documents, chapter titles, clause subheadings, and table headers in the index building stage. The noun phrases satisfy the suffix matching rules and are stored in the database. The suffix matching rules include "upper limit", "quota", "standard", "proportion", "frequency", "cycle", "term", "approval", and "effectiveness"; the extraction results are deduplicated and the longest term is retained to form the initial version of the attribute dictionary; the numerical unit pattern uses regular expressions to extract numerical values and units, and the enumerated phrase pattern scans to the right after the attribute word position to the end of the sentence or the next punctuation mark, and extracts a continuous Chinese phrase with a length not exceeding 24 characters as the value.
[0044] The target sentence is subjected to scope word extraction, resulting in several scope words. For example, a pre-built scope dictionary is used to locate the position of scope words in the target sentence. The scope dictionary initialization extracts trigger word neighborhood phrases from the clause sentences of the institutional documents during the index building phase. The trigger word set includes "applies to", "only", "for", "when", "in", "except", and "not applicable". The trigger word body is incorporated into the dictionary, and subsequent consecutive phrases following the trigger word are marked as scope candidates. The scope candidates are deduplicated and filtered for stop words, and phrases with a maximum length of 16 characters are retained to form the initial version of the scope dictionary.
[0045] Next, based on the attribute words, the subject words are extracted from the target sentence. For example, the subject words are extracted by tracing back to the nearest noun phrase boundary in the target sentence using the position of the attribute words as anchor points.
[0046] Finally, the topic key is obtained by concatenating attribute words, scope words, and subject words. For example, the topic key can be formed by concatenating attribute words, scope words, and subject words in a fixed order.
[0047] In addition, the values extracted from the value pattern can be normalized to obtain normalized values and generate assertions. The assertions include subject terms, attribute terms, range terms, normalized values, and value fragment positions.
[0048] By segmenting matching fragments into semantically complete sentences through sentence boundary delimitation, sentence boundaries are aligned with semantic units, improving the accuracy of sentence relevance judgment. Hit count statistics are used to calculate word segmentation matching degree, allowing target sentence selection to be based on query semantic matching, thus resolving ambiguity issues in multi-source data fragment matching. Selecting the candidate sentence with the highest hit count as the target sentence ensures that topic word extraction focuses on core content, avoiding interference from irrelevant information and supporting precise topic key construction. The extraction and concatenation of attribute words, scope words, and topic words structurally identify the thematic focus of content conflicts, facilitating the accurate generation and verifiable citation of differing entries.
[0049] Step S132: Compare the target content of each matching segment based on the topic key to obtain the comparison result.
[0050] In one implementation, the target content of each matching fragment under the same topic key can be aggregated to obtain a set of target content for the topic key. The aggregation includes deduplication. Specifically, the target content is a value. The value is normalized to obtain normalized values, and then the normalized values are aggregated to obtain the set of target content.
[0051] Next, it is determined whether the target content set of the topic key contains multiple target contents. If so, it means that multiple matching fragments of the same topic key have different target contents.
[0052] Step S133: In response to the fact that multiple matching fragments with the same topic key have different target content, generate corresponding difference entries.
[0053] Among them, the difference entries record the identifier of the matching fragment corresponding to different target content of the topic key, as well as the location of the target content.
[0054] When generating difference entries, the two matching segments with the highest search scores are selected as control items, and their target content positions are retained.
[0055] Step S140: Based on the set of matching fragments and the difference entries, generate the search results corresponding to the user query.
[0056] In one implementation, the set of matching segments can be arranged by segment number, with each segment number followed by the corresponding matching segment text to form a hit paragraph; the difference entries can be converted into conflict paragraphs, each conflict paragraph containing a topic key, different values, and segment numbers corresponding to different target content.
[0057] Select a prompt template, which includes a question area, an evidence area, a conflict area, and a constraint area. Enter the user query into the question area, the matched paragraph into the evidence area, and the conflicting paragraph into the conflict area. In the constraint area, set generation constraints: these constraints limit the answer text to only reference information from the evidence area; they also limit the output of a segment number at the end of each conclusion to form a citation identifier; and when a conflict area exists, the generation constraints first output a conflict prompt, then output the conclusions corresponding to the respective segment numbers, and prohibit the output of merged target content. The filled-in prompts are used as input and submitted to the BLOOM (BigScience Large Open-science Open-access Multilingual Language Model) model to generate search results and return citation identifiers.
[0058] After obtaining the search results, the previously generated results can be organized to form a historical query record. This allows the retrieval system to periodically check the historical query record, continuously identifying and addressing zero-hit, expired, and conflict issues by generating check entries with status codes. Based on these check entries, the retrieval system automatically adjusts routing configurations and weight parameters to optimize the retrieval and generation process, ensuring search hit rate and stability during long-term operation.
[0059] Specifically, after generating the search results corresponding to the user query, the user identifier, the corresponding execution plan identifier, and the word segmentation result are combined to generate a session key. The user identifier is obtained by parsing the user query, and the word segmentation result is the result of segmenting the user query into words. The session key is generated using a string concatenation and hashing method, calculating the first 16 bytes of the hexadecimal string using SHA-256. The session key is the first 32 bytes of the hexadecimal string obtained by calculating SHA-256 on the input string. Based on the session key, location information, evidence association records, difference entries, and query records generated during the same round of user queries are associated to form a historical query record. The evidence association record is used to record the association relationship between matching fragments, difference entries, and metadata. The metadata includes at least the version identifier corresponding to the target data source; in addition, the metadata may also include the data source identifier, location identifier, etc. Based on a preset time period, the system scans historical query records and counts the number of evidence-related records for each session key, generating health check entries with status codes. When the number of evidence-related records is zero, a zero-hit status code is generated. When the number of evidence-related records is not zero, the system reads the version identifier from the evidence-related records and reads the current version identifier and validity threshold of the corresponding data source identifier in the preset data source table. If the version identifier is not equal to the current version identifier, an expired status code health check entry is generated. When there are discrepancies in the session key association entries, a conflict status code is generated. The preset time period can be set to 24 hours, and the scanning window is the historical data of the last 7 days.
[0060] By combining user identifiers, execution plan identifiers, and word segmentation results to generate session keys, location information and evidence-related records for the same round of queries can be uniquely associated, which is beneficial for continuous tracking of the query process and structured management of historical data. By associating evidence-related records and difference entries to form historical query records, the citation links of evidence fragments and data conflict information are uniformly stored, which helps to solve the problem of lack of evidence-level attribution and location identifier binding in search results.
[0061] Next, the session key and health check entries are obtained. The session key is used to locate historical query records and extract word segmentation results. The routing key is calculated, and the target data source set is retrieved from the routing configuration table, thus obtaining the hit records. The health check entries are then parsed to obtain the status code.
[0062] In response to a zero-hit status code in a medical examination entry, a first processing task order is generated. This first task order carries adjustment instructions to modify the filtering conditions for the hit records. For example, it lowers the retrieval score elimination threshold and increases the number of records to be extracted from the hit record set. Specifically, it adjusts the retrieval score elimination threshold from 0.15 to 0.12 and the number of records to be extracted from the hit record set from 20 to 30. In response to an expired status code in a medical examination entry, a second processing task order is generated. This second task order carries a weight reduction instruction to adjust the weight coefficient of the corresponding data source identifier in the weight parameter table. For example, it uses evidence-related records from historical query records to extract the data source identifier and reduces the weight coefficient of the corresponding data source identifier in the weight parameter table to 0.8. In response to a conflict status code in the physical examination item, a third processing task sheet is generated. The third processing task sheet carries an adjudication instruction to adjust the weights of evidence fragments with different values under the same topic for the discrepancies. For example, the topic key is extracted from the discrepancies in the historical query records, and the matching fragment identifiers corresponding to different values are extracted. The matching fragment identifiers are used to reverse locate the evidence association records to obtain the data source identifier. The data source priority configuration table is read to obtain the preset priority score, and the target data source identifier with the highest preset priority score is selected. The preset weight coefficient of the target data source identifier in the weight parameter table is increased to a fixed value of 1.2, and the weight coefficients of the other data source identifiers under the same topic key are decreased to a fixed value of 0.8.
[0063] Please see Figure 2 , Figure 2 This is a flowchart illustrating an embodiment of the data location information generation method of this application. The method's execution entity is the source end of a retrieval system. Specifically, it may include the following steps: Step S210: The source end receives the execution plan sent by the application end, wherein the execution plan is generated by the application end based on the target data source set obtained by matching the data source based on the user query.
[0064] Step S220: Based on the execution plan, perform data retrieval on the target data sources in the target data source set to obtain a candidate record set.
[0065] In one implementation, after receiving the execution plan from the application, the source end parses the execution plan to obtain a query instruction. Based on the query instruction, the source end calls the retrieval interface corresponding to the data source identifier on the data source side to obtain a set of candidate records.
[0066] Step S230: Select at least one candidate record from the candidate record set as the hit record.
[0067] In one embodiment, candidate records that meet the retrieval constraint information requirements from the candidate record set are added to the computation set. The retrieval constraint information is obtained by parsing the execution plan and is derived by the application based on user permission information queried by the user. The retrieval constraint information represents the data types that the user is allowed to access. Specifically, candidate records that the current user is allowed to access from the candidate record set are added to the computation set.
[0068] Next, candidate records in the calculation set whose importance meets the first preset screening requirement are selected as the hit records. The first preset screening requirement can be that the importance of the candidate record is greater than a screening threshold. The importance of the candidate record is obtained as follows: for each candidate record, the inverse document frequency (IVF) of each target word and the number of times it appears in the candidate record are obtained, where the target word is the word in the user query; based on the number of times each target word appears in the candidate record and its IVF, the retrieval score of the candidate record is obtained, which is used as the importance of the candidate record.
[0069] Furthermore, to avoid having too many candidate records that meet the first preset screening criteria, thus increasing computation, further screening can be performed on these candidate records. For example, the candidate records that meet the first preset screening criteria can be sorted in descending order by search score, and the top 20 can be selected to form a set of hit records.
[0070] Step S240: Generate corresponding location information based on the document identifier and version identifier corresponding to the hit record.
[0071] Specifically, the application generates search results corresponding to the user's query based on the set of matching segments and the difference entries obtained through location information. The set of matching segments is obtained by integrating the matching segments corresponding to each hit record, and the difference entries represent at least two matching segments with content conflicts. The matching segments are obtained based on location information. For details, please refer to steps S110 to S140 above, which will not be repeated here.
[0072] In one embodiment, the location information includes the source identifier corresponding to the hit segment and the position information of the reference word in the hit segment. The reference word is the central word that contributes the most to the importance of the hit segment. The source identifier includes at least one of the following: the data source identifier of the hit segment, the document identifier of the hit segment, and the version identifier of the data source corresponding to the hit segment.
[0073] Therefore, to obtain location information, the hit segments are first determined. Specifically, for each hit record, the lexicon that meets the preset lexicon requirements is selected as the central lexicon of the hit record. Text segments within a preset range of the central lexicon in the hit record are obtained as hit segments. For example, a preset number of characters can be extended forward and backward from the central lexicon of the hit record, with each extension being 120 characters. The hit segments are then used as the matching segments corresponding to the hit records, or a summary of the hit segments is obtained and used as the matching segments corresponding to the hit records. The hit segments are selected based on the importance of candidate segments, which is determined by the number of times each central lexicon in the user query appears in the candidate segments.
[0074] In this application, the retrieval system generates a permission context and executes constraint and de-identification policies based on the user's identity information and authorization attributes. Simultaneously, the retrieval system generates an execution plan based on the word segmentation results, assigns query instructions to each data source, and performs access control verification during the retrieval process to ensure the consistency and security of data source access.
[0075] By filtering matching records using summary and location information, and through evidence borrowing and deduplication processes, a set of citationable matching fragments is generated. Based on this set of matching fragments, the system performs assertion extraction, topic key aggregation, and determines conflicts between multiple data sources, generating discrepancy entries to ensure the traceability and consistency of the answers.
[0076] Periodically perform health checks on historical query records, generating health check entries with status codes to continuously identify and address issues such as zero hits, expiration, and conflicts. Based on these health check entries, the system automatically adjusts routing configurations and weight parameters to optimize the retrieval and generation process, ensuring retrieval hit rate and stability during long-term operation.
[0077] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0078] Please see Figure 3 , Figure 3This is a schematic diagram of the framework of an embodiment of the retrieval system 300 of this application. The retrieval system 300 includes: a permission preprocessing module 310, a routing plan module 320, a source-end gateway retrieval module 330, an evidence borrowing and attribution module 340, a large language model response module 350, and a knowledge self-healing module 360. The permission preprocessing module 310 receives user queries, obtains identity information, generates a permission context, which includes constraint policies and desensitization policies, and outputs word segmentation results. The routing plan module 320 generates an execution plan based on the word segmentation results and retrieval constraints, and the execution plan provides query instructions corresponding to the target data source set. The source-end gateway retrieval module 330 receives the execution plan, verifies access control, executes the retrieval, and outputs summary information, location information, and verification records. The evidence borrowing and attribution module 340 filters the hit set based on the summary information and location information, borrows evidence fragments from the hit set to remove duplicates, binds the matching fragments to the data source identifier, version identifier, and location identifier in sequence to form a matching fragment set, generates evidence association records, extracts assertions based on the matching fragment set, aggregates differences by topic key to generate discrepancy entries, and associates them with the evidence association records. The large language model response module 350 is used to construct prompt words based on the matching fragment set, difference entries, and generation constraints, and call the BLOOM model to output answer text reference identifiers to generate search result records. The knowledge check and self-healing module 360 is used to receive the execution plan, generate session keys, form historical query records, perform periodic checks on the historical query records, generate check entries with status codes, dispatch processing task orders, update the routing configuration according to the processing task orders, generate weight parameters, and write them back to the routing plan module 320 and the large language model response module 350.
[0079] The evidence borrowing and attribution module 340 executes the application receiving location information sent by the source end. This location information represents the location of the hit records obtained by the source end through data retrieval based on the execution plan sent by the application. The execution plan is generated by the application matching data sources based on the user query, resulting in a set of target data sources. The evidence borrowing and attribution module 340, based on the location information corresponding to each hit record, calls the corresponding data source interface to obtain the matching fragments for each hit record. The evidence borrowing and attribution module 340 integrates the matching fragments corresponding to each hit record into a matching fragment set and performs conflict checks on each matching fragment, obtaining at least one discrepancy entry. A discrepancy entry represents at least two matching fragments with content conflicts. The large language model response module 350, based on the matching fragment set and the discrepancy entries, generates the search results corresponding to the user query.
[0080] Specifically, the permission preprocessing module 310, routing plan module 320, evidence borrowing and attribution module 340, large language model response module 350, and knowledge self-healing module 360 are deployed on the application side, while the source-side gateway retrieval module 330 is deployed on the source side. More specifically, the permission preprocessing module 310, routing plan module 320, evidence borrowing and attribution module 340, and knowledge self-healing module 360 are deployed on an application server cluster, while the large language model response module 350 is deployed on a separate inference server.
[0081] In one embodiment, the evidence borrowing and attribution module 340 performs conflict checks on each matching segment to obtain at least one difference entry, including: performing part-of-speech extraction based on the matching segment to obtain the topic key of the matching segment, and obtaining the target content related to the topic key in the matching segment; comparing the target content of each matching segment based on the topic key to obtain a comparison result; and generating a corresponding difference entry in response to the comparison result indicating that multiple matching segments with the same topic key have different target content, wherein the difference entry records the identifier of the matching segment corresponding to the different target content of the topic key, and the position of the target content.
[0082] In one embodiment, the evidence borrowing and attribution module 340 executes the target content as the value of the attribute word in the neighborhood of the matching segment; and / or, compares the target content of each matching segment based on the topic key to obtain the comparison result, including: aggregating the target content of each matching segment under the same topic key to obtain the target content set of the topic key, the aggregation including deduplication; determining whether the target content set of the topic key contains multiple target contents, if so, it means that multiple matching segments of the same topic key have different target contents.
[0083] In one embodiment, the evidence borrowing and attribution module 340 performs the following steps before performing part-of-speech extraction based on the matching fragment to obtain the topic key of the matching fragment: segmenting the matching fragment into sentence boundaries to obtain candidate sentences; counting the hit count of each candidate sentence for the words in the user query; selecting the candidate sentence with the highest hit count as the target sentence of the matching fragment; and / or, performing part-of-speech extraction based on the matching fragment to obtain the topic key of the matching fragment, including: extracting attribute words from the target sentence in the matching fragment to obtain several attribute words, wherein the target sentence is a sentence in the matching fragment related to the user query; extracting range words from the target sentence to obtain several range words; extracting topic words from the target sentence based on the attribute words to obtain topic words; and concatenating the attribute words, range words, and topic words to obtain the topic key.
[0084] In one embodiment, the permission preprocessing module 310 performs the following steps before the application receives the location information sent by the source: preprocessing the user query to obtain the word segmentation result and retrieval constraint information of the user query; selecting several candidate data sources related to the user query from several data sources; filtering the several candidate data sources using the retrieval constraint information to obtain at least one target data source, and the at least one target data source forms a target data source set.
[0085] In one embodiment, the permission preprocessing module 310 performs preprocessing on the user query to obtain the word segmentation results and retrieval constraint information of the user query, including: normalizing the user query to obtain a normalized query question; segmenting the normalized query question to obtain word segmentation results; parsing the user query to obtain the authorization attributes corresponding to the user; and mapping based on the authorization attributes to obtain retrieval constraint information.
[0086] In one embodiment, the routing plan module 320, after filtering several candidate data sources using retrieval constraint information to obtain at least one target data source, includes: obtaining a scheduling score corresponding to each target data source based on a preset priority score and a preset weight parameter; sorting each target data source based on the scheduling score to obtain a sorting result; determining the concurrent batch and timeout parameter corresponding to each target data source based on the sorting result; generating a corresponding query instruction for the target data source; and writing the query instruction, concurrent batch, and timeout parameter into the execution plan.
[0087] In one embodiment, the knowledge self-healing module 360, after generating the search results corresponding to the user query based on the matching fragment set and the difference entries, includes: combining the user identifier, the corresponding identifier of the execution plan, and the word segmentation result to generate a session key, wherein the user identifier is obtained by parsing the user query, and the word segmentation result is the result obtained by segmenting the user query; forming a historical query record based on the location information, evidence association records, difference entries, and query records formed in the same round of user queries based on the session key, wherein the evidence association records are used to record the association relationship between the hit fragments, difference entries, and metadata, and the metadata includes at least the version identifier corresponding to the target data source; scanning the historical query records based on a preset time period and counting the number of evidence association records for each session key and generating a health check entry carrying a status code, wherein when the number of evidence association records is zero, a zero-hit status code is generated; when the number of evidence association records is not zero, the version identifier in the evidence association record is read and the current version identifier and validity threshold of the corresponding data source identifier in the preset data source table are read, and when the version identifier is not equal to the current version identifier, an expired status code health check entry is generated; and generating a conflict status code when there are difference entries associated with the session key.
[0088] In one embodiment, the knowledge check self-healing module 360, after scanning historical query records and counting the number of evidence-related records for each session key and generating corresponding status code check entries based on a preset time period, includes: generating a first processing task sheet in response to a zero-hit status code in the check entry, the first processing task sheet carrying an adjustment instruction to adjust the filtering conditions of the target record set; generating a second processing task sheet in response to an expired status code in the check entry, the second processing task sheet carrying a weight reduction instruction, the weight at the time the query instruction was generated; and generating a third processing task sheet in response to a conflict status code in the check entry, the third processing task sheet carrying an adjudication instruction to adjust the weights corresponding to evidence fragments with different values under the same topic.
[0089] In one embodiment, the source gateway retrieval module 330 executes the execution plan sent by the source receiving application, wherein the execution plan is generated by the application based on the target data source set obtained by matching data sources based on the user query; based on the execution plan, data retrieval is performed on the target data sources in the target data source set to obtain a candidate record set; at least one candidate record is selected from the candidate record set as the hit record; based on the document identifier and version identifier corresponding to the hit record, corresponding location information is generated, wherein the application generates the retrieval results corresponding to the user query based on the matching fragment set and difference entries obtained through the location information, the matching fragment set is obtained by integrating the matching fragments corresponding to each hit record, and the difference entries represent at least two matching fragments that have content conflicts, and the matching fragments are obtained based on the location information.
[0090] In one embodiment, the source gateway retrieval module 330 performs the following steps: selecting at least one candidate record from the candidate record set as the hit record; adding the candidate records in the candidate record set that meet the retrieval constraint information requirements to the calculation set; wherein the retrieval constraint information is obtained by parsing the execution plan and is obtained by the application end based on the user permission information queried by the user; and selecting the candidate records in the calculation set whose importance meets the first preset screening requirements as the hit records.
[0091] In one embodiment, the source gateway retrieval module 330 executes retrieval constraint information to characterize the data types that the user is allowed to access; and / or, before using candidate records in the computation set that meet the first preset screening requirements as hit records, it further includes: for each candidate record, obtaining the inverse document frequency term of each target word and the number of times it appears in the candidate record, wherein the target word is a word in the user query; and based on the number of times each target word appears in the candidate record and the inverse document frequency term, obtaining the retrieval score of the candidate record as the importance of the candidate record.
[0092] In one embodiment, before the source gateway retrieval module 330 generates corresponding location information based on the document identifier and version identifier corresponding to the hit record, it further includes: for each hit record, selecting a word that meets the preset word requirement as the central word of the hit record; obtaining a text fragment within the preset range of the central word in the hit record as the hit fragment; using the hit fragment as the matching fragment corresponding to the hit record, or obtaining the summary information of the hit fragment as the matching fragment corresponding to the hit record.
[0093] In one embodiment, the source gateway retrieval module 330 selects the hit fragment based on the importance of the candidate fragment, and the importance of the candidate fragment is determined based on the number of times each central word in the user query appears in the candidate fragment; and / or, obtains text fragments in the hit record that are within a preset range of the central word, as the hit fragment, including: taking the central word of the hit record as the center point and extending it forward and backward by a preset number of characters, as the hit fragment.
[0094] Please see Figure 4 , Figure 4 This is a schematic diagram of a framework of an embodiment of the electronic device 40 of this application. The electronic device 40 includes a memory 41 and a processor 42 coupled to each other. The processor 42 is used to execute program instructions stored in the memory 41 to implement the steps of any of the above-described image retrieval method embodiments, or to implement the steps of any of the above-described data location information generation method embodiments. In a specific implementation scenario, the electronic device 40 may include, but is not limited to, a microcomputer or a server. In addition, the electronic device 40 may also include mobile devices such as laptops and tablets, which are not limited here.
[0095] Specifically, processor 42 controls itself and memory 41 to implement the steps of any of the above-described image retrieval method embodiments, or to implement the steps of any of the above-described data location information generation method embodiments. Processor 42 can also be referred to as a CPU (Central Processing Unit). Processor 42 may be an integrated circuit chip with signal processing capabilities. Processor 42 can also be a general-purpose processor, digital signal processor (DSP), application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. A general-purpose processor can be a microprocessor or any conventional processor. Furthermore, processor 42 can be implemented using integrated circuit chips.
[0096] Please see Figure 5 , Figure 5 This is a schematic diagram of a framework of an embodiment of the computer-readable storage medium 50 of this application. The computer-readable storage medium 50 stores program instructions 501 that can be executed by a processor. The program instructions 501 are used to implement the steps of any of the above-described image retrieval method embodiments, or to implement the steps of any of the above-described data location information generation method embodiments.
[0097] In some embodiments, the functions or modules of the apparatus provided in this disclosure can be used to perform the methods described in the above method embodiments. The specific implementation can be referred to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0098] The description of the various embodiments above tends to emphasize the differences between the various embodiments. The similarities or similarities between them can be referred to, and for the sake of brevity, they will not be repeated here.
[0099] In the several embodiments provided in this application, it should be understood that the disclosed methods and apparatus can be implemented in other ways. For example, the apparatus implementations described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0100] 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 as a software functional unit.
[0101] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
Claims
1. A retrieval method characterized by, include: The application receives location information sent by the source end, wherein the location information is the location of the hit record obtained by the source end through data retrieval using the execution plan sent by the application end, and the execution plan is generated by the application end through data source matching based on user queries to obtain a set of target data sources; Based on the location information corresponding to each hit record, the data source interface corresponding to the hit record is called to obtain the matching fragment corresponding to the hit record; The matching segments corresponding to each hit record are integrated into a set of matching segments, and conflict checks are performed on each of the matching segments to obtain at least one difference entry, wherein the difference entry represents at least two of the matching segments that have content conflicts. Based on the set of matching fragments and the difference entries, the search results corresponding to the user query are generated; After generating the search results corresponding to the user query based on the set of matching fragments and the difference entries, the process includes: The user identifier, the corresponding identifier of the execution plan, and the word segmentation result are combined to generate a session key, wherein the user identifier is obtained by parsing the user query, and the word segmentation result is the result obtained by segmenting the user query; Based on the session key associated with the location information, evidence association records, difference entries, and query records generated during the same round of user queries, a historical query record is formed. The evidence association record is used to record the association relationship between the matching fragment and the difference entries and metadata. The metadata includes at least the version identifier corresponding to the target data source. Based on a preset time period, the historical query records are scanned, and the number of evidence-related records for each session key is counted and a health check item with a status code is generated, so as to adjust the weight parameters corresponding to the data source and the filtering conditions of the hit records.
2. The search method of claim 1, wherein, The step of performing conflict checks on each of the matched segments to obtain at least one difference entry includes: Part-of-speech tagging is performed on the matched fragment to obtain the topic key of the matched fragment, and the target content related to the topic key in the matched fragment is obtained. The topic key represents the topic focus of the content corresponding to the matched fragment. The target content of each matched segment is compared based on the topic key to obtain the comparison result; In response to the comparison result indicating that multiple matching segments with the same topic key have different target content, a corresponding difference entry is generated, wherein the difference entry records the identifier of the matching segment corresponding to the different target content of the topic key, and the position of the target content.
3. The search method of claim 2, wherein, The target content is the value within the neighborhood of the location of the attribute word in the matched segment; And / or, the comparison of the target content of each of the matched segments based on the topic key to obtain the comparison result includes: The target content of each matching segment under the same topic key is aggregated to obtain a set of target content for the topic key, and the aggregation includes deduplication. Determine whether the target content set of the topic key contains multiple target contents. If so, it means that multiple matching fragments of the same topic key have different target contents.
4. The retrieval method according to claim 2, characterized in that, Before performing part-of-speech tagging based on the matched fragment to obtain the topic key of the matched fragment, the process includes: The matched segments are segmented into sentence boundaries to obtain candidate sentences; Count the number of hits of the word segmentation in the user query in each of the candidate sentences; The candidate sentence with the highest hit count is selected as the target sentence of the matching segment. And / or, the step of performing part-of-speech tagging based on the matched fragment to obtain the topic key of the matched fragment includes: Attribute words are extracted from the target sentence in the matching segment to obtain several attribute words. The target sentence is the sentence in the matching segment that is related to the user's query. The target sentence is subjected to range word extraction to obtain a number of range words; Based on the attribute words, the target sentence is subjected to topic word extraction to obtain topic words; The topic key is obtained by concatenating the attribute words, scope words, and topic words.
5. The retrieval method according to claim 1, characterized in that, Before the application receives the location information sent by the source, it includes: The user query is preprocessed to obtain the word segmentation results and retrieval constraint information of the user query; From a number of data sources, select several candidate data sources that are relevant to the user's query; The candidate data sources are filtered using the retrieval constraint information to obtain at least one target data source, and the at least one target data source forms the target data source set.
6. The retrieval method according to claim 5, characterized in that, The preprocessing of the user query to obtain the word segmentation results and retrieval constraint information includes: The user query is normalized to obtain the normalized query problem; The standardized query problem is segmented into words to obtain the segmentation results; The user query is parsed to obtain the authorization attributes corresponding to the user; The retrieval constraint information is obtained by mapping based on the authorized attributes.
7. The retrieval method according to claim 5, characterized in that, After filtering the candidate data sources using the retrieval constraint information to obtain at least one target data source, the process includes: Based on the preset priority score and preset weight parameter corresponding to the target data source, the scheduling score corresponding to each target data source is obtained; The target data sources are sorted based on the scheduling scores to obtain the sorting results; Based on the sorting results, determine the concurrent batches corresponding to each target data source and the timeout parameters corresponding to the concurrent batches; Generate corresponding query commands for the target data source; Write the query command, concurrent batches, and timeout parameters into the execution plan.
8. The retrieval method according to claim 1, characterized in that, When the number of evidence-related records is zero, a zero-hit status code is generated; When the number of evidence-related records is not zero, the version identifier in the evidence-related record is read and the current version identifier and validity period threshold of the corresponding data source identifier in the preset data source table are read. When the version identifier and the current version identifier are not equal, an expired status code check item is generated. When a difference entry associated with the session key exists, a conflict status code is generated.
9. The retrieval method according to claim 8, characterized in that, After scanning the historical query records based on a preset time period and counting the number of evidence-related records for each session key and generating corresponding status code health check entries, the process includes: In response to a zero-hit status code in the physical examination entry, a first processing task sheet is generated, which carries an adjustment instruction to adjust the filtering conditions of the hit record. In response to the status code of the physical examination item being an expired status code, a second processing task order is generated. The second processing task order carries a weight reduction instruction to adjust the weight coefficient of the corresponding data source identifier in the weight parameter table. In response to a conflict status code in the physical examination item, a third processing task sheet is generated. The third processing task sheet carries an adjudication instruction to adjust the weights of the evidence fragments corresponding to different values under the same topic for the difference items.
10. A method for generating data location information, characterized in that, The source end receives an execution plan sent by the application end, wherein the execution plan is generated by the application end based on the target data source set obtained by matching data sources according to user queries; Based on the execution plan, data retrieval is performed on the target data sources in the target data source set to obtain a candidate record set; Select at least one candidate record from the candidate record set as the hit record; Based on the document identifier and version identifier corresponding to the hit record, corresponding location information is generated. The application generates the search results corresponding to the user query based on the matching fragment set and difference entries obtained through the location information. The matching fragment set is obtained by integrating the matching fragments corresponding to each hit record. The difference entries represent at least two matching fragments that have content conflicts. The matching fragments are obtained based on the location information. The process of generating the search results corresponding to the user query based on the set of matching segments and difference entries obtained through the location information includes: The application combines the user identifier, the corresponding identifier of the execution plan, and the word segmentation result to generate a session key. The user identifier is obtained by parsing the user query, and the word segmentation result is the result obtained by segmenting the user query. Based on the session key associated with the location information, evidence association records, difference entries, and query records generated during the same round of user queries, a historical query record is formed. The evidence association record is used to record the association relationship between the matching fragment and the difference entries and metadata. The metadata includes at least the version identifier corresponding to the target data source. Based on a preset time period, the historical query records are scanned, and the number of evidence-related records for each session key is counted and a health check item with a status code is generated, so as to adjust the weight parameters corresponding to the data source and the filtering conditions of the hit records.
11. The generation method according to claim 10, characterized in that, The step of selecting at least one candidate record from the candidate record set as the hit record includes: Candidate records that meet the retrieval constraint information requirements from the candidate record set are added to the calculation set, wherein the retrieval constraint information is obtained by parsing the execution plan and is obtained by the application based on the user permission information queried by the user; Candidate records in the computation set whose importance meets the first preset screening requirements are taken as the hit records.
12. The generation method according to claim 11, characterized in that, The retrieval constraint information represents the types of data that the user is allowed to access; And / or, before selecting candidate records in the computation set whose importance meets the first preset screening requirement as the hit records, the method further includes: For each candidate record, obtain the inverse document frequency of each target word and the number of times it appears in the candidate record, wherein the target word is a word in the user query; Based on the frequency of each target term in the candidate record and the inverse document frequency, the retrieval score of the candidate record is obtained, which is used as the importance of the candidate record.
13. The generation method according to claim 11, characterized in that, Before generating the corresponding location information based on the document identifier and version identifier corresponding to the hit record, the method further includes: For each hit record, select the word that meets the preset word requirements as the center word of the hit record; Obtain the text fragments located within a preset range of the central word in the hit record as the hit fragments; The hit fragment can be used as the matching fragment corresponding to the hit record, or the summary information of the hit fragment can be obtained and used as the matching fragment corresponding to the hit record.
14. The generation method according to claim 13, characterized in that, The hit segment is selected based on the importance of the candidate segment, and the importance of the candidate segment is determined based on the number of times each central word in the user query appears in the candidate segment; And / or, obtaining text fragments within a preset range of the central word in the hit record as hit fragments includes: The hit segment is formed by taking the central word of the hit record as the center point and extending a preset number of characters forward and backward.
15. An electronic device, characterized in that, The device includes a memory and a processor coupled to each other, the processor being configured to execute program instructions stored in the memory to implement the retrieval method according to any one of claims 1 to 9, or to implement the data location information generation method according to any one of claims 10 to 14.
16. A computer-readable storage medium having program instructions stored thereon, characterized in that, When the program instructions are executed by the processor, they implement the retrieval method according to any one of claims 1 to 9, or the data location information generation method according to any one of claims 10 to 14.
Citation Information
Patent Citations
Data query method, device and equipment and readable storage medium
CN114896279A
Insurance multi-source retrieval and consistency verification method and device, medium and product
CN121901398A