A cross-language retrieval method
By using a language-specific vectorized model and a dual screening mechanism, more semantically optimized query statements are generated. The retrieval parameters are dynamically adjusted based on user browsing behavior, which solves the problems of semantic representation bias and entity differences in cross-language retrieval, thereby improving query accuracy and user satisfaction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-02
- Publication Date
- 2026-03-13
AI Technical Summary
In existing cross-language retrieval methods, single encoding models struggle to account for the semantic differences between different languages, resulting in low query accuracy. Furthermore, the differences between entity representations in users' natural language and standardized entities in knowledge graphs lead to high query failure rates.
A language-specific vectorized model is adopted, and a dual screening mechanism of primary entity screening threshold and standardized entity threshold is used to generate semantically better query statements. Furthermore, the retrieval parameters are dynamically adjusted based on user browsing behavior to optimize query accuracy.
It significantly improved the accuracy of Chinese, English, and mixed text searches, reduced the query failure rate, and enhanced the accuracy, recall, and user satisfaction of cross-language retrieval, thereby improving the efficiency and quality of cross-language information exchange and knowledge sharing.
Smart Images

Figure CN121117156B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to information processing technology, specifically to a cross-language retrieval method. Background Technology
[0002] With the increasing demand for data queries, the low accuracy of cross-language retrieval has become increasingly severe. The core problems of current cross-language retrieval lie in two aspects. First, a single encoding model struggles to accommodate the semantic differences between languages. The character combination in Chinese and the root structure in English exhibit representational discrepancies in vector space, limiting the accuracy of similarity searches (ANN) in Milvus for mixed text. While traditional solutions using a unified model can achieve cross-language mapping, they sacrifice language-specific semantic details. Second, entity representations in users' natural language often differ from standardized entities in knowledge graphs due to abbreviations, alternative names, and misspellings. Traditional Cypher engines rely on precise string matching, resulting in a failure rate as high as 37% for such queries (tested in the medical field). More seriously, entity ambiguity can lead to erroneous associations, causing the collapse of knowledge reasoning logic. Manually maintained thesaurus coverage is low, making it difficult to handle out-of-vocabulary words and cross-domain entities. Cypher generation, relying on fixed templates, lacks dynamic error correction capabilities and cannot adapt to entity variations, resulting in extremely low cross-language retrieval accuracy, thus limiting the efficiency and quality of cross-language information exchange and knowledge sharing.
[0003] Chinese patent CN112699212A discloses a cross-language text retrieval system and method, including multiple machine translation modules, a target language retrieval request construction module, a search term list formation module, a weight calculation module, a cloud data service module, a translation credibility calculation module, and a target language retrieval result construction module. The machine translation modules are communicatively connected to the target language retrieval request construction module, which is also communicatively connected to the search term list formation module and the weight calculation module. Both the search term list formation module and the weight calculation module are communicatively connected to a search query generation module, which is also communicatively connected to the cloud data service module, which is in turn communicatively connected to the translation credibility calculation module. The cloud data service module is also communicatively connected to the target language retrieval result construction module. While this system and method can improve the accuracy of cross-language retrieval to some extent, the improvement is limited, and a high failure rate still exists when user resource language expressions are inconsistent. How to avoid the impact of entity ambiguity on query success rate while optimizing the accuracy of cross-language retrieval has become a current research challenge. Summary of the Invention
[0004] To address this, the present invention provides a cross-language retrieval method to overcome the problem that existing single-encoding models cannot take into account the semantic characteristics of different languages and that the difference between entity representations in natural language and standardized entities in knowledge graphs leads to low query accuracy.
[0005] To achieve the above objectives, the present invention provides a cross-language retrieval method, comprising:
[0006] Receive the query statement and extract object entities whose character length is less than or equal to the entity string length threshold, where the entity string length threshold is the maximum allowed length of the entity string;
[0007] Vectorization models that select the corresponding type based on the language attributes of object entities. The language attributes include Chinese type, English type and mixed Chinese-English type. The vectorization model types include Chinese type vectorization model, English type vectorization model and mixed Chinese-English type vectorization model.
[0008] The vectorized object entities are screened using a primary entity screening threshold to obtain a number of selected entities and a number of updated entities. The selected entities are screened using a standardized entity threshold to obtain a number of standardized entities. The updated entities are stored in the database to update the pre-stored entities in the database. The primary entity screening threshold is the minimum similarity that each selected entity in the database must achieve with its corresponding object entity. The standardized entity threshold is the maximum value of the proportion of standardized entities in the selected entities.
[0009] Several query statements are generated based on the language model and the standardized entities described above, and the query statement with the highest semantic similarity to the query statement is selected as the final query statement.
[0010] The final query statement is retrieved based on the HNSW or IVF_PQ index to obtain the total search results, and the search results with a relevance higher than the result filtering threshold are output. The result filtering threshold is the minimum relevance standard of the search results.
[0011] The effective scroll depth is defined as the page position depth reached by the scrollbar on the search results page during a single search, where the dwell time exceeds the preset dwell threshold.
[0012] Based on the effective scroll depth, determine whether the search results meet the requirements; and when it is determined that they do not meet the requirements, determine the reason for the non-compliance based on the proportion of the search results in the total search results; and adjust the parameters of the object entity in extraction, matching, retrieval and result meeting the requirements based on the corresponding reason.
[0013] Furthermore, the process of determining whether the search results meet the requirements based on the effective scrolling depth includes:
[0014] The effective scrolling depth is determined based on the maximum page position depth where the dwell time exceeds the preset dwell threshold.
[0015] If the effective scrolling depth is less than or equal to the first preset effective scrolling depth or greater than or equal to the second preset effective scrolling depth, the search results are determined to be unacceptable. The reason for the unacceptability of the search results is determined based on the proportion of the search results in the total search results.
[0016] If the effective scroll depth is greater than the first preset effective scroll depth but less than the second preset effective scroll depth, the search results are determined to meet the requirements, and the search parameter settings are maintained.
[0017] Furthermore, the process of determining why the search results do not meet the needs based on the proportion of the search results in the total search results includes:
[0018] The percentage of search results is determined based on the percentage of the search results in the total search results.
[0019] If the percentage of search results is less than the preset percentage of search results, it is determined that the result filtering threshold is set unreasonably, and the result filtering threshold is corrected based on the ratio of the preset percentage of search results to the percentage of search results.
[0020] If the percentage of search results is greater than or equal to the preset percentage of search results, the reason why the search results do not meet the requirements is determined based on the percentage of successfully matched object entities in the total number of object entities.
[0021] Furthermore, the process of adjusting the result filtering threshold based on the ratio of the preset search result percentage to the search result percentage includes:
[0022] The result proportion ratio is determined based on the ratio of the preset search result proportion to the search result proportion;
[0023] The result filtering threshold is reduced based on the comparison between the result percentage ratio and the preset result percentage ratio, and the reduction in the result filtering threshold is proportional to the result percentage ratio.
[0024] Furthermore, the process of determining why the search results do not meet the requirements based on the proportion of successfully matched object entities in the total number of object entities includes:
[0025] The matching ratio is determined based on the proportion of the successfully matched object entities in the total number of object entities.
[0026] If the matching ratio is less than the preset matching ratio, it is determined that the extraction of the object entity does not meet the requirements, and the entity string length threshold is adjusted based on the difference between the matching ratio and the preset matching ratio.
[0027] If the matching ratio is greater than or equal to the preset matching ratio, the standardized entity threshold is adjusted based on the semantic similarity between the final query statement and the query statement.
[0028] Furthermore, the process of adjusting the entity string length threshold based on the difference between the matching ratio and the preset matching ratio includes:
[0029] The difference in the matching ratio is determined based on the difference between the preset matching ratio and the preset matching ratio.
[0030] The threshold for reducing the length of the entity string is determined based on the comparison between the difference in the matching ratio and the preset difference in the matching ratio, and the reduction in the length threshold of the entity string is proportional to the difference in the matching ratio.
[0031] Furthermore, the process of correcting the standardized entity threshold based on the semantic similarity between the final query statement and the query statement includes:
[0032] Semantic similarity is determined based on the semantic similarity between the final query statement and the query statement;
[0033] The threshold for the standardized entity is reduced based on the comparison between the semantic similarity and the preset semantic similarity, and the reduction in the threshold for the standardized entity is inversely proportional to the semantic similarity.
[0034] Furthermore, based on the comparison between the standardized entity threshold difference and the preset standardized entity threshold difference, the threshold for increasing the primary screening of entities is determined, and the increase in the primary screening threshold is proportional to the standardized entity threshold difference.
[0035] Wherein, the standardized entity threshold difference is the difference between the standardized entity threshold after correction and the standardized entity threshold before correction.
[0036] Furthermore, based on the corrected parameters, the process of determining whether the number of parameter modifications per unit time meets the standard includes:
[0037] The number of modifications per unit time is determined based on the number of times any of the above parameters are modified per unit time.
[0038] If the number of modifications per unit time is less than the preset number of modifications per unit time, then maintain the current parameters and continue detection;
[0039] If the number of modifications per unit time is greater than or equal to the preset number of modifications per unit time, the second preset effective scroll depth is adjusted based on the average dwell time on the search results page.
[0040] Furthermore, the process of adjusting the second preset effective scroll depth based on the average dwell time on the search results page within N times includes:
[0041] The average time spent on a page is determined based on the average time users spend on the search results page.
[0042] Based on the comparison between the average page dwell time and the preset average page dwell time, the second preset effective scroll depth is increased, and the increase in the second preset effective scroll depth is proportional to the average page dwell time.
[0043] Compared with existing technologies, the advantages of this invention are as follows: This invention extracts object entities of a limited length, selects the corresponding vectorization model based on their language type, and then uses dual thresholds to screen standardized entities and update the database to generate semantically superior query statements. After retrieval, highly relevant results are output. To further optimize query accuracy, this invention collects the effective scrolling depth of the user's browsing to determine if the results meet the requirements and dynamically adjusts the entity extraction, matching, and retrieval parameters accordingly. This invention employs a language-type-specific vectorization model, effectively solving the semantic representation bias of traditional single-encoding models in cross-language scenarios. This invention significantly improves the accuracy of searches in Chinese, English, and mixed text. Simultaneously, through a dual dynamic screening mechanism of "initial entity screening threshold" and "standardized entity threshold," combined with a database update strategy, it effectively bridges the gap between user-generated natural language entity representations and standardized entities in the knowledge graph, significantly reducing the query failure rate caused by abbreviations, aliases, and typos. Furthermore, this invention introduces "effective scrolling depth" as a user behavior feedback indicator, combined with a dynamic correction mechanism based on search result percentage and semantic similarity, achieving closed-loop optimization of search parameters, thereby greatly improving the accuracy, recall, and user satisfaction of cross-language searches.
[0044] Furthermore, judging whether search results meet the needs based on effective scrolling depth can comprehensively consider user browsing behavior and attention to search results. This is more reasonable than judging solely based on the number of search results or relevance, and can more accurately reflect user satisfaction with search results. This provides a more reliable basis for optimizing cross-language search systems and further improves the accuracy and relevance of search results.
[0045] Furthermore, based on the percentage of search results, the system determines why search results do not meet user needs. When the percentage falls below a preset value, it promptly identifies issues with unreasonable result filtering thresholds and adjusts the threshold by calculating the ratio of the preset search result percentage to the actual search result percentage. This dynamic adjustment of filtering criteria allows for more precise matching of filtering conditions to user needs, avoiding the exclusion of too many potentially relevant results due to excessively high thresholds, or a decline in result quality due to excessively low thresholds. Simultaneously, when the percentage reaches the preset value, further analysis based on the percentage of successfully matched object entities allows for a more comprehensive diagnosis of problems in the cross-language search process, improving the performance and reliability of the retrieval system.
[0046] Furthermore, by adjusting the result filtering threshold based on the ratio of preset search result percentages to actual search result percentages, the gap between the filtering threshold and the ideal effect can be quantitatively assessed. The threshold can be reasonably lowered to expand the range of acceptable results, making the system more flexible and adaptable to different user needs. Moreover, setting different preset result percentage ranges and corresponding adjustment thresholds ensures that the reduction in the result filtering threshold effectively improves the quantity of results without excessively broadening the filtering conditions, thus achieving a balance between the quantity and quality of search results and further optimizing the accuracy and relevance of cross-language searches.
[0047] Furthermore, by determining the reason why search results do not meet requirements based on the proportion of successfully matched object entities, it is possible to pinpoint whether the problem lies in the object entity extraction stage or the query generation stage. When the matching ratio is lower than a preset value, the entity string length threshold is adjusted in a timely manner, and the extraction strategy is adjusted to make the extracted entities more consistent with the standardized entity length characteristics, thereby improving the matching success rate. Conversely, when the matching ratio reaches the preset value, the standardized entity threshold is adjusted based on semantic similarity, and the query generation stage is optimized to improve the accuracy and relevance of search results. This targeted corrective measure effectively improves the quality and efficiency of cross-language retrieval.
[0048] Furthermore, by adjusting the entity string length threshold based on the difference between the matching ratio and the preset matching ratio, the extraction strategy can be dynamically adjusted according to the severity of the problem. The larger the difference in the matching ratio, the more serious the problem in the object entity extraction stage. In this case, significantly reducing the entity string length threshold can more effectively optimize the extraction stage, improve the quality of the extracted entities, and thus enhance the performance of cross-language retrieval.
[0049] Furthermore, the standardized entity threshold is adjusted based on the semantic similarity between the final query and the query statement. When the semantic similarity is low, the standardized entity threshold is lowered to provide more reference objects, thereby improving the accuracy of the query statement. By setting different preset semantic similarity ranges and corresponding adjustment thresholds, the reduction in the standardized entity threshold is inversely proportional to the semantic similarity, making the cross-language retrieval system more flexible and adaptable, better meeting the diverse retrieval needs of users, and improving the efficiency and quality of cross-language information retrieval.
[0050] Furthermore, by comparing the difference between the standardized entity threshold and the preset difference, the threshold for increasing the initial entity screening can be determined. This initial screening threshold can be dynamically adjusted based on the degree of correction to the standardized entity threshold. When the standardized entity threshold decreases, increasing the initial entity screening threshold prevents pre-existing entities with insufficient matching in the database from being selected as standardized entities, ensuring that the entities entering subsequent screening stages are of higher quality and better match the user's true query intent, thus further improving the accuracy and relevance of the search results.
[0051] Furthermore, judging whether the number of parameter modifications per unit time meets the standard based on the corrected parameters can effectively assess the rationality of the effective scroll depth setting. When the number of modifications per unit time is too large, timely adjustment of the second preset effective scroll depth based on the average page dwell time can avoid frequent parameter adjustments due to unreasonable effective scroll depth settings, making the cross-language retrieval system run more stably and improving system reliability and user experience.
[0052] Furthermore, by adjusting the second preset effective scroll depth based on the average page dwell time, the scroll depth can be dynamically adjusted according to the user's interest in the search results. The longer the average page dwell time, the more interested the user is in the search results. In this case, appropriately increasing the second preset effective scroll depth allows the system to better adapt to the diverse behavioral patterns of different users, improve the personalization and accuracy of search results, thereby optimizing system performance and enhancing user satisfaction with the cross-language search system. Attached Figure Description
[0053] Figure 1 This is a flowchart illustrating the cross-language retrieval method in an embodiment of the present invention.
[0054] Figure 2 This is a flowchart illustrating how to determine whether the search results meet the requirements based on the effective scrolling depth in an embodiment of the present invention.
[0055] Figure 3 This is a flowchart illustrating the process of correcting the result filtering threshold based on the result proportion ratio in an embodiment of the present invention;
[0056] Figure 4This is a flowchart illustrating the process of correcting the second preset effective scrolling depth based on the average page dwell time in an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives and advantages of the present invention clearer, the present invention will be further described below with reference to embodiments; it should be understood that the specific embodiments described herein are merely for explaining the present invention and are not intended to limit the present invention.
[0058] Preferred embodiments of the present invention will now be described with reference to the accompanying drawings. Those skilled in the art should understand that these embodiments are merely illustrative of the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0059] Please see Figure 1 As shown, it is a flowchart of the cross-language retrieval method in an embodiment of the present invention, including:
[0060] S1: Extraction of object entities. Receives the query statement and extracts object entities whose character length is less than or equal to the entity string length threshold. The entity string length threshold is the maximum allowed length of the entity string.
[0061] S2: Object entity vectorization, which selects the corresponding type of vectorization model based on the language attribute of the object entity. The language attribute includes Chinese type, English type and mixed Chinese and English type. The vectorization model types include Chinese type vectorization model, English type vectorization model and mixed Chinese and English type vectorization model.
[0062] S3: Matching of vectorized object entities, using a primary entity screening threshold to screen each vectorized object entity to obtain several selected entities and several updated entities, using a standardized entity threshold to screen each selected entity to obtain several standardized entities, and storing each updated entity in the database to update the pre-stored entities in the database. The primary entity screening threshold is the minimum similarity that each selected entity in the database must achieve with its corresponding object entity, and the standardized entity threshold is the maximum value of the proportion of standardized entities in the selected entities.
[0063] S4: Generate query statements. Based on the language model and the standardized entities, generate several query statements and select the query statement with the highest semantic similarity to the query statement as the final query statement.
[0064] S5: Retrieval of the final query statement, the final query statement is retrieved based on the HNSW or IVF_PQ index to obtain the total search results, and the search results with a relevance higher than the result filtering threshold are output, where the result filtering threshold is the minimum relevance standard of the search results.
[0065] S6: Collection of effective scroll depth: The effective scroll depth is the page position depth reached by the scroll bar on the search results page in a single search results page and the dwell time exceeds the set preset dwell threshold.
[0066] S7: Optimize the query results, determine whether the search results meet the requirements based on the effective scroll depth, and when it is determined that they do not meet the requirements, determine the reason for the non-compliance based on the proportion of the search results in the total search results, and adjust the parameters of the object entity in extraction, matching, retrieval and result meeting the requirements based on the corresponding reason.
[0067] The threshold value for entity string length is 10-20 characters. The method for extracting object entities based on the query statement is not limited in principle. Technicians can choose any one or more of the following tools for extraction, including but not limited to spaCy, StanfordNLP, NLTK, PURE, Entity Extractor by NER, CRFEntityExtractor, PylTP, Transformers library, paddleNLP, and OpenAI. This will not be elaborated further.
[0068] In principle, the types of Chinese type vectorization models, English type vectorization models, and mixed Chinese-English type vectorization models are not limited. Chinese type vectorization models include, but are not limited to, the text2vec-large-chinese model. English type vectorization models include, but are not limited to, Qwen2 encoding. Mixed Chinese-English type vectorization models include, but are not limited to, parallel encoding of dual models and feature fusion. The feature fusion method is not limited, such as element-wise operation, concatenation, etc., which will not be elaborated here.
[0069] Wherein, the primary screening threshold V ∈ [0.7, 0.95];
[0070] Specifically, the process of screening each vectorized object entity based on the initial entity screening threshold includes:
[0071] Iterate through each of the pre-stored entities in the database and calculate the relevance between each pre-stored entity and each object entity in turn, denoted as V. i-j V i-j This represents the relevance between the i-th pre-stored entity and the j-th object entity, where i = 1, 2, ..., n, and j = 1, 2, ..., n;
[0072] The entity primary screening thresholds V and V are sequentially set. i-j Compare;
[0073] If Vi-j If the value is greater than or equal to the primary screening threshold V of the entity, then the corresponding V will be... i-j Include the selected entity corresponding to the object entity;
[0074] After traversing all pre-stored entities, if the V of all pre-stored entities i-j If all values are less than the primary screening threshold V for the entity, then the corresponding V will be... i-j This is recorded as updating the entity and storing it in the database, and updating the pre-stored entities in the database. Then, the initial screening threshold V for the entity is set to V... i-j Compare the results to identify the selected entities;
[0075] Specifically, the process of filtering selected entities based on a standardized entity threshold to obtain a number of standardized entities includes:
[0076] Set the standardized entity threshold P ∈ [50, 60%];
[0077] The selected entities are sorted in descending order of relevance, and the top P% of the selected entities are taken as standardized entities.
[0078] The method for generating several query statements based on the language model and the standardized entities is not limited in principle. The method includes, but is not limited to, any one of the following: Sequence to Sequence (Seq2Seq) model, chatGPT, graph traversal algorithm, LitSense, PubTator, and Google Custom Search API. It will not be elaborated here.
[0079] The process of selecting the final query statement includes:
[0080] Calculate the similarity between each generated query statement and the initial query statement, and select the query statement with the highest similarity as the final query statement.
[0081] The process of outputting search results based on the result filtering threshold includes:
[0082] The relevance JC between each search result and the query statement is calculated sequentially. Then, JC is compared with the set result filtering threshold, where the result filtering threshold E∈[0.5, 0.7].
[0083] If JC is less than the result filtering threshold E, then the search result will not be output.
[0084] If JC is greater than or equal to the result filtering threshold E, then the search result will be output.
[0085] Among them, setting a preset dwell threshold S∈[3,7s] is helpful because related research shows that when there is no relevant content on the search results page that attracts the user's attention, the user may only spend 3-7 seconds looking at it. Therefore, setting a preset dwell threshold S∈[3,7s] helps to ensure that the user's current dwell time is because they have found the content they need.
[0086] Furthermore, the process of determining whether the search results meet the requirements based on the effective scrolling depth includes:
[0087] The effective scrolling depth is determined based on the maximum page position depth where the dwell time exceeds the preset dwell threshold.
[0088] If the effective scrolling depth is less than or equal to the first preset effective scrolling depth or greater than or equal to the second preset effective scrolling depth, the search results are determined to be unacceptable. The reason for the unacceptability of the search results is determined based on the proportion of the search results in the total search results.
[0089] If the effective scroll depth is greater than the first preset effective scroll depth but less than the second preset effective scroll depth, the search results are determined to meet the requirements, and the search parameter settings are maintained.
[0090] Effective scrolling depth refers to the depth of the page position reached by the scroll bar on the search results page in a single search, where the dwell time exceeds the preset dwell threshold S. In cross-language searches, there are typically two situations where search requirements cannot be met: one is that the retrieved content is completely irrelevant to the desired content; the other is that while the retrieved content has some relevance to the desired content, the search accuracy is low, requiring users to continuously scroll down to find more relevant content. Effective scrolling depth, as a standard for judging whether search results meet the requirements, comprehensively considers user browsing behavior and attention to search results. Through effective scrolling depth, this invention can easily filter out search results that do not meet the requirements, thus providing a reliable basis for optimizing cross-language search systems.
[0091] Please see Figure 2 As shown, this is a flowchart illustrating how to determine whether search results meet requirements based on effective scrolling depth in an embodiment of the present invention. The process of determining whether search results meet requirements based on effective scrolling depth includes:
[0092] The effective scrolling depth A is determined based on the maximum page position depth where the dwell time exceeds the preset dwell threshold.
[0093] The first preset effective scroll depth A1 is set to [0.5%, 5%] of the search result page depth, and the second preset effective scroll depth A2 is set to [70%, 90%] of the search result page depth;
[0094] The effective rolling depth A is compared with the first preset effective rolling depth A1 and the second preset effective rolling depth A2;
[0095] If the effective scrolling depth A is less than or equal to the first preset effective scrolling depth A1 or greater than or equal to the second preset effective scrolling depth A2, the search results are determined to be unacceptable. The reason for the unacceptability of the search results is determined based on the proportion of the search results in the total search results.
[0096] If the effective scrolling depth A is greater than the first preset effective scrolling depth A1 and less than the second preset effective scrolling depth A2, the search results are determined to meet the requirements, and the search parameter settings are maintained.
[0097] Furthermore, the process of determining why the search results do not meet the needs based on the proportion of the search results in the total search results includes:
[0098] The percentage of search results is determined based on the percentage of the search results in the total search results.
[0099] If the percentage of search results is less than the preset percentage of search results, it is determined that the result filtering threshold is set unreasonably, and the result filtering threshold is corrected based on the ratio of the preset percentage of search results to the percentage of search results.
[0100] If the percentage of search results is greater than or equal to the preset percentage of search results, the reason why the search results do not meet the requirements is determined based on the percentage of successfully matched object entities in the total number of object entities.
[0101] The percentage of search results refers to the proportion of the search results in the total search results. When this percentage is lower than a preset value, it means that the number of results that meet the requirements is too small under the current filtering threshold. This is likely because the result filtering threshold is set too high, causing some results that are less relevant to the user's needs but may actually meet the needs to be excluded. When the percentage of search results reaches or exceeds the preset value, it indicates that the search results that meet the requirements have reached a certain proportion in the total results, meeting the preset minimum requirements. At this time, the filtering threshold can filter out results that meet the user's needs to a certain extent. If there are still search results that do not meet the requirements, the problem may not be with the result filtering threshold, but with a problem in other aspects. In this case, it is necessary to further investigate the reasons based on the proportion of successfully matched object entities in the total number of object entities.
[0102] Specifically, the process of determining why the search results do not meet the needs based on the proportion of the search results in the total search results includes:
[0103] The percentage of search results B is determined based on the percentage of the search results in the total search results.
[0104] Set a preset search result percentage B1, and compare the search result percentage B with the preset search result percentage B1, setting the preset search result percentage B1 ∈ [50, 70%].
[0105] If the percentage of search results B is less than the preset percentage of search results B1, it is determined that the result filtering threshold is set unreasonably, and the result filtering threshold is corrected based on the ratio of the preset percentage of search results to the percentage of search results.
[0106] If the percentage of search results B is greater than or equal to the preset percentage of search results B1, the reason why the search results do not meet the requirements is determined based on the percentage of successfully matched object entities in the total number of object entities.
[0107] Furthermore, the process of adjusting the result filtering threshold based on the ratio of the preset search result percentage to the search result percentage includes:
[0108] The result proportion ratio is determined based on the ratio of the preset search result proportion to the search result proportion;
[0109] The result filtering threshold is reduced based on the comparison between the result percentage ratio and the preset result percentage ratio, and the reduction in the result filtering threshold is proportional to the result percentage ratio.
[0110] In cross-language retrieval, adjusting the result filtering threshold based on the result proportion ratio is a way to dynamically adjust the filtering criteria, making them more accurately match user needs and improving the accuracy and relevance of search results. When the result proportion is lower than the preset value, it indicates that the result filtering threshold is too high, causing a large number of potentially relevant results to be excluded. In this case, by calculating the result proportion ratio, the gap between the filtering threshold and the ideal effect can be quantitatively assessed, thereby reasonably lowering the threshold, expanding the range of results that meet the requirements, making the system more flexible in adapting to different user needs, and optimizing search performance. At the same time, the reduction in the result filtering threshold is proportional to the result proportion ratio. This design ensures that the reduction effectively improves the quantity of results without excessively relaxing the filtering conditions and causing a decline in result quality, thus achieving a balance between the quantity and quality of search results.
[0111] Please see Figure 3 As shown, this is a flowchart illustrating the process of correcting the result filtering threshold based on the result proportion ratio in an embodiment of the present invention. The process of correcting the result filtering threshold based on the ratio of the preset search result proportion to the search result proportion includes:
[0112] The result proportion ratio C is determined based on the ratio of the preset search result proportion to the search result proportion;
[0113] Set a first preset result ratio C1 and a second preset result ratio C2, and compare the first preset result ratio C1 and the second preset result ratio C2 with the result ratio C. The first preset result ratio C1 is set to (1, 1.5) and the second preset result ratio C2 is set to [1.5, 2].
[0114] If the result ratio C is less than or equal to the first preset result ratio C1, then the result filtering threshold E is corrected using the first result filtering correction threshold α1.
[0115] E' = E × α1, where the first result filtering correction threshold α1 = 0.99 is set;
[0116] If the result ratio C is greater than the first preset result ratio C1 and less than or equal to the second preset result ratio C2, then the result filtering threshold E is corrected using the second result filtering correction threshold α2. The corrected result filtering threshold E' = E × α2, where the second result filtering correction threshold α2 is set to 0.96.
[0117] If the result ratio C is greater than the second preset result ratio C2, then the result filtering threshold E is corrected using the third result filtering correction threshold α3. The corrected result filtering threshold E' = E × α3, where the third result filtering correction threshold α3 is set to 0.92.
[0118] Furthermore, the process of determining why the search results do not meet the requirements based on the proportion of successfully matched object entities in the total number of object entities includes:
[0119] The matching ratio is determined based on the proportion of the successfully matched object entities in the total number of object entities.
[0120] If the matching ratio is less than the preset matching ratio, it is determined that the extraction of the object entity does not meet the requirements, and the entity string length threshold is adjusted based on the difference between the matching ratio and the preset matching ratio.
[0121] If the matching ratio is greater than or equal to the preset matching ratio, the standardized entity threshold is adjusted based on the semantic similarity between the final query statement and the query statement.
[0122] The matching ratio is determined based on the proportion of successfully matched object entities out of the total number of object entities. The matching ratio reflects the percentage of currently extracted object entities that are successfully matched in the database. When the matching ratio is lower than a preset matching ratio, it indicates a low percentage of successfully matched extracted object entities, suggesting a problem in the object entity extraction process. The extracted entities may not meet the requirements, resulting in too few successfully matched entities. In this case, the root cause lies in the entity extraction stage. Therefore, it is necessary to adjust the entity string length threshold based on the difference between the matching ratio and the preset matching ratio to adjust the extraction strategy and improve the quality of extracted entities. On the other hand, when the matching ratio is greater than or equal to the preset matching ratio, it indicates that the extracted object entities performed well in the matching process, and the number of successfully matched entities met expectations. In this case, the problem may not lie in the entity extraction and matching stages, but rather in the insufficient semantic similarity between the generated final query and the original query. This may lead to a deviation between the search results and the user's actual needs. Therefore, it is necessary to adjust the standardized entity threshold based on the semantic similarity between the final query and the original query to optimize the query generation process and improve the accuracy and relevance of the search results. Based on the matching ratio, it can be determined whether the problem lies in the extraction of object entities or in the query generation process, so as to take targeted corrective measures, optimize the cross-language retrieval process, and improve the quality and accuracy of retrieval results.
[0123] Specifically, the process of determining why the search results do not meet the requirements based on the proportion of successfully matched object entities in the total number of object entities includes:
[0124] The matching ratio D is determined based on the proportion of the successfully matched object entities in the total number of object entities.
[0125] Set a preset matching ratio D1, and compare the preset matching ratio D1 with the matching ratio D, wherein the preset matching ratio D1 is set to [0.5, 0.7].
[0126] If the matching ratio D is less than the preset matching ratio D1, it is determined that the extraction of the object entity does not meet the requirements, and the entity string length threshold is adjusted based on the difference between the matching ratio and the preset matching ratio.
[0127] If the matching ratio D is greater than or equal to the preset matching ratio D1, the standardized entity threshold is adjusted based on the semantic similarity between the final query statement and the query statement.
[0128] Furthermore, the process of adjusting the entity string length threshold based on the difference between the matching ratio and the preset matching ratio includes:
[0129] The difference in the matching ratio is determined based on the difference between the preset matching ratio and the preset matching ratio.
[0130] The threshold for reducing the length of the entity string is determined based on the comparison between the difference in the matching ratio and the preset difference in the matching ratio, and the reduction in the length threshold of the entity string is proportional to the difference in the matching ratio.
[0131] The matching ratio difference refers to the difference between the preset matching ratio and the preset matching ratio. When the matching ratio is lower than the preset value, the entity string length threshold is adjusted based on the matching ratio difference. This is to adjust the extraction strategy so that the extracted entities better conform to the standardized entity length characteristics, thereby improving the matching success rate. The reduction in the entity string length threshold is proportional to the matching ratio difference because this ensures that the adjustment range matches the severity of the problem. The larger the matching ratio difference, the more severe the problem, requiring a larger adjustment to effectively optimize the extraction process and improve cross-language retrieval performance.
[0132] Specifically, the process of adjusting the entity string length threshold based on the difference between the matching ratio and the preset matching ratio includes:
[0133] The matching ratio difference F is determined based on the difference between the preset matching ratio and the preset matching ratio.
[0134] Set a first preset matching ratio difference F1 and a second preset matching ratio difference F2, and compare the first preset matching ratio difference F1 and the second preset matching ratio difference F2 with the ratio difference F, wherein the first preset matching ratio difference F1∈[0.1, 0.3] and the second preset matching ratio difference F2∈[0.3, 0.6];
[0135] If the difference in the matching ratio F is less than or equal to the first preset difference in the matching ratio F1, then the entity string length threshold L is corrected using the first string length correction threshold β1, and the corrected entity string length threshold L' = L × β1, wherein the first string length correction threshold β1 is set to 0.99;
[0136] If the matching ratio difference F is greater than the first preset matching ratio difference F1 and less than or equal to the second preset matching ratio difference F2, then the entity string length threshold L is corrected using the second string length correction threshold β2. The corrected entity string length threshold L' = L × β2, where the second string length correction threshold β2 is set to 0.97.
[0137] If the difference in the matching ratio F is greater than the second preset difference in the matching ratio F2, then the entity string length threshold L is corrected using the third string length correction threshold β3. The corrected entity string length threshold L' = L × β3, where the third string length correction threshold β3 is set to 0.94.
[0138] Furthermore, the process of correcting the standardized entity threshold based on the semantic similarity between the final query statement and the query statement includes:
[0139] Semantic similarity is determined based on the semantic similarity between the final query statement and the query statement;
[0140] The standardized entity threshold is increased based on the comparison result between the semantic similarity and the preset semantic similarity, and the increase in the standardized entity threshold is inversely proportional to the semantic similarity.
[0141] When replacing each vectorized object entity with a pre-stored entity in the database that has high similarity, it is possible that although the standardized entity used for replacement has a high similarity with the corresponding vectorized object entity, the resulting query statement may have certain expression errors. Therefore, it is necessary to lower the standardized entity threshold to provide more reference objects, thereby improving the accuracy of the query statement. The semantic similarity refers to the semantic similarity between the final query statement and the query statement. Lowering the standardized entity threshold based on semantic similarity, and ensuring that the reduction in the standardized entity threshold is inversely proportional to the semantic similarity, can make the cross-language retrieval system more flexible and adaptable, thereby better meeting the diverse retrieval needs of users and improving the efficiency and quality of cross-language information retrieval.
[0142] Specifically, the process of correcting the standardized entity threshold based on the semantic similarity between the final query statement and the query statement includes:
[0143] The semantic similarity G is determined based on the semantic similarity between the final query statement and the query statement.
[0144] Set a first preset semantic similarity G1 and a second preset semantic similarity G2, and compare the first preset semantic similarity G1 and the second preset semantic similarity G2 with the semantic similarity G. The first preset semantic similarity G1 is set to [0.4, 0.6), and the second preset semantic similarity G2 is set to [0.6, 0.8].
[0145] If the semantic similarity G is less than or equal to the first preset semantic similarity G1, then the standardized entity threshold H is corrected using the first standardized entity correction threshold γ1, and the corrected standardized entity threshold H' = H × γ1, and the first standardized entity correction threshold γ1 is set to 0.85.
[0146] If the semantic similarity G is greater than the first preset semantic similarity G1 and less than or equal to the second preset semantic similarity G2, then the standardized entity threshold H is corrected using the second standardized entity correction threshold γ2. The corrected standardized entity threshold H' = H × γ2. The second standardized entity correction threshold γ is set.
[0147] 2 = 0.92;
[0148] If the semantic similarity G is greater than the second preset semantic similarity G2, then the standardized entity threshold H is corrected using the third standardized entity correction threshold γ3. The corrected standardized entity threshold H' = H × γ3, and the third standardized entity correction threshold γ3 is set to 0.95.
[0149] Furthermore, based on the comparison between the standardized entity threshold difference and the preset standardized entity threshold difference, the threshold for increasing the primary screening of entities is determined, and the increase in the primary screening threshold is proportional to the standardized entity threshold difference.
[0150] Wherein, the standardized entity threshold difference is the difference between the standardized entity threshold after correction and the standardized entity threshold before correction.
[0151] After lowering the standardized entity threshold, more selected entities will be chosen as standardized entities. At this point, it is necessary to increase the primary entity screening threshold to prevent pre-stored entities with insufficient matching in the database from being selected as standardized entities. The standardized entity threshold difference is the difference between the corrected and uncorrected standardized entity thresholds. Increasing the primary entity screening threshold based on the standardized entity threshold difference helps to correct the primary entity screening threshold according to the degree of correction of the standardized entity threshold, resulting in higher quality entities entering the subsequent standardized entity screening stage that better match the user's true query intent. At the same time, the increase in the primary entity screening threshold is proportional to the standardized entity threshold difference, which helps to dynamically adjust the primary entity screening threshold, thereby improving the accuracy and relevance of the search results.
[0152] Specifically, the process of correcting the primary screening threshold of an entity based on the standardized entity threshold difference includes:
[0153] The standardized entity threshold difference J is determined based on the difference between the corrected and the original standardized entity thresholds.
[0154] Set a first preset standardized entity threshold difference J1 and a second preset standardized entity threshold difference J2, and compare the first preset standardized entity threshold difference J1 and the second preset standardized entity threshold difference J2 with the standardized entity threshold difference J, wherein the first preset standardized entity threshold difference J1 is set to [2, 5%) and the second preset standardized entity threshold difference J2 is set to [5, 10%].
[0155] If the standardized entity threshold difference J is less than or equal to the first preset standardized entity threshold difference J1, then the first vector matching correction threshold η1 is used to correct the entity primary screening threshold X, and the corrected entity primary screening threshold X' = X × η1, where the first vector matching correction threshold η1 is set to 1.02.
[0156] If the standardized entity threshold difference J is greater than the first preset standardized entity threshold difference J1 and less than or equal to the second preset standardized entity threshold difference J2, then the entity primary screening threshold X is corrected using the second vector matching correction threshold η2. The corrected entity primary screening threshold X' = X × η2, where the second vector matching correction threshold η2 is set to 1.05.
[0157] If the standardized entity threshold difference J is greater than the second preset standardized entity threshold difference J2, then the primary entity screening threshold X is corrected using the third vector matching correction threshold η3. The corrected primary entity screening threshold X' = X × η3, where the third vector matching correction threshold η3 is set to 1.11.
[0158] Furthermore, based on the corrected parameters, the process of determining whether the number of parameter modifications per unit time meets the standard includes:
[0159] The number of modifications per unit time is determined based on the number of times parameters are modified per unit time.
[0160] If the number of modifications per unit time is less than the preset number of modifications per unit time, then maintain the current parameters and continue detection;
[0161] If the number of modifications per unit time is greater than or equal to the preset number of modifications per unit time, the second preset effective scroll depth is adjusted based on the average dwell time on the search results page.
[0162] The number of modifications per unit time refers to the number of times parameters are modified within a unit of time. This number reflects the reasonableness of the effective scroll depth setting. If the number of modifications per unit time is too high, it indicates that the current effective scroll depth setting may be unreasonable, leading to frequent parameter adjustments. When the number of modifications per unit time exceeds the preset number of modifications per unit time, the second preset effective scroll depth is adjusted instead of the first preset effective scroll depth. This is because when the effective scroll depth is less than the first preset effective scroll depth, it means the user enters the page and then immediately exits the search results. In this case, parameter adjustments are necessary to optimize the search results. The situation where the number of modifications exceeds the second preset effective scroll depth has two possibilities: either the search results are not relevant enough, causing the user to continuously scroll down, or the second preset effective scroll depth is set unreasonably, leading to a failed response. Therefore, when the number of modifications per unit time is greater than or equal to the preset number of modifications per unit time, the second preset effective scroll depth needs to be adjusted to ensure compatibility with user operations.
[0163] Specifically, the process of determining whether the number of parameter modifications per unit time meets the standard based on the corrected parameters includes:
[0164] The number of modifications per unit time, K, is determined based on the number of times any of the above parameters are modified per unit time, where the unit time ranges from 30 minutes to 120 minutes.
[0165] Set a preset number of modifications per unit time K1, and compare the number of modifications per unit time K with the preset number of modifications per unit time K1, wherein the preset number of modifications per unit time K1 is set to [5, 15 times];
[0166] If the number of modifications per unit time K is less than the preset number of modifications per unit time K1, then maintain the current parameters and continue detection;
[0167] If the number of modifications per unit time K is greater than or equal to the preset number of modifications per unit time K1, then the second preset effective scroll depth is adjusted based on the average dwell time on the search results page.
[0168] Furthermore, the process of adjusting the second preset effective scroll depth based on the average dwell time on the search results page within N times includes:
[0169] The average time spent on a page is determined based on the average time users spend on the search results page across N searches.
[0170] Based on the comparison between the average page dwell time and the preset average page dwell time, the second preset effective scroll depth is increased, and the increase in the second preset effective scroll depth is proportional to the average page dwell time.
[0171] The average page dwell time is the average time a user spends on the search results page across N searches. Average page dwell time directly reflects a user's level of interest in the search results. Dynamically adjusting the scrolling depth based on average page dwell time allows the system to better adapt to the diverse behavioral patterns of different users, improving the personalization and accuracy of search results, and thus optimizing system performance. Simultaneously, this proportional relationship ensures a consistent user experience, allowing users to perceive a reasonable response from the system to their behavior in different search scenarios, thereby enhancing overall satisfaction with the cross-language search system.
[0172] Please see Figure 4 As shown, this is a flowchart illustrating the process of correcting the second preset effective scroll depth based on the average page dwell time in an embodiment of the present invention. The process of correcting the second preset effective scroll depth based on the average dwell time on the search results page includes:
[0173] The average time spent on the search results page is determined based on the average time spent by users on the page within N times, where N is set to be greater than or equal to 5.
[0174] Set the first preset page average dwell time T1 and the second preset page average dwell time T2, and compare the first preset page average dwell time T1 and the second preset page average dwell time T2 with the page average dwell time T. The first preset page average dwell time T1∈[2, 5min) and the second preset page average dwell time T2∈(5, 10min] are set.
[0175] If the average page dwell time T is less than or equal to the first preset average page dwell time T1, then the second preset effective scroll depth A2 is corrected using the first scroll depth correction threshold θ1, and the corrected result filtering threshold A2' = A2 × θ1, where the first result filtering correction threshold θ1 is set to 1.04.
[0176] If the average page dwell time T is greater than the first preset average page dwell time T1 and less than or equal to the second preset average page dwell time T2, then the second preset effective scroll depth A2 is corrected using the second scroll depth correction threshold θ2, and the corrected result filtering threshold A2' = A2 × θ2, where the second result filtering correction threshold θ2 is set to 1.1;
[0177] If the average page dwell time T is greater than the second preset average page dwell time T2, then the second preset effective scroll depth A2 is corrected using the third scroll depth correction threshold θ3. The corrected result filtering threshold A2' = A2 × θ3, where the third result filtering correction threshold θ3 is set to 1.18.
[0178] The technical solution of the present invention has been described above with reference to the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will all fall within the scope of protection of the present invention.
Claims
1. A cross-language retrieval method, characterized in that, include, Receive the query statement and extract object entities whose character length is less than or equal to the entity string length threshold, where the entity string length threshold is the maximum allowed length of the entity string; Vectorization models that select the corresponding type based on the language attributes of object entities. The language attributes include Chinese type, English type and mixed Chinese-English type. The vectorization model types include Chinese type vectorization model, English type vectorization model and mixed Chinese-English type vectorization model. The vectorized object entities are screened using a primary entity screening threshold to obtain a number of selected entities and a number of updated entities. The selected entities are screened using a standardized entity threshold to obtain a number of standardized entities. The updated entities are stored in the database to update the pre-stored entities in the database. The primary entity screening threshold is the minimum similarity that each selected entity in the database must achieve with its corresponding object entity. The standardized entity threshold is the maximum value of the proportion of standardized entities in the selected entities. Several query statements are generated based on the language model and the standardized entities described above, and the query statement with the highest semantic similarity to the query statement is selected as the final query statement. The final query statement is retrieved based on the HNSW or IVF_PQ index to obtain the total search results, and the search results with a relevance higher than the result filtering threshold are output. The result filtering threshold is the minimum relevance standard of the search results. The effective scroll depth is defined as the page position depth reached by the scrollbar on the search results page during a single search, where the dwell time exceeds the preset dwell threshold. Based on the effective scroll depth, determine whether the search results meet the requirements; and when it is determined that they do not meet the requirements, determine the reason for the non-compliance based on the proportion of the search results in the total search results; and adjust the parameters of the object entity in extraction, matching, retrieval and result meeting the requirements based on the corresponding reason.
2. The cross-language retrieval method according to claim 1, characterized in that, The process of determining whether the search results meet the requirements based on the effective scrolling depth includes: The effective scrolling depth is determined based on the maximum page position depth where the dwell time exceeds the preset dwell threshold. If the effective scrolling depth is less than or equal to the first preset effective scrolling depth or greater than or equal to the second preset effective scrolling depth, the search results are determined to be unacceptable. The reason for the unacceptability of the search results is determined based on the proportion of the search results in the total search results. If the effective scroll depth is greater than the first preset effective scroll depth but less than the second preset effective scroll depth, the search results are determined to meet the requirements, and the search parameter settings are maintained.
3. The cross-language retrieval method according to claim 2, characterized in that, The process of determining why the search results do not meet the needs based on the proportion of the search results in the total search results includes: The percentage of search results is determined based on the percentage of the search results in the total search results. If the percentage of search results is less than the preset percentage of search results, it is determined that the result filtering threshold is set unreasonably, and the result filtering threshold is corrected based on the ratio of the preset percentage of search results to the percentage of search results. If the percentage of search results is greater than or equal to the preset percentage of search results, the reason why the search results do not meet the requirements is determined based on the percentage of successfully matched object entities in the total number of object entities.
4. The cross-language retrieval method according to claim 3, characterized in that, The process of adjusting the result filtering threshold based on the ratio of the preset search result percentage to the search result percentage includes: The result proportion ratio is determined based on the ratio of the preset search result proportion to the search result proportion; The result filtering threshold is reduced based on the comparison between the result percentage ratio and the preset result percentage ratio, and the reduction in the result filtering threshold is proportional to the result percentage ratio.
5. The cross-language retrieval method according to claim 3, characterized in that, The process of determining why the search results do not meet the requirements based on the proportion of successfully matched object entities in the total number of object entities includes: The matching ratio is determined based on the proportion of the successfully matched object entities in the total number of object entities. If the matching ratio is less than the preset matching ratio, it is determined that the extraction of the object entity does not meet the requirements, and the entity string length threshold is adjusted based on the difference between the matching ratio and the preset matching ratio. If the matching ratio is greater than or equal to the preset matching ratio, the standardized entity threshold is adjusted based on the semantic similarity between the final query statement and the query statement.
6. The cross-language retrieval method according to claim 5, characterized in that, The process of adjusting the entity string length threshold based on the difference between the matching ratio and the preset matching ratio includes: The difference in the matching ratio is determined based on the difference between the preset matching ratio and the preset matching ratio. The threshold for reducing the length of the entity string is determined based on the comparison between the difference in the matching ratio and the preset difference in the matching ratio, and the reduction in the length threshold of the entity string is proportional to the difference in the matching ratio.
7. The cross-language retrieval method according to claim 5, characterized in that, The process of correcting the standardized entity threshold based on the semantic similarity between the final query statement and the query statement includes: Semantic similarity is determined based on the semantic similarity between the final query statement and the query statement; The threshold for the standardized entity is reduced based on the comparison between the semantic similarity and the preset semantic similarity, and the reduction in the threshold for the standardized entity is inversely proportional to the semantic similarity.
8. The cross-language retrieval method according to claim 7, characterized in that, The primary screening threshold for entities is increased based on the comparison between the standardized entity threshold difference and the preset standardized entity threshold difference. The increase in the primary screening threshold is proportional to the standardized entity threshold difference. Wherein, the standardized entity threshold difference is the difference between the standardized entity threshold after correction and the standardized entity threshold before correction.
9. The cross-language retrieval method according to claim 8, characterized in that, Based on the corrected parameters, determine whether the number of parameter modifications per unit time meets the standard. The process includes: The number of modifications per unit time is determined based on the number of times any of the above parameters are modified per unit time. If the number of modifications per unit time is less than the preset number of modifications per unit time, then maintain the current parameters and continue detection; If the number of modifications per unit time is greater than or equal to the preset number of modifications per unit time, the second preset effective scroll depth is adjusted based on the average dwell time on the search results page.
10. The cross-language retrieval method according to claim 9, characterized in that, The process of adjusting the second preset effective scroll depth based on the average dwell time on the search results page within N times includes: The average time spent on a page is determined based on the average time users spend on the search results page. Based on the comparison between the average page dwell time and the preset average page dwell time, the second preset effective scroll depth is increased, and the increase in the second preset effective scroll depth is proportional to the average page dwell time.
Citation Information
Patent Citations
Cross-language text retrieval system and method thereof
CN112699212A
SQL (Structured Query Language) statement generation method based on large-model multi-stage iteration
CN120086244A
Knowledge graph-based traffic engineering large model intelligent question-answering system and method
CN120407752A