An information retrieval method, an intelligent terminal and a computer readable storage medium

By obtaining text strings from instruction files, determining the retrieval database using historical string sets and set similarity, and combining this with a keyword database, the problem of inaccurate retrieval results caused by homophones with different meanings in voice interaction is solved, achieving higher retrieval accuracy.

CN114647710BActive Publication Date: 2026-01-23SHENZHEN TCL NEW-TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202011494551.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-17
Publication Date
2026-01-23
Estimated Expiration
2040-12-17

AI Technical Summary

Technical Problem

In existing voice interaction technologies, the accuracy of search results based on homophones with different meanings is low, resulting in inaccurate search results.

Method used

By obtaining text strings from the instruction file, determining the retrieval database using a preset historical string set and set similarity, and employing a keyword-based retrieval method, the accuracy of retrieval results is improved.

Benefits of technology

It improves the accuracy of voice-interactive search results and meets the diverse query needs of users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114647710B_ABST
    Figure CN114647710B_ABST
Patent Text Reader

Abstract

The application discloses an information retrieval method, an intelligent terminal and a computer readable storage medium. The method comprises the following steps: acquiring an instruction file and extracting a text string in the instruction file; determining a historical string set corresponding to each text string according to a set similarity between the text string and each historical string set; determining a retrieval database corresponding to the instruction file according to a set weight value corresponding to the historical string set; and retrieving the retrieval database according to the text string to determine retrieval data corresponding to the instruction text. The application can improve the accuracy of the retrieval result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to an information retrieval method, a smart terminal, and a storage medium. Background Technology

[0002] With the rapid development of natural language processing technology, voice interaction technology is becoming increasingly mature. Voice assistants are now widely used in various IoT devices such as mobile phones, TVs, and computers, covering various fields including movies, weather inquiries, device control, shopping, and consumption. Users can use voice to search for large amounts of data, check the weather, and watch videos.

[0003] However, voice interaction involves too many fields and user queries are diverse. Different fields may contain words with the same characters but different meanings. For example, the noun "azalea" can refer to the azalea flower in the plant kingdom, the cuckoo bird in the animal kingdom, and even a personal name. Therefore, when searching based on this type of noun, the search results are often less accurate. Summary of the Invention

[0004] The main objective of this invention is to provide an information retrieval method, a smart terminal, and a computer-readable storage medium, aiming to solve the problem of low accuracy of retrieval results in the prior art.

[0005] To achieve the above objectives, the present invention provides an information retrieval method, which includes the following steps:

[0006] Obtain the instruction file and extract the text string from the instruction file;

[0007] Based on the similarity between the text string and the preset sets of historical strings, the set of historical strings corresponding to each text string is determined.

[0008] The retrieval database corresponding to the instruction file is determined based on the set weight value corresponding to the historical string set;

[0009] Based on the text string, the search database is searched to determine the search data corresponding to the instruction text.

[0010] Optionally, in the information retrieval method, the instruction file includes an audio file; extracting the text string from the instruction file specifically includes:

[0011] The audio file is subjected to speech recognition to obtain the corresponding speech text;

[0012] According to the preset word segmentation rules, the speech text is segmented into several text strings.

[0013] Optionally, the information retrieval method further includes, before determining the historical string set corresponding to each text string based on the set similarity between the text string and preset historical string sets:

[0014] Retrieve historical strings;

[0015] Cluster the historical strings to obtain multiple sets of historical strings;

[0016] For each set of historical strings, a set weight value corresponding to each set of historical strings is determined based on the historical strings in that set.

[0017] Optionally, in the information retrieval method, determining the set weight value corresponding to each historical string set based on the historical strings in that historical string set specifically includes:

[0018] For each set of historical strings, the set weight value corresponding to each set of historical strings is determined based on the number of times the same historical string is repeated in the set.

[0019] Optionally, in the information retrieval method, determining the set weight value corresponding to each historical string set based on the historical strings in that historical string set specifically includes:

[0020] For each set of historical strings, the sum of the text string weights corresponding to different historical strings in the set is calculated to determine the set weight value corresponding to each set of historical strings.

[0021] Optionally, in the information retrieval method, determining the retrieval database corresponding to the instruction file based on the set weight value corresponding to the historical string set specifically includes:

[0022] The text strings are sorted according to the set weight values ​​corresponding to each text string to obtain a text string sequence.

[0023] Based on the order of each text string in the text string sequence, determine whether it corresponds to a set of preset intervention keywords.

