A retrieval method, device, computer-readable storage medium and terminal device

By obtaining the target text, performing translation search and text material search, and automatically determining the display method, the problem of users in the prior art need to manually switch modes to locate the text to be identified, achieving a simpler user experience.

CN117828020BActive Publication Date: 2025-06-27东莞市步步高教育软件有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311864313.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-29
Publication Date
2025-06-27
Estimated Expiration
2043-12-29

AI Technical Summary

Technical Problem

In the prior art, users need to manually switch to textbook scanning mode to locate the text to be identified, resulting in cumbersome operation steps, increasing the user's learning and usage costs, and affecting the user's experience.

Method used

By obtaining the target text to be processed, performing translation search and text material search, automatically determine the text matching results and display methods, and reducing user operation steps.

Benefits of technology

Automatic translation and search of target text and text material retrieval are achieved without the need for user manual switching mode, reducing user operation steps and learning costs and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117828020B_ABST
    Figure CN117828020B_ABST
Patent Text Reader

Abstract

This application belongs to the technical field of natural language processing, and particularly relates to a retrieval method, device, computer-readable storage medium, and terminal device. The method includes: obtaining a target text to be processed; performing a translation retrieval on the target text to obtain a translation retrieval result; and performing a text material retrieval on the target text to determine a text matching result. Through the above method, the target text can be automatically subjected to translation retrieval and text material retrieval without the user manually switching to the textbook scanning mode, thereby reducing the user's operation steps and learning costs and helping to improve the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of natural language processing, and particularly relates to a retrieval method, device, computer-readable storage medium, and terminal device. Background Art

[0002] With the progress of technology, various intelligent tools for assisting learning have gradually entered thousands of households. By using various intelligent tools, people can be helped to learn and work better. For example, intelligent translation tools such as dictionary pens can be used to translate the text to be recognized, or the text to be recognized can be located in materials such as textbooks or books, thereby helping people learn more efficiently.

[0003] However, when a user needs to locate a textbook or literary book for the text to be recognized, the retrieval methods in the prior art usually require the user to manually switch to the corresponding textbook scanning mode. The operation steps of this process are relatively cumbersome, and the learning cost of the user is increased, resulting in a poor user experience. Summary of the Invention

[0004] In view of this, embodiments of this application provide a retrieval method, device, computer-readable storage medium, and terminal device to solve the problem that the operation steps of the retrieval method in the prior art are relatively cumbersome, resulting in a poor user experience.

[0005] The first aspect of the embodiments of this application provides a retrieval method, which may include:

[0006] Obtain a target text to be processed;

[0007] Perform a translation retrieval on the target text to obtain a translation retrieval result;

[0008] Perform a text material retrieval on the target text to determine a text matching result.

[0009] In a specific implementation manner of the first aspect, the text matching result includes a target text matching degree and a target matching text;

[0010] The method further includes:

[0011] Determine a target display mode according to the target text matching degree;

[0012] Display the retrieval result according to the target display mode.

[0013] In a specific implementation manner of the first aspect, the determining a target display mode according to the target text matching degree includes:

[0014] If the matching degree of the target text is greater than a preset second matching degree threshold, then determine a preset first display mode as the target display mode; wherein, the first display mode is a display mode for displaying the text matching result;

[0015] If the matching degree of the target text is less than or equal to the second matching degree threshold and greater than a preset first matching degree threshold, then determine a preset second display mode as the target display mode; wherein, the second display mode is a display mode for displaying the translation retrieval result and the text matching result;

[0016] If the matching degree of the target text is less than or equal to the first matching degree threshold, then determine a preset third display mode as the target display mode; wherein, the third display mode is a display mode for displaying the translation retrieval result.

[0017] In a specific implementation manner of the first aspect, the displaying the retrieval result according to the target display mode includes:

[0018] If the target display mode is the second display mode, then display the target matching text and a preset text matching result entry; wherein, the text matching result entry is used to enter the display interface of the text matching result.

[0019] In a specific implementation manner of the first aspect, the target matching text includes preset various text materials, and the target text matching degree includes respective text matching degrees corresponding to the target text and each of the text materials;

[0020] The displaying the retrieval result according to the target display mode includes:

[0021] If the target display mode is the second display mode, then determine the text type and page number information of each matching text material; wherein, the matching text material is any one of the target matching texts that is greater than the first matching degree threshold;

[0022] Determine the display order of each matching text material according to the text type and page number information of each matching text material;

[0023] Display the text matching result according to the display order of each matching text material.

[0024] In a specific implementation manner of the first aspect, the obtaining the target text to be processed includes:

[0025] Obtain the scanning result of a preset scanning device;

[0026] Determine the scanning result as the target text to be processed.

[0027] In a specific implementation of the first aspect, it includes:

[0028] Obtain the selected information of the historical check-in record;

[0029] Determine the selected information of the historical retrieval record as the target text to be processed.

[0030] A second aspect of the embodiments of the present application provides a retrieval device, which may include:

