Information retrieval method and device, electronic equipment and computer readable storage medium

By performing word-shaped expansion processing on the keywords in the query statement, the problem of inaccurate expression of the user input query statement is solved, the accuracy of information retrieval is improved, and the accuracy and relevance of information retrieval is enhanced.

CN119003698APending Publication Date: 2024-11-22ALIBABA (CHINA) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411092016.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-08
Publication Date
2024-11-22

AI Technical Summary

Technical Problem

The query statements entered by users often have problems with inaccurate expression, resulting in low accuracy of information retrieval, and it is difficult for the existing technology to effectively deal with defects such as spelling errors and word tense and number changes.

Method used

By performing word-shaped expansion processing on the keywords in the query statement, deformed words are obtained, information retrieval is performed, the possibility of inaccurate expressions is reduced, and the accuracy of information retrieval is improved.

Benefits of technology

Through word shape expansion processing, the inaccuracy of the expression of the query statement can be effectively reduced, the accuracy of information retrieval can be improved, and the ability to identify related information can be enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119003698A_ABST
    Figure CN119003698A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an information retrieval method and device, electronic equipment and a computer readable storage medium. According to the embodiment of the invention, after the query statement is obtained, the to-be-expanded word in the query statement can be obtained, and the word form expansion processing is carried out according to the to-be-expanded word to obtain the deformed word of the to-be-expanded word, so that information retrieval is carried out based on the obtained deformed word to obtain the retrieval result of the query statement. According to the embodiment of the invention, the possibility of inaccurate expression is reduced by performing word form expansion on the key words in the query statement, so that the accuracy of information retrieval can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and more specifically, to an information retrieval method, device, electronic device and computer-readable storage medium. Background Art

[0002] As the amount of data continues to grow, information retrieval becomes more and more important. However, the query statements entered by users sometimes have inaccurate expressions, which reduces the accuracy of information retrieval. Summary of the invention

[0003] In view of this, embodiments of the present invention provide an information retrieval method, device, electronic device and computer-readable storage medium to reduce the possibility of inaccurate query statement expression by expanding the word form of key words in the query statement, thereby improving the accuracy of information retrieval.

[0004] In a first aspect, an embodiment of the present invention discloses an information retrieval method, the method comprising:

[0005] Determine the words to be expanded in the initial query statement;

[0006] Performing word form expansion processing according to the words to be expanded to obtain a first word set, wherein the first word set includes the inflected words to be expanded;

[0007] Information retrieval is performed based on the first word set to obtain retrieval results of the initial query statement.

[0008] Optionally, performing word form expansion processing according to the words to be expanded to obtain a first word set includes:

[0009] Performing stem restoration processing on the words to be expanded to obtain a second word set, wherein the second word set includes the stems of the words to be expanded;

[0010] Perform word form expansion processing on the second word set to obtain the first word set.

[0011] Optionally, determining the words to be expanded in the initial query sentence includes:

[0012] Performing part-of-speech tagging on each word in the initial query sentence to determine the part-of-speech information of each word;

[0013] The word whose part-of-speech information is a target part-of-speech is determined as the word to be expanded, and the target part-of-speech is a noun or a verb.

[0014] Optionally, performing information retrieval according to the first word set to obtain a retrieval result of the initial query statement includes:

[0015] Determining an intent classification result of the initial query statement;

[0016] Filtering target words from the first word set according to the intention classification result;

[0017] The search result is obtained according to the target word.

[0018] Optionally, the intention classification result includes a noun classification result and a verb classification result;

[0019] The step of selecting a target word from the first word set according to the intention classification result includes:

[0020] In response to the intention classification result being a noun classification result, determining the inflected word whose part of speech information is a noun as the target word;

[0021] In response to the intention classification result being a verb classification result, the inflected word whose part of speech information is a verb is determined as the target word.

[0022] Optionally, determining the intent classification result of the initial query statement includes:

[0023] The intent classification result is obtained according to the initial query statement and a pre-trained natural language processing model, wherein the natural language processing model is trained based on a training sample set, and each training sample in the training sample set includes a sample query statement and intent classification information of the sample query statement.

[0024] Optionally, performing word form expansion processing on the second word set includes:

[0025] In response to the part-of-speech information of the stem being a verb, the inflected word is acquired based on a preset word form expansion rule.