[0024] When a text string corresponding to the intervention keyword exists, the retrieval database corresponding to the intervention keyword is used as the retrieval database corresponding to the text string.

[0025] Optionally, in the information retrieval method, the step of searching the retrieval database based on the text string to determine the retrieval data corresponding to the instruction text specifically includes:

[0026] Based on a preset keyword library, the text string is filtered to generate keywords;

[0027] Calculate the similarity between the keywords and each search result in the search database;

[0028] The search data corresponding to the highest similarity value is used as the search data corresponding to the text string.

[0029] Optionally, the information retrieval method, after retrieving the retrieval database based on the text string to determine the retrieval data corresponding to the instruction text, further includes:

[0030] Save the text string as a history string.

[0031] In addition, to achieve the above objectives, the present invention also provides a smart terminal, wherein the smart terminal includes: a memory, a processor, and an information retrieval program stored in the memory and executable on the processor, wherein when the information retrieval program is executed by the processor, it implements the steps of the information retrieval method described above.

[0032] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an information retrieval program, which, when executed by a processor, implements the steps of the information retrieval method described above.

[0033] This invention first acquires the instruction text, extracts the text strings within it, and then determines the corresponding search database based on the historical string set corresponding to the text strings. Based on the determined search database, a search is then performed on the search database according to the text strings to obtain the search data. Since the historical string set in this invention is generated based on the history of user-issued instruction texts, it can represent the user's areas of interest at a certain time period. Because the search database corresponds to the historical string set, performing a search based on the user's areas of interest can effectively improve the accuracy of the search results. Attached Figure Description

[0034] Figure 1 This is a flowchart of a preferred embodiment of the information retrieval method of the present invention;

[0035] Figure 2 This is a flowchart illustrating the process of determining and retrieving a database in a preferred embodiment of the smart terminal of the present invention.

[0036] Figure 3 This is a schematic diagram of the operating environment of a preferred embodiment of the smart terminal of the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this invention clearer and more explicit, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.

[0038] The information retrieval method described in the preferred embodiment of the present invention, such as... Figure 1 As shown, the information retrieval method includes the following steps:

[0039] Step S100: Obtain the instruction file and extract the text string from the instruction file.

[0040] Specifically, this embodiment describes a smart terminal as the execution subject. The user issues an instruction file through the smart terminal, and the smart terminal obtains the instruction file and sends it to the information retrieval program.

[0041] Furthermore, the instruction file sent by the user can be in text format or in audio format.

[0042] If the instruction text is an audio file, then the audio file is subjected to speech recognition to obtain the corresponding speech text; according to the preset word segmentation rules, the speech text is segmented to obtain several text strings.

[0043] The smart terminal is equipped with a microphone and an information retrieval program. The microphone can capture the user's voice and provides an operation interface to the information retrieval program; the information retrieval program is used to execute the information retrieval method of this embodiment. When the user wants to play a program, for example, program A, they start recording mode and say, "Play program A." The microphone starts recording mode, which can be turned on and off externally. After the voice is captured, it is saved as an audio file. The information retrieval program obtains the saved audio file, then calls the Automatic Speech Recognition (ASR) function to convert the acquired voice information into text, and then performs word segmentation to extract the text string.

[0044] Step S200: Determine the historical string set corresponding to each text string based on the set similarity between the text string and the preset historical string sets.

[0045] Specifically, a historical string set is a dataset obtained by clustering historical strings. Each historical string set contains several historical strings. Historical strings refer to the text strings used by the information retrieval program based on previous user commands. After obtaining the text strings, the similarity between each text string and each historical string set is calculated. Similarity can be calculated using methods such as cosine similarity or Euclidean distance, and the calculation objects can be each text string compared to each historical string in each historical string set.

[0046] Taking the cosine similarity calculation method as an example, the first implementation of this embodiment is as follows: If the calculation is performed on a text string A and a set of historical strings A, each historical string in the set of historical strings A, such as historical string a, historical string b, and historical string c, is taken as the calculation object. According to the cosine similarity calculation formula, the string similarity between the text string A and historical strings a, b, and c is calculated respectively. Then, the maximum value among these string similarities is taken as the set similarity between the text string A and the set of historical strings A. In this way, the set similarity between the historical string A and the set of historical strings A, B, and C is calculated sequentially. Then, the set of historical strings corresponding to the maximum value among these set similarities is taken as the set of historical strings corresponding to the text string.