[0031] A target text acquisition module, configured to obtain the target text to be processed;

[0032] A translation retrieval module, configured to perform translation retrieval on the target text to obtain a translation retrieval result;

[0033] A text material retrieval module, configured to perform text material retrieval on the target text to determine a text matching result.

[0034] In a specific implementation of the second aspect, the text matching result includes a target text matching degree and a target matching text;

[0035] The retrieval device may further include:

[0036] A target display mode determination module, configured to determine a target display mode according to the target text matching degree;

[0037] A retrieval result display module, configured to display the retrieval result according to the target display mode.

[0038] In a specific implementation of the second aspect, the target display mode determination module may include:

[0039] A first display mode determination sub-module, configured to, if the target text matching degree is greater than a preset second matching degree threshold, determine a preset first display mode as the target display mode; wherein, the first display mode is a display mode for displaying the text matching result;

[0040] A second display mode determination sub-module, configured to, if the target text matching degree is less than or equal to the second matching degree threshold and greater than a preset first matching degree threshold, determine a preset second display mode as the target display mode; wherein, the second display mode is a display mode for displaying the translation retrieval result and the text matching result;

[0041] A third display mode determination sub-module, configured to, if the target text matching degree is less than or equal to the first matching degree threshold, determine a preset third display mode as the target display mode; wherein, the third display mode is a display mode for displaying the translation retrieval result.

[0042] In a specific implementation manner of the second aspect, the retrieval result display module includes:

[0043] A result entry display sub-module, configured to display the target matching text and a preset text matching result entry if the target display manner is the second display manner; wherein, the text matching result entry is used to enter the display interface of the text matching result.

[0044] In a specific implementation manner of the second aspect, the target matching text includes various preset text materials, and the target text matching degree includes the respective text matching degrees corresponding to the target text and each of the text materials.

[0045] The retrieval result display module may further include:

[0046] An information acquisition sub-module, configured to determine the text type and page number information of each matching text material if the target display manner is the second display manner; wherein, the matching text material is any one of the target matching texts that is greater than the first matching degree threshold.

[0047] A display order determination sub-module, configured to determine the display order of each matching text material according to the text type and page number information of each matching text material.

[0048] Display the text matching result according to the display order of each matching text material.

[0049] In a specific implementation manner of the second aspect, the target text acquisition module may include:

[0050] A scan result acquisition sub-module, configured to acquire the scan result of a preset scanning device.

[0051] A target text determination sub-module, configured to determine the scan result as the target text to be processed.

[0052] In a specific implementation manner of the second aspect, the target text acquisition module may further include:

[0053] A selected information acquisition sub-module, configured to acquire the selected information of the historical retrieval record.

[0054] A target text determination sub-module, configured to determine the selected information of the historical retrieval record as the target text to be processed.

[0055] A third aspect of the embodiments of the present application provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps of any of the above retrieval methods are implemented.

[0056] A fourth aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of any of the above retrieval methods are implemented.

[0057] A fifth aspect of the embodiments of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device is enabled to execute the steps of any of the above retrieval methods.

[0058] The beneficial effects of the embodiments of the present application compared with the prior art are as follows: The embodiments of the present application obtain a target text to be processed; perform translation retrieval on the target text to obtain a translation retrieval result; perform text material retrieval on the target text to determine a text matching result. Through the embodiments of the present application, the target text can be automatically subjected to translation retrieval and text material retrieval without the user manually switching to the textbook scanning mode, thereby reducing the user's operation steps and learning costs and helping to improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0060] Figure 1 It is a flowchart of an embodiment of a retrieval method in the embodiments of the present application;

[0061] Figure 2 It is a schematic diagram of the first display mode;

[0062] Figure 3 It is a schematic diagram of the second display mode;

[0063] Figure 4 It is a schematic diagram of entering the textbook mode;

[0064] Figure 5 It is a schematic diagram of the operation gesture for entering the textbook mode;

[0065] Figure 6 It is a schematic diagram of the third display mode;

[0066] Figure 7 It is a structural diagram of an embodiment of a retrieval device in the embodiments of the present application;

[0067] Figure 8 It is a schematic block diagram of a terminal device in the embodiments of the present application. Detailed implementation manners

[0068] To make the objectives, features, and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the embodiments described below are only a part of the embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the scope of protection of the present application.

[0069] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, wholes, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components, and / or their combinations.

[0070] It should also be understood that the terms used in this specification of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification of the present application and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are intended to include the plural forms.

[0071] It should be further understood that the term "and / or" used in this specification of the present application and the appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0072] As used in this specification and the appended claims, the term "if" can be interpreted as "when", "once", "in response to determining", or "in response to detecting" according to the context. Similarly, the phrase "if determined" or "if [the described condition or event] is detected" can be interpreted as meaning "once determined", "in response to determining", "once [the described condition or event] is detected", or "in response to detecting [the described condition or event]" according to the context.