[0026] Optionally, the method further comprises:

[0027] Get the predetermined query statement;

[0028] In response to the predetermined query statement being in a non-target language, the predetermined query statement is converted into an initial query statement, where the initial query statement is a query statement in a target language.

[0029] In a second aspect, an embodiment of the present invention discloses an information retrieval device, the device comprising:

[0030] A word determination unit, used to determine the words to be expanded in the initial query sentence;

[0031] A processing unit, configured to perform word form expansion processing according to the words to be expanded, and obtain a first word set, wherein the first word set includes the inflected words to be expanded;

[0032] Information retrieval is performed based on the first word set to obtain retrieval results of the initial query statement.

[0033] A retrieval unit is used to perform information retrieval based on the first word set to obtain a retrieval result of the initial query statement.

[0034] A retrieval unit is used to perform information retrieval based on the first word set to obtain a retrieval result of the initial query statement.

[0035] In a third aspect, an embodiment of the present invention discloses an electronic device, comprising a memory and a processor, wherein the memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement a method as described in any one of the first aspects.

[0036] In a fourth aspect, an embodiment of the present invention discloses a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method as described in any one of the first aspects is implemented.

[0037] In a fifth aspect, an embodiment of the present invention discloses a computer program product, which includes a computer program / instructions. When the computer program / instructions are executed by a processor, the method as described in any one of the first aspects is implemented.

[0038] After obtaining the query statement, the embodiment of the present invention can obtain the words to be expanded in the query statement, and perform word form expansion processing according to the words to be expanded to obtain the inflected words of the words to be expanded, so as to perform information retrieval based on the obtained inflected words to obtain the retrieval results of the query statement. The embodiment of the present invention reduces the possibility of inaccurate expression by performing word form expansion on the key words in the query statement, thereby improving the accuracy of information retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The above and other objects, features and advantages of the present invention will become more apparent through the following description of the embodiments of the present invention with reference to the accompanying drawings, in which:

[0040] Figure 1 is a flow chart of an information retrieval method according to a first embodiment of the present invention;

[0041] Figure 2 is a flow chart of determining a word to be expanded in an optional implementation manner of an embodiment of the present invention;

[0042] Figure 3 is a flow chart of obtaining search results in an optional implementation of an embodiment of the present invention;

[0043] Figure 4 is a flow chart of an information retrieval method according to a second embodiment of the present invention;

[0044] Figure 5 is a schematic diagram of an information retrieval device according to a third embodiment of the present invention;

[0045] Figure 6 is a schematic diagram of an electronic device according to a fourth embodiment of the present invention. DETAILED DESCRIPTION

[0046] The present application is described below based on embodiments, but the present application is not limited to these embodiments. In the detailed description of the present application below, some specific details are described in detail. It is possible for those skilled in the art to fully understand the present application without the description of these details. In order to avoid confusing the essence of the present application, known methods, processes, flows, components and circuits are not described in detail.

[0047] In addition, persons of ordinary skill in the art will appreciate that the drawings provided herein are for illustration purposes and are not necessarily drawn to scale.

[0048] Unless the context clearly requires otherwise, the words "include", "comprising" and similar words throughout the application should be interpreted as including rather than exclusive or exhaustive; that is, the meaning is "including but not limited to".

[0049] In the description of this application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In addition, in the description of this application, unless otherwise specified, the meaning of "plurality" is two or more.

[0050] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0051] Information retrieval is an important way for users to conduct information search and obtain information retrieval results. Information retrieval is one of the important means for users to obtain the information they need, but users are more likely to make spelling errors when performing information retrieval, such as spelling running as runing, or not considering the tense changes, singular and plural changes of words, etc., and existing information retrieval technology cannot handle the above defects well. Therefore, when performing information retrieval, some information that is highly related to the query statement cannot be correctly identified, resulting in low accuracy of information retrieval.

[0052] The execution subject of the embodiment of the present invention may be an existing electronic device, including a smart terminal, such as a smart phone, a smart wearable device (including a smart watch, a smart headset, a smart glasses, etc.), a tablet computer, a server, etc. The embodiment of the present invention is described by taking a smart terminal (hereinafter referred to as a terminal) as an example.

[0053] Figure 1 FIG. 1 is a flow chart of the information retrieval method according to the first embodiment of the present invention. Figure 1 As shown, the method of this embodiment includes the following steps:

