An information query method and device
By employing a two-round retrieval method, semantic similarity calculation is performed after removing high-frequency entities, thus solving the problem of insufficient retrieval accuracy caused by interference from high-frequency entities and improving the retrieval accuracy and efficiency of the generative model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- LCFC HEFEI ELECTRONICS TECH
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-09
Smart Images

Figure CN122173624A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of large model technology, and in particular to an information retrieval method and apparatus. Background Technology
[0002] In the field of information retrieval, the accuracy and effectiveness of generative large language models (or generative models) in retrieving relevant content from massive amounts of documents based on user queries directly determine the accuracy of the responses. Traditional information retrieval methods calculate the semantic similarity between user queries and document blocks to obtain the final filtering results. However, because the semantic similarity score between document blocks containing high-frequency entities and user queries is often inflated by the repeated occurrence of high-frequency entities, a large number of document blocks containing high-frequency entities that are irrelevant to the core query intent are incorrectly retrieved. This results in document blocks that truly carry the key answers being unable to be retrieved due to their lower ranking, ultimately causing the generative model to fail to provide effective answers. Summary of the Invention
[0003] This application is made in view of at least one of the above-mentioned technical problems existing in the prior art, and this application can improve the quality of recall results.
[0004] In a first aspect, embodiments of this application provide an information query method, including:
[0005] In response to user query information, extract entities from the user query information; In response to the user query information containing a target entity, a first document block is selected from M document blocks based on the user query information, wherein the target entity belongs to a pre-defined high-frequency entity dictionary, and the M document blocks belong to the source documents of the high-frequency entity dictionary; Delete the target entity from the user query information to obtain the target query information; Based on the target query information and the first document block, the query result information is determined.
[0006] Secondly, embodiments of this application provide an information query device, including: The extraction module is configured to extract entities from the user query information in response to the user query information; The first filtering module is configured to, in response to the user query information containing a target entity, filter a first document block from M document blocks based on the user query information, wherein the target entity belongs to a pre-defined high-frequency entity dictionary, and the M document blocks belong to the source documents of the high-frequency entity dictionary; The deletion module is configured to delete the target entity from the user query information to obtain the target query information; The second filtering module is configured to determine the query result information based on the target query information and the first document block.
[0007] This application provides an information retrieval method and apparatus. The embodiments of this application employ a two-round retrieval process to reduce the influence of high-frequency entities such as template words, significantly improving the accuracy of retrieval results. The first round of retrieval, based on complete user query information, ensures the initial relevance between the first document block and the user query information. After removing target entities, the second round of retrieval better reflects the user's true semantic needs, rather than relying solely on literal matching of high-frequency entities. Attached Figure Description
[0008] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0009] Figure 1 This is a schematic diagram of an existing information retrieval method; Figure 2 This is a flowchart illustrating an information query method provided in one embodiment of this application; Figure 3 This is a document block collection provided in one embodiment of this application; Figure 4 This application provides a sequence of sub-word symbols obtained through word segmentation, as one embodiment of the application. Figure 5 This application provides an embodiment of a pre-correction entity and its score; Figure 6 This is an example of an alternative entity and its fraction provided in one embodiment of this application; Figure 7 This is a high-frequency entity dictionary provided in one embodiment of this application; Figure 8 This is a schematic diagram of an information query device provided in one embodiment of this application. Detailed Implementation
[0010] To enable those skilled in the art to better understand the technical solutions of the embodiments of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] For ease of description and understanding, the following explanation will use laptop computer certification as an example. This application is also applicable to other generative model-based question-answering scenarios.
[0012] In the research and development and market launch process of laptops, products must meet a vast array of laws, regulations, and industry certification standards worldwide. The efficiency and accuracy of these certification processes directly determine whether a product can successfully enter the market. To address the need for certification engineers to quickly retrieve key information from massive amounts of regulatory documents, a generative model for laptop certification has been developed. When certification engineers raise specific certification questions, the generative model can quickly match relevant document content and generate accurate answers, significantly reducing manual retrieval costs and improving certification efficiency.
[0013] Therefore, the performance of generative models depends on high recall and precision during the retrieval phase.
[0014] Specifically, the original regulatory documents are first segmented into blocks to form a list of document blocks with relatively complete semantics. Then, based on user query information, the list of document blocks is retrieved, and the top-N document blocks with the highest relevance (e.g., top 10) are selected as the input for the subsequent generation model. However, in practical application scenarios, regulatory certification documents often contain a large number of domain-specific high-frequency entities, such as technical terms or format keywords like DFS, RLAN, and frequency bands. These high-frequency entities are widely distributed and recurring in the documents.
[0015] When users query information containing such high-frequency entities, existing information query methods face a serious problem of false recall, resulting in low question and answer quality.
[0016] like Figure 1 As shown, the user query is "What are the main functions of Dynamic Frequency Selection (DFS) as defined in the document? In which frequency bands should DFS be applied?" The correct answer should come from section 4.2.6. However, this section was not found in the document blocks retrieved according to the existing retrieval scheme. This is because the term "DFS" appears multiple times in the document and is a high-frequency term. As a result, document blocks containing "DFS" pollute the retrieval results, causing the correct document blocks to be missed and leading to low retrieval quality.
[0017] Therefore, existing information retrieval methods generally suffer from insufficient retrieval accuracy and low key information recall when processing user queries containing high-frequency entities. To address the retrieval failure problem caused by high-frequency entity interference, there is an urgent need for an information retrieval method that can accurately identify high-frequency entities and resolve semantic biases in queries, thereby improving retrieval accuracy and robustness in complex query scenarios.
[0018] like Figure 2As shown in the figure, this application provides an information query method, including: Step 201: In response to the user's query information, extract the entities from the user's query information.
[0019] The method can be implemented by electronic devices such as smart terminals and servers. It employs named entity recognition technology to semantically parse user-submitted queries, extracting entities with specific meanings from the query text. For example, if a user query is "What are the main functions of Dynamic Frequency Selection (DFS) as defined in the document?", the extracted entities would be: "Dynamic Frequency Selection", "DFS", and "Main Functions".
[0020] Step 202: In response to the user query information containing the target entity, filter the first document block from M document blocks based on the user query information. The target entity belongs to a pre-defined high-frequency entity dictionary, and the M document blocks belong to the source documents of the high-frequency entity dictionary.
[0021] The high-frequency entity dictionary is constructed based on the domain characteristics of the current searched document library, containing high-frequency entity words in that domain. Multiple document blocks are obtained by parsing documents from the current searched document library. For example, if the current searched document library is a laptop authentication document library, a high-frequency entity field for the laptop authentication domain can be constructed based on the high-frequency entity words in the laptop authentication document library. Whether an entity is considered high-frequency can be determined based on a preset frequency threshold.
[0022] If the user query contains the target entity from the dictionary, two filtering processes are triggered. The first filtering uses the original user query containing the target entity to perform a first-round search in the document block set, filtering out multiple first document blocks. The first-round search uses the original query, and its purpose is not to miss any potentially relevant documents. This is because, although the target entity is a high-frequency term, it may also be a core component of the query semantics. This step aims to obtain the most complete first document block possible, even if it may contain irrelevant high-frequency term documents.
[0023] Step 203: Delete the target entity from the user query information to obtain the target query information.
[0024] By eliminating known high-frequency interference items, the main factors causing retrieval bias in the query are removed. The target query information obtained after removing target entities better reflects the user's true and unique search intent beyond high-frequency common-sense entities. For example, if a user's query is "What are the main functions of Dynamic Frequency Selection (DFS) as defined in the document?", removing "DFS" changes it to "What are the main functions of Dynamic Frequency Selection as defined in the document?".
[0025] Step 204: Determine the query result information based on the target query information and the first document block.
[0026] Specifically, an improved BERT similarity model is used to calculate the semantic similarity between the target query information and the first document block (e.g., the filtered Top-200 document blocks). After sorting by similarity in descending order, the Top-N (e.g., Top-20) document blocks are selected as the query results. For example, the original user query information is "What is the main function of DFS?". After removing "DFS", the user query information is "What is the main function?". The similarity between "What is the main function?" and the Top-200 first document blocks is calculated, and the 20 most relevant document blocks are selected as the query results.
[0027] In this embodiment, a second round of retrieval is performed using user query information with removed target entities, filtering out first document blocks with higher similarity to the target query information as query results. At this point, document blocks that were recalled only because they contained high-frequency target entities, but were unrelated to the user query information with removed target entities, will have their relevance scores significantly reduced.
[0028] This application's embodiments employ a two-round retrieval process to reduce the influence of high-frequency entities such as template words, significantly improving the accuracy of retrieval results. The first round of retrieval, based on complete user query information, ensures the initial relevance between the first document block and the user's query. After removing target entities, the second round of retrieval better reflects the user's true semantic needs, rather than relying solely on literal matching of high-frequency entities.
[0029] By identifying and eliminating high-frequency interfering entities, the search bias caused by word frequency statistics is effectively suppressed, making the final selected second document block more closely match the user's deeper intent, rather than just superficial keyword matching. The secondary search process is only initiated when the target entity is detected. For ordinary queries that do not contain such entities, the traditional efficient search path can be used, ensuring overall search efficiency.
[0030] In one embodiment of this application, before extracting entities from the user query information, the method further includes: Extract entities from multiple document blocks separately; Calculate the term frequency-inverse document frequency for each entity; The score for each entity is determined based on the term frequency-inverse document frequency of each entity; Based on the scores of each entity, entities from the high-frequency entity dictionary are selected from the extracted entities.
[0031] The document block list D = {D1, D2, ..., D...} obtained from parsing the document nThe process involves performing named entity recognition (NID) on each document block, extracting entities with specific semantic meanings from each block, such as technical terms like "DFS" and "RLAN," frequency bands like "5250MHz," and functional descriptions like "Radar detection." This ultimately yields the entity set {E1, E2, ..., E...} for all document blocks. m}, where E i This represents the entity subset of the i-th document block.
[0032] Named entity recognition can be achieved through NER (Named Entity Recognition) models, such as the BERT-based NER model.
[0033] Term Frequency (TF) Calculation: For each entity e, count its frequency of occurrence in a single document block. For example, if the entity "DFS" appears 3 times in document block D1 and the total number of words in document block D1 is 100, then TF = 3 / 100.
[0034] Inverse Document Frequency (IDF) calculation: Count the number of document blocks containing entity e (denoted as m), and combine it with the total number of document blocks N to calculate IDF = log (N / m).
[0035] The TF-IDF score for each entity e is calculated as TF × IDF, which comprehensively measures the entity's importance within a single document block and its distinguishability within the entire document library. The TF-IDF score is essentially the entity's rating.
[0036] Entities are selected from the high-frequency entity dictionary based on their ratings from highest to lowest. For example, a preset number of entities can be selected as high-frequency entities, or entities with ratings higher than a preset rating threshold can be selected as high-frequency entities.
[0037] Existing methods do not filter based on the semantic value and global distribution of high-frequency entities, resulting in high-frequency entity dictionaries potentially including meaningless format words, background words, or omitting truly high-frequency technical terms in the domain. For example, traditional methods, which only sort by word frequency, may include format words like "see note" in the high-frequency entity dictionary while ignoring core technical high-frequency entities like "DFS".
[0038] Since dictionary construction is based on statistical data from a document library, this method can be applied to different professional fields, such as from law to medicine, from finance to engineering. By simply changing the underlying set of document blocks, a high-frequency entity dictionary adapted to the field can be automatically generated.
[0039] In one embodiment of this application, entities are extracted from multiple document blocks, including: Perform word-level segmentation on document blocks to obtain a sequence of word symbols; Named entity recognition is performed on the sequence of sub-word symbols to obtain entities in the document block.
[0040] The context-adaptive WordPiece word segmentation algorithm is used to parse multiple document blocks (document block set D={D1,D2,…,D…) from the document. n The process involves segmenting each document block into semantically complete sub-word symbol sequences T. i =WP(D i )={t i1 ,t i2 ,…,t im}, where t ij This represents the j-th sub-word symbol of the i-th document block. For example... Figure 3 The image shown is a collection of document blocks, such as... Figure 4 The image shows the sequence of sub-word symbols obtained from word segmentation.
[0041] The obtained sub-word symbol sequence is input into the NER model. The NER model analyzes the semantic type and contextual association of each sub-word, extracts entities with specific meanings from the sub-word sequence, and finally obtains the entity set E for each document block. i =NER(T i )={e i1 ,e i2 ,…,e ik The NER model can accurately distinguish between technical entities, format words, and background words based on pre-trained domain knowledge.
[0042] Existing methods typically use traditional word segmenters (such as dictionary-based mechanical word segmentation) for word segmentation, followed by entity recognition. This approach has two major drawbacks: traditional word segmenters cannot adapt to the semantic boundaries of domain-specific technical terms, and tend to split complete entities, causing the NER model to fail to recognize complete entities; traditional word segmenters have poor context adaptability, and tend to misclassify format words and background words as entities, thus polluting the entity set.
[0043] This application's embodiments ensure the integrity of the boundaries of technical terms and complex entities through sub-word-level segmentation, avoiding entity loss caused by splitting, and accurately filter core entities through the NER model, eliminating interference from format words and background words.
[0044] In one embodiment of this application, before determining the score of each entity based on the term frequency-inverse document frequency of each entity, the method further includes: Determine the semantic weight of each entity; Based on the term frequency-inverse document frequency of each entity, the score for each entity is determined, including: The score for each entity is determined based on its term frequency-inverse document frequency and semantic weight.
[0045] Specifically, the semantic weights of each entity can be directly output based on the trained NER model. Alternatively, the type of each entity can be determined based on the output of the NER model, and a corresponding semantic weight α(e) can be assigned to different types of entities through a preset mapping rule between entity type and semantic weight. The value ranges from 0 to 1, with the higher the semantic value, the closer the weight is to 1; the lower the semantic value, the closer the weight is to 0.
[0046] In this embodiment, the TF-IDF score is multiplied by the semantic weight to calculate the score for each entity, i.e., Score(e) = TF-IDF(e) × α(e). Here, TF-IDF(e) is the aforementioned TF-IDF score, reflecting the frequency and global distribution of entity e, and α(e) is the semantic weight of entity e, reflecting the domain semantic value of entity e. Figure 5 The image shows the entity before correction and its score.
[0047] Through the embodiments of this application, even if format words and background words have high TF-IDF scores, their final scores are significantly reduced due to low semantic weight, and they cannot pass the screening; even if technical terms and numerical parameters have medium TF-IDF scores, their final scores can still meet the standards due to high semantic weight, ensuring that they are included in the high-frequency entity dictionary.
[0048] In one embodiment of this application, entities from a high-frequency entity dictionary are selected from multiple extracted entities based on their scores, including: Each entity is converted into a semantic vector; Cluster the semantic vectors of multiple entities to determine the cluster to which each entity belongs; The density of a cluster is determined based on the semantic vectors of entities within the cluster. The scores of individual entities are adjusted based on the density of the cluster; Based on the corrected scores of each entity, entities from the high-frequency entity dictionary are selected from the extracted entities.
[0049] Specifically, a pre-trained encoder model (such as BERT) can be used to semantically encode each entity, outputting a semantic vector V of fixed dimensions (such as 768 dimensions). e =Encoder(e). Semantic vectors transform the textual semantics of an entity into a quantifiable and computable vector form, reflecting the semantic features of the entity.
[0050] Clustering algorithms (such as K-Means and hierarchical clustering) are used to perform cluster analysis on the semantic vectors of all entities. Entities with semantic vectors that are close in distance (i.e., semantically similar) are grouped into a cluster, ultimately forming multiple entity clusters C={C1,C2,…,C…}. CFor example, "DFS", "DFS function", and "DFS requirement" will be clustered into one cluster, while "see note", "section", and "note" will be clustered into another cluster.
[0051] Calculate the center vector C0 of each cluster: take the average of the semantic vectors of all entities in the cluster as the semantic center of the cluster.
[0052] Calculate the cluster density D c : The average Euclidean distance from the semantic vectors of all entities within the cluster to the center vector C0. c The smaller the value, the higher the semantic similarity of entities within the cluster, and the greater the density; D c The larger the value, the greater the semantic difference between entities within the cluster, and the lower the density. For example, the cluster composed of "see note" and "section" has a small average Euclidean distance and a low density D. c Large; the cluster composed of "DFS", "5250MHz", and "Radar detection" has a large average Euclidean distance and a high density D. c Small.
[0053] The density penalty factor P is calculated based on equation (1). c .
[0054] (1) in, These are preset parameters, and their values can be adaptively adjusted based on the characteristics of the document domain, such as 1.5. D c The smaller the value (the higher the cluster density), the better. c The smaller (the stronger the punishment); D c The larger the cluster density, the greater the P. c The larger the value (the weaker the penalty).
[0055] The score for each entity is adjusted based on the density penalty factor, Score´(e) = Score(e) P c , where Score(e) is the score of the entity before correction, and Score´(e) is the score of the entity after correction.
[0056] Entities from the high-frequency entity dictionary are selected from multiple extracted entities according to the order of Score´(e) from largest to smallest.
[0057] This application's embodiments achieve accurate removal of non-semantic entities through a closed-loop process of vector transformation, clustering, density calculation, penalty correction, and filtering. Semantic vector clustering aggregates format words and background words into high-density clusters, enabling group recognition of non-semantic entities. A density penalty factor is applied to entities in these high-density clusters, resulting in a high-frequency entity dictionary free of redundant interference items. This provides a reliable benchmark for subsequent retrieval and bias removal, improving retrieval effectiveness from the source.
[0058] In one embodiment of this application, entities from a high-frequency entity dictionary are selected from multiple extracted entities based on the corrected scores of each entity, including: Based on the revised scores of each entity, multiple candidate entities are identified from among the multiple entities. Based on the number of times each candidate entity appears in multiple document blocks and a preset frequency threshold, entities from the high-frequency entity dictionary are selected from multiple candidate entities.
[0059] The corrected entity scores are sorted in descending order. Entities with scores higher than a preset score threshold are selected as candidate entities. The top k selected entities are then chosen as candidate entities, where k is a preset value. For example... Figure 6 The image shows the candidate entities and their scores, as follows: Figure 7 The image shown is a high-frequency entity dictionary.
[0060] Count the total number of occurrences of each candidate entity in the entire set of document blocks D, set a preset frequency threshold T, filter out candidate entities whose occurrence count is not lower than the frequency threshold, and finally form a high-frequency entity dictionary.
[0061] This application employs a dual mechanism of scoring and frequency filtering to accurately pinpoint core interfering entities. Specifically, scoring filtering excludes format words and background words, ensuring entities have high semantic value and are not template redundant. Frequency filtering excludes low-frequency interfering entities, ensuring entities are distributed globally at a high frequency. The resulting high-frequency entity dictionary contains only core entities that possess semantic value and frequently appear, easily leading to false recalls, thus improving the dictionary's accuracy and reliability from the source. In one embodiment of this application, based on the target query information and the first document block, query result information is determined, including: Based on the target query information, multiple third document blocks are selected from multiple first document blocks; The target query information and multiple third document blocks are input into the reordering model to obtain multiple second document blocks.
[0062] The selected third document block (Top-20) and the user query information of the target entity are input together into the re-ranking model, such as a supervised re-ranker model based on the Cross-Encoder structure. The model calculates the accurate relevance score of "query-document block" through deep semantic interaction, sorts the scores in descending order, and selects the Top-10 document blocks as the second document block, which is the query result information.
[0063] This application embodiment filters user query information based on the removal of target entities to avoid interference from high-frequency entities in similarity calculation, ensuring that the third document block is relevant to the core requirements. Through deep interaction of the reordering model, it further distinguishes between superficially relevant and substantially relevant document blocks and removes the remaining interference.
[0064] In one embodiment of this application, based on the target query information, multiple third document blocks are filtered from multiple first document blocks, including: Based on the context information of the first document block in its source document, a reconstructed document block is generated; Calculate the semantic similarity between the target query information and each reconstructed document block; Based on the semantic similarity from high to low, multiple third document blocks are selected from multiple reconstructed document blocks.
[0065] The first document block selected is traced back to its corresponding source document chapter, and the semantic information of the preceding and following text (such as chapter titles and adjacent paragraph content) is supplemented to generate a semantically complete reconstructed document block. For example, if a first document block only contains "DFS requirements applicable to the 5250MHz to 5350MHz frequency band", the chapter title "Dynamic Frequency Selection (DFS) Technical Specification" and the preceding text "RLAN Device Frequency Band Usage Rules" are supplemented after tracing back to form a semantically complete reconstructed document block.
[0066] An improved BERT similarity model can be used to calculate the semantic similarity between the target query information and each reconstructed document block. All reconstructed document blocks are sorted in descending order of semantic similarity score, and the Top-N (e.g., Top-20) document blocks are selected as the third document block.
[0067] This application's embodiments restore complete semantics by reconstructing document blocks, ensuring full alignment between the core query intent and the semantics of the document blocks. Combined with bias-free querying, it avoids interference from high-frequency entities, allowing similarity calculation to focus on core semantic matching, significantly improving the accuracy of semantic matching and reducing false positives and false negatives caused by semantic incompleteness.
[0068] In one embodiment of this application, after extracting entities from the user query information, the method further includes: In response to the user query not containing the target entity, multiple fourth document blocks are selected from multiple document blocks based on the user query information; wherein the number of fourth document blocks is less than the number of first document blocks; Input the user query information and multiple fourth document blocks into the reordering model to obtain multiple fifth document blocks.
[0069] After performing entity recognition on the user query information, it is matched with a high-frequency entity dictionary. If no matching target entity is identified, multiple fourth document blocks are selected from the document block list based on the original user query information using conventional retrieval strategies (such as embedding vector cosine similarity).
[0070] The filtered fourth document block (Top-20) is input together with the original user query information into the re-ranking model, and the Top-10 document block is selected as the fifth document block. The fifth document block is the final query result.
[0071] Existing methods employ a one-size-fits-all retrieval strategy, such as fixed selection of Top-20 or Top-200. When there is no high-frequency interference, the wide range of Top-200 retrieval will lead to a surge in redundant data and increase the computational burden; when there is high-frequency interference, the narrow range of Top-20 retrieval will lead to the omission of relevant content.
[0072] This application's embodiments solve this problem through a scenario divide-and-conquer strategy: High-frequency interference (including target entities): triggers a wide-range search to ensure recall rate; No high-frequency interference (excluding target entities): Narrow-range retrieval is used to improve efficiency.
[0073] The embodiments of this application allow the retrieval strategy to be adjusted as needed, achieving an optimal balance between efficiency and effectiveness in different scenarios, and adapting to the diverse query needs of the laptop-authenticated intelligent agent.
[0074] like Figure 8 As shown in the figure, this application embodiment provides an information query device, including: Extraction module 801 is configured to extract entities from user query information in response to user query information; The first filtering module 802 is configured to, in response to a user query that contains a target entity, filter a first document block from M document blocks based on the user query information, wherein the target entity belongs to a pre-defined high-frequency entity dictionary, and the M document blocks belong to the source documents of the high-frequency entity dictionary; The deletion module 803 is configured to delete the target entity from the user query information and obtain the target query information. The second filtering module 804 is configured to determine the query result information based on the target query information and the first document block.
[0075] In one embodiment of this application, the apparatus further includes: a creation module; Create a module configured to extract entities from multiple document blocks; calculate the term frequency-inverse document frequency (TNF) of each entity; determine the score of each entity based on the TNF of each entity; and filter the entities in the high-frequency entity dictionary from the extracted entities based on the scores of each entity.
[0076] In one embodiment of this application, a creation module is configured to perform sub-word segmentation on a document block to obtain a sub-word symbol sequence; and to perform named entity recognition on the sub-word symbol sequence to obtain entities in the document block.
[0077] In one embodiment of this application, a creation module is configured to determine the semantic weight of each entity; and to determine the score of each entity based on the term frequency-inverse document frequency and semantic weight of each entity.
[0078] In one embodiment of this application, a creation module is configured to convert each entity into a semantic vector; cluster the semantic vectors of multiple entities to determine the cluster to which each entity belongs; determine the density of the cluster based on the semantic vectors of the entities in the cluster; correct the score of each entity based on the density of the cluster; and filter out entities from the high-frequency entity dictionary from the extracted multiple entities based on the corrected scores of each entity.
[0079] In one embodiment of this application, a creation module is configured to determine multiple candidate entities from multiple entities based on the corrected scores of each entity; and to filter entities from the high-frequency entity dictionary from the multiple candidate entities based on the number of times each candidate entity appears in multiple document blocks and a preset frequency threshold.
[0080] In one embodiment of this application, the second filtering module 804 is configured to filter out multiple third document blocks from multiple first document blocks based on target query information; and input the target query information and multiple third document blocks into a reordering model to obtain multiple second document blocks.
[0081] In one embodiment of this application, the second filtering module 804 is configured to generate a reconstructed document block based on the context information of the first document block in its source document; calculate the semantic similarity between the target query information and each reconstructed document block; and filter out multiple third document blocks from multiple reconstructed document blocks based on the semantic similarity from high to low.
[0082] In one embodiment of this application, the second filtering module 804 is configured to, in response to the user query information not containing the target entity, filter out multiple fourth document blocks from multiple document blocks based on the user query information; wherein the number of fourth document blocks is less than the number of first document blocks; and input the user query information and multiple fourth document blocks into a reordering model to obtain multiple fifth document blocks.
[0083] This application provides an electronic device, including a memory and a processor. The memory stores an executable program, and the processor executes the executable program to perform the steps of the methods described in any of the above embodiments.
[0084] This application provides a computer program product that, when executed by a processor, implements the methods of any of the above embodiments.
[0085] It should be understood that in the embodiments of this application, the processor may be a central processing unit (CPU), or it may 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.
[0086] It should also be understood that the memory mentioned in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (Read-Only Memory). Only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct memory bus RAM (DR RAM).
[0087] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated into the processor.
[0088] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0089] In addition to the data bus, this bus may also include a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled "bus" in the diagram.
[0090] It should also be understood that the first, second, third, fourth and various numerical designations used herein are merely for descriptive convenience and are not intended to limit the scope of this application.
[0091] It should be understood that the term "and / or" 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, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0092] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The steps of the method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules in the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0093] In the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0094] Those skilled in the art will recognize that the various illustrative logical blocks (ILBs) and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0095] 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.
[0096] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0097] In addition, 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.
[0098] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0099] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. An information retrieval method, characterized in that, The method includes: In response to user query information, extract entities from the user query information; In response to the user query information containing a target entity, a first document block is selected from M document blocks based on the user query information, wherein the target entity belongs to a pre-defined high-frequency entity dictionary, and the M document blocks belong to the source documents of the high-frequency entity dictionary; Delete the target entity from the user query information to obtain the target query information; Based on the target query information and the first document block, the query result information is determined.
2. The information query method as described in claim 1, characterized in that, Before extracting entities from the user query information, the method further includes: Extract entities from the multiple document blocks respectively; Calculate the term frequency-inverse document frequency for each of the entities; The score for each entity is determined based on the term frequency-inverse document frequency of each entity; Based on the scores of each entity, entities from the high-frequency entity dictionary are selected from the extracted entities.
3. The information query method as described in claim 2, characterized in that, The step of extracting entities from the plurality of document blocks includes: The document block is segmented into sub-words to obtain a sequence of sub-word symbols; Named entity recognition is performed on the sequence of sub-word symbols to obtain the entities in the document block.
4. The information query method as described in claim 2, characterized in that, Before determining the score of each entity based on the term frequency-inverse document frequency of each entity, the method further includes: Determine the semantic weight of each of the entities; The determination of the score for each entity based on the term frequency-inverse document frequency of each entity includes: The score for each entity is determined based on its term frequency-inverse document frequency and semantic weight.
5. The information query method as described in claim 2, characterized in that, The step of filtering entities from the high-frequency entity dictionary based on the scores of each entity includes: Each of the entities is converted into a semantic vector; Cluster the semantic vectors of the multiple entities to determine the cluster to which each entity belongs; The density of a cluster is determined based on the semantic vectors of entities within the cluster. The scores of each entity are adjusted based on the density of the cluster; Based on the corrected scores of each entity, entities from the high-frequency entity dictionary are selected from the extracted entities.
6. The information query method as described in claim 5, characterized in that, The step of filtering entities from the high-frequency entity dictionary from multiple extracted entities based on the corrected scores of each entity includes: Based on the corrected scores of each of the entities, multiple candidate entities are determined from among the multiple entities; Based on the number of times each candidate entity appears in the multiple document blocks and a preset frequency threshold, entities in the high-frequency entity dictionary are selected from the multiple candidate entities.
7. The information query method as described in claim 1, characterized in that, The step of determining the query result information based on the target query information and the first document block includes: Based on the target query information, multiple third document blocks are selected from multiple first document blocks; The target query information and the multiple third document blocks are input into the reordering model to obtain multiple second document blocks.
8. The information query method as described in claim 7, characterized in that, The step of filtering multiple third document blocks from multiple first document blocks based on the target query information includes: Based on the context information of the first document block in its source document, a reconstructed document block is generated; Calculate the semantic similarity between the target query information and each of the reconstructed document blocks; Based on the semantic similarity from high to low, the plurality of third document blocks are selected from the plurality of reconstructed document blocks.
9. The information query method as described in claim 1, characterized in that, After extracting entities from the user query information, the method further includes: In response to the user query information not containing the target entity, based on the user query information, a plurality of fourth document blocks are filtered from the plurality of document blocks; wherein the number of fourth document blocks is less than the number of first document blocks; The user query information and the multiple fourth document blocks are input into the reordering model to obtain multiple fifth document blocks.
10. An information query device, characterized in that, include: The extraction module is configured to extract entities from the user query information in response to the user query information; The first filtering module is configured to, in response to the user query information containing a target entity, filter a first document block from M document blocks based on the user query information, wherein the target entity belongs to a pre-defined high-frequency entity dictionary, and the M document blocks belong to the source documents of the high-frequency entity dictionary; The deletion module is configured to delete the target entity from the user query information to obtain the target query information; The second filtering module is configured to determine the query result information based on the target query information and the first document block.