[0047] In the second embodiment of this example, if calculations are performed on text string A and historical string set A, the historical strings in the historical string set are first filtered to determine the historical string that can represent the historical string set. To distinguish it from other historical strings, it is named the representative string. For example, historical string set A contains historical string A, historical string B, and historical string C. The string similarity between historical string A and historical string B, the string similarity between historical string A and historical string C, and the string similarity between historical string B and historical string C are calculated. Then, among these string similarity values, the historical string with a value greater than a preset string similarity threshold and / or the highest string similarity value is selected. For example, the string similarity between historical string A and historical string B is 80%, the string similarity between historical string A and historical string C is 90%, and the string similarity between historical string B and historical string C is 50%. The preset string similarity threshold is 70%. Therefore, there are two strings with a string similarity exceeding the threshold corresponding to historical string A, while there is only one string with a similarity exceeding the threshold for historical string B and historical string C. Thus, historical string A is selected as the representative string. The similarity between text string A and representative string A is then used as the set similarity between the text string and the historical string set A. Furthermore, the method for determining the representative string is not limited to the examples listed in this embodiment; sorting the string similarity between historical strings can also achieve the same goal. The historical string set corresponding to the highest set similarity is then used as the historical string set corresponding to the text string.

[0048] The history string set is generated based on the text of the instructions previously issued by the user, so in a sense, it represents the user's preferences for issuing instructions and the categories of areas of interest.

[0049] Step S300: Determine the retrieval database corresponding to the instruction file based on the set weight value corresponding to the historical string set.

[0050] Specifically, a set weight value is pre-set for each historical string set. Once the historical string set corresponding to each text string is determined, the corresponding retrieval database is determined based on its corresponding set weight value.

[0051] First, there are multiple scenarios for the set weight value corresponding to the historical string set.

[0052] In the first implementation of this embodiment, the set weight value is preset and fixed. In the second implementation of this embodiment, the set weight value is set based on the historical strings in the historical string set. The specific process is as follows:

[0053] B10, retrieve historical strings.

[0054] Specifically, the history string refers to the text string used by the information retrieval program based on previous user commands. Therefore, the retrieved history string can be a text string from a specific time period or all previous text strings. Each time a user submits a command and extracts its text string, the information retrieval program stores it as a history string. Furthermore, the history string may also include strings frequently used by the user when using other programs; for example, the history string can be obtained from the history records of video software.

[0055] B20, cluster the historical strings to obtain multiple sets of historical strings.

[0056] Specifically, unsupervised or supervised clustering algorithms are used to cluster historical strings, resulting in multiple sets of historical strings. If a supervised clustering algorithm is used, the preset categories can be "movies," "TV series," "novels," etc. Taking videos as an example, if a supervised clustering algorithm is used, movies are pre-labeled as 1, TV series as 2, variety shows as 3, and online courses as 4. Then, based on labels 1 to 4, historical strings are clustered to obtain sets of historical strings.

[0057] B30, for each of the historical string sets, determine the set weight value corresponding to each of the historical string sets based on the historical strings in the historical string set.

[0058] Specifically, the clustered historical string set contains several historical strings. This implementation determines the set weight value corresponding to each historical string set based on the historical strings in this set. There are many ways to determine the set weight value, such as based on the weight value of the historical string itself, based on the frequency of occurrence of the historical string, or based on big data. This embodiment preferably uses two methods to determine the set weight value.

[0059] The first method is to determine the set weight value corresponding to each set of historical strings based on the number of times the same historical string is repeated in the set.

[0060] For example, in the historical string set corresponding to "movies," the number of times the historical string with the same content is repeated is 10, while in the historical string set corresponding to "variety shows," the number of times the historical string with the same content is repeated is 20. This indicates that users pay more attention to content in the "variety shows" category, so the set weight value corresponding to "variety shows" is set higher than the set weight value corresponding to "movies."

[0061] In addition, when setting weight values, a preset weight value allocation range can be set, such as 0 to 100. Then, based on the number of times the same historical string is repeated in the historical string set, the set weight value corresponding to each historical string set is assigned.

[0062] The second approach is to calculate the sum of the text string weights corresponding to different historical strings in each set of historical strings, and then determine the set weight value corresponding to each set of historical strings.

