Information retrieval method and device
By constructing an expanded vocabulary set and similarity assessment, the problem of inaccurate search results in intellectual property semantic retrieval was solved, achieving the effect of accurately matching similar texts.
Patent Information
- Application Number
- CN202610239430.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-02-28
- Publication Date
- 2026-04-03
AI Technical Summary
Existing intellectual property semantic retrieval technologies suffer from inaccurate search results, particularly the inability to accurately match relevant text when searching for information.
The target text is determined by constructing extended vocabulary sets for the text to be retrieved and similar texts, performing vocabulary matching evaluation, and combining this with text similarity. Specific steps include: identifying similar texts associated with the text to be retrieved, constructing their respective extended vocabulary sets, performing vocabulary matching evaluation, and determining the target text based on similarity.
It improves the accuracy of information retrieval, enabling precise matching and retrieval of the most similar text content.
Smart Images

Figure CN121786175A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information retrieval technology, and in particular to an information retrieval method and apparatus. Background Technology
[0002] With the acceleration of global digitalization, all kinds of information and data are growing explosively, and information retrieval has become a key means for people to obtain effective information, assist in decision-making, and filter core content.
[0003] Taking existing intellectual property semantic retrieval as an example, most existing intellectual property semantic retrieval technologies currently achieve information retrieval by semantically recognizing the key information of the input retrieval information. For example, if the user inputs AB, where AB is a word, but the retrieved file contains CABD, then although AB does exist, CA and BD are words in that file. Therefore, such information retrieval methods have the problem of inaccurate retrieval results.
[0004] To address the aforementioned issues, information retrieval methods need to be improved. Summary of the Invention
[0005] This invention provides an information retrieval method and apparatus to solve the problem of inaccurate retrieval results when searching based on retrieval information.
[0006] In a first aspect, embodiments of the present invention provide an information retrieval method, including: When the text to be retrieved is detected, at least one similar text associated with the text to be retrieved is determined; Construct a first vocabulary extension set corresponding to the text to be retrieved, and construct a second vocabulary extension set corresponding to each similar text; Based on the first extended vocabulary in the first vocabulary extension set, vocabulary matching is performed on each second extended vocabulary in each second vocabulary extension set, and the vocabulary matching evaluation attribute corresponding to each second vocabulary extension set is determined according to the matching results. Based on the vocabulary matching evaluation attributes of each second vocabulary expansion set, and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved, the target text corresponding to the text to be retrieved is determined from at least one of the similar texts.
[0007] Secondly, embodiments of the present invention also provide an information retrieval device, comprising: A similar text determination module is used to determine at least one similar text associated with the text to be retrieved when the text to be retrieved is detected. The vocabulary expansion set construction module constructs a first vocabulary expansion set corresponding to the text to be retrieved, and constructs a second vocabulary expansion set corresponding to each similar text; wherein, the first vocabulary expansion set includes at least one original word in the text to be retrieved, and the expanded vocabulary of all original words, and the second vocabulary expansion set includes the original words of the similar texts; The vocabulary matching evaluation attribute determination module is used to traverse each second extended word in the second vocabulary extension set for each second vocabulary extension set, perform vocabulary matching on each second extended word in the first vocabulary extension set respectively, and determine the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result. The target text determination module is used to determine the target text corresponding to the text to be retrieved from at least one of the similar texts based on the vocabulary matching evaluation attributes of each second vocabulary expansion set and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved.
[0008] Thirdly, embodiments of the present invention also provide an electronic device, comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform the information retrieval method according to any embodiment of the present invention.
[0009] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing computer instructions, which are used to cause a processor to execute and implement the information retrieval method described in any embodiment of the present invention.
[0010] Fifthly, embodiments of the present invention also provide a computer program product, including a computer program that, when executed by a processor, implements the information retrieval method as described in any of the embodiments of the present invention.
[0011] The technical solution of this invention, upon detecting a text to be retrieved, determines at least one similar text associated with the text to be retrieved; constructs a first vocabulary extension set corresponding to the text to be retrieved, and constructs a second vocabulary extension set corresponding to each similar text; for each second vocabulary extension set, iterates through each second extended word in the second vocabulary extension set, performs vocabulary matching on each second extended word in the first vocabulary extension set, and determines the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result; based on the vocabulary matching evaluation attribute of each second vocabulary extension set, and the text similarity between the similar texts corresponding to each second vocabulary extension set and the text to be retrieved, determines the target text corresponding to the text to be retrieved from at least one similar text. In this technical solution, by performing word segmentation on the text to be retrieved to obtain at least one word segment, and performing vocabulary expansion on each word segment to obtain a first vocabulary extension set corresponding to the text to be retrieved, and simultaneously, by performing word segmentation on the similar texts to the text to be retrieved using a similar method, constructs a second vocabulary extension set based on the obtained word segments. Based on this, for each second vocabulary expansion set, it is sequentially determined whether the second extended vocabulary in the second vocabulary expansion set exists in the first vocabulary expansion set. That is, whether the word segmentation in similar texts can accurately match the original or expanded vocabulary of the text to be retrieved. If a match is successful, the vocabulary matching evaluation attribute of the second vocabulary expansion set is determined based on the number of successful matches of the second extended vocabulary in the second vocabulary expansion set and the corresponding vocabulary weights of the successful matches. Further, the text similarity evaluation attribute is determined based on the text similarity between similar texts and the text to be retrieved. Finally, the comprehensive evaluation attribute between the corresponding similar texts and the text to be retrieved is determined based on the text similarity evaluation attribute and the vocabulary matching evaluation attribute, so that the similar text corresponding to the highest comprehensive evaluation attribute is taken as the most similar target text of the text to be retrieved. The advantage of this setup is that it evaluates the similarity between similar texts and the text to be retrieved from multiple dimensions, which can effectively improve the accuracy of the retrieval process. It solves the problem of inaccurate retrieval results when searching based on user-input retrieval information, and achieves the effect of accurately matching the text content most similar to the retrieval information. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the content of the embodiments of the present invention and these drawings without creative effort.
[0013] Figure 1 This is a flowchart of an information retrieval method provided according to Embodiment 1 of the present invention; Figure 2 This is a flowchart illustrating a specific information retrieval method according to an embodiment of the present invention; Figure 3 This is a flowchart of an information retrieval method provided according to Embodiment 2 of the present invention; Figure 4 This is a schematic diagram of the structure of an information retrieval device according to Embodiment 3 of the present invention; Figure 5 This is a schematic diagram of the structure of an electronic device that implements the information retrieval method of this invention. Detailed Implementation
[0014] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention. The acquisition, transmission, storage, use, and processing of data in the technical solutions of this application comply with the relevant provisions of national laws and regulations. It should be noted that in the embodiments of this application, certain software, components, or models and other existing solutions in the industry may be mentioned. These should be considered as exemplary, and their purpose is only to illustrate the feasibility of implementing the technical solutions of this application, but it does not mean that the applicant has or necessarily used such solutions.
[0015] It should be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution disclosed herein all comply with relevant laws and regulations, are used for legitimate purposes, and do not violate public order and good morals. Necessary measures are taken to prevent unauthorized access to user personal information data and to maintain user personal information security and network security. It should also be noted that the collection, gathering, updating, analysis, processing, use, transmission, and storage of user personal information involved in the technical solution disclosed herein are all conducted with the user's knowledge and consent, and comply with relevant privacy protection regulations.
[0016] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in sequences other than those illustrated or described herein.
[0017] Example 1 Figure 1 The flowchart of an information retrieval method provided in Embodiment 1 of the present invention is applicable to the following: input retrieval information is segmented into words, and the resulting segments are expanded to obtain a first vocabulary expansion set. Simultaneously, similar texts of the retrieval information are segmented into words to construct a second vocabulary expansion set. The vocabulary matching evaluation attribute of each second vocabulary expansion set is evaluated by traversing the word segmentation hit results in each second vocabulary expansion set. Furthermore, based on the text similarity of similar texts, the text similarity evaluation attribute corresponding to each similar text is determined. Then, by combining the text similarity evaluation attribute corresponding to the similar texts and the vocabulary matching evaluation attribute of the second vocabulary expansion sets corresponding to the similar texts, the target text most closely related to the retrieval information is determined. This method can be executed by an information retrieval device, which can be implemented in hardware and / or software and can be configured in a computing device capable of executing the information retrieval method.
[0018] like Figure 1 As shown, the method includes: S110. When the text to be retrieved is detected, at least one similar text associated with the text to be retrieved is determined.
[0019] The search text is the query text entered by the user on the search interface to find relevant content. For example, the search text can be keywords, technical points, abstract statements, or problem descriptions. Similar text refers to text that is semantically similar to the search text.
[0020] Specifically, such as Figure 2 As shown, users can enter the text to be searched through the edit box on the search interface. For example, they can enter technical points or abstract statements on the patent search page. After the user clicks to confirm the search, at least one similar text associated with the text to be searched will be retrieved from the patent search database based on semantic similarity.
[0021] Optionally, determining at least one similar text associated with the text to be retrieved includes: constructing a first semantic vector corresponding to the text to be retrieved; determining the vector similarity between the second semantic vector and the first semantic vector of each candidate text from at least one candidate text; and determining at least one similar text associated with the text to be retrieved from at least one candidate text based on the vector similarity.
[0022] In this context, candidate text refers to all alternative texts pre-stored in the retrieval database that can be compared with the text to be retrieved for similarity, such as patent abstracts in a patent retrieval database or excerpts from academic papers in a paper database. The first semantic vector is a vector that represents the core semantic information of the text to be retrieved after semantic encoding by the user. The second semantic vector is a vector used to calculate the similarity with the first semantic vector after encoding the candidate text using semantic encoding methods. The encoding methods for the first and second semantic vectors are the same. Vector similarity can be used to quantify the degree of similarity between the first and second semantic vectors in the semantic space.
[0023] For details, please refer to [link / reference]. Figure 2 When the text to be retrieved is detected, it is vector-encoded using a pre-set semantic encoding model to obtain a first semantic vector. Simultaneously, each candidate text in the retrieval database (i.e., the semantic vector retrieval database) is vector-encoded using the same model to obtain a second semantic vector corresponding to each candidate text. At this point, a first semantic vector and second semantic vectors corresponding to multiple candidate texts are obtained. The vector similarity between each second semantic vector and the first semantic vector is calculated, and the candidate texts corresponding to each second semantic vector are ranked according to their vector similarity. Based on the ranking results, one or more similar texts with a high semantic relevance to the text to be retrieved are determined from at least one candidate text (i.e., preliminary retrieval results are obtained). For example, based on vector similarity, the top three ranked candidate texts are selected as similar texts associated with the text to be retrieved.
[0024] S120. Construct a first vocabulary extension set corresponding to the text to be retrieved, and construct a second vocabulary extension set corresponding to each similar text.
[0025] In this technical solution, see continue to refer to Figure 2 Before searching the text to be retrieved, the text is first segmented to obtain at least one first vocabulary to be expanded (i.e., segmentation to obtain segmentation results). For each first vocabulary to be expanded, vocabulary expansion is performed (i.e., expanding words are determined for each segmented word), resulting in a vocabulary expansion subset corresponding to each first vocabulary to be expanded. Based on the set of all vocabulary expansion subsets, the first vocabulary expansion set corresponding to the text to be retrieved is obtained.
[0026] Similarly, this technical solution processes similar text in the same way as it processes the text to be retrieved. It obtains at least one second extended vocabulary in the similar text in a similar manner, and constructs the second vocabulary extension set corresponding to the similar text based on all the second extended vocabulary in the same similar text.
[0027] The first vocabulary expansion set includes at least one original word from the text to be retrieved, as well as the expanded vocabulary of all original words. The second vocabulary expansion set includes the original words of similar texts (i.e., the second expanded vocabulary).
[0028] It is understandable that both the first and second expanded vocabulary lists are words with actual meanings and do not include words without actual meanings, such as stop words or interjections.
[0029] S130. For each second vocabulary extension set, traverse each second extended vocabulary in the second vocabulary extension set, and perform vocabulary matching for each second extended vocabulary in the first vocabulary extension set respectively, and determine the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result.
[0030] The first expanded vocabulary refers to the expanded vocabulary of the first vocabulary to be expanded in the text to be retrieved, and is included in the first expanded vocabulary set. The first expanded vocabulary can be the original vocabulary after word segmentation of the text to be retrieved, or words with similar meanings to the original vocabulary. Correspondingly, the second expanded vocabulary refers to the original vocabulary after word segmentation of similar text, and is included in the second expanded vocabulary set. The vocabulary matching evaluation attribute is used to characterize the degree of matching between the second expanded vocabulary set and the first expanded vocabulary set.
[0031] For example, if the first word to be expanded is "method", then the first word to be expanded can be "method", "method", "pattern", "means", etc.
[0032] In this technical solution, in order to prioritize displaying the most similar texts during the retrieval process of the text to be retrieved, the second vocabulary expansion sets of each similar text can be matched with the first vocabulary expansion set of the text to be retrieved to obtain the matching results. Based on the matching results, the vocabulary matching evaluation attribute of each second vocabulary expansion set is determined. The higher the vocabulary matching evaluation attribute, the higher the degree of matching between the second vocabulary expansion set and the first vocabulary expansion set.
[0033] Optionally, each second extended word in the second vocabulary expansion set is traversed, and word matching is performed on each second extended word in the first vocabulary expansion set. The word matching evaluation attribute corresponding to the second vocabulary expansion set is determined based on the matching result, including: for each second extended word in each second vocabulary expansion set, if the first vocabulary expansion set contains a first extended word that is completely consistent with the second extended word, the matching result of the second extended word is determined to be a successful match; the word matching evaluation attribute of the second vocabulary expansion set is determined based on the number of successful matches of the second extended words in the second vocabulary expansion set and the word weight corresponding to the successful matches of the second extended words.
[0034] The word weight of the second word extension word that is successfully matched is determined by the word weight of the first word extension word in the first word extension set.
[0035] Specifically, see [link to relevant documentation] Figure 2 When matching the first vocabulary expansion set and the second vocabulary expansion set, the matching is performed at the granularity of word segmentation. That is, for each second vocabulary expansion set, each second expansion word in the second vocabulary expansion set is traversed, and it is determined whether the second expansion word exists in the first expansion set (that is, word segmentation is performed from the preliminary results based on the expansion words). If it exists, the matching result of the second expansion word is a successful match (that is, a successful hit).
[0036] Based on this, according to the matching results of each second extended word in each second vocabulary expansion set with the first extended words in the first vocabulary expansion set, the matching degree between the corresponding second vocabulary expansion set and the first vocabulary expansion set is quantified, and the vocabulary matching evaluation attribute corresponding to each second vocabulary expansion set is obtained.
[0037] In a specific example, we construct a first vocabulary extension set corresponding to the text to be retrieved, denoted as . W={m 1 , m 2 ,…,m n } And a second vocabulary extension set corresponding to similar texts, denoted as F={f 1 ,f 2 ,…,f m } .
[0038] With the second vocabulary expansion set F In f 1 For example, to determine f 1 Does it exist in W={m 1 ,m 2 ,…,m n } If it exists, then determine. f 1 Successful hit.
[0039] Based on this, the vocabulary matching evaluation attributes of the second vocabulary expansion set are determined according to the number of successful hits of the second expanded vocabulary in the second vocabulary expansion set and the corresponding vocabulary weights of the successful hits of the second expanded vocabulary. This includes: if the number of successful hits of the second expanded vocabulary in the second vocabulary expansion set is greater than the preset number of hits, then the hit coverage rate corresponding to the first vocabulary expansion set is determined based on the ratio of the number of successful hits of the first expanded vocabulary in the first vocabulary expansion set to the total number of vocabulary; and the vocabulary matching evaluation attributes of the second vocabulary expansion set are determined based on the product of the number of hits and the hit coverage rate.
[0040] Based on the above example, for each successfully matched second extended word, the weight of the first extended word corresponding to the second extended word is taken as the word weight of the second extended word, and the word weights of all successfully matched second extended words are accumulated to obtain the word matching evaluation attribute to be corrected.
[0041] For example, F = {patent infringement; technical solution; analysis}, W = {patent infringement; (0.7) patent infringement behavior; (0.2), "patent infringement" (0.1)}, where the word weight corresponding to "patent infringement" in the W set is 0.7, the word weight corresponding to patent infringement behavior is 0.2, and the word weight of patent infringement is 0.1. It can be seen that "patent infringement" in the second word extension set exists in the first word extension set, indicating a successful match, and the word weight of "patent infringement" is 0.7. However, the two second extension words "technical solution" and "analysis" in the second word extension set did not match successfully, so their corresponding word weights are 0. Therefore, the word matching evaluation attribute of the second word extension set can be calculated as S1 = 0.7 + 0 = 0 + 0 = 0.7.
[0042] It should be noted that when the number of successfully matched extended words in the first vocabulary expansion set is less than 2 (i.e., the preset number of matches), S1 can be directly used as the vocabulary matching evaluation attribute for the second vocabulary expansion set. However, when the number of successfully matched extended words in the first vocabulary expansion set is greater than or equal to 2, the vocabulary matching evaluation attribute for the second vocabulary expansion set needs to be corrected, and the correction parameter is the hit coverage rate of the first vocabulary expansion set. The hit coverage rate of the first vocabulary expansion set is the ratio of the number of successfully matched words in the first vocabulary expansion set to the total number of words.
[0043] For example, if the number of words in the first expanded vocabulary set that successfully match is greater than or equal to 2, the vocabulary matching evaluation attribute corresponding to the second expanded vocabulary set can be corrected based on the following formula: S1 (correction) = S1 × hit coverage Wherein, S1 (correction) represents the word matching evaluation attribute corresponding to the corrected second vocabulary expansion set, and S1 represents the word matching evaluation attribute corresponding to the original second vocabulary expansion set.
[0044] In this technical solution, if the number of first extended words successfully matched in the first vocabulary extension set is greater than or equal to 2, then S1 (correction) is used as the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set. If the number of first extended words successfully matched in the first vocabulary extension set is less than 2, then S1 (correction) = S1, and S1 is used as the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set.
[0045] Optionally, the word weight of the first extended vocabulary is dynamically determined based on the total number of words in the first vocabulary extension set and the semantic similarity between the first extended vocabulary and the first vocabulary to be extended, and the sum of the word weights of all the first extended vocabulary is 1.
[0046] S140. Based on the vocabulary matching evaluation attributes of each second vocabulary expansion set and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved, determine the target text corresponding to the text to be retrieved from at least one similar text.
[0047] Text similarity is used to characterize the degree of semantic similarity between similar texts and the text to be retrieved. The target text refers to the text that is most semantically similar to the text to be retrieved.
[0048] In this technical solution, there are multiple similar texts to the text to be retrieved. The similarity between the similar texts and the text to be retrieved can be comprehensively evaluated from two dimensions, so that the similar text that is closest to the text to be retrieved is taken as the target text.
[0049] Optionally, based on the vocabulary matching evaluation attributes of each second vocabulary expansion set and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved, the target text corresponding to the text to be retrieved is determined from at least one similar text. This includes: for each second vocabulary expansion set, determining the first weight corresponding to the vocabulary matching evaluation attribute of the second vocabulary expansion set and the second weight corresponding to the similar texts corresponding to the second vocabulary expansion set; performing weighted processing on the vocabulary matching evaluation attribute of the second vocabulary expansion set, the first weight, the similar texts corresponding to the second vocabulary expansion set, and the second weight corresponding to the similar texts to obtain the comprehensive evaluation attribute corresponding to the similar texts corresponding to the second vocabulary expansion set; and determining the target text corresponding to the text to be retrieved from at least one similar text based on the comprehensive evaluation attribute of each similar text.
[0050] Among them, the comprehensive evaluation attribute refers to the quantitative parameter of semantic similarity between similar texts and the text to be retrieved, which is determined by combining two dimensions: text similarity and word matching similarity.
[0051] Based on the above example, corresponding weights are set for the text similarity evaluation dimension and the word matching dimension respectively. For example, the first weight corresponding to the second word expansion set of similar texts is set as α, and the weight corresponding to the text similarity evaluation dimension is set as β (that is, the second weight corresponding to the text similarity of similar texts is β).
[0052] Furthermore, the comprehensive evaluation attributes corresponding to similar texts can be determined based on the following formula: S 综合 =α×S1(corrected)+β×S2 Among them, S 综合 S1 (correction) represents the comprehensive evaluation attribute of similar texts, S2 (text similarity evaluation attribute) represents the word matching evaluation attribute corresponding to the second vocabulary expansion set, α is the first weight, β is the second weight, and S2 represents the text similarity evaluation attribute.
[0053] The technical solution of this invention, upon detecting a text to be retrieved, determines at least one similar text associated with the text to be retrieved; constructs a first vocabulary extension set corresponding to the text to be retrieved, and constructs a second vocabulary extension set corresponding to each similar text; for each second vocabulary extension set, iterates through each second extended word in the second vocabulary extension set, performs vocabulary matching on each second extended word in the first vocabulary extension set, and determines the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result; based on the vocabulary matching evaluation attribute of each second vocabulary extension set, and the text similarity between the similar texts corresponding to each second vocabulary extension set and the text to be retrieved, determines the target text corresponding to the text to be retrieved from at least one similar text. In this technical solution, by performing word segmentation on the text to be retrieved to obtain at least one word segment, and performing vocabulary expansion on each word segment to obtain a first vocabulary extension set corresponding to the text to be retrieved, and simultaneously, by performing word segmentation on the similar texts to the text to be retrieved using a similar method, constructs a second vocabulary extension set based on the obtained word segments. Based on this, for each second vocabulary expansion set, it is sequentially determined whether the second extended vocabulary in the second vocabulary expansion set exists in the first vocabulary expansion set. That is, whether the word segmentation in similar texts can accurately match the original or expanded vocabulary of the text to be retrieved. If a match is successful, the vocabulary matching evaluation attribute of the second vocabulary expansion set is determined based on the number of successful matches of the second extended vocabulary in the second vocabulary expansion set and the corresponding vocabulary weights of the successful matches. Further, the text similarity evaluation attribute is determined based on the text similarity between similar texts and the text to be retrieved. Finally, the comprehensive evaluation attribute between the corresponding similar texts and the text to be retrieved is determined based on the text similarity evaluation attribute and the vocabulary matching evaluation attribute, so that the similar text corresponding to the highest comprehensive evaluation attribute is taken as the most similar target text of the text to be retrieved. The advantage of this setup is that it evaluates the similarity between similar texts and the text to be retrieved from multiple dimensions, which can effectively improve the accuracy of the retrieval process. It solves the problem of inaccurate retrieval results when searching based on user-input retrieval information, and achieves the effect of accurately matching the text content most similar to the retrieval information.
[0054] Example 2 Figure 3 The flowchart shows an information retrieval method provided in Embodiment 2 of the present invention. Optionally, a first vocabulary extension set corresponding to the text to be retrieved is constructed.
[0055] like Figure 3 As shown, the method includes: S210. When the text to be retrieved is detected, at least one similar text associated with the text to be retrieved is determined.
[0056] In a specific example, when the text to be retrieved is detected, a semantic search is performed on candidate texts in the retrieval database. The text similarity between each candidate text and the text to be retrieved is determined based on semantic similarity, and the candidate texts are then ranked based on their text similarity. According to the ranking results, one or more of the top-ranked candidate texts are considered as at least one similar text associated with the text to be retrieved.
[0057] S220. Perform word segmentation on the text to be retrieved to obtain at least one first vocabulary to be expanded.
[0058] Based on the above example, the text to be retrieved is segmented, and the segments with actual meaning are used as the first vocabulary to be expanded.
[0059] For example, if the text to be retrieved is "a deep learning-based image recognition method", after word segmentation, several first words to be expanded are obtained, including: a, based on, deep learning, image, recognition, method.
[0060] S230. For each first word to be expanded, determine the word expansion method of the first word to be expanded according to the word type, and determine the corresponding word expansion subset of the first word to be expanded based on the word expansion method.
[0061] In this context, "lexical expansion method" refers to the lexical processing rules that semantically expand or replace the first word to be expanded. A lexical expansion subset refers to the set of first-expanded words associated with the same first word to be expanded. For example, if the first word to be expanded is "method," then the first-expanded words could be "method," "method," "pattern," "means," etc. Correspondingly, the set of all first-expanded words together constitutes the lexical expansion subset corresponding to "method."
[0062] Based on the above example, vocabulary expansion processing is performed on each of the first words to be expanded, resulting in a vocabulary expansion subset corresponding to each first word to be expanded. It should be noted that the vocabulary type of the first words to be expanded can be professional terms or general terms, and the vocabulary expansion method will be different for different vocabulary types.
[0063] Optionally, the word expansion method of the first word to be expanded is determined according to the word type, and the corresponding word expansion subset of the first word to be expanded is determined based on the word expansion method, including: if the first word to be expanded is a professional word, then based on semantic similarity, at least one first word to be used associated with the professional word is determined, and a professional word expansion subset is obtained based on all the first words to be used; if the first word to be expanded is a general word, then based on the text length of the text to be retrieved and the frequency of occurrence of the general word in the text to be retrieved, the general word is expanded to obtain a general word expansion subset.
[0064] Here, the first term to be used refers to words semantically similar to the first term to be expanded when it is a specialized term. Correspondingly, the specialized term expansion subset refers to the set of at least one first term to be used that is associated with the same first term when it is a specialized term. The specialized term expansion subset includes the first term to be expanded itself.
[0065] For example, if the first vocabulary to be expanded is a specialized term, then the first vocabulary to be expanded is used as the core of the expansion. Based on semantic similarity, at least one first vocabulary to be used is selected from the expanded vocabulary resource library whose semantic similarity is greater than a preset semantic similarity. For example, the first vocabulary to be used is selected from the expanded vocabulary resource library with a semantic similarity ≥ 0.85 (i.e., the preset semantic similarity). For instance, based on semantic similarity ranking, the top 2-4 first vocabulary to be used are selected to form a specialized vocabulary expansion subset corresponding to the first vocabulary to be expanded. It is understandable that, in order to avoid duplicate words in the specialized vocabulary expansion subset, all the first vocabulary to be used are deduplicated and integrated before generating the specialized vocabulary expansion subset.
[0066] Optionally, if the first vocabulary to be expanded is a general vocabulary, then based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved, the general vocabulary is expanded to obtain a general vocabulary expansion subset, including: if the first vocabulary to be expanded is a general vocabulary, determining at least one second vocabulary to be used associated with the general vocabulary based on semantic similarity; determining the number of vocabulary expansions corresponding to the general vocabulary based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved; obtaining a corresponding number of target words from at least one second vocabulary to be used based on the number of vocabulary expansions, and generating a general vocabulary expansion subset corresponding to the general vocabulary based on all the target words.
[0067] Here, the second vocabulary to be used refers to words semantically similar to the first vocabulary to be expanded when the first vocabulary to be expanded is a general vocabulary. Correspondingly, the general vocabulary expansion subset refers to the set of at least one second vocabulary to be used associated with the same first vocabulary to be expanded when the first vocabulary to be expanded is a general vocabulary. The general vocabulary expansion subset includes the first vocabulary to be expanded itself.
[0068] Specifically, the text length (i.e., sentence length) of the text to be retrieved is determined based on the number of characters it contains. Simultaneously, the frequency of each common word in the text is calculated. Based on a dynamic combination of text length and the frequency of common words, a decision is made regarding whether to expand the common words in the text, and if so, the number of words to be expanded. The frequency of common words is described below as an example: The frequency of occurrence of general term A = the number of times general term A appears in the text to be searched / the total number of all first words to be expanded in the text to be searched.
[0069] For example, if the number of characters in the text to be retrieved is less than or equal to 10, then the text to be retrieved is determined to be a short sentence. In this case, since the text to be retrieved is relatively concise, the frequency of occurrence of common words does not need to be considered, and word expansion processing can be performed directly. The word expansion quantity of each common word is set to 2 (that is, the common word itself + 1 second word to be used), such as expanding "method" to "method" and "way".
[0070] For example, if the number of characters in the text to be retrieved is between [10, 20], then the text to be retrieved is determined to be a medium sentence. In this case, the text to be retrieved has a certain text length, and the number of words to be expanded needs to be determined by combining the frequency of occurrence of common words. For example, if the number of words to be expanded is greater than or equal to 0.3, then words to be expanded are performed; otherwise, they are not expanded. If words to be expanded are performed, the number of words to be expanded can be determined based on the frequency and occurrence of common words in the text to be retrieved, and when the number of words to be expanded is not an integer, rounding rules are used to determine the number of words to be expanded.
[0071] For example, if the frequency of occurrence of general vocabulary A is 0.67 and the number of occurrences is 2, then the number of expansions of general vocabulary A = 1 (general vocabulary itself) + 0.67 × 2 = 2.34. After rounding, the number of expansions of general vocabulary A is 2.
[0072] For example, if the text to be retrieved contains more than 20 characters, it is considered a long text, and the number of words to be expanded needs to be determined by considering the frequency of occurrence of common words. For instance, if the number of words to be expanded is greater than or equal to 0.2, then the common words are expanded; otherwise, they are not expanded. If common words are expanded, the number of words to be expanded can be determined based on the frequency and occurrence of common words in the text to be retrieved, and when the number of words to be expanded is not an integer, rounding rules are used to determine the number of words to be expanded.
[0073] For example, if the frequency of general vocabulary B is 0.3 and its occurrence frequency is 3, then the number of expansions for general vocabulary B = 1 (the general vocabulary itself) + 0.3 × 3 = 1.9. Rounding up, the number of expansions for general vocabulary B is 2. Similarly, if the frequency of general vocabulary C is 0.5 and its occurrence frequency is 3, then the number of expansions for general vocabulary B = 1 (the general vocabulary itself) + 0.5 × 3 = 2.5. Rounding up, the number of expansions for general vocabulary C is 3.
[0074] It is understood that the text length in the above example is only for illustrative purposes, and the specific text length can be set according to actual needs.
[0075] It should be noted that when comprehensively evaluating the number of words to be expanded by considering both the text length of the text to be retrieved and the frequency of common words, the purpose is as follows: When the text length is short, the computational load of the text to be retrieved is small, and direct word expansion will not increase the computational burden, so word expansion can be performed directly; when the text length is medium sentence length, it is necessary to balance the computational load of word expansion with the efficiency of word matching, and minimize the expansion of low-frequency words; when the text length is long sentence length, it is still necessary to expand common words, but the threshold for word expansion needs to be gradually increased to reduce the number of words to be expanded and balance the computational load during the word expansion process; when the text length is extremely long sentence length, in order to avoid a surge in the computational load caused by word expansion, it is necessary to strictly control the number of words to be expanded.
[0076] It is important to note that in this technical solution, determining whether the frequency of common terms is high requires comprehensive consideration of both the text length of the searched text and the frequency of common terms, with a frequency threshold set based on the text length. The frequency of common terms is obtained by calculating the proportion of their occurrence in all word segments of the searched text, and then combined with the text length to determine whether the frequency reaches the frequency threshold. If the text length is short, a higher frequency threshold should be set (for extremely short sentences, no threshold can be set, and expanded terms can be directly determined); if the sentence length is long, a lower frequency threshold should be set. The advantage of this approach is that for common terms in the searched text, a higher frequency indicates a stronger relevance to the user's search needs, allowing the common term to be used as a key anchor point; conversely, a lower frequency allows for less expansion or no expansion to save computational resources.
[0077] S240. Based on all the vocabulary extension subsets, generate the first vocabulary extension set corresponding to the text to be retrieved.
[0078] S250. Construct a second vocabulary extension set corresponding to each similar text.
[0079] S260. For each second vocabulary extension set, traverse each second extended vocabulary in the second vocabulary extension set, and perform vocabulary matching for each second extended vocabulary in the first vocabulary extension set respectively, and determine the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching results.
[0080] S270. Based on the vocabulary matching evaluation attributes of each second vocabulary extension set and the text similarity between the similar texts corresponding to each second vocabulary extension set and the text to be retrieved, determine the target text corresponding to the text to be retrieved from at least one similar text.
[0081] The technical solution of this invention involves segmenting the text to be retrieved to obtain at least one first vocabulary to be expanded; for each first vocabulary to be expanded, a vocabulary expansion method is determined according to the vocabulary type, and a corresponding vocabulary expansion subset is determined based on the vocabulary expansion method; wherein, the vocabulary type is either professional vocabulary or general vocabulary; based on all vocabulary expansion subsets, a first vocabulary expansion set corresponding to the text to be retrieved is generated. In this technical solution, when constructing a second vocabulary expansion set corresponding to similar texts of the first vocabulary expansion set of the text to be retrieved, different vocabulary expansion methods are adopted for vocabulary of different vocabulary types. If the first vocabulary to be expanded is a professional vocabulary, at least one first vocabulary to be used associated with the professional vocabulary is determined based on semantic similarity, and the professional vocabulary expansion subset is obtained based on all first vocabulary to be used; if the first vocabulary to be expanded is a general vocabulary, the general vocabulary is expanded based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved, resulting in a general vocabulary expansion subset. The advantage of this setup is that it can accurately expand related words for specialized terms through semantic similarity, ensuring the professionalism and matching accuracy of the retrieval. At the same time, it can dynamically control the expansion quantity of general terms based on the length and frequency of occurrence of the text to be retrieved. That is, the shorter the text, the more unrestricted the expansion, and the longer the text, the more strictly the expansion is controlled. While ensuring that high-frequency general terms are effectively expanded as key anchors and improving the relevance of the retrieval, it can significantly reduce the computational burden caused by excessive expansion of medium and long sentences and achieve a balance between retrieval efficiency and matching effect.
[0082] Example 3 Figure 4 This is a schematic diagram of the structure of an information retrieval device provided in Embodiment 3 of the present invention. Figure 4 As shown, the device includes: a similar text determination module 310, a vocabulary expansion set construction module 320, a vocabulary matching evaluation attribute determination module 330, and a target text determination module 340.
[0083] The similar text determination module 310 is used to determine at least one similar text associated with the text to be retrieved when the text to be retrieved is detected. The vocabulary extension set construction module 320 is used to construct a first vocabulary extension set corresponding to the text to be retrieved, and to construct a second vocabulary extension set corresponding to each similar text; wherein, the first vocabulary extension set includes at least one original word in the text to be retrieved, and the extended words of all original words, and the second vocabulary extension set includes the original words of similar texts. The vocabulary matching evaluation attribute determination module 330 is used to traverse each second extended word in the second vocabulary extension set for each second vocabulary extension set, perform vocabulary matching on each second extended word in the first vocabulary extension set respectively, and determine the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result. The target text determination module 340 is used to determine the target text corresponding to the text to be retrieved from at least one similar text based on the vocabulary matching evaluation attributes of each second vocabulary expansion set and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved.
[0084] The technical solution of this invention, upon detecting a text to be retrieved, determines at least one similar text associated with the text to be retrieved; constructs a first vocabulary extension set corresponding to the text to be retrieved, and constructs a second vocabulary extension set corresponding to each similar text; for each second vocabulary extension set, iterates through each second extended word in the second vocabulary extension set, performs vocabulary matching on each second extended word in the first vocabulary extension set, and determines the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result; based on the vocabulary matching evaluation attribute of each second vocabulary extension set, and the text similarity between the similar texts corresponding to each second vocabulary extension set and the text to be retrieved, determines the target text corresponding to the text to be retrieved from at least one similar text. In this technical solution, by performing word segmentation on the text to be retrieved to obtain at least one word segment, and performing vocabulary expansion on each word segment to obtain a first vocabulary extension set corresponding to the text to be retrieved, and simultaneously, by performing word segmentation on the similar texts to the text to be retrieved using a similar method, constructs a second vocabulary extension set based on the obtained word segments. Based on this, for each second vocabulary expansion set, it is sequentially determined whether the second extended vocabulary in the second vocabulary expansion set exists in the first vocabulary expansion set. That is, whether the word segmentation in similar texts can accurately match the original or expanded vocabulary of the text to be retrieved. If a match is successful, the vocabulary matching evaluation attribute of the second vocabulary expansion set is determined based on the number of successful matches of the second extended vocabulary in the second vocabulary expansion set and the corresponding vocabulary weights of the successful matches. Further, the text similarity evaluation attribute is determined based on the text similarity between similar texts and the text to be retrieved. Finally, the comprehensive evaluation attribute between the corresponding similar texts and the text to be retrieved is determined based on the text similarity evaluation attribute and the vocabulary matching evaluation attribute, so that the similar text corresponding to the highest comprehensive evaluation attribute is taken as the most similar target text of the text to be retrieved. The advantage of this setup is that it evaluates the similarity between similar texts and the text to be retrieved from multiple dimensions, which can effectively improve the accuracy of the retrieval process. It solves the problem of inaccurate retrieval results when searching based on user-input retrieval information, and achieves the effect of accurately matching the text content most similar to the retrieval information.
[0085] Optionally, the vocabulary expansion set construction module includes: a word segmentation submodule, used to segment the text to be retrieved to obtain at least one first vocabulary to be expanded; The vocabulary expansion subset determination submodule is used to determine the vocabulary expansion method of each first vocabulary to be expanded according to the vocabulary type, and to determine the corresponding vocabulary expansion subset based on the vocabulary expansion method; wherein, the vocabulary type is professional vocabulary or general vocabulary. The first vocabulary extension set determination submodule is used to generate the first vocabulary extension set corresponding to the text to be retrieved based on all vocabulary extension subsets.
[0086] Optionally, the vocabulary expansion subset determination submodule includes: a professional vocabulary expansion subset determination unit, which is used to determine at least one first word to be used associated with the professional word based on semantic similarity if the first word to be expanded is a professional word, and to obtain a professional vocabulary expansion subset based on all the first words to be used; The general vocabulary expansion subset determination unit is used to expand the general vocabulary based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved if the first vocabulary to be expanded is a general vocabulary, thereby obtaining a general vocabulary expansion subset. Among them, the vocabulary expansion subset is either a professional vocabulary expansion subset or a general vocabulary expansion subset.
[0087] Optionally, the general vocabulary expansion subset determination unit includes: a second vocabulary determination subunit, used to determine at least one second vocabulary to be used that is associated with the general vocabulary based on semantic similarity if the first vocabulary to be expanded is a general vocabulary; The vocabulary expansion quantity determination subunit is used to determine the vocabulary expansion quantity corresponding to the general vocabulary based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved. Based on the number of vocabulary expansions, obtain the corresponding number of target words from at least one second vocabulary to be used, and generate a general vocabulary expansion subset corresponding to the general vocabulary based on all the target words.
[0088] Optionally, the vocabulary matching evaluation attribute determination module includes: a matching result determination submodule, which is used to determine the matching result of the second extended vocabulary as a successful match if the first extended vocabulary contains a first extended vocabulary that is completely consistent with the second extended vocabulary for each second extended vocabulary in each second extended vocabulary set; The vocabulary matching evaluation attribute determination submodule is used to determine the vocabulary matching evaluation attribute of the second vocabulary expansion set based on the number of successful second expansion words in the second vocabulary expansion set and the vocabulary weights corresponding to the successful second expansion words; wherein, the vocabulary weights corresponding to the successful second expansion words are determined by the vocabulary weights of the corresponding first expansion words in the first vocabulary expansion set.
[0089] Optionally, the vocabulary matching evaluation attribute determination submodule includes: a hit coverage determination unit, used to determine the hit coverage corresponding to the first vocabulary expansion set based on the ratio of the number of first expansion words successfully hit in the first vocabulary expansion set to the total number of words if the number of hits of the second expansion words successfully hit in the second vocabulary expansion set is greater than the preset number of hits. The vocabulary matching evaluation attribute determination unit is used to determine the vocabulary matching evaluation attributes of the second vocabulary expansion set based on the product of the number of hits and the hit coverage.
[0090] Optionally, the word weight of the first extended vocabulary is dynamically determined based on the total number of words in the first vocabulary extension set and the semantic similarity between the first extended vocabulary and the first vocabulary to be extended, and the sum of the word weights of all the first extended vocabulary is 1.
[0091] Optionally, the similar text determination module includes: a first semantic vector determination submodule, used to construct a first semantic vector corresponding to the text to be retrieved; The vector similarity determination submodule is used to determine the vector similarity between the second semantic vector and the first semantic vector of each candidate text from at least one candidate text. The similar text determination submodule is used to determine at least one similar text associated with the text to be retrieved from at least one candidate text based on vector similarity.
[0092] Optionally, the target text determination module includes: a weight determination submodule, used to determine, for each second vocabulary expansion set, the first weight corresponding to the vocabulary matching evaluation attribute of the second vocabulary expansion set, and the second weight corresponding to the similar text of the second vocabulary expansion set; The comprehensive evaluation attribute determination submodule is used to perform weighted processing on the vocabulary matching evaluation attribute of the second vocabulary expansion set, the first weight, the similar texts corresponding to the second vocabulary expansion set, and the second weights corresponding to the similar texts, to obtain the comprehensive evaluation attribute of the similar texts corresponding to the second vocabulary expansion set. The target text determination submodule is used to determine the target text corresponding to the text to be retrieved from at least one similar text based on the comprehensive evaluation attributes of each similar text.
[0093] The information retrieval device provided in the embodiments of the present invention can execute the information retrieval method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the method.
[0094] Example 4 Figure 5 A schematic diagram of the structure of an electronic device 10 according to an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0095] like Figure 5As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0096] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0097] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as information retrieval methods.
[0098] In some embodiments, the information retrieval method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the information retrieval method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the information retrieval method by any other suitable means (e.g., by means of firmware).
[0099] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0100] Computer programs used to implement the information retrieval method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0101] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0102] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0103] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0104] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0105] Example 5 This invention also provides a computer program product, including a computer program that, when executed by a processor, implements the information retrieval method provided in any embodiment of this application.
[0106] In implementing the computer program product, computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof. Programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0107] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0108] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An information retrieval method, characterized in that, include: When the text to be retrieved is detected, at least one similar text associated with the text to be retrieved is determined; Construct a first vocabulary extension set corresponding to the text to be retrieved, and construct a second vocabulary extension set corresponding to each similar text; wherein, the first vocabulary extension set includes at least one original word in the text to be retrieved, and the extended vocabulary of all original words, and the second vocabulary extension set includes the original words of the similar texts; For each second vocabulary expansion set, traverse each second expansion word in the second vocabulary expansion set, and perform word matching on each second expansion word in the first vocabulary expansion set respectively, and determine the word matching evaluation attribute corresponding to the second vocabulary expansion set based on the matching result; Based on the vocabulary matching evaluation attributes of each second vocabulary expansion set, and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved, the target text corresponding to the text to be retrieved is determined from at least one of the similar texts.
2. The method according to claim 1, characterized in that, The construction of the first vocabulary extension set corresponding to the text to be retrieved includes: The text to be retrieved is segmented to obtain at least one first vocabulary to be expanded; For each first word to be expanded, the word expansion method of the first word to be expanded is determined according to the word type, and the corresponding word expansion subset of the first word to be expanded is determined based on the word expansion method; wherein, the word type is professional terminology or general terminology; Based on all the vocabulary expansion subsets, a first vocabulary expansion set corresponding to the text to be retrieved is generated.
3. The method according to claim 2, characterized in that, The vocabulary expansion subset is either a specialized vocabulary expansion subset or a general vocabulary expansion subset. The step of determining the vocabulary expansion method for the first vocabulary to be expanded based on the vocabulary type, and determining the corresponding vocabulary expansion subset for the first vocabulary to be expanded based on the vocabulary expansion method, includes: If the first vocabulary to be expanded is a professional term, then based on semantic similarity, at least one first vocabulary to be used associated with the professional term is determined, and the professional term expansion subset is obtained based on all the first vocabulary to be used. If the first vocabulary to be expanded is a general vocabulary, then based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved, the general vocabulary is expanded to obtain a general vocabulary expansion subset.
4. The method according to claim 3, characterized in that, If the first vocabulary to be expanded is a general vocabulary, then based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved, the general vocabulary is expanded to obtain a general vocabulary expansion subset, including: If the first vocabulary to be expanded is a general vocabulary, at least one second vocabulary to be used is determined based on semantic similarity and associated with the general vocabulary; Based on the text length of the text to be retrieved and the frequency of occurrence of the general vocabulary in the text to be retrieved, the number of vocabulary expansions corresponding to the general vocabulary is determined; Based on the number of word expansions, a corresponding number of target words are obtained from at least one of the second words to be used, and a general word expansion subset corresponding to the general words is generated based on all the target words.
5. The method according to claim 1, characterized in that, The step of traversing each second extended word in the second vocabulary expansion set, performing word matching on each second extended word in the first vocabulary expansion set, and determining the word matching evaluation attribute corresponding to the second vocabulary expansion set based on the matching results includes: For each second extended word in each second extended word set, if the first extended word set contains a first extended word that is completely identical to the second extended word, then the matching result of the second extended word is determined to be a successful match. Based on the number of successful matches of the second extended words in the second vocabulary expansion set and the corresponding word weights of the successful matches of the second extended words, the word matching evaluation attribute of the second vocabulary expansion set is determined; wherein, the word weights of the successful matches of the second extended words are determined by the word weights of the corresponding first extended words in the first vocabulary expansion set.
6. The method according to claim 5, characterized in that, The step of determining the vocabulary matching evaluation attributes of the second vocabulary expansion set based on the number of successful matches of the second expanded vocabulary in the second vocabulary expansion set and the vocabulary weights corresponding to the successful matches of the second expanded vocabulary includes: If the number of successful hits of the second extended vocabulary in the second vocabulary expansion set is greater than the preset number of hits, then the hit coverage rate corresponding to the first vocabulary expansion set is determined based on the ratio of the number of successful hits of the first extended vocabulary in the first vocabulary expansion set to the total number of vocabulary words. The vocabulary matching evaluation attribute of the second vocabulary expansion set is determined based on the product of the number of hits and the hit coverage.
7. The method according to claim 5, characterized in that, The word weight of the first extended vocabulary is dynamically determined based on the total number of words in the first vocabulary extension set and the semantic similarity between the first extended vocabulary and the first vocabulary to be extended. The sum of the word weights of all the first extended vocabulary is 1.
8. The method according to claim 1, characterized in that, Determining at least one similar text associated with the text to be retrieved includes: Construct a first semantic vector corresponding to the text to be retrieved; From at least one candidate text, determine the vector similarity between the second semantic vector corresponding to each candidate text and the first semantic vector; Based on the vector similarity, at least one similar text associated with the text to be retrieved is determined from at least one of the candidate texts.
9. The method according to claim 6, characterized in that, The determination of the target text corresponding to the text to be retrieved from at least one of the similar texts, based on the vocabulary matching evaluation attributes of each second vocabulary expansion set and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved, includes: For each second vocabulary expansion set, determine the first weight corresponding to the vocabulary matching evaluation attribute of the second vocabulary expansion set, and the second weight corresponding to the similar text of the second vocabulary expansion set; The vocabulary matching evaluation attribute of the second vocabulary expansion set, the first weight, the similar texts corresponding to the second vocabulary expansion set, and the second weights corresponding to the similar texts are weighted to obtain the comprehensive evaluation attribute of the similar texts corresponding to the second vocabulary expansion set. Based on the comprehensive evaluation attributes of each similar text, the target text corresponding to the text to be retrieved is determined from at least one of the similar texts.
10. An information retrieval device, characterized in that, include: A similar text determination module is used to determine at least one similar text associated with the text to be retrieved when the text to be retrieved is detected. The vocabulary expansion set construction module constructs a first vocabulary expansion set corresponding to the text to be retrieved, and constructs a second vocabulary expansion set corresponding to each similar text; wherein, the first vocabulary expansion set includes at least one original word in the text to be retrieved, and the expanded vocabulary of all original words, and the second vocabulary expansion set includes the original words of the similar texts; The vocabulary matching evaluation attribute determination module is used to traverse each second extended word in the second vocabulary extension set for each second vocabulary extension set, perform vocabulary matching on each second extended word in the first vocabulary extension set respectively, and determine the vocabulary matching evaluation attribute corresponding to the second vocabulary extension set based on the matching result. The target text determination module is used to determine the target text corresponding to the text to be retrieved from at least one of the similar texts based on the vocabulary matching evaluation attributes of each second vocabulary expansion set and the text similarity between the similar texts corresponding to each second vocabulary expansion set and the text to be retrieved.