[0054] Step S100: determining the words to be expanded in the initial query sentence.

[0055] In daily life, the terminal can obtain the query statement input by the user in various ways. For example, the terminal can obtain the query statement input by the user by recognizing the voice information sent by the user, or by receiving the text information input by the user through the display device (including the text information obtained by optical character recognition of the content handwritten by the user through the display device and the text information input through the key virtual keyboard displayed in the display device), or by receiving the text information input by the user through the key physical keyboard, or by other various existing methods, which are not limited in this embodiment.

[0056] After obtaining the query statement input by the user, the terminal can determine the query statement as the initial query statement and determine the words to be expanded in the initial query statement. The words to be expanded are key words in the initial query statement, which can summarize or express the intention of the initial query statement. Any grammatical category can be expressed by the combination of nouns and verbs, so the nouns and verbs in the initial query statement can be determined as the words to be expanded in the initial query statement.

[0057] Figure 2 FIG. 1 is a flow chart of determining a word to be expanded in an optional implementation of an embodiment of the present invention. Figure 2As shown, in an optional implementation of this embodiment, step S100 may include the following steps:

[0058] Step S110, performing part-of-speech tagging on each word in the initial query sentence to determine the part-of-speech information of each word.

[0059] Part-Of-Speech tagging (POS tagging), also known as grammatical tagging or word-category disambiguation, is a text data processing technology that determines the part-of-speech information of a word based on its meaning and context.

[0060] In this step, the terminal can segment the initial query sentence, obtain each word in the initial query sentence, and perform part-of-speech tagging on each word to determine the word form information of each word. Optionally, after removing the stop words in the initial query sentence, each word can be tagged with part-of-speech to determine the part-of-speech information of each word to improve the efficiency of part-of-speech tagging.

[0061] According to actual needs, the terminal can determine the words in the initial query statement based on the co-occurrence probability between adjacent characters based on a pre-trained traditional classification model, such as a hidden Markov model (HMM), a conditional random field (CRF), etc., or segment the initial query statement based on a pre-set dictionary to obtain the words in the initial query statement. It can also be based on a pre-trained deep learning model, such as a recurrent neural network (RNN), a long short-term memory network (LSTM), a Transformer, etc., based on sequence labeling technology to determine the words in the initial query statement, which is not limited in this embodiment. It is easy to understand that the above-mentioned traditional classification model and deep learning model are both natural language processing models.

[0062] The essence of part-of-speech tagging is to classify words into corresponding categories. Therefore, in this embodiment, any model that can achieve classification can be used to obtain the part-of-speech information of words. Specifically, the terminal can tag each word with part-of-speech based on the correspondence between the pre-set dictionary and the part-of-speech to determine the part-of-speech information of each word, or it can determine the part-of-speech information of each word based on a pre-trained natural language processing model, such as a hidden Markov model, a conditional random field, a recurrent neural network, a Transformer, etc. based on sequence labeling technology, which is not limited in this embodiment.

[0063] Step S120: Determine the words with the target part of speech as the words to be expanded.

[0064] The part-of-speech information of words mainly includes nouns, pronouns, verbs, adjectives, and quantifiers. Among them, nouns and verbs have the strongest representativeness for the initial query statement. Therefore, in an optional implementation manner of this embodiment, nouns and verbs can be determined as the target part of speech, and the words with the part-of-speech information of nouns or verbs are determined as the words to be expanded.

[0065] Step S200: Perform morphological expansion processing on the words to be expanded to obtain the first set of words.

[0066] Morphological Expansion is a form of generating new words by changing the basic form of words, which can enrich the expression form of language, enhance the representation ability of the initial query statement, and thus improve the accuracy of information retrieval. Therefore, in this step, the terminal can perform morphological expansion processing on each word to be expanded to obtain the variant words of each word to be expanded as the first set of words.

[0067] Optionally, the terminal can perform morphological expansion on each word to be expanded based on a predefined word library, such as OMW (Open Multilingual WordNet), etc. For example, if the word to be expanded is "netizen", where "net" can be extended to "network", "Internet", etc., and "izen" can be extended to "people", "resident", "citizen", etc., then the variant words of "netizen" can include "Internet user", "network user", "network resident", "network citizen", etc.