[0073] In addition, in the description of the present application, the terms "first", "second", "third", etc. are only used for distinguishing descriptions and cannot be understood as indicating or implying relative importance.

[0074] With the progress of technology, various intelligent tools for assisting learning have gradually entered thousands of households. By using various intelligent tools, people can be helped to learn and work better. For example, intelligent translation tools such as dictionary pens can be used to translate the text to be recognized, or the text to be recognized can be located in materials such as textbooks or literary books, thereby helping people learn more efficiently.

[0075] However, when the user needs to locate the text to be recognized in a textbook or a book, the retrieval methods in the prior art usually require the user to manually switch to the corresponding textbook scanning mode. The operation steps of this process are rather cumbersome, and it increases the learning cost of the user, resulting in a poor user experience.

[0076] In view of this, the embodiments of the present application provide a retrieval method, device, computer-readable storage medium, and terminal device to solve the problem that the operation steps of the retrieval methods in the prior art are rather cumbersome, resulting in a poor user experience.

[0077] It should be noted that the execution subject of the method of the present application is a terminal device. Specifically, it can be common computing devices such as a dictionary pen, a desktop computer, a notebook, a palm computer, etc., or other computing devices.

[0078] Please refer to Figure 1 , an embodiment of a retrieval method in the embodiments of the present application may include:

[0079] Step S101, obtain the target text to be processed.

[0080] In the actual use process of the terminal device, the user may use a preset scanning device to scan the text to be retrieved and expect the terminal device to retrieve the text; or, the user may also select a certain text in the terminal device and expect the terminal device to retrieve the text. Therefore, the embodiments of the present application can set multiple ways to obtain the target text to be processed to better meet the retrieval needs of the user in various scenarios and improve the scenario adaptability and flexibility of the retrieval method.

[0081] In a specific implementation manner of the embodiments of the present application, a scanning device may be provided on the terminal device, or the terminal device may be communicatively connected to a preset scanning device; in use, the user can scan the text to be retrieved through the scanning device, and the terminal device can obtain the scanning result of the scanning device and determine the scanning result as the target text to be processed.

[0082] In another specific implementation manner of the embodiments of the present application, the target text can also be obtained by selecting the text in the terminal device. For example, the user can enter the display interface of the historical retrieval records of the terminal device and select a certain historical retrieval record by long pressing or clicking, etc. At this time, the terminal device can obtain the historical retrieval record selection information and use the historical retrieval record selection information as the target text to be processed.

[0083] Step S102, perform a translation retrieval on the target text to obtain a translation retrieval result.

[0084] In the embodiments of the present application, the target text can be an English text. Here, the target text can be translated and retrieved to obtain a translation retrieval result to assist users in efficient learning and work.

[0085] Among them, the translation retrieval method can be any translation method in the prior art, and the present application does not make specific limitations thereon.

[0086] For example, a pre-trained translation model for translation can be used to perform translation retrieval on the target text to obtain a translation retrieval result of the target text.

[0087] For another example, the target text can be segmented, and each segment can be matched with the data in a preset translation database, and the successfully matched data can be used as the translation result of each segment, so that a translation retrieval result of the target text can be integrated.

[0088] Step S103: Perform text material retrieval on the target text to determine a text matching result.

[0089] Generally, when a user needs to locate a certain text in learning materials such as textbooks or literary books, the preset positioning scanning mode (such as textbook scanning mode) in the terminal device can be used. That is, the switching of the positioning scanning mode depends on the manual operation of the user. In actual use, the user may not be able to determine which text content needs to be scanned when switching to the positioning scanning mode, making it difficult to make a subjective judgment, resulting in an increase in the learning cost and usage cost of the user and affecting the user experience.

[0090] Therefore, in the embodiments of the present application, text material retrieval can also be performed on the target text to obtain a text material retrieval result, so that the user does not need to make a subjective judgment and manually switch the scanning mode, which can reduce the learning cost and usage cost of the user and improve the user experience.

[0091] Specifically, the text matching degree between the target text and each preset text material can be calculated, and the text matching result can be determined accordingly. Among them, each preset text material can be the text material stored in a preset storage module, and the text matching result can include the target text matching degree and the target matching text.

[0092] In a specific implementation manner, learning materials such as textbooks and literary books can be split to obtain each text material to be retrieved; for example, learning materials such as textbooks and literary books can be split according to sentences to obtain multiple sentences, and each of the sentences can be used as a text material, so that multiple text materials can be obtained; for another example, learning materials such as textbooks and literary books can be split according to paragraphs to obtain multiple paragraphs, and each of the paragraphs can be used as a text material, so that multiple text materials can be obtained.

