A multilingual retrieval method and system, electronic equipment and storage medium
By using a multilingual retrieval method and system, and utilizing a multilingual patent vocabulary and the BM25 algorithm to calculate content similarity, the problem of the inability to perform multilingual retrieval in existing technologies has been solved, achieving efficient and accurate multilingual retrieval result ranking and relevance content searching.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 汤如伊
- Filing Date
- 2023-01-03
- Publication Date
- 2026-04-17
AI Technical Summary
Existing note-taking software cannot perform multilingual searches, cannot obtain search results in different languages within the same course scope, and lacks relevance ranking, forcing users to manually search for the knowledge points most relevant to the keywords.
By receiving the original keywords input by the user, translating them into different target languages using a multilingual patent vocabulary, conducting multilingual database searches, calculating content similarity using the BM25 algorithm and improved algorithms, establishing a search result index table, and achieving efficient sorting of multilingual search results.
It enables convenient and efficient multilingual retrieval, improves the accuracy of keyword positioning and the efficiency of finding relevant content, and makes it easy for users to quickly compare key content in multilingual professional books.
Smart Images

Figure QLYQS_1 
Figure QLYQS_2 
Figure BDA0004035892210000031
Abstract
Description
Technical Field
[0001] This invention relates to the field of data retrieval technology, and more specifically, to a multilingual retrieval method, system, electronic device, and storage medium. Background Technology
[0002] Currently, more and more students are choosing to use the search functions provided by note-taking software to search for keywords and pinpoint related content in electronic textbooks. However, these software search functions can only retrieve content containing the keyword within its target language. To obtain results in different languages, users need to switch input methods, and each search only yields results in one language. Furthermore, when students want to quickly compare textbooks for the same course in different languages, they would prefer to simultaneously obtain search results in different languages and see the relevance between textbooks in different languages. For example, considering three textbooks on advanced algebra (Chinese, English, and French), students would like to compare the content of these three books, search for keywords related to "advanced algebra," and ultimately see all relevant content from these three books clearly displayed in the search results. However, current note-taking software search functions cannot achieve this. Therefore, current search technology cannot simultaneously retrieve results in different languages, cannot pinpoint a specific course scope, and, due to the lack of relevance ranking, requires manual searching for the knowledge points most relevant to the keywords and course content.
[0003] How to provide a multilingual retrieval method, system, electronic device, and storage medium has become a technical challenge that urgently needs to be solved in this field. Summary of the Invention
[0004] The purpose of this invention is to provide a multilingual retrieval method, system, electronic device, and storage medium.
[0005] The first aspect of this invention discloses a multilingual retrieval method, the method comprising:
[0006] Step S1: Receive the original keywords input by the user, and use a preset multilingual patent vocabulary to translate the original keywords from their original language into keywords in various target languages that are different from the original language;
[0007] Step S2: Based on the original keywords, perform text retrieval in the original language database to obtain a first retrieval result containing the original keywords and the statement belonging information; and based on the translated keywords of various target languages, perform text retrieval in the corresponding target language databases to obtain a second retrieval result containing the translated keywords of various target languages and the statement belonging information.
[0008] Step S3: Calculate the content similarity score of each sentence in the search results by performing content similarity calculation on the first and second search results;
[0009] Step S4: Based on the content similarity scores of each statement in the search results, the first search result, and the second search result, establish a search result index table.
[0010] According to the method of the first aspect of the present invention, step S3 includes:
[0011] Step S31: Use a translation engine of the same language to translate the first search result and the second search result;
[0012] Step S32: Use the BM25 algorithm to process the translated first and second search results to obtain the content similarity scores of each sentence in the search results.
[0013] According to the method of the first aspect of the present invention, step S3 includes:
[0014] Step S31: Compare the first search result and the second search result with the corresponding professional thesaurus respectively, so as to find the sentences containing professional terms in the thesaurus respectively in the first search result and the second search result;
[0015] Step S32: Calculate and process the sentences containing professional terms from the thesaurus found in the first and second search results according to the preset weighting method to obtain the content similarity score of each sentence in the search results.
[0016] According to the method of the first aspect of the present invention, step S4 specifically includes:
[0017] Step S41: Sort the first and second search results according to the content similarity scores of each statement in the search results;
[0018] Step S43: Establish a search result index table based on the first and second search results after sorting.
[0019] According to the method of the first aspect of the present invention, step S4 further includes:
[0020] Step S42: Sort the first and second search results according to the statement attribution information in the search results.
[0021] According to the method of the first aspect of the present invention, the sorting processing method used in step S42 is an improved algorithm based on the BM25 method.
[0022] According to the method of the first aspect of the present invention, when the original language of the original keyword is Chinese and the translated language is English, the formula of the improved algorithm based on the BM25 method is expressed as follows:
[0023]
[0024] Among them, RSV ch This represents the similarity score, where q represents a chapter from the English book, t represents the keywords extracted after q segmentation, N' represents a chapter from the Chinese book, and chf t This indicates the number of chapters containing 't' after the initial search. tch This indicates the word frequency of word 't' in a specific chapter of a Chinese book. ch This indicates the total number of words in a chapter of a Chinese book. ave This represents the average total number of words in chapters other than q in the search results.
[0025] A second aspect of this invention discloses a multilingual retrieval system, the system comprising:
[0026] The first processing module is configured to receive the original keywords input by the user and translate the original keywords from their original language into keywords in various target languages that are different from the original language using a preset multilingual patent vocabulary.
[0027] The second processing module is configured to perform text retrieval in the original language database based on the original keywords to obtain a first retrieval result containing the original keywords and the statement belonging information, and to perform text retrieval in the corresponding target language database based on the translated keywords of various target languages to obtain a second retrieval result containing the translated keywords of various target languages and the statement belonging information.
[0028] The third processing module is configured to calculate the content similarity score of each sentence in the search results by performing content similarity calculation on the first and second search results.
[0029] The fourth processing module is configured to establish a search result index table based on the content similarity scores of each statement in the search results, the first search result, and the second search result.
[0030] According to the system of the second aspect of the present invention, the third processing module is specifically configured as follows:
[0031] The first and second search results were translated using a translation engine in the same language.
[0032] The BM25 algorithm is used to process the translated first and second search results to obtain the content similarity scores of each sentence in the search results.
[0033] According to the system of the second aspect of the present invention, the third processing module is specifically configured as follows:
[0034] The first and second search results are compared with the corresponding professional thesaurus to find sentences containing professional terms from the thesaurus in the first and second search results, respectively.
[0035] Based on a preset weighting method, the sentences containing professional terms from the thesaurus found in the first and second search results are processed to obtain the content similarity score of each sentence in the search results.
[0036] According to the system of the second aspect of the present invention, the fourth processing module is specifically configured as follows:
[0037] The first and second search results are sorted according to the content similarity scores of each statement in the search results;
[0038] A search result index table is created based on the first and second search results after sorting.
[0039] According to the system of the second aspect of the present invention, the fourth processing module is specifically configured as follows:
[0040] The first and second search results are sorted based on the statement attribution information in the search results.
[0041] According to the system of the second aspect of the present invention, the sorting method used in the fourth processing module is an improved algorithm based on the BM25 method.
[0042] According to the system of the second aspect of the present invention, when the original language of the original keyword is Chinese and the translated language is English, the formula of the improved algorithm based on the BM25 method in the fourth processing module is expressed as follows:
[0043]
[0044] Among them, RSV ch This represents the similarity score, where q represents a chapter from the English book, t represents the keywords extracted after q segmentation, N' represents a chapter from the Chinese book, and chf t This indicates the number of chapters containing 't' after the initial search. tch This indicates the word frequency of word 't' in a specific chapter of a Chinese book. ch This indicates the total number of words in a chapter of a Chinese book. ave This represents the average total number of words in chapters other than q in the search results.
[0045] A third aspect of this invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a multilingual retrieval method according to any one of the first aspects of this disclosure.
[0046] A fourth aspect of this invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a multilingual retrieval method according to any one of the first aspects of this disclosure.
[0047] According to the technical content disclosed in this invention, the following beneficial effects are achieved:
[0048] In summary, the solution proposed in this invention enables convenient and efficient multilingual retrieval, highly accurate keyword positioning, and the acquisition of relevant content search results. This solution greatly facilitates users in finding and comparing key content in multilingual professional books, and can significantly improve their understanding of professional knowledge.
[0049] Other features and advantages of the invention will become clear from the following detailed description of exemplary embodiments of the invention with reference to the accompanying drawings. Attached Figure Description
[0050] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments of the invention and, together with their description, serve to explain the principles of the invention.
[0051] Figure 1 This is a flowchart illustrating a multilingual retrieval method provided according to an embodiment;
[0052] Figure 2 Example of English text;
[0053] Figure 3 Here is an example of preprocessed English text;
[0054] Figure 4 This is a schematic diagram illustrating the implementation of step S2 in a multilingual retrieval method according to an embodiment;
[0055] Figure 5 This is a schematic diagram of step S3 in a multilingual retrieval method provided according to an embodiment. Figure 1 ;
[0056] Figure 6 This is a schematic diagram of step S3 in a multilingual retrieval method provided according to an embodiment. Figure 2 .
[0057] Figure 7 Example of data entry format Figure 1 ;
[0058] Figure 8 Example of data entry format Figure 2 ;
[0059] Figure 9 This is a schematic diagram illustrating the implementation of secondary sorting in a multilingual retrieval method according to an embodiment;
[0060] Figure 10 This is a structural diagram of a multilingual retrieval system according to an embodiment of the present invention;
[0061] Figure 11 This is a structural diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0062] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that, unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps set forth in these embodiments do not limit the scope of the invention.
[0063] The following description of at least one exemplary embodiment is merely illustrative and is in no way intended to limit the invention or its application or use.
[0064] Techniques, methods, and equipment known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and equipment should be considered part of the specification.
[0065] In all the examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values.
[0066] It should be noted that similar labels and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be discussed further in subsequent figures.
[0067] Example 1:
[0068] This invention discloses a multilingual retrieval method. Figure 1 A flowchart of a multilingual retrieval method according to an embodiment of the present invention is shown below. Figure 1 As shown, the method includes:
[0069] Step S1: Receive the original keywords input by the user, and use the preset multilingual patent vocabulary to translate the original keywords from their original language into keywords in various target languages that are different from the original language;
[0070] Step S2: Based on the original keywords, perform text retrieval in the original language database to obtain the first retrieval result containing the original keywords and the statement attribution information; and based on the translated keywords of various target languages, perform text retrieval in the corresponding target language database to obtain the second retrieval result containing the translated keywords of various target languages and the statement attribution information.
[0071] Step S3: Calculate the content similarity score of each sentence in the search results by performing content similarity calculation on the first and second search results;
[0072] Step S4: Based on the content similarity scores of each statement in the search results, the first search result, and the second search result, establish a search result index table.
[0073] In step S1, the user inputs the original keywords, and a preset multilingual patent vocabulary is used to translate the original keywords from their original language into keywords in various target languages that are different from the original language.
[0074] In this embodiment, the original language of the original keyword can be Chinese, and the target languages that are different from the original language can include English, French, etc.; of course, they can also be other languages in the world, which will not be listed here.
[0075] Specifically, users can input multiple keywords in any one of the languages (Chinese, English, or French) as source keywords in the software's search function. The source keywords will be retrieved from a pre-set list of professional terms in Chinese, English, and French to obtain translations of the source keywords in other languages. These translations, together with the source keywords, will form a new set of keywords.
[0076] In step S2, a text search is performed in the original language database based on the original keywords to obtain a first search result containing the original keywords and the statement attribution information. Then, a text search is performed in the corresponding target language database based on the translated keywords of each target language to obtain a second search result containing the translated keywords of each target language and the statement attribution information.
[0077] In this embodiment, the sentences containing the new keywords and their corresponding positions in the professional books are obtained by searching in Chinese / English / French professional book databases respectively.
[0078] It should be noted that text preprocessing, including sentence segmentation and labeling, is required before searching the preset source language database and each target language database (i.e., Chinese / English / French professional book databases) to achieve digital sentence location. Figure 2 Taking English text as an example, by calling the jieba library for natural language processing, the text segments and labels obtained from the scanned original book are preprocessed, and finally... Figure 3 The processing results.
[0079] Specifically, taking the Chinese keyword "keyword_ch" as an example, this keyword will be compared and searched in Chinese, English, and French glossaries to find its position in the glossary and obtain the corresponding English and French translations. Keywords in different languages will be searched separately in their respective language databases, traversing all documents to obtain sentences containing the keyword and the documents corresponding to those sentences, including the book, chapter, and page number. Figure 4 As shown.
[0080] In step S3, the content similarity of the first and second search results is calculated to obtain the content similarity score of each statement in the search results.
[0081] In this step, the content similarity of text sentences from professional books in different languages is calculated, and various similarity calculation methods can be used.
[0082] In some embodiments, step S3 specifically includes:
[0083] Step S31: Use a translation engine of the same language to translate the first search result and the second search result;
[0084] Step S32: Use the BM25 algorithm to process the translated first and second search results to obtain the content similarity scores of each sentence in the search results.
[0085] Specifically, such as Figure 5 As shown, taking Chinese keywords as an example, the keyword will be compared and searched in Chinese, English, and French professional glossaries to find its position in the glossary and obtain the corresponding English and French translations. Keywords in different languages will be searched in their respective language databases, traversing all documents to obtain sentences containing the keyword and the documents corresponding to those sentences, including the book, chapter, and page number—that is, the retrieved Chinese, English, and French documents. Then, all three language documents will be converted into English documents using an external translation engine, and the overall content similarity of the documents will be calculated.
[0086] In this embodiment, the BM25 algorithm based on the probabilistic retrieval model can be used to calculate content similarity. The calculation formula of this algorithm is as follows:
[0087]
[0088] Among them, RSV d The similarity score is represented by q, which represents the reference document (English document is selected here), t represents the keywords extracted after document segmentation, N represents the number of indexed documents, and df i This represents the number of documents containing t, tftd L represents the word frequency of word t in a document d (the number of times t appears in d / the total number of words in d). d L represents the total number of words in document d. ave This represents the average total number of words in all documents. b is set to 0.75. k1 and k3 are adjustable parameters. In this embodiment, k1 is set to 1.2 and k3 to 0.5.
[0089] In some embodiments, step S3 specifically includes:
[0090] Step S31: Compare the first search result and the second search result with the corresponding professional thesaurus respectively, so as to find the sentences containing professional terms in the thesaurus respectively in the first search result and the second search result;
[0091] Step S32: Calculate and process the sentences containing professional terms from the thesaurus found in the first and second search results according to the preset weighting method to obtain the content similarity score of each sentence in the search results.
[0092] Specifically, in this embodiment, other methods can be used to calculate similarity. The calculation process is as follows: the search results of the keywords obtained in step S2 are compared with the existing professional terminology database. Sentences containing professional terms from the terminology database are found from the search results, and the professional terms in these sentences are calculated according to a certain weighting method. For the same set of keywords, after weighting the scores for each language, three weighted scores are obtained. Then, the absolute values of the differences between each pair of weighted scores are taken to obtain three absolute difference values. The sum of the three absolute difference values is divided by the sum of the three weighted scores to obtain the similarity score. If the similarity score is less than 0.05, the three Chinese, English, and French professional books are considered to be matched.
[0093] like Figure 6 As shown, with Figure 4 Taking the output results of a Chinese database as an example, the Chinese keywords entered by the user are denoted as keyword_ch. The search results are compared with existing professional thesaurus to find statements containing Chinese keywords from the thesaurus, and each occurrence of a Chinese keyword from the professional thesaurus is recorded as keyword_CH. i And note that it contains both keyword_ch and keyword_CH. i There are J sentences in total, and the length (i.e., the number of words) of each sentence is denoted as n. i,j For the I keywords_CH that appear in the J sentences in the search results i Weighted score A i =Σ J j=1 n i,j / Σ I i=1Σ J j= 1n i,j .
[0094] Taking the Chinese search term "matrix" as an example, among all results containing the word "matrix", we can find sentences containing both "matrix" and "transpose" based on the keyword "transpose" already available in a specialized thesaurus. We can then calculate the sentence lengths of all sentences containing these two words and sum them to obtain Σ. J j=1 n i,j Then, for all statements containing "matrix" and intersecting with existing keywords in the professional thesaurus, the sentence lengths of all these statements are summed to obtain Σ. I i=1 Σ J j=1 n i,j Dividing the sums of the two calculations yields the weighted score A. i .
[0095] Similarly, the English and French search terms entered by the user are denoted as keyword_eng and keyword_fr, respectively. The search results are compared with existing professional thesaurus to find phrases containing keywords from the thesaurus. The number of English keywords from the professional thesaurus and the number of French keywords from the professional thesaurus appearing in the search results are recorded as P and S, respectively. Each appearing English keyword is denoted as keyword_ENG. p French keywords are denoted as keyword_FR s And note that it contains both keyword_eng and keyword_ENG. p The statement has a total of Q sentences, and the length (i.e., the number of words) of each sentence is denoted as m. p,q Note that it contains both keyword_fr and keyword_FR. s The statement has a total of T sentences, and the length (i.e., the number of words) of each sentence is denoted as k. s,t The weighted scores for P instances of the Q-phrase in the search results and S instances of the T-phrase in the search results are B, respectively. p C s . When(|A i -B q |+|B q -C s |+|C s -A i |) / (A i +B q +C s If the expression is less than 0.05, it is considered a match.
[0096] In step S4, a search result index table is established based on the content similarity scores of each statement in the search results, the first search result, and the second search result.
[0097] In some embodiments, step S4 specifically includes:
[0098] Step S41: Sort the first and second search results according to the content similarity scores of each statement in the search results;
[0099] Step S43: Establish a search result index table based on the first and second search results after sorting.
[0100] Specifically, for keywords from the specialized thesaurus added during retrieval, taking Chinese keywords as an example, they will be sorted in the table from high to low according to the weighted values obtained based on the IDF algorithm. The calculation formula is as follows:
[0101] IDF(keyword_CH i = log((N-J+0.5) / (J+0.5))
[0102] Where N represents the total number of entries containing the Chinese keyword keyword_ch entered by the user, and J represents entries that contain both keyword_ch and keyword_CH. i The total number of entries.
[0103] The calculated similarity scores will be linked to the corresponding Chinese, English, and French professional book titles to form terms. All terms will form a search results index table, which will become an important indicator for the initial search result ranking. The data term format of the search results index table is as follows: Figure 7 As shown.
[0104] In some embodiments, step S4 further includes:
[0105] Step S42: Sort the first and second search results according to the statement attribution information in the search results.
[0106] In some embodiments, the sorting method used in step S42 is an improved algorithm based on the BM25 method.
[0107] In some embodiments, when the original keyword is in Chinese and the translated language is English, the formula for the improved algorithm based on the BM25 method is as follows:
[0108]
[0109] Among them, RSV chThis represents the similarity score, where q represents a chapter from the English book, t represents the keywords extracted after q segmentation, N' represents a chapter from the Chinese book, and chf t This indicates the number of chapters containing 't' after the initial search. tch This indicates the word frequency of word 't' in a specific chapter of a Chinese book. ch This indicates the total number of words in a chapter of a Chinese book. ave This represents the average total number of words in chapters other than q in the search results.
[0110] Specifically, in addition to the initial ranking based on the overall document content similarity score, a secondary internal ranking is needed to more clearly see the relevance of the trilingual professional books and facilitate direct content comparison. This ranking focuses on data from different positions within a set of multilingual professional books. For example, if a Chinese keyword appears in Chapter 2 and Chapter 3 of a Chinese professional book, and the English version of that keyword appears in Chapter 4 of an English professional book, and Chapter 2 of the Chinese book is more similar to Chapter 3 of the English book than Chapter 4, then the ranking prioritizes pairing Chapter 2 of the Chinese book with Chapter 4 of the English book. Specifically, when determining which chapter (Chapter 2 or 3 of the Chinese book) is more similar to Chapter 4 of the English book, an improved algorithm based on the BM25 method is used to calculate the similarity of the chapter content. The specific calculation method is as follows:
[0111]
[0112] RSV ch To represent the similarity score, continuing the example above, q represents Chapter 4 of the English book, t represents the keywords extracted after q is segmented, and N' represents documents indexed other than q, which in this case refers to Chapters 2 and 3 of the Chinese book. chf t This indicates the number of chapters containing 't' after the initial search. tch This indicates the word frequency of word t within a certain chapter ch other than q (e.g., the number of times t appears in Chapter 2 of a Chinese book / the total number of words in Chapter 2 of the Chinese book), L ch L represents the total word count of a chapter other than q (e.g., the second chapter of a Chinese book). ave This represents the average total number of words in the chapters other than q in the search results. In this case, it refers to the total number of words in the second and third chapters of the Chinese book / 2.
[0113] This chapter-based sorting method extracts the table of contents from a group of Chinese, English, and French professional books with high content similarity, and establishes a correspondence between the chapters of the three books. Each correspondence is stored as data in a new index table. This new index table will become an important indicator for secondary sorting. Ultimately, it will accurately and effectively obtain keyword-related content. The data entry format of the new index table is as follows: Figure 8 As shown.
[0114] A diagram illustrating chapter-based sorting is shown below. Figure 9 As shown.
[0115] In summary, the solution proposed in this invention can achieve convenient and efficient multilingual retrieval, highly accurate keyword positioning, and obtain relevant content search results. This solution greatly facilitates users in finding and comparing key content in multilingual professional books, and can significantly improve their understanding of professional knowledge.
[0116] Example 2:
[0117] This invention discloses a multilingual retrieval system. Figure 10 This is a structural diagram of a multilingual retrieval system according to an embodiment of the present invention; as shown below. Figure 10 As shown, the system 100 includes:
[0118] The first processing module 101 is configured to receive the original keywords input by the user and use a preset multilingual patent vocabulary to translate the original keywords from their original language into keywords in various target languages that are different from the original language.
[0119] The second processing module 102 is configured to perform text retrieval in the original language database based on the original keywords to obtain a first retrieval result containing the original keywords and the statement attribution information, and to perform text retrieval in the corresponding target language database based on the translated keywords of various target languages to obtain a second retrieval result containing the translated keywords of various target languages and the statement attribution information.
[0120] The third processing module 103 is configured to calculate the content similarity of the first and second search results to obtain the content similarity score of each sentence in the search results.
[0121] The fourth processing module 104 is configured to establish a search result index table based on the content similarity scores of each statement in the search results, the first search result, and the second search result.
[0122] According to an embodiment of the system of the present invention, the third processing module 103 is specifically configured as follows:
[0123] The first and second search results were translated using a translation engine in the same language.
[0124] The BM25 algorithm is used to process the translated first and second search results to obtain the content similarity scores of each sentence in the search results.
[0125] According to an embodiment of the system of the present invention, the third processing module 103 is specifically configured as follows:
[0126] The first and second search results are compared with the corresponding professional thesaurus to find sentences containing professional terms from the thesaurus in the first and second search results, respectively.
[0127] Based on a preset weighting method, the sentences containing professional terms from the thesaurus found in the first and second search results are processed to obtain the content similarity score of each sentence in the search results.
[0128] According to an embodiment of the system of the present invention, the fourth processing module 104 is specifically configured as follows:
[0129] The first and second search results are sorted according to the content similarity scores of each statement in the search results;
[0130] A search result index table is created based on the first and second search results after sorting.
[0131] According to an embodiment of the system of the present invention, the fourth processing module 104 is specifically configured as follows:
[0132] The first and second search results are sorted based on the statement attribution information in the search results.
[0133] According to the system of the present invention, the sorting method used in the fourth processing module 104 is an improved algorithm based on the BM25 method.
[0134] According to the system of this embodiment, when the original language of the original keyword is Chinese and the translated language is English, the formula of the improved algorithm based on the BM25 method in the fourth processing module 104 is expressed as follows:
[0135]
[0136] Where RSVch represents the similarity score, q represents a chapter in the English book, t represents the keywords extracted after q is segmented, N' represents a chapter in the Chinese book, chft represents the number of chapters containing t after the initial search, tftch represents the word frequency of t in a chapter of the Chinese book, lch represents the total number of words in a chapter of the Chinese book, and lave represents the average total number of words in chapters other than q in the search results.
[0137] Example 3:
[0138] This invention discloses an electronic device. The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of a multilingual retrieval method according to any one of the embodiments disclosed in 1 of this invention.
[0139] Figure 11This is a structural diagram of an electronic device according to an embodiment of the present invention, such as... Figure 11 As shown, the electronic device includes a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, Near Field Communication (NFC), or other technologies. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the device's casing, or an external keyboard, touchpad, or mouse.
[0140] Those skilled in the art will understand that Figure 11 The structure shown is merely a structural diagram of the part related to the technical solution of this disclosure and does not constitute a limitation on the electronic device to which the solution of this application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0141] Example 4:
[0142] This invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of a multilingual retrieval method according to any one of Embodiment 1 of this invention.
[0143] Please note that the technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, not all possible combinations of the technical features in the above embodiments have been described. However, as long as the combination of these technical features does not contradict each other, it should be considered within the scope of this specification. The above embodiments only illustrate several implementation methods of this application, and their descriptions are relatively specific and detailed, but they should not be construed as limiting the scope of the invention patent. It should be pointed out that for those skilled in the art, several modifications and improvements can be made without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
[0144] The embodiments of the subject matter and functional operation described in this specification can be implemented in the following ways: digital electronic circuits, tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or combinations thereof. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, i.e., one or more modules of computer program instructions encoded on a tangible, non-transitory program carrier for execution by a data processing apparatus or for controlling the operation of a data processing apparatus. Alternatively or additionally, the program instructions may be encoded on artificially generated propagation signals, such as machine-generated electrical, optical, or electromagnetic signals, which are generated to encode information and transmit it to a suitable receiving device for execution by the data processing apparatus. The computer storage medium may be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or combinations thereof.
[0145] The processing and logic flow described in this specification can be executed by one or more programmable computers that execute one or more computer programs to perform corresponding functions by operating on input data and generating output. The processing and logic flow can also be executed by dedicated logic circuitry—such as FPGAs (Field-Programmable Gate Arrays) or ASICs (Application-Specific Integrated Circuits), and the device can also be implemented as dedicated logic circuitry.
[0146] Suitable computers for executing computer programs include, for example, general-purpose and / or special-purpose microprocessors, or any other type of central processing unit. Typically, the central processing unit receives instructions and data from read-only memory and / or random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Typically, a computer will also include one or more mass storage devices for storing data, such as disks, magneto-optical disks, or optical disks, or the computer will be operatively coupled to such mass storage devices to receive data from or transfer data to them, or both. However, a computer is not required to have such devices. Furthermore, a computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0147] Computer-readable media suitable for storing computer program instructions and data include all forms of non-volatile memory, media, and memory devices, such as semiconductor memory devices (e.g., EPROM, EEPROM, and flash memory devices), magnetic disks (e.g., internal hard disks or removable disks), magneto-optical disks, and CD-ROM and DVD-ROM disks. Processors and memory may be supplemented by or incorporated into dedicated logic circuitry.
[0148] While this specification contains numerous specific implementation details, these should not be construed as limiting the scope of any invention or the scope of the claims, but rather are primarily intended to describe features of specific embodiments of a particular invention. Certain features described in the various embodiments herein may also be implemented in combination in a single embodiment. Conversely, various features described in a single embodiment may also be implemented separately in various embodiments or in any suitable sub-combination. Furthermore, while features may function in certain combinations as described above and even initially claimed in this way, one or more features from a claimed combination may be removed from that combination in some cases, and a claimed combination may refer to a sub-combination or a variation thereof.
[0149] Similarly, although the operations are depicted in a specific order in the accompanying drawings, this should not be construed as requiring these operations to be performed in the specific order shown or sequentially, or requiring all illustrated operations to be performed to achieve the desired result. In some cases, multitasking and parallel processing may be advantageous. Furthermore, the separation of various system modules and components in the above embodiments should not be construed as requiring such separation in all embodiments, and it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0150] Thus, specific embodiments of the subject matter have been described. Other embodiments are within the scope of the appended claims. In some cases, the actions recited in the claims may be performed in a different order and still achieve the desired result. Furthermore, the processes depicted in the drawings are not necessarily shown in a specific order or sequence to achieve the desired result. In some implementations, multitasking and parallel processing may be advantageous.
[0151] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
[0152] While specific embodiments of the invention have been described in detail by way of examples, those skilled in the art should understand that the examples are for illustrative purposes only and not intended to limit the scope of the invention. Those skilled in the art should understand that modifications can be made to the above embodiments without departing from the scope and spirit of the invention. The scope of the invention is defined by the appended claims.
Claims
1. A multi-lingual retrieval method, characterized by, The method includes: Step S1: Receive the original keywords input by the user, and use a preset multilingual professional vocabulary list to translate the original keywords from their original language into keywords in various target languages that are different from the original language; Step S2: Based on the original keywords, perform text retrieval in the original language database to obtain a first retrieval result containing the original keywords and the statement belonging information; and based on the translated keywords of various target languages, perform text retrieval in the corresponding target language databases to obtain a second retrieval result containing the translated keywords of various target languages and the statement belonging information. Step S3: Calculate the content similarity score of each sentence in the search results by performing content similarity calculation on the first and second search results; Step S4: Based on the content similarity scores of each statement in the search results, the first search result, and the second search result, establish a search result index table; Step S4 specifically includes: Step S41: Sort the first and second search results according to the content similarity scores of each statement in the search results; Step S43: Establish a search result index table based on the first and second search results after sorting. Step S4 further includes: Step S42: Sort the first and second search results according to the statement attribution information in the search results; The sorting method used in step S42 is an improved algorithm based on the BM25 method; When the original keyword is in Chinese and the translated word is English, the formula for the improved algorithm based on the BM25 method is as follows: ; Among them, RSV ch This represents the similarity score, where q represents a chapter from the English book, t represents the keywords extracted after q segmentation, N' represents a chapter from the Chinese book, and chf t This indicates the number of chapters containing "t" after the initial search. "tftch" represents the word frequency of "t" in a specific chapter of a Chinese book. "lch" represents the total number of words in a specific chapter of a Chinese book. "lave" represents the average total number of words in chapters other than "q" in the search results.
2. The multi-lingual retrieval method of claim 1, wherein, Step S3 includes: Step S31: Use a translation engine of the same language to translate the first search result and the second search result; Step S32: Use the BM25 algorithm to process the translated first and second search results to obtain the content similarity scores of each sentence in the search results.
3. The multi-lingual retrieval method of claim 1, wherein, Step S3 includes: Step S31: Compare the first search result and the second search result with the corresponding professional thesaurus respectively, so as to find the sentences containing professional terms in the thesaurus respectively in the first search result and the second search result; Step S32: Calculate the content similarity score of each sentence in the search results by calculating the sentences containing professional terms from the thesaurus found in the first and second search results according to the preset weighting method.
4. A multi-lingual retrieval system, characterized by, The system includes: The first processing module is configured to receive the original keywords input by the user and use a variety of preset professional vocabulary lists to translate the original keywords from their original language into keywords in various target languages that are different from the original language. The second processing module is configured to perform text retrieval in the original language database based on the original keywords to obtain a first retrieval result containing the original keywords and the statement belonging information, and to perform text retrieval in the corresponding target language database based on the translated keywords of various target languages to obtain a second retrieval result containing the translated keywords of various target languages and the statement belonging information. The third processing module is configured to calculate the content similarity score of each sentence in the search results by performing content similarity calculation on the first and second search results. The fourth processing module is configured to build a search result index table based on the content similarity scores of each statement in the search results, the first search result, and the second search result; The fourth processing module is specifically configured to sort the first and second search results based on the content similarity scores of each statement in the search results; A search result index table is created based on the first and second search results after sorting. The fourth processing module is specifically configured to sort the first and second search results based on the statement attribution information in the search results; The sorting method used in this fourth processing module is an improved algorithm based on the BM25 method; When the original keyword is in Chinese and the same language is translated into English in the fourth processing module, the formula of the improved algorithm based on the BM25 method is represented as: ; Among them, RSV ch This represents the similarity score, where q represents a chapter from the English book, t represents the keywords extracted after q segmentation, N' represents a chapter from the Chinese book, and chf t This indicates the number of chapters containing "t" after the initial search. "tftch" represents the word frequency of "t" in a specific chapter of a Chinese book. "lch" represents the total number of words in a specific chapter of a Chinese book. "lave" represents the average total number of words in chapters other than "q" in the search results.
5. An electronic device, comprising: The electronic device includes a memory and a processor. The memory stores a computer program, and when the processor executes the computer program, it implements the steps of the multilingual retrieval method according to any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the multilingual retrieval method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Patent search method
CN101025758A
Searching mixed language document sets
US20080281804A1