[0068] Step S300: Perform information retrieval based on the first set of words to obtain the retrieval result of the initial query statement.

[0069] In this step, the terminal can generate a target query statement according to the variant words of the words to be expanded and obtain the retrieval result according to the target query statement, or directly obtain the retrieval result according to the variant words of the words to be expanded. This embodiment does not make any restrictions.

[0070] Figure 3 It is a flowchart for obtaining the retrieval result in an optional implementation manner of the embodiment of the present invention. As Figure 3 shown, in an optional implementation manner, step S300 may include the following steps:

[0071] Step S310: Determine the intention classification result of the initial query statement.

[0072] Intent Recognition is a natural language processing technology used to determine the intention or purpose of a user when communicating with a device. In this embodiment, the intent classification result is used to characterize the classification of the intent of the initial query statement, that is, the category to which the information to be queried by the initial query statement belongs, which may specifically include the two categories of nouns and verbs.

[0073] The essence of intent recognition is to classify the query into corresponding categories. Therefore, in this embodiment, any model that can achieve classification can be used to obtain the intent classification result of the initial query. Therefore, in this step, the terminal can determine the intent classification result of the initial query through various existing intent recognition methods.

[0074] In an optional implementation, the terminal can obtain the intent classification result of the initial query statement based on the initial query statement and the pre-trained natural language processing model. According to actual needs, the natural language processing model can be Naive Bayes Model (NBM), Support Vector Machine (SVM), recurrent neural network, Transformer, etc., which is not limited in this embodiment.

[0075] The natural language processing model can be obtained based on training samples, and each training sample in the training sample set includes a sample query statement and intent classification information of the sample query statement, wherein the intent classification information is used to characterize the classification of the intent of the sample query statement.

[0076] In the process of training the natural language processing model, each sample query statement can be used as input, and the intent classification information corresponding to the sample query statement can be used as the training target to train or fine-tune the natural language processing model until the natural language processing model meets the training target, such as a predetermined number of iterations, the loss function converges, the accuracy rate reaches a preset threshold, etc.

[0077] Step S320: Filter out target words from the first word set according to the intention classification result.

[0078] In this step, the terminal can determine the transformed words that match the intention recognition result as the target words according to the intention recognition result. Optionally, if the intention classification result of the initial query sentence is a noun classification result, the terminal can determine the transformed words whose part of speech information is a noun in the first word set as the target words; if the intention classification result of the initial query sentence is a verb classification result, the terminal can determine the transformed words whose part of speech information is a verb in the first word set as the target words.

[0079] For example, sentence Q1 and sentence Q2 are both initial query sentences, where sentence Q1 is "where is the flow limit configured", and the intention recognition result of sentence Q1 is a noun classification result, then the terminal can determine the inflected word with noun part-of-speech information in the first word set corresponding to sentence Q1 as the target word corresponding to sentence Q1; sentence Q2 is "how to achieve comment positioning", and the intention recognition result of sentence Q2 is a verb classification result, then the terminal can determine the inflected word with verb part-of-speech information in the first word set corresponding to sentence Q2 as the target word corresponding to sentence Q2.

[0080] Step S330, obtaining search results according to the target word.

[0081] In this step, the terminal may generate a target query statement according to the target word and obtain the search result according to the target query statement, or may directly obtain the search result according to the target word, which is not limited in this embodiment.

[0082] After obtaining the query statement, the embodiment of the present invention can obtain the words to be expanded in the query statement, and perform word form expansion processing according to the words to be expanded to obtain the inflected words of the words to be expanded, so as to perform information retrieval based on the obtained inflected words to obtain the retrieval results of the query statement. The embodiment of the present invention reduces the possibility of inaccurate expression by performing word form expansion on the key words in the query statement, thereby improving the accuracy of information retrieval.

[0083] Figure 4 FIG. 1 is a flow chart of the information retrieval method according to the second embodiment of the present invention. Figure 4 As shown, the method of this embodiment includes the following steps:

[0084] Step S100', obtaining a predetermined query statement.

[0085] In this embodiment, the terminal may determine the query statement input by the user as a predetermined query statement. The method for obtaining the query statement input by the user may refer to step S100, and this embodiment does not limit it.

[0086] Step S200': in response to the predetermined query statement using a non-target language, convert the predetermined query statement into an initial query statement.