[0093] In a specific implementation manner of the embodiment of the present application, the target matching text may be the first text material retrieved during the retrieval process that is greater than the first matching degree threshold, and the target matching text may be the text matching degree corresponding to the first text material retrieved during the retrieval process that is greater than the first matching degree threshold. When retrieving text materials, the text matching degree between the target text and each preset text material can be calculated one by one; when calculating the text matching degree of a certain text material, if the text matching degree of the text material is greater than the preset first matching degree threshold, it can be considered that the matching is successful, and the text material can be used as the target matching text, and the text matching degree corresponding to the text material can be used as the target text matching degree. After that, the process of retrieving text materials can be ended, thereby improving the efficiency of retrieving text materials. Optionally, a matching priority can also be set for each text material. If the matching priority of a certain text material is higher, the text matching degree between the text material and the target text can be calculated first. Specifically, user information can be obtained, where the user information may include the user's location area and the user's grade. According to the user information, the matching priority of each text material can be determined; according to the matching priority of each text material, the matching degree between each text material and the target text can be calculated; for example, if the user's location area is Guangdong and the grade is the fifth grade, it can be determined that the user is likely to use the fifth-grade English textbook of the People's Education Edition. Therefore, the matching priority of each text material in the fifth-grade English textbook of the People's Education Edition can be set to a higher value, while the matching priority of each text material in other textbooks can be set to a lower value; during the process of retrieving text materials, the text matching degree between the text material with a higher matching priority and the target text can be calculated first. If the matching is successful, the process of retrieving text materials can be ended. If the matching is not successful, the text matching degree between the text material with a lower matching priority and the target text can be calculated continuously; thus, the efficiency of retrieving text materials can be improved.

[0094] In another specific implementation manner of the embodiment of the present application, the target matching text may include various preset text materials, and the target text matching degree may include the respective text matching degrees corresponding to the target text and each text material; when performing text material retrieval, the text matching degrees between the target text and each preset text material may be calculated to obtain the respective text matching degrees; and each preset text material may be used as the target matching text, and the respective text matching degrees corresponding to the target text and each preset text material may be used as the target text matching degree; alternatively, the target matching text may be the text material corresponding to the maximum value of the text matching degree of the target text, and the target text matching degree may be the maximum value of the text matching degree of the target text; when performing text material retrieval, the text matching degrees between the target text and each preset text material may be calculated to obtain the respective text matching degrees; and the text material corresponding to the maximum value of the text matching degree of the target text may be used as the target matching text, and the maximum value of the text matching degree of the target text may be used as the target text matching degree.

[0095] It should be noted that the above translation retrieval process and text material retrieval process may be executed in parallel.

[0096] In the embodiment of the present application, after obtaining the text matching result, the target display manner may further be determined according to the text matching result, and the retrieval result may be displayed according to the target display manner; wherein, the display content corresponding to the target display manner may include the translation retrieval result and / or the text matching result.

[0097] It should be understood that if the target text matching degree is at a relatively low value, it may be considered that no text material similar to the target text is matched. At this time, the text matching result may not be displayed; if the target text matching degree is at a relatively high value, it may be considered that a text material similar to the target text is matched. At this time, the text material retrieval result may be displayed. Accordingly, an appropriate display manner may be determined according to the specific matching value of the target text matching degree to improve the scene adaptability.

[0098] If the target text matching degree is greater than the preset second matching degree threshold, the preset first display manner may be determined as the target display manner; wherein, the first display manner may be the display manner for displaying the text matching result.

[0099] If the target text matching degree is less than or equal to the second matching degree threshold and greater than the first matching degree threshold, the preset second display manner may be determined as the target display manner; wherein, the second display manner may be the display manner for displaying the translation retrieval result and the text matching result.

[0100] If the target text matching degree is less than or equal to the first matching degree threshold, the preset third display mode can be determined as the target display mode; wherein, the third display mode is the display mode for displaying the translation retrieval result.

[0101] In a specific implementation manner of the embodiment of the present application, if the target matching text includes each preset text material, and the target text matching degree includes each text matching degree corresponding to the target text and each text material respectively; then the target display mode can be determined according to the calculated text matching degrees. Specifically, if there is at least one text matching degree greater than the second matching degree threshold in the target text matching degree, the first display mode can be determined as the target display mode, and if the text matching degree of a certain text material is greater than the second matching degree threshold, it can be considered that the text material is completely matched with the target text; if each text matching degree in the target text matching degree is less than or equal to the second matching degree threshold, and there is at least one text matching degree greater than the first matching degree threshold, the second display mode can be determined as the target display mode; if each text matching degree in the target text matching degree is less than or equal to the first matching degree threshold, the third display mode can be determined as the target display mode.

[0102] Among them, both the above-mentioned first matching degree threshold and the second matching degree threshold can be specifically and contextually set according to actual needs, and the present application does not limit this. Preferably, the first matching degree threshold can be set to 74%, and the second matching degree threshold can be set to 99%.