[0063] Specifically, each historical string has a corresponding string weight value, which is determined by the frequency of that historical string among all historical strings. After clustering, for each set of historical strings, the set weight value is determined by the sum of the weights corresponding to the historical strings within it. Therefore, if a set of historical strings contains historical strings with higher string weight values, it indicates that the domain covered by that set is more likely to be the domain the user wants to search for.

[0064] Using the above method, the set weight value corresponding to each text string can be determined based on the set weight value corresponding to the historical strings. In the first implementation of this embodiment, different retrieval databases are pre-defined for each set of historical strings. After determining the set weight value corresponding to each text string, the retrieval database corresponding to the largest set weight value is selected as the retrieval database corresponding to the instruction text.

[0065] However, setting up a different search database for each set of historical strings is quite complex, and since users' historical strings are constantly updated, the first implementation method is time-consuming. Therefore, in the second implementation of this embodiment, instead of setting up a corresponding search database for each set of historical strings, the search database is determined by intervening keywords. See [reference] Figure 2 The specific process is as follows:

[0066] C10, sort the text strings according to the set weight values ​​corresponding to each text string to obtain a text string sequence.

[0067] C20, based on the order of each text string in the text string sequence, determine whether it corresponds to a preset number of intervention keywords.

[0068] Specifically, multiple intervention keywords are pre-defined, which are keywords corresponding to various pre-defined fields, such as "movie" and "variety show" mentioned above. Then, based on the order of each text string in the text string sequence, it is sequentially determined whether it corresponds to a text string of the pre-defined intervention keywords. For example, if the text string sequence is "[I][Gone with the Wind][Want to Watch]", then it is sequentially determined whether "[I]" has a corresponding intervention keyword. If not, it is further determined whether "[Gone with the Wind]" has a corresponding intervention keyword. If it does, it is "movie".

[0069] C30, when a text string corresponding to the intervention keyword exists, the retrieval database corresponding to the intervention keyword is used as the retrieval database corresponding to the text string.

[0070] Specifically, when such conditions exist, such as the example above of "Gone with the Wind" and "movie", the search database corresponding to the intervention keyword, that is, the database containing search data related to movies, will be used as the search database corresponding to the text string.

[0071] Since the set weight value corresponding to the historical string set represents the user's level of interest in that area of ​​interest, when a certain command text corresponds to the highest weight value for a particular historical string, it means that the object the user wants to search for is likely within the search database corresponding to that historical string set.

[0072] Step S400: Based on the text string, search the retrieval database to determine the retrieval data corresponding to the text string.

[0073] Specifically, after determining the search database, the database is searched based on the text string in the instruction text to determine the search data corresponding to the instruction text. Many search methods are currently available. In this embodiment, a keyword-based search method is used in addition to conventional search methods. The specific process is as follows:

[0074] Based on a preset keyword library, the text string is filtered to generate keywords;

[0075] Calculate the retrieval similarity between the keywords and each retrieval data in the retrieval database;

[0076] Based on the search similarity, the search data corresponding to the instruction text is determined.

[0077] Specifically, a keyword database is pre-defined, containing multiple keywords. Since user commands are typically a single sentence, and only keywords truly contribute to the search, for example, a command like "I want to see pictures of azaleas" only contains the words "azalea" and "pictures." Therefore, to reduce search time and improve efficiency, based on the pre-defined keyword database, the text string is first filtered to obtain the keywords that contribute to the search. Then, the search similarity between the keywords and the search data is calculated, and the search data with the highest similarity score is used as the search data corresponding to the command text. Furthermore, the search data may also exist and be sorted based on search similarity before being output.

[0078] Furthermore, to improve efficiency, in this embodiment, the information retrieval program can be divided into two parts: one part is installed on the smart terminal, mainly used to collect command text; the other part is installed in the cloud, mainly used to determine the retrieval data based on the command text. However, depending on the computing power of the user terminal, the division of labor between the terminal and the cloud can be appropriately adjusted, and even a single smart terminal can complete the entire process of this embodiment.

[0079] Furthermore, such as Figure 2 As shown, based on the above information retrieval method, the present invention also provides a smart terminal, which includes a processor 10, a memory 20 and a display 30. Figure 2 Only some components of the smart terminal are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.

[0080] In some embodiments, the memory 20 may be an internal storage unit of the smart terminal, such as a hard drive or memory. In other embodiments, the memory 20 may be an external storage device of the smart terminal, such as a plug-in hard drive, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the smart terminal. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the smart terminal, such as the program code installed on the smart terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores an information retrieval program 40, which can be executed by the processor 10 to implement the information retrieval method of this application.