[0087] The grammatical structure of English is relatively simple, which makes the natural language processing field generally more capable of processing query statements in English. Therefore, in an optional implementation of this embodiment, the terminal can determine the language used by the predetermined query statement. If the language used by the predetermined query statement is a non-target language, that is, non-English, such as Chinese, French, German, etc., the terminal can convert the predetermined query statement into a query statement using the target language, that is, the initial query statement.

[0088] The essence of identifying the language used in a query statement is to classify the query statement into corresponding categories. Therefore, in this embodiment, any model that can achieve classification can be used to obtain the language used in the predetermined query statement. Specifically, according to actual needs, the terminal can determine the language used in the predetermined query statement through various existing methods, for example, based on a preset language detection library, such as langdetect, cld2-cffi, spaCy, Google-cloud-translate, etc. The language used in the predetermined query statement can also be determined through a pre-trained natural language processing model, such as a hidden Markov model, conditional random field, recurrent neural network, Transformer, etc. The language used in the predetermined query statement is not limited in this embodiment.

[0089] It is easy to understand that if the predetermined query statement uses the target language, the terminal can directly determine the predetermined query statement as the initial query statement. And the target language in this embodiment can be set according to actual needs, and can be set to other languages ​​involving tense changes of verbs and singular and plural changes of nouns, which is not limited in this embodiment.

[0090] Step S300', determining the words to be expanded in the initial query sentence.

[0091] In this embodiment, the implementation of step S300 ′ is similar to the implementation of step S100 , and will not be described in detail herein.

[0092] Step S400': performing stem restoration processing on the words to be expanded to obtain a second word set.

[0093] A stem is a morpheme, i.e., the basic form of a word. Specifically, if the word's part of speech information is a noun, the stem is the singular form of the noun; if the word's word form information is a verb, the stem is the present tense of the verb. For example, if the word to be expanded is teachers, the stem of the word to be expanded is the singular form of teachers, i.e., teacher; if the word to be expanded is running, the stem of the word to be expanded is the present tense of running, i.e., run.

[0094] In this step, the terminal can perform stem restoration processing on the words to be expanded according to various existing methods to obtain the stems of each word to be expanded as the second word set. For example, the stems of each word to be expanded can be obtained based on a predetermined language library, such as a stem restoration service provided by nltk (Natural Language Toolkit), PorterStemFilter, Natural, etc., or based on a pre-trained natural language processing model, such as a recurrent neural network, Transformer, etc., and the stems of each word to be expanded are not limited in this embodiment.

[0095] By stemming, some misspelled words to be expanded in the initial query can be restored to their basic form, thereby reducing the negative impact of spelling errors on information retrieval.

[0096] Step S500', performing word form expansion processing on the second word set to obtain the first word set.

[0097] In this step, the terminal may perform word form expansion processing on the stem of each word to be expanded in the second word set, and obtain inflected words of the stem of each word to be expanded as the first word set.

[0098] Optionally, the terminal may perform word form expansion on the stem of each word to be expanded based on a predetermined word library, such as Wordnet, etc. For example, if the stem of the word to be expanded is walk, the terminal may use walks, walked and walking as variant words of walk.

[0099] However, the morphological changes of some verbs are irregular, and Wordnet has limited processing capabilities for such words. Therefore, if the part-of-speech information of the stem of the word to be expanded is a verb, the terminal can obtain the inflected words of the word to be expanded based on the pre-set word form expansion rules. For example, if the stem of the word to be expanded is swim, the terminal can use swims, swam, swimming and swum as inflected words of swim.

[0100] Step S600': perform information retrieval according to the first word set to obtain the retrieval result of the initial query statement.

[0101] In this embodiment, the implementation of step S600 ′ is similar to the implementation of step S300 , and will not be described in detail herein.

[0102] After obtaining the query statement, the embodiment of the present invention can convert the query statement into a query statement using the target language when the language used in the query statement is a non-target language, and perform stem restoration processing on the words to be expanded in the query statement to obtain the stems of each word to be expanded, and then perform word form expansion processing on the stems of the words to be expanded to obtain the inflected words of the words to be expanded, thereby performing information retrieval based on the obtained inflected words to obtain the retrieval results of the query statement. The embodiment of the present invention reduces the possibility of spelling errors and inaccurate expressions by restoring the key words in the query statement through stem restoration and word form expansion, thereby improving the accuracy of information retrieval.