[0103] In the embodiments of the present application, if the target display mode is the first display mode, it can be considered that there is a text material that exactly matches the target text, and it can be considered that the user is more likely to locate the target text in the corresponding learning materials at this time. Therefore, the first display mode can be to display the text matching result in detail (specifically, the target matching text can be displayed in detail) to better meet the learning needs of the user. In practical applications, if the target matching text belongs to a certain textbook, when displaying the retrieval result, it can enter the textbook (for example, enter the textbook mode) and perform a scan reading on the target matching text. In addition, the unit and page number of the target matching text in the textbook can also be displayed for the user to view. For example, if the target matching text is "I am dancing, dancing, dancing on the street.", and the target matching text "I am dancing, dancing, dancing on the street." belongs to the English textbook for the first semester of the third grade of the People's Education Edition, when displaying the retrieval result, it can enter the English textbook for the first semester of the third grade of the People's Education Edition, perform a scan reading on the target matching text "I am dancing, dancing, dancing on the street.", and the unit and page number of the target matching text "I am dancing, dancing, dancing on the street." in the English textbook for the first semester of the third grade of the People's Education Edition can be displayed, as Figure 2 shown.

[0104] In a specific implementation manner, when entering the learning materials to display the text matching result in detail, the context of the text material that exactly matches can also be displayed, or the corresponding knowledge points in the text material that exactly matches can be displayed. For example, the words, grammar, etc. that are required to be mastered to better assist the user in learning.

[0105] The detailed display method of the text matching result can also be specifically and contextually set according to actual needs, and the present application does not limit this.

[0106] In an embodiment of the present application, if the target display mode is the second display mode, the translation search results and the text matching results can be displayed. Since a text material having a certain similarity with the target text is matched in the learning material at this time, it can be considered that the user may need to locate the target text in the learning material, and may also need to translate the target text. Therefore, the translation search results and the text matching results can be displayed at the same time to facilitate the user to view the translation search results and the text matching results at the same time. Specifically, when the second display mode is used to display the search results, the translation search results can be displayed in detail, and the text matching results can be briefly displayed (specifically, the target matching text can be briefly displayed). For example, the target text is "I am dancing, dancing, dancing.", and its translation search result is "I am dancing, dancing, dancing.". When displaying the translation search results, the target text "I am dancing, dancing, dancing." and its translation search result "I am dancing, dancing, dancing." can be displayed at the same time; and the target matching text is the text material belonging to the third grade English textbook of the People's Education Press, "I am dancing, dancing, dancing on the street.". At this time, the text content of the target matching text "I am dancing, dancing, dancing on the street." and the textbook to which it belongs can be displayed as brief information below the translation search results, such as Figure 3 As shown; and in order to facilitate the user to view the detailed information of the text material, when displaying the text matching results, the target matching text and the preset text matching result entrance can also be displayed; wherein the text matching result entrance can be used to enter the display interface of the text matching results; here, the text matching result entrance can be a control corresponding to the brief information of the target matching text; specifically, the user can enter the display interface of the detailed information of the text matching results (enter the textbook mode) by clicking the control corresponding to the brief information of the target matching text, as shown Figure 4 As shown; alternatively, the text matching result entry may be a preset entry button; specifically, the user may enter a display interface for detailed information of the text matching result by clicking on the preset entry button.

[0107] The detailed display method of the translation search results and the brief display method of the text matching results can be configured in a specific and situational manner according to actual needs, and this application does not limit this.

[0108] In addition, when the target matching text includes each preset text material, and the target text matching degree includes each text matching degree corresponding to each text material respectively, if there are multiple text matching degrees in the target text matching degree that are less than or equal to the second matching degree threshold and there is at least one text matching degree greater than the first matching degree threshold, the target display mode can be determined to be the second display mode. At this time, each matching text material can be sorted, and the text matching results can be displayed according to the display order of each matching text material; among them, the matching text material is any text material in the target matching text that is greater than the first matching degree threshold. Specifically, the text type and page number information of each matching text material can be obtained, and the display order of each text material can be determined according to the text type and page number information of each text material. The text type of the text material can be used to indicate the type of learning material to which the text material belongs. For example, if the text type of a certain text material is a textbook, it can indicate that the text material belongs to a certain textbook; if the text type of a certain text material is a literary book, it can indicate that the text material belongs to a certain literary book; and the page number information of the text material can be used to indicate the page number of the text material in the learning material to which it belongs. For example, if the page number information of a certain text material is 13, it can indicate that the text material is on page 13 of the learning material to which it belongs.

[0109] In a specific implementation manner, the first display order can be determined according to the text type of the matching text material, and the second display order can be determined according to the page number information of the matching text material. According to the first display order and the second display order, the matching text material can be displayed. Specifically, if the first display order of a certain text material (denoted as text material 1) is earlier than the first display order of another text material (denoted as text material 2), text material 1 can be preferentially displayed, and then text material 2 can be displayed; if the first display orders of a certain text material (denoted as text material 3) and another text material (denoted as text material 4) are the same, the display can be performed according to the second display orders of text material 3 and text material 4; if the second display order of text material 3 is earlier than the second display order of text material 4, text material 3 can be preferentially displayed, and then text material 4 can be displayed.

