Text retrieval self-adaptive reordering method and device based on time perception
By extracting and classifying the time of queries and text blocks and performing comprehensive sorting based on the time and semantic similarity scores, the problem of single sorting method in the existing technology is solved, and the accuracy and recall rate of text retrieval are improved.
Patent Information
- Application Number
- CN202510911298.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-02
- Publication Date
- 2025-09-30
AI Technical Summary
Existing text retrieval reranking algorithms mainly rely on semantic similarity, have a single sorting method, and have limited room for improving retrieval accuracy.
By extracting time from queries and text blocks, classifying queries according to time sensitivity, calculating time and semantic similarity scores, and integrating multi-dimensional ranking information for re-ranking.
Improved the accuracy of text retrieval, especially in time-sensitive areas, and improved the recall rate and average reciprocal ranking.
Smart Images

Figure CN120723902A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of retrieval technology optimization, and in particular relates to a time-aware text retrieval adaptive reordering method and device. Background Art
[0002] With the development of artificial intelligence (AI), large pre-trained models are widely used in natural language processing. However, due to limited training data, their performance is limited in tasks requiring accurate information retrieval. Retrieval-augmented generation combines the advantages of both retrieval and generation models. First, a retrieval component extracts relevant text from large documents, and then a generation model generates content based on this information, improving the accuracy and relevance of the output.
[0003] In the retrieval-augmented generative framework, the retrieval task is crucial. It provides essential contextual information for the generative model and directly impacts the output quality. However, traditional retrieval methods suffer from shortcomings in efficiency and accuracy, particularly when processing large document repositories, which can easily return irrelevant or low-quality information. Therefore, to improve system performance, re-ranking algorithms are crucial. Based on the retrieval process, they perform secondary screening and optimized ranking of candidate sets, ensuring that the most valuable information is presented to users first, thereby enhancing information acquisition efficiency and user experience.
[0004] Currently, a variety of reranking algorithms exist in the field of retrieval-enhanced generation for text retrieval tasks. The paper "Passage Re-ranking with BERT[J]" (Nogueira R, Cho K. Passage Re-ranking with BERT[J].arXiv preprint arXiv:1901.04085, 2019.) mentions the use of a cross-encoder model for text reranking. The paper "Improving passage retrieval with zero-shot question generation[J]" (Sachan DS, Lewis M, Joshi M, et al. Improving passage retrieval with zero-shot question generation[J]. arXiv preprint arXiv:2204.07496, 2022.) proposes using a large language model to generate several questions for each text block in the retrieval results. The similarity between these questions and the original query is calculated, and the maximum similarity value is used as the similarity value between the text block and the original query. The text blocks are then reranked based on this similarity value. The article "Is ChatGPT good at search? Investigating large language models as reranking agents[J]" (Sun W, Yan L, Ma X, et al. Is ChatGPT good at search? Investigating large language models as reranking agents[J]. arXiv preprintarXiv:2304.09542, 2023.) proposes using a large language model to determine the similarity between a query and several text blocks. Given the limited input and understanding lengths of large language models, this paper proposes grouping search results using overlapping sliding windows, thereby achieving reranking of the entire search result set.
[0005] However, existing text retrieval reranking algorithms mainly rely on semantic similarity, have a single sorting method, and have limited room for improving retrieval accuracy.
[0006] Therefore, how to provide a text retrieval adaptive reranking method that integrates multi-dimensional ranking information and has higher retrieval accuracy has become an important issue. Summary of the Invention
[0007] In order to solve the above problems existing in the prior art, the present invention provides a time-aware text retrieval adaptive reordering method and device.
[0008] The technical problem to be solved by the present invention is achieved through the following technical solutions: In a first aspect, the present invention provides a time-aware text retrieval adaptive reordering method, the text retrieval adaptive reordering method comprising: Performing a time extraction operation on each query in the query set and each text block in the search results corresponding to each query to obtain a time list corresponding to each query and each text block; Based on the time list corresponding to each query, each query is classified according to time sensitivity to determine the sensitivity category of each query; Based on the sensitivity category of each query, the temporal similarity score between each query and each text block in the retrieval results corresponding to each query is calculated; Obtaining a comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query based on the temporal similarity score and the semantic similarity score between each query and each text block in the retrieval results corresponding to each query; The retrieval results corresponding to each query are sorted in descending order according to the comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query, so as to realize text retrieval adaptive re-ranking.
[0009] Optionally, based on the sensitivity category of each query, a temporal similarity score is calculated between each query and each text block in the retrieval results corresponding to each query, including: The time information in the time list corresponding to each query and each text block is formatted uniformly to obtain a standardized time list corresponding to each query and each text block; According to the sensitivity category of each query and the normalized time list corresponding to each query and each text block, a time similarity score between each query and each text block in the retrieval results corresponding to each query is calculated.
[0010] Optionally, based on the time list corresponding to each query, each query is classified according to time sensitivity to determine a sensitivity category for each query, including: Classify queries without time information in the time list into the first sensitivity category; Classify queries containing implicit time information in the time list into the second sensitivity category; Queries with explicit time information in the time list are classified into the third sensitivity category.
[0011] Optionally, a comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query is obtained based on the temporal similarity score and the semantic similarity score between each query and each text block in the retrieval results corresponding to each query, including: For first queries belonging to the first sensitivity category, using the semantic similarity score between each first query and each text block in the retrieval results corresponding to each first query as the comprehensive similarity score between each first query and each text block in the retrieval results corresponding to each first query; For the second queries belonging to the second sensitivity category, using a comprehensive similarity calculation formula, based on the temporal similarity score and the semantic similarity score between each second query and each text block in the retrieval results corresponding to each second query, a comprehensive similarity score between each second query and each text block in the retrieval results corresponding to each second query is calculated; For the third queries belonging to the third sensitivity category, the comprehensive similarity calculation formula is used to calculate the comprehensive similarity score between each third query and each text block in the retrieval results corresponding to each third query based on the temporal similarity score and semantic similarity score between each third query and each text block in the retrieval results corresponding to each third query.
[0012] Optionally, based on the sensitivity category of each query, a temporal similarity score is calculated between each query and each text block in the retrieval results corresponding to each query, including: determining a time similarity score between the first query under the first sensitivity category and each text block in the search results corresponding to each first query to be 0; Determine the time similarity score between the second query under the second sensitivity category and the text block with an empty time list in the search results corresponding to each second query as 0, and determine the time similarity score between the second query under the second sensitivity category and the text block with a non-empty time list in the search results corresponding to each second query as 1; The similarity coefficient is used to calculate a temporal similarity score between the third query under the third sensitivity category and each text block in the retrieval results corresponding to each third query.
[0013] Optionally, the similarity coefficient is a Jaccard similarity coefficient.
[0014] In a second aspect, the present invention provides a time-aware text retrieval adaptive reordering device, the text retrieval adaptive reordering device comprising: An extraction module is used to perform a time extraction operation on each query in the query set and each text block in the search results corresponding to each query, to obtain a time list corresponding to each query and each text block; A classification module is used to classify each query according to its time sensitivity based on the time list corresponding to each query, and determine the sensitivity category of each query; a calculation module for calculating a temporal similarity score between each query and each text block in the retrieval results corresponding to each query based on the sensitivity category of each query; a determination module for obtaining a comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query based on a temporal similarity score and a semantic similarity score between each query and each text block in the retrieval results corresponding to each query; The sorting module is used to sort the search results corresponding to each query in descending order according to the comprehensive similarity score between each query and each text block in the search results corresponding to each query, so as to achieve text search adaptive reordering.
[0015] In a third aspect, the present invention provides an electronic device comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus; Memory for storing computer programs; The processor is configured to implement the method steps described in any one of the above-mentioned time-aware text retrieval adaptive reordering methods when executing the computer program stored in the memory.
[0016] In a fourth aspect, the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the method steps described in any of the above-mentioned time-aware text retrieval adaptive reordering methods.
[0017] The present invention provides a time-aware text retrieval adaptive reordering method, which calculates the time similarity score between each query and each text block in the retrieval results corresponding to each query according to the sensitivity category of each query, and then obtains the comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query based on the time similarity score and semantic similarity score between each query and each text block in the retrieval results corresponding to each query. The retrieval result set corresponding to each query is then sorted in descending order based on the comprehensive similarity score. The time similarity score can be introduced into the initial retrieval algorithm or the semantic reordering algorithm, and the accuracy of the retrieval can be further improved by integrating multi-dimensional sorting information.
[0018] The present invention will be further described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 1 is a flow chart of a time-aware text retrieval adaptive reordering method provided by an embodiment of the present invention; Figure 2 2. FIG. 1 is a schematic diagram comparing the time-aware text retrieval adaptive re-ranking method provided by an embodiment of the present invention with the R@N method of the prior art; Figure 3 2. FIG. 1 is a schematic diagram comparing the time-aware text retrieval adaptive reranking method provided by an embodiment of the present invention with the MRR@N method of the prior art; Figure 4 1 is a schematic structural diagram of a time-aware text retrieval adaptive reordering device provided by an embodiment of the present invention; Figure 5 It is a structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The present invention will be further described in detail below with reference to specific examples, but the embodiments of the present invention are not limited thereto.
[0021] In order to solve the problem that the existing text retrieval re-ranking algorithm mainly relies on semantic similarity, has a single ranking method, and has limited room for improving retrieval accuracy, the embodiment of the present invention provides a text retrieval adaptive re-ranking method based on time perception, see Figure 1 , Figure 1 FIG. 1 is a flow chart of a time-aware text retrieval adaptive reordering method provided by an embodiment of the present invention, which specifically includes the following steps: Step S101 : performing a time extraction operation on each query in the query set and each text block in the search results corresponding to each query, to obtain a time list corresponding to each query and each text block.
[0022] First, the present invention focuses on the re-ranking stage of text retrieval, so it is assumed that the initial retrieval stage of text retrieval, and even the semantic re-ranking stage, has been carried out. Therefore, the query set is assumed to be , there is a collection of segmented text blocks , there is a retrieval result set corresponding to the query set , and query Corresponding search result set ,like exists in The search result set In and The semantic similarity score between ,The semantic similarity score is provided by the last step of the currently completed text retrieval, that is, after the initial retrieval or semantic re-ranking.
[0023] Query collection Each query , the set of text blocks after segmentation Each text block Extract the time in the text. After this step, no matter what query Or any block of text , you will get a time list , records all time information that appears in the text. If the text does not contain time information, then the time list corresponding to the text Empty.
[0024] In the embodiment of the present invention, the time lists of the query and the text block are the times extracted from the query text and the text block text. For example, if the query is "how many mines were mined in 2015", "2015" is extracted.
[0025] Step S102 : Based on the time list corresponding to each query, each query is classified according to time sensitivity to determine the sensitivity category of each query.
[0026] In an embodiment of the present invention, based on the time list corresponding to each query, each query is classified according to time sensitivity to determine the sensitivity category of each query, including: Classify queries without time information in the time list into the first sensitivity category; Classify queries containing implicit time information in the time list into the second sensitivity category; Queries with explicit time information in the time list are classified into the third sensitivity category.
[0027] In an embodiment of the present invention, queries can be divided into three sensitivity categories based on time sensitivity: the first sensitivity category is queries that are completely unrelated to time, and such queries often ask factual questions; the second sensitivity category is queries that have implicit time information in their time lists, that is, there is no clear time, but the query time point or time period; the third sensitivity category is queries that have explicit time information in their corresponding time lists, that is, a clear time has appeared.
[0028] For any query , first check its corresponding Is it empty? If it is not empty, it means that there is a clear time in the query, and the query is classified as the third sensitivity category; otherwise, based on the prompt word "You are a discriminator whose task is to judge whether the question is related to time. You only need to output 0 or 1: if the question is not related to time, output 0; if the question involves time, output 1. Please note that any mention of a time point, time period, or inquiry about time should be considered to be related to time. Question: {question}", this time the question is the corresponding query.
[0029] A large language model is used to determine whether the query is time-independent. If the query is not time-independent, it is classified as the first sensitivity category; otherwise, it is classified as the second sensitivity category. After this step, each query in the query set has a corresponding time sensitivity category.
[0030] Step S103 : calculating the temporal similarity score between each query and each text block in the retrieval result corresponding to each query according to the sensitivity category of each query.
[0031] In the embodiment of the present invention, the time list obtained by time extraction contains only time points, and the expression of time varies. First, there may be incomplete time expression, that is, due to contextual reasons, the time unit is not uniform. For example, the year "2024" has appeared in the above text, so the following text only expresses "June 17", and the year unit is missing; second, there may be inconsistent minimum time units, such as "2024" and "July 2024", the minimum time units of these two expressions are "year" and "month" respectively. Therefore, before calculating the time similarity score, it is necessary to check the time similarity score for each query and text block. The content is formatted uniformly.
[0032] In an embodiment of the present invention, calculating the temporal similarity score between each query and each text block in the search results corresponding to each query according to the sensitivity category of each query includes: The time information in the time list corresponding to each query and each text block is formatted uniformly to obtain a standardized time list corresponding to each query and each text block; According to the sensitivity category of each query and the normalized time list corresponding to each query and each text block, a time similarity score between each query and each text block in the retrieval results corresponding to each query is calculated.
[0033] Specifically, the unified time format is as follows: a) Complete the time expression according to the context to ensure that all time units larger than the time unit at the current time point exist; b) is to fix the minimum time unit to "minutes", and convert the original time point into a time period with the minimum unit of the start and end time points as minutes, such as "June 13, 2024" is converted to [June 13, 2024 0:00, June 13, 2024 23:59]. After this step, each query and text block corresponds to The irregular time points in the data are converted into regular time periods.
[0034] After the time format is unified, the normalized time list corresponding to each query and each text block is obtained. Then, based on the sensitivity category of each query and the normalized time list corresponding to each query and each text block, the time similarity score between each query and each text block in the retrieval results corresponding to each query can be calculated.
[0035] In the embodiment of the present invention, a query under the first sensitivity category is referred to as a first query, a query under the second sensitivity category is referred to as a second query, and a query under the third sensitivity category is referred to as a third query.
[0036] In an embodiment of the present invention, calculating the temporal similarity score between each query and each text block in the search results corresponding to each query according to the sensitivity category of each query includes: Determine the time similarity score between the first query under the first sensitivity category and each text block in the search results corresponding to each first query as 0; Determine the time similarity score between the second query under the second sensitivity category and the text block with an empty time list in the search results corresponding to each second query as 0, and determine the time similarity score between the second query under the second sensitivity category and the text block with a non-empty time list in the search results corresponding to each second query as 1; The similarity coefficient is used to calculate a temporal similarity score between the third query under the third sensitivity category and each text block in the retrieval results corresponding to each third query.
[0037] In the embodiment of the present invention, for any query , according to its time sensitivity category corresponding to its specific calculation rules, calculate its difference with the search results Any text block The time similarity score between Among them, according to the sensitivity category of the query, the query and the text block have their specific time similarity score calculation rules: when the query belongs to the first sensitivity category, then the first query is not related to time, and the time similarity score between the query and each text block in the retrieval result is recorded as 0; when the query belongs to the second sensitivity category, then the second query is related to time, and is asking about a time point or time period, then when calculating the time similarity score between the second query and any text block in the retrieval result, check the time of the text block. Is it empty? If it is empty, it means that the text block does not contain time, then the time similarity score is recorded as 0, otherwise it is recorded as 1. When the query belongs to the third sensitivity category, then the third query is related to time, and the third query contains a time point. The third query is calculated based on the similarity coefficient, such as the Jaccard similarity coefficient. Any time period and text block The maximum value is taken as the temporal similarity score between the query and the text block.
[0038] Among them, the Jaccard similarity coefficient means that if there are two intervals [a,b] and [c,d], then the similarity coefficient between them for: ; Where a is the start time of the time interval [a,b], b is the end time of the time interval [a,b]; c is the start time of the time interval [c,d], and d is the end time of the time interval [c,d].
[0039] After this step, any query in the query set The corresponding search results Any text block There is a temporal similarity score between .
[0040] In the embodiment of the present invention, the third query of the third sensitivity category is calculated based on the Jaccard similarity coefficient. Any time period and text block The time similarity of any time period in the query and the maximum value is taken as the time similarity score between each text block in the search results corresponding to the query and each third query, as follows: Time extraction is performed on the third query and the text blocks in the search results corresponding to the third query. In particular, a text block may contain multiple times. After normalization, each time is standardized as an interval such as [start time, end time]. Then, a normalized time list (A, B, C) may be obtained from the third query, and a normalized time list (D, E, F, G) may be obtained from the text block, where A, B, C, D, E, F, and G are all time intervals in the form of [start time, end time]. The time similarity between the two intervals is calculated based on the Jaccard similarity coefficient. The coefficient of each interval in (A, B, C) is calculated with each interval in (D, E, F, G), such as AD, AE, AF, AG...CG, and the maximum value of this column of numbers is finally selected as the time similarity between the third query and the text block.
[0041] Step S104 , obtaining a comprehensive similarity score between each query and each text block in the retrieval result corresponding to each query based on the temporal similarity score and the semantic similarity score between each query and each text block in the retrieval result corresponding to each query.
[0042] The embodiment of the present invention provides a re-ranking method, which can obtain the semantic similarity score between each query and each text block in the search results corresponding to each query in the initial search stage of text search. Therefore, the calculation of the semantic similarity score can refer to the existing technology and will not be described in detail here. The corresponding search results Any text block There is a semantic similarity score between .
[0043] After the above steps, there is a semantic similarity score and a temporal similarity score between the query and any text block in the retrieval results. These two scores are combined to obtain the final similarity score between the query and the text block.
[0044] In the embodiment of the present invention, a comprehensive similarity score between each query and each text block in the search results corresponding to each query is obtained based on the temporal similarity score and the semantic similarity score between each query and each text block in the search results corresponding to each query, including: For first queries belonging to the first sensitivity category, using the semantic similarity score between each first query and each text block in the retrieval results corresponding to each first query as the comprehensive similarity score between each first query and each text block in the retrieval results corresponding to each first query; For the second queries belonging to the second sensitivity category, using a comprehensive similarity calculation formula, based on the temporal similarity score and the semantic similarity score between each second query and each text block in the retrieval results corresponding to each second query, a comprehensive similarity score between each second query and each text block in the retrieval results corresponding to each second query is calculated; For the third queries belonging to the third sensitivity category, the comprehensive similarity calculation formula is used to calculate the comprehensive similarity score between each third query and each text block in the retrieval results corresponding to each third query based on the temporal similarity score and semantic similarity score between each third query and each text block in the retrieval results corresponding to each third query.
[0045] Among them, if the time sensitivity classification of the query belongs to the first sensitivity category, it means that the query is not related to time, and there is no need to synthesize, and the semantic similarity score is directly used as the final comprehensive similarity score. For queries whose time sensitivity classification belongs to the second sensitivity class and the third sensitivity class With text blocks First, we will use the semantic similarity score to Sort the Chinese text blocks in descending order and get Ranking ; Then, according to the time similarity score, Sort the Chinese text blocks in descending order and get Ranking ; Then according to the comprehensive similarity calculation formula: ; in, Indicates the weight of the semantic similarity factor when calculating the comprehensive similarity; Indicates the weight of the time similarity factor when calculating the comprehensive similarity; represents the constant 1; represents the constant 1; Calculated and The comprehensive similarity score of After this step, any query in the query set and any text block in its corresponding search results will receive a final comprehensive similarity score.
[0046] Step S105 , sorting the search results corresponding to each query in descending order according to the comprehensive similarity score between each query and each text block in the search results corresponding to each query, so as to achieve text search adaptive re-ranking.
[0047] In an embodiment of the present invention, for each query, all text blocks in the corresponding search results are sorted in descending order according to the calculated comprehensive similarity scores, and the search results with high comprehensive similarity in the search result set are sorted in front to form a new, optimized search result list.
[0048] In an embodiment of the present invention, based on the sensitivity category of each query, a temporal similarity score is calculated between each query and each text block in the retrieval results corresponding to each query. Then, based on the temporal similarity score and semantic similarity score between each query and each text block in the retrieval results corresponding to each query, a comprehensive similarity score is obtained between each query and each text block in the retrieval results corresponding to each query. Then, based on the comprehensive similarity score, the retrieval results corresponding to each query are sorted in descending order. By introducing the temporal similarity score into the initial retrieval algorithm or the semantic reranking algorithm, the retrieval accuracy can be further improved by integrating multi-dimensional sorting information.
[0049] Especially for time-sensitive fields like news and finance, the temporal information in text is crucial for re-ranking. Therefore, focusing on temporal information in text and effectively improving re-ranking is crucial for improving retrieval accuracy and ensuring the quality of generated content.
[0050] A simulation experiment using a time-aware text retrieval adaptive reordering method provided by an embodiment of the present invention is as follows: In order to verify the superiority of the time-aware text retrieval adaptive reranking method proposed in this invention in improving retrieval accuracy, a public text dataset was selected, and the specific implementation of the reranking algorithm proposed in this invention and multiple reranking algorithms in the prior art were set up. The recall rate (R@N, Recall at N) and the mean reciprocal rank (MRR@N, Mean Reciprocal Rank at N) were selected as the measurement indicators of the retrieval effect.
[0051] In the selected public dataset, each query has its corresponding most relevant text block. If the retrieval results contain the most relevant text block, the retrieval is a hit, which is beneficial for subsequent generation tasks; otherwise, it is a miss.
[0052] Recall (R@N) represents the ratio of the number of queries that retrieved the most relevant text blocks to the total number of queries, when focusing only on the first N text blocks in the search results. R@N ranges from [0, 1]. A higher value indicates a higher recall and better search results. Mean Reciprocal Ranking (MRR@N) represents the average of the reciprocal rankings of the most relevant text blocks retrieved by all queries, when focusing only on the first N text blocks in the search results. MRR@N ranges from [0, 1]. A higher value indicates a higher ranking of the most relevant text blocks in the search results, indicating better search results.
[0053] The public English text dataset SQuAD was selected for the specific implementation of the reranking method proposed in this invention and multiple reranking algorithms in the prior art. The SQuAD dataset contains 98,169 queries and 20,958 text blocks. Since the present invention focuses on the contribution of the time information of queries and text blocks to retrieval accuracy, it only focuses on the reranking of time-related queries in the second sensitivity category and the third sensitivity category after the "query time sensitivity classification" proposed in this invention. In the SQuAD dataset, the number of queries classified as the second sensitivity category and the third sensitivity category is 25,171.
[0054] In addition, the present invention will integrate the semantic similarity and temporal similarity between the query and the text block, and the present invention can be superimposed on the ordinary initial retrieval and the above-mentioned existing semantic reranking to perform reranking. Therefore, this implementation case demonstrates the retrieval accuracy of various existing technologies without superposition and with superposition of the reranking algorithm of the present invention to reflect the benefits of the present invention.
[0055] For the "initial dense search" algorithm, in the following Figure 2 and “retrieve” in Table 1; for the “cross encoder model reordering” algorithm, in the following Figure 2 and represented by “reranker” in Table 1.
[0056] The recall rate R@N obtained by re-ranking algorithm proposed in the present invention and multiple re-ranking algorithms in the prior art on the data set is as follows: Figure 2 As shown in Table 1, Figure 2 Schematic diagram comparing the time-aware text retrieval adaptive re-ranking method provided by an embodiment of the present invention with the R@N method of the prior art: Table 1 Comparison between the reordering algorithm of the present invention and the prior art R@N
[0057] From the above Table 1 and Figure 2 It can be seen that, whether it is the initial dense search algorithm or various semantic reranking algorithms, the recall rate R@N is improved after superimposing the time-aware text search adaptive reranking method provided by the embodiment of the present invention. This shows that superimposing the reranking method proposed by the present invention can improve the recall rate and enhance the search effect.
[0058] The average reciprocal ranking MRR@N obtained by retrieving the data set from the reranking algorithm proposed in the present invention and multiple reranking algorithms in the prior art is shown in Table 2 and Figure 3 As shown, Figure 3 Schematic diagram comparing the time-aware text retrieval adaptive reranking method provided by an embodiment of the present invention with the MRR@N method of the prior art: Table 2 Comparison between the reordering algorithm of the present invention and the prior art MRR@N
[0059] From Table 2 and Figure 3 It can be seen that both the initial intensive search algorithm and various semantic reranking algorithms achieve an improvement in mean reciprocal ranking (MRR@N) when the time-aware text retrieval adaptive reranking method proposed in this embodiment of the present invention is added. This demonstrates that the addition of the proposed reranking method can improve the ranking of text related to the query in the search results, thereby enhancing search effectiveness.
[0060] Based on the same inventive concept, the embodiment of the present invention also provides a time-aware text retrieval adaptive reordering device, see Figure 4 , Figure 4 1 is a schematic structural diagram of a time-aware text retrieval adaptive reordering device provided by an embodiment of the present invention, the text retrieval adaptive reordering device comprising: Extraction module 401, for performing time extraction operations on each query in the query set and each text block in the search results corresponding to each query, to obtain a time list corresponding to each query and each text block; A classification module 402 is configured to classify each query according to its time sensitivity based on the time list corresponding to each query, and determine a sensitivity category for each query; A calculation module 403 is used to calculate a temporal similarity score between each query and each text block in the search results corresponding to each query based on the sensitivity category of each query; Determination module 404, for obtaining a comprehensive similarity score between each query and each text block in the search results corresponding to each query based on the temporal similarity score and the semantic similarity score between each query and each text block in the search results corresponding to each query; The sorting module 405 is used to sort the search results corresponding to each query in descending order according to the comprehensive similarity score between each query and each text block in the search results corresponding to each query, so as to achieve text search adaptive re-ranking.
[0061] In an embodiment of the present invention, based on the sensitivity category of each query, a temporal similarity score is calculated between each query and each text block in the retrieval results corresponding to each query. Then, based on the temporal similarity score and semantic similarity score between each query and each text block in the retrieval results corresponding to each query, a comprehensive similarity score is obtained between each query and each text block in the retrieval results corresponding to each query. Then, based on the comprehensive similarity score, the retrieval results corresponding to each query are sorted in descending order. By introducing the temporal similarity score into the initial retrieval algorithm or the semantic reranking algorithm, the retrieval accuracy can be further improved by integrating multi-dimensional sorting information.
[0062] Optional computing module, specifically used for: The time information in the time lists corresponding to each query and each text block is formatted uniformly to obtain the normalized time lists corresponding to each query and each text block; based on the sensitivity category of each query and the normalized time lists corresponding to each query and each text block, the time similarity score between each query and each text block in the retrieval results corresponding to each query is calculated.
[0063] Optional, classification module, specifically used for: Queries without time information in the time list are classified into the first sensitivity category; queries with implicit time information in the time list are classified into the second sensitivity category; queries with explicit time information in the time list are classified into the third sensitivity category.
[0064] Optionally, determine the module, specifically for: For the first queries belonging to the first sensitivity category, the semantic similarity scores between each first query and each text block in the retrieval results corresponding to each first query are used as the comprehensive similarity scores between each first query and each text block in the retrieval results corresponding to each first query; for the second queries belonging to the second sensitivity category, the comprehensive similarity calculation formula is used to calculate the comprehensive similarity scores between each second query and each text block in the retrieval results corresponding to each second query based on the temporal similarity scores and semantic similarity scores between each second query and each text block in the retrieval results corresponding to each second query; for the third queries belonging to the third sensitivity category, the comprehensive similarity calculation formula is used to calculate the comprehensive similarity scores between each third query and each text block in the retrieval results corresponding to each third query based on the temporal similarity scores and semantic similarity scores between each third query and each text block in the retrieval results corresponding to each third query.
[0065] Optionally, the computing module is further configured to: The temporal similarity scores between the first query under the first sensitivity category and each text block in the retrieval results corresponding to each first query are determined to be 0; the temporal similarity scores between the second query under the second sensitivity category and the text blocks with empty time lists in the retrieval results corresponding to each second query are determined to be 0, and the temporal similarity scores between the second query under the second sensitivity category and the text blocks with non-empty time lists in the retrieval results corresponding to each second query are determined to be 1; and the temporal similarity scores between the third query under the third sensitivity category and each text block in the retrieval results corresponding to each third query are calculated using the similarity coefficient.
[0066] Optionally, the similarity coefficient is a Jaccard similarity coefficient.
[0067] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504. Memory 503, used for storing computer programs; The processor 501 is configured to implement any of the above-mentioned time-aware text retrieval adaptive reordering methods when executing the program stored in the memory 503 .
[0068] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0069] The communication interface is used for communication between the above electronic device and other devices.
[0070] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0071] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0072] The present invention also provides a computer-readable storage medium in which a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps of any of the above-mentioned time-aware text retrieval adaptive reordering methods.
[0073] Optionally, the computer-readable storage medium may be a non-volatile memory (NVM), such as at least one disk memory.
[0074] Optionally, the computer-readable storage medium may also be at least one storage device located away from the processor.
[0075] In another embodiment of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute the method steps described in any one of the above-mentioned time-aware text retrieval adaptive reordering methods.
[0076] It should be noted that the terms "first," "second," and the like are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of devices and methods consistent with some aspects of the present invention.
[0077] In the description of this specification, the reference terms "one embodiment," "some embodiments," "example," "specific example," or "some examples" mean that the specific features or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features or characteristics described can be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples described in this specification.
[0078] Although the present invention is described herein in conjunction with various embodiments, in the process of implementing the claimed invention, those skilled in the art can understand and implement other variations of the disclosed embodiments by viewing the drawings and the disclosed content. In the description of the present invention, the word "comprising" does not exclude other components or steps, "one" or "a" does not exclude multiple situations, and "multiple" means two or more, unless otherwise clearly and specifically defined. In addition, certain measures are recorded in different embodiments, but this does not mean that these measures cannot be combined to produce good results.
[0079] The method provided in the embodiments of the present invention can be applied to electronic devices. Specifically, the electronic devices can be desktop computers, portable computers, smart mobile terminals, servers, etc. This is not limited here; any electronic device that can implement the present invention falls within the scope of protection of the present invention.
[0080] As for the device / electronic device / storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0081] It should be noted that the device, electronic device and storage medium of the embodiments of the present invention are respectively the device, electronic device and storage medium that apply the above-mentioned text retrieval adaptive reordering method based on time perception. All embodiments of the above-mentioned text retrieval adaptive reordering method based on time perception are applicable to the device, electronic device and storage medium, and can achieve the same or similar beneficial effects.
[0082] The above is a further detailed description of the present invention in conjunction with specific preferred embodiments, and the specific implementation of the present invention should not be considered to be limited to these descriptions. For those skilled in the art of the present invention, without departing from the concept of the present invention, several simple deductions or substitutions can be made, which should be considered to fall within the scope of protection of the present invention.
Claims
1. A time-aware text retrieval adaptive re-ranking method, characterized in that: The text retrieval adaptive reordering method comprises: Performing a time extraction operation on each query in the query set and each text block in the search results corresponding to each query to obtain a time list corresponding to each query and each text block; Based on the time list corresponding to each query, each query is classified according to time sensitivity to determine the sensitivity category of each query; Based on the sensitivity category of each query, the temporal similarity score between each query and each text block in the retrieval results corresponding to each query is calculated; Obtaining a comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query based on the temporal similarity score and the semantic similarity score between each query and each text block in the retrieval results corresponding to each query; The retrieval results corresponding to each query are sorted in descending order according to the comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query, so as to realize text retrieval adaptive re-ranking.
2. The text retrieval adaptive re-ranking method according to claim 1, characterized in that: According to the sensitivity category of each query, the temporal similarity score between each query and each text block in the retrieval results corresponding to each query is calculated, including: The time information in the time list corresponding to each query and each text block is formatted uniformly to obtain a standardized time list corresponding to each query and each text block; According to the sensitivity category of each query and the normalized time list corresponding to each query and each text block, a time similarity score between each query and each text block in the retrieval results corresponding to each query is calculated.
3. The text retrieval adaptive re-ranking method according to claim 1, characterized in that: Based on the time list corresponding to each query, each query is classified according to time sensitivity to determine the sensitivity category of each query, including: Classify queries without time information in the time list into the first sensitivity category; Classify queries containing implicit time information in the time list into the second sensitivity category; Queries with explicit time information in the time list are classified into the third sensitivity category.
4. The text retrieval adaptive re-ranking method according to claim 3, characterized in that: According to the temporal similarity score and semantic similarity score between each query and each text block in the retrieval results corresponding to each query, a comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query is obtained, including: For first queries belonging to the first sensitivity category, using the semantic similarity score between each first query and each text block in the retrieval results corresponding to each first query as the comprehensive similarity score between each first query and each text block in the retrieval results corresponding to each first query; For the second queries belonging to the second sensitivity category, using a comprehensive similarity calculation formula, based on the temporal similarity score and the semantic similarity score between each second query and each text block in the retrieval results corresponding to each second query, a comprehensive similarity score between each second query and each text block in the retrieval results corresponding to each second query is calculated; For the third queries belonging to the third sensitivity category, the comprehensive similarity calculation formula is used to calculate the comprehensive similarity score between each third query and each text block in the retrieval results corresponding to each third query based on the temporal similarity score and semantic similarity score between each third query and each text block in the retrieval results corresponding to each third query.
5. The text retrieval adaptive re-ranking method according to claim 3, characterized in that: According to the sensitivity category of each query, the temporal similarity score between each query and each text block in the retrieval results corresponding to each query is calculated, including: determining a time similarity score between the first query under the first sensitivity category and each text block in the search results corresponding to each first query to be 0; Determine the time similarity score between the second query under the second sensitivity category and the text block with an empty time list in the search results corresponding to each second query as 0, and determine the time similarity score between the second query under the second sensitivity category and the text block with a non-empty time list in the search results corresponding to each second query as 1; The similarity coefficient is used to calculate a temporal similarity score between the third query under the third sensitivity category and each text block in the retrieval results corresponding to each third query.
6. The text retrieval adaptive re-ranking method according to claim 5, characterized in that: The similarity coefficient is the Jaccard similarity coefficient.
7. A time-aware text retrieval adaptive reordering device, characterized in that: The text retrieval adaptive reordering device comprises: An extraction module is used to perform a time extraction operation on each query in the query set and each text block in the search results corresponding to each query, to obtain a time list corresponding to each query and each text block; A classification module is used to classify each query according to its time sensitivity based on the time list corresponding to each query, and determine the sensitivity category of each query; a calculation module for calculating a temporal similarity score between each query and each text block in the retrieval results corresponding to each query based on the sensitivity category of each query; a determination module for obtaining a comprehensive similarity score between each query and each text block in the retrieval results corresponding to each query based on a temporal similarity score and a semantic similarity score between each query and each text block in the retrieval results corresponding to each query; The sorting module is used to sort the search results corresponding to each query in descending order according to the comprehensive similarity score between each query and each text block in the search results corresponding to each query, so as to achieve text search adaptive reordering.
8. The text retrieval adaptive reordering device according to claim 7, characterized in that: Computing module, specifically used for: The time information in the time lists corresponding to each query and each text block is formatted uniformly to obtain the normalized time lists corresponding to each query and each text block; based on the sensitivity category of each query and the normalized time lists corresponding to each query and each text block, the time similarity score between each query and each text block in the retrieval results corresponding to each query is calculated.
9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; The processor is configured to implement the text retrieval adaptive reordering method according to any one of claims 1 to 6 when executing a computer program stored in the memory.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the text retrieval adaptive reordering method according to any one of claims 1 to 6 is implemented.