[0103] Figure 5 Schematic diagram of the information retrieval device of the third embodiment of the present invention. Figure 5 As shown, the information retrieval device of this embodiment includes a word determination unit 51, a processing unit 52 and a retrieval unit 53.

[0104] Among them, the word determination unit 51 is used to determine the words to be expanded in the initial query statement; the processing unit 52 is used to perform word form expansion processing based on the words to be expanded, and obtain a first word set, which includes the inflected words to be expanded; the retrieval unit 53 is used to perform information retrieval based on the first word set to obtain the retrieval result of the initial query statement.

[0105] Furthermore, the processing unit 52 includes a first processing sub-unit and a second processing sub-unit.

[0106] Among them, the first processing subunit is used to perform stem restoration processing on the words to be expanded to obtain a second word set, and the second word set includes the stems of the words to be expanded; the second processing subunit is used to perform word form expansion processing on the second word set to obtain the first word set.

[0107] Furthermore, the word determination unit 51 includes a marking subunit and a first determination subunit.

[0108] Among them, the marking subunit is used to perform part-of-speech marking on each word in the initial query sentence to determine the part-of-speech information of each word; the first determination subunit is used to determine the word whose part-of-speech information is the target part-of-speech as the word to be expanded, and the target part-of-speech is a noun or a verb.

[0109] Furthermore, the retrieval unit 53 includes a second determining subunit, a third determining subunit and an acquiring subunit.

[0110] Among them, the second determination subunit is used to determine the intention classification result of the initial query statement; the third determination subunit is used to filter out target words from the first word set according to the intention classification result; and the acquisition subunit is used to acquire the retrieval result according to the target word.

[0111] Furthermore, the intention classification result includes a noun classification result and a verb classification result;

[0112] The third determining subunit comprises:

[0113] The first determination module is used for determining the inflected word whose part of speech information is a noun as the target word in response to the intention classification result being a noun classification result;

[0114] The second determination module is used for determining the inflected word whose part of speech information is a verb as the target word in response to the intention classification result being a verb classification result.

[0115] Furthermore, the second determination subunit is further used to obtain the intent classification result based on the initial query statement and a pre-trained natural language processing model, and the natural language processing model is trained based on a training sample set, and each training sample in the training sample set includes a sample query statement and intent classification information of the sample query statement.

[0116] Furthermore, the second processing sub-unit is further used for acquiring the inflected word based on a preset word form expansion rule in response to the part-of-speech information of the stem being a verb.

[0117] Furthermore, the device also includes an acquisition unit and a conversion unit.

[0118] The acquisition unit is used to acquire a predetermined query statement; the conversion unit is used to convert the predetermined query statement into an initial query statement in response to the predetermined query statement using a non-target language, wherein the initial query statement is a query statement using a target language.

[0119] After obtaining the query statement, the embodiment of the present invention can obtain the words to be expanded in the query statement, and perform word form expansion processing according to the words to be expanded to obtain the inflected words of the words to be expanded, so as to perform information retrieval based on the obtained inflected words to obtain the retrieval results of the query statement. The embodiment of the present invention reduces the possibility of inaccurate expression by performing word form expansion on the key words in the query statement, thereby improving the accuracy of information retrieval.

[0120] Figure 6 Schematic diagram of an electronic device according to a fourth embodiment of the present invention. In this embodiment, the electronic device 6 includes a server, a terminal, etc. Figure 6As shown, the electronic device 6: includes at least one processor 61; and a memory 62 connected to the at least one processor 61 for communication; and a communication component 63 connected to the scanning device for communication, the communication component 63 receives and sends data under the control of the processor 61; wherein the memory 62 stores instructions that can be executed by at least one processor 61, and the instructions are executed by at least one processor 61 to implement the above-mentioned information retrieval method.

[0121] Specifically, the electronic device includes: one or more processors 61 and a memory 62, Figure 6 A processor 61 is taken as an example. The processor 61 and the memory 62 may be connected via a bus or other means. Figure 6 In the example, the bus connection is used. The memory 62 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The processor 61 executes various functional applications and data processing of the device by running the non-volatile software programs, instructions and modules stored in the memory 62, that is, realizing the above-mentioned information retrieval method.