[0110] For example, the text type can be textbook or literary book. When displaying, the matching text materials with the text type of textbook can be preferentially displayed, and then the matching text materials with the text type of literary book can be displayed. If the text matching degree between the target text and a text material belonging to a certain textbook is less than the second matching degree threshold and greater than the first matching degree threshold, and at the same time, if the text matching degree between the target text and a text material belonging to a certain literary book is also less than the second matching degree threshold and greater than the first matching degree threshold, that is, the target text completely matches the text materials belonging to a certain textbook and the text materials belonging to a certain literary book. At this time, the text materials matching the textbook can be preferentially displayed, and then the text materials matching the literary book can be displayed; specifically, if the text type of the matching text material is textbook, the first display order of this text material can be set as a relatively forward order, and if the text type of the matching text material is literary book, the first display order of this text material can be set as a relatively backward order, so that in the case of matching, the matching text materials belonging to the textbook can be preferentially displayed; and if there are multiple text materials whose text matching degrees with the target text are less than the second matching degree threshold and greater than the first matching degree threshold, and there are at least two text materials all from the same learning material, that is, the target text appears at least twice in a certain learning material. At this time, the second display order of each matching text material can be determined according to the page number information of the matching text material; specifically, since users have a high awareness of page numbers, the text materials with earlier page numbers can be preferentially displayed. If the page number of the matching text material is smaller (i.e., more forward in the textbook), its second display order can be set as a more forward order. If the page number of the matching text material is larger, its second display order can be set as a more backward order, so that in the case where the target text appears multiple times in a certain learning material, the matching text materials with earlier page numbers can be preferentially displayed.

[0111] For ease of understanding, the above example will be explained below in combination with a specific application scenario.

[0112] For example, the text matching degree between the target text and text material 1 belonging to the sixth grade English textbook of the People's Education Edition is less than the second matching degree threshold and greater than the first matching degree threshold. At the same time, the text matching degree between the target text and text material 2 belonging to the literary book "The Old Man and the Sea" is less than the second matching degree threshold and greater than the first matching degree threshold. At this time, it can be considered that the target text matches both text material 1 and text material 2; when using the first display method to display the retrieval results, the detailed information of text material 1 and text material 2 can be displayed. And because the text type of text material 1 is textbook, while the text type of text material 2 is literary book, the first display order of text material 1 can be more forward than the first display order of text material 2.

[0113] For another example, the text matching degrees between the target text and Text Material 1 and Text Material 2 belonging to the fourth-grade English textbook of the People's Education Edition are both less than the second matching degree threshold and greater than the first matching degree threshold, that is, the target text matches both Text Material 1 and Text Material 2; since the text types of Text Material 1 and Text Material 2 are the same, the same first display order can be set for Text Material 1 and Text Material 2. However, since the page number information of Text Material 1 is 9 and the page number information of Text Material 2 is 10, the second display order of Text Material 1 can be set as the earlier order, and the second display order of Text Material 2 can be set as the later order.

[0114] For another example, the text matching degrees between the target text and Text Material 1 and Text Material 2 belonging to the fourth-grade English textbook of the People's Education Edition are both less than the second matching degree threshold and greater than the first matching degree threshold. At the same time, the text matching degree between the target text and Text Material 3 belonging to the literary book "The Old Man and the Sea" is also less than the second matching degree threshold and greater than the first matching degree threshold; since the text types of Text Material 1 and Text Material 2 are textbook materials, while the text type of Text Material 3 is a literary book, therefore, the first display order of Text Material 1 and Text Material 2 can be earlier than the first display order of Text Material 3, that is, the first display orders of Text Material 1 and Text Material 2 can be set to be the same; but the page number of Text Material 1 is 9 and the page number of Text Material 2 is 10, then the second display order of Text Material 1 can be earlier than the second display order of Text Material 2; therefore, here, the display can be performed in the display order of showing Text Material 1, Text Material 2, and Text Material 3.

[0115] In addition, when there are multiple matching text materials, considering that the display interface of the terminal device may not be able to display each matching text material at one time, corresponding operation gestures can also be set according to actual needs to view each matching text material. For example, the user can view each matching text material through a sliding operation; or, the user can click a preset switching button to view the next matching text material, as Figure 5 shown.

[0116] Accordingly, when it is necessary to display multiple text materials, a reasonable display order can be set, which can optimize the user's reading experience.

[0117] In a specific implementation manner, if there are multiple text matching degrees greater than the second matching degree threshold in the target text matching degrees, that is, there are multiple text materials that completely match the target text, the display order of the text materials that completely match can be determined with reference to the above method, and the retrieval result can be displayed according to the display order.

[0118] In an embodiment of the present application, if each text matching degree in the target text matching degree is less than or equal to the first matching degree threshold, the preset third display mode can be determined as the target display mode; where the third display mode is the display mode for displaying the translation retrieval result. Here, the translation retrieval result can be displayed in detail, such as Figure 6 as shown. When using the third display mode for display, the translation retrieval result can be displayed in detail with reference to the above method, which will not be elaborated here.