[0081] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the information retrieval method.

[0082] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the smart terminal and to display a visual user interface. The components 10-30 of the smart terminal communicate with each other via a system bus.

[0083] In one embodiment, when the processor 10 executes the information retrieval program 40 in the memory 20, the following steps are performed:

[0084] Obtain the instruction file and extract the text string from the instruction file;

[0085] Based on the similarity between the text string and the preset sets of historical strings, the set of historical strings corresponding to each text string is determined.

[0086] The retrieval database corresponding to the instruction file is determined based on the set weight value corresponding to the historical string set;

[0087] Based on the text string, the search database is searched to determine the search data corresponding to the instruction text.

[0088] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores an information retrieval program, which, when executed by a processor, implements the steps of the information retrieval method described above.

[0089] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware (such as a processor, controller, etc.). The program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The computer-readable storage medium can be a memory, magnetic disk, optical disk, etc.

[0090] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.

Claims

1. An information retrieval method, characterized in that, The information retrieval method includes: Obtain the instruction file and extract the text string from the instruction file; Based on the similarity between the text string and the preset sets of historical strings, the set of historical strings corresponding to each text string is determined. The set weight value corresponding to the text string is determined based on the set weight value corresponding to the historical string set; Based on the set weight value corresponding to the text string, determine the retrieval database corresponding to the instruction file; Based on the text string, the search database is searched to determine the search data corresponding to the instruction text; Before determining the historical string set corresponding to each text string based on the set similarity between the text string and each preset historical string set, the method further includes: Retrieve historical strings; Cluster the historical strings to obtain multiple sets of historical strings; For each of the historical string sets, a set weight value corresponding to each historical string set is determined based on the historical strings in that set. The step of determining the historical string set corresponding to each text string based on the similarity between the text string and preset historical string sets specifically includes: The similarity between the text string and each historical string in the preset historical string set is calculated according to the cosine similarity calculation formula. The highest string similarity among the multiple string similarities is taken as the set similarity between the text string and the set of historical strings; The set of historical strings corresponding to the set with the highest set similarity among the multiple sets is taken as the set of historical strings corresponding to the text string; The step of determining the retrieval database corresponding to the instruction file based on the set weight value corresponding to the historical string set specifically includes: The text strings are sorted according to the set weight values ​​corresponding to each text string to obtain a text string sequence. Based on the order of each text string in the text string sequence, determine in turn whether there is a text string that corresponds to a number of preset intervention keywords; When a text string corresponding to the intervention keyword exists, the retrieval database corresponding to the intervention keyword is used as the retrieval database corresponding to the text string.

2. The information retrieval method according to claim 1, characterized in that, The instruction file includes an audio file; the extraction of text strings from the instruction file specifically includes: The audio file is subjected to speech recognition to obtain the corresponding speech text; According to the preset word segmentation rules, the speech text is segmented into several text strings.

3. The information retrieval method according to claim 1, characterized in that, For each of the historical string sets, determining the set weight value corresponding to each historical string set based on the historical strings in that set specifically includes: For each set of historical strings, the set weight value corresponding to each set of historical strings is determined based on the number of times the same historical string is repeated in the set.

4. The information retrieval method according to claim 1, characterized in that, For each of the historical string sets, determining the set weight value corresponding to each historical string set based on the historical strings in that set specifically includes: For each set of historical strings, the sum of the text string weights corresponding to different historical strings in the set is calculated to determine the set weight value corresponding to each set of historical strings.

5. The information retrieval method according to claim 1, characterized in that, The step of searching the retrieval database based on the text string to determine the retrieval data corresponding to the instruction text specifically includes: Based on a preset keyword library, the text string is filtered to generate keywords; Calculate the similarity between the keywords and each search result in the search database; The search data corresponding to the highest similarity value is used as the search data corresponding to the text string.

6. The information retrieval method according to any one of claims 1-5, characterized in that, After searching the retrieval database based on the text string to determine the retrieval data corresponding to the instruction text, the method further includes: Save the text string as a history string.

7. A smart terminal, characterized in that, The smart terminal includes: a memory, a processor, and an information retrieval program stored in the memory and executable on the processor. When the information retrieval program is executed by the processor, it implements the steps of the information retrieval method as described in any one of claims 1-6.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an information retrieval program, which, when executed by a processor, implements the steps of the information retrieval method as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Speech interaction method and device

    CN105389400A