[0122] The memory 62 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store a list of options, etc. In addition, the memory 62 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 62 may optionally include a memory remotely arranged relative to the processor 61, and these remote memories may be connected to an external device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0123] One or more modules are stored in the memory 62, and when executed by one or more processors 61, the information retrieval method in any of the above method embodiments is executed.

[0124] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.

[0125] After obtaining the query statement, the embodiment of the present invention can obtain the words to be expanded in the query statement, and perform word form expansion processing according to the words to be expanded to obtain the inflected words of the words to be expanded, so as to perform information retrieval based on the obtained inflected words to obtain the retrieval results of the query statement. The embodiment of the present invention reduces the possibility of inaccurate expression by performing word form expansion on the key words in the query statement, thereby improving the accuracy of information retrieval.

[0126] Another embodiment of the present invention relates to a non-volatile storage medium for storing a computer-readable program, wherein the computer-readable program is used for a computer to execute part or all of the above method embodiments.

[0127] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0128] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. An information retrieval method, characterized in that: The method comprises: Determine the words to be expanded in the initial query statement; Performing word form expansion processing according to the words to be expanded to obtain a first word set, wherein the first word set includes the inflected words to be expanded; Information retrieval is performed based on the first word set to obtain retrieval results of the initial query statement.

2. The method according to claim 1, characterized in that: The performing word form expansion processing according to the words to be expanded to obtain a first word set comprises: Performing stem restoration processing on the words to be expanded to obtain a second word set, wherein the second word set includes the stems of the words to be expanded; Perform word form expansion processing on the second word set to obtain the first word set.

3. The method according to claim 1, characterized in that: The step of determining the words to be expanded in the initial query sentence includes: Performing part-of-speech tagging on each word in the initial query sentence to determine the part-of-speech information of each word; The word whose part-of-speech information is a target part-of-speech is determined as the word to be expanded, and the target part-of-speech is a noun or a verb.

4. The method according to claim 1, characterized in that: The performing information retrieval according to the first word set to obtain the retrieval result of the initial query statement includes: Determining an intent classification result of the initial query statement; Filtering target words from the first word set according to the intention classification result; The search result is obtained according to the target word.

5. The method according to claim 4, characterized in that The intention classification results include noun classification results and verb classification results; The step of selecting a target word from the first word set according to the intention classification result includes: In response to the intention classification result being a noun classification result, determining the inflected word whose part of speech information is a noun as the target word; In response to the intention classification result being a verb classification result, the inflected word whose part of speech information is a verb is determined as the target word.

6. The method according to claim 4, characterized in that Determining the intent classification result of the initial query statement includes: The intent classification result is obtained according to the initial query statement and a pre-trained natural language processing model, wherein the natural language processing model is trained based on a training sample set, and each training sample in the training sample set includes a sample query statement and intent classification information of the sample query statement.

7. The method according to claim 2, characterized in that: The word form expansion processing of the second word set comprises: In response to the part-of-speech information of the word stem being a verb, the inflected word is acquired based on a preset word form expansion rule.

8. The method according to claim 1, characterized in that: The method further comprises: Get the predetermined query statement; In response to the predetermined query statement being in a non-target language, the predetermined query statement is converted into an initial query statement, where the initial query statement is a query statement in a target language.

9. An information retrieval device, characterized in that: The device comprises: A word determination unit, used to determine the words to be expanded in the initial query sentence; A processing unit, configured to perform word form expansion processing according to the words to be expanded, and obtain a first word set, wherein the first word set includes the inflected words to be expanded; A retrieval unit is used to perform information retrieval based on the first word set to obtain a retrieval result of the initial query statement.

10. An electronic device comprising a memory and a processor, characterized in that: The memory is used to store one or more computer program instructions, wherein the one or more computer program instructions are executed by the processor to implement the method according to any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.

12. A computer program product, characterized in that The computer program product comprises a computer program / instructions, which implement the method according to any one of claims 1 to 8 when executed by a processor.

Citation Information

Patent Citations

  • Word2vec-based semantic query expansion method and device

    CN108491462A

  • A method and a device for retrieving information

    CN109902152A

  • Data search method and device

    CN111159381A

  • Text novelty detection method and device, electronic equipment and readable storage medium

    CN115879441A