[0119] Accordingly, a more appropriate display mode can be determined according to each text matching degree to better meet the user's needs and help improve the user experience.

[0120] In summary, the embodiment of the present application obtains the target text to be processed; performs a translation retrieval on the target text to obtain a translation retrieval result; performs a text material retrieval on the target text to determine a text matching result. Through the embodiment of the present application, the target text can be automatically subjected to translation retrieval and text material retrieval without the user manually switching to the textbook scanning mode, thereby reducing the user's operation steps and learning costs and helping to improve the user experience.

[0121] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiment of the present application.

[0122] Corresponding to the retrieval method described in the above embodiments, Figure 7 FIG. shows a structural diagram of an embodiment of a retrieval device provided by an embodiment of the present application.

[0123] In an embodiment of the present application, a retrieval device may include:

[0124] A target text acquisition module 701, configured to acquire a target text to be processed;

[0125] A translation retrieval module 702, configured to perform a translation retrieval on the target text to obtain a translation retrieval result;

[0126] A text material retrieval module 703, configured to perform a text material retrieval on the target text to determine a text matching result.

[0127] In a specific implementation manner of an embodiment of the present application, the text matching result includes a target text matching degree and a target matching text;

[0128] The retrieval device may further include:

[0129] A target display mode determination module, configured to determine a target display mode according to the target text matching degree;

[0130] A retrieval result display module for displaying retrieval results in accordance with the target display mode.

[0131] In a specific implementation manner of an embodiment of the present application, the target display mode determination module may include:

[0132] A first display mode determination sub-module for, if the target text matching degree is greater than a preset second matching degree threshold, determining a preset first display mode as the target display mode; wherein, the first display mode is a display mode for displaying the text matching result.

[0133] A second display mode determination sub-module for, if the target text matching degree is less than or equal to the second matching degree threshold and greater than a preset first matching degree threshold, determining a preset second display mode as the target display mode; wherein, the second display mode is a display mode for displaying the translation retrieval result and the text matching result.

[0134] A third display mode determination sub-module for, if the target text matching degree is less than or equal to the first matching degree threshold, determining a preset third display mode as the target display mode; wherein, the third display mode is a display mode for displaying the translation retrieval result.

[0135] In a specific implementation manner of an embodiment of the present application, the retrieval result display module includes:

[0136] A result entry display sub-module for, if the target display mode is the second display mode, displaying the target matching text and a preset text matching result entry; wherein, the text matching result entry is used to enter the display interface of the text matching result.

[0137] In a specific implementation manner of an embodiment of the present application, the target matching text includes preset various text materials, and the target text matching degree includes respective text matching degrees corresponding to the target text and each of the text materials.

[0138] The retrieval result display module may further include:

[0139] An information acquisition sub-module for, if the target display mode is the second display mode, determining the text type and page number information of each matching text material; wherein, the matching text material is any one of the target matching texts that is greater than the first matching degree threshold.

[0140] A display order determination sub-module for determining the display order of each matching text material according to the text type and page number information of each matching text material.

[0141] Display the text matching results according to the display order of each matching text material.

[0142] In a specific implementation manner of the embodiment of the present application, the target text acquisition module may include:

[0143] A scan result acquisition sub-module, configured to acquire the scan result of a preset scanning device;

[0144] A target text determination sub-module, configured to determine the scan result as the target text to be processed.

[0145] In a specific implementation manner of the embodiment of the present application, the target text acquisition module may further include:

[0146] A selected information acquisition sub-module, configured to acquire the selected information of the historical retrieval record;

[0147] A target text determination sub-module, configured to determine the selected information of the historical retrieval record as the target text to be processed.

[0148] Those skilled in the art can clearly understand that for the convenience and conciseness of description, the specific working processes of the above-described devices, modules, and units can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0149] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0150] Figure 8 The schematic block diagram of a terminal device provided by the embodiment of the present application is shown. For the convenience of description, only the parts related to the embodiment of the present application are shown.

[0151] As Figure 8 shown, the terminal device 8 of this embodiment includes: a processor 80, a memory 81, and a computer program 82 stored in the memory 81 and executable on the processor 80. When the processor 80 executes the computer program 82, the steps in the foregoing various retrieval method embodiments are implemented, such as Figure 1 the steps S101 to S103 shown. Alternatively, when the processor 80 executes the computer program 82, the functions of the respective modules / units in the foregoing various device embodiments are implemented, such as Figure 7 the functions of the modules 701 to 703 shown.

[0152] Exemplarily, the computer program 82 may be divided into one or more modules / units, which are stored in the memory 81 and executed by the processor 80 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and these instruction segments are used to describe the execution process of the computer program 82 in the terminal device 8.

[0153] Those skilled in the art can understand that Figure 8 merely examples of the terminal device 8, which do not constitute a limitation on the terminal device 8, may include more or fewer components than shown in the figure, or combine certain components, or different components. For example, the terminal device 8 may further include input / output devices, network access devices, buses, etc.

[0154] The processor 80 may be a central processing unit (CPU), or may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0155] The memory 81 may be an internal storage unit of the terminal device 8, such as the hard disk or memory of the terminal device 8. The memory 81 may also be an external storage device of the terminal device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 8. Further, the memory 81 may also include both the internal storage unit and the external storage device of the terminal device 8. The memory 81 is used to store the computer program and other programs and data required by the terminal device 8. The memory 81 may also be used to temporarily store data that has been output or will be output.

[0156] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-mentioned division of each functional unit and module is used as an example. In actual applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiments can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0157] In the above embodiments, the descriptions of the various embodiments have their own emphases. For the parts not detailed or recorded in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0158] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or by a combination of computer software and electronic hardware. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of this application.

[0159] In the embodiments provided in this application, it should be understood that the disclosed device / terminal device and method can be implemented in other ways. For example, the device / terminal device embodiments described above are only illustrative. For example, the division of the module or unit is only a logical function division, and there can be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the couplings or direct couplings or communication connections retrieved or discussed with each other can be through some interfaces, and the indirect couplings or communication connections of the devices or units can be in electrical, mechanical or other forms.

[0160] The units described as separate components may or may not be physically separated, and the components retrieved as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0161] In addition, each functional unit in various embodiments of the present application may be integrated into one processing unit, may exist separately as individual physical units, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit.

[0162] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on such an understanding, all or part of the processes in the above-mentioned embodiment methods of the present application can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable storage medium does not include electrical carrier signals and telecommunication signals.

[0163] The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A retrieval method, characterized in that, Including: Obtain a target text to be processed; Conduct a translation retrieval on the target text to obtain a translation retrieval result; Conduct a text material retrieval on the target text to determine a text matching result; the text matching result includes a target text matching degree and a target matching text; If the target text matching degree is greater than a preset second matching degree threshold, determine a preset first display mode as the target display mode; wherein, the first display mode is a display mode for displaying the text matching result; if the target text matching degree is less than or equal to the second matching degree threshold and greater than a preset first matching degree threshold, determine a preset second display mode as the target display mode; wherein, the second display mode is a display mode for displaying the translation retrieval result and the text matching result; if the target text matching degree is less than or equal to the first matching degree threshold, determine a preset third display mode as the target display mode; wherein, the third display mode is a display mode for displaying the translation retrieval result; Display the retrieval result according to the target display mode.

2. The retrieval method according to claim 1, characterized in that The displaying the retrieval result according to the target display mode includes: If the target display mode is the second display mode, display the target matching text and a preset text matching result entry; wherein, the text matching result entry is used to enter the display interface of the text matching result.

3. The retrieval method according to claim 1, characterized in that The target matching text includes preset various text materials, and the target text matching degree includes respective text matching degrees corresponding to the target text and each of the various text materials; The displaying the retrieval result according to the target display mode includes: If the target display mode is the second display mode, determine the text type and page number information of each matching text material; wherein, the matching text material is any text material in the target matching text that is greater than the first matching degree threshold; Determine the display order of each matching text material according to the text type and page number information of each matching text material; Display the text matching result according to the display order of each matching text material.

4. The retrieval method according to any one of claims 1 to 3, characterized in that, The obtaining the target text to be processed includes: Obtain the scanning result of a preset scanning device; Determine the scanning result as the target text to be processed.

5. The retrieval method according to any one of claims 1 to 3, characterized in that The obtaining the target text to be processed includes: Obtain the selected information of the historical retrieval record; Determine the selected information of the historical retrieval record as the target text to be processed.

6. A retrieval device, characterized in that, Including: A target text obtaining module, configured to obtain a target text to be processed; A translation retrieval module, configured to conduct a translation retrieval on the target text to obtain a translation retrieval result; A text material retrieval module, configured to conduct a text material retrieval on the target text to determine a text matching result; the text matching result includes a target text matching degree and a target matching text; A target display mode determination module, configured to determine a preset first display mode as the target display mode if the matching degree of the target text is greater than a preset second matching degree threshold; wherein, the first display mode is a display mode for displaying the text matching result; if the matching degree of the target text is less than or equal to the second matching degree threshold and greater than a preset first matching degree threshold, determine a preset second display mode as the target display mode; wherein, the second display mode is a display mode for displaying the translation retrieval result and the text matching result; if the matching degree of the target text is less than or equal to the first matching degree threshold, determine a preset third display mode as the target display mode; wherein, the third display mode is a display mode for displaying the translation retrieval result. A retrieval result display module, configured to display the retrieval result according to the target display mode.

7. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, the steps of the retrieval method according to any one of claims 1 to 5 are implemented.

8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the retrieval method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Long keyword string matching method and device and computer readable storage medium

    CN116108230A