Keyword recall method, device, electronic device, and storage medium

By calculating the similarity between the words to be recalled and the seed keywords, and combining the sentence-level similarity strategy to determine the target keywords and candidate keywords, the problem of low recall in the existing technology is solved and more efficient keyword recall is achieved.

CN113822065BActive Publication Date: 2025-08-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110867106.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-29
Publication Date
2025-08-19
Estimated Expiration
2041-07-29

AI Technical Summary

Technical Problem

Existing keyword recall methods generally have the problem of low recall rates, especially due to insufficient keyword recall caused by OOV problems.

Method used

By calculating the similarity between the words to be recalled and the seed keywords, and combining the sentence-level similarity strategy, the target keywords and candidate keywords are determined, and the seed key sentences are used to recall the recall sentences, combining the similarity calculations between word level and sentence-level, to improve the recall rate.

Benefits of technology

It improves the recall rate of keywords, makes up for the shortcomings when using only seed keywords to recall, and enhances the effect of information recommendation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113822065B_ABST
    Figure CN113822065B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a keyword recall method, device, electronic device, and storage medium. The method includes: calculating a first similarity between a to-be-recalled word and a seed keyword, determining a to-be-recalled word whose first similarity is greater than a first threshold as a target keyword, and determining a to-be-recalled word whose first similarity is less than the first threshold and greater than a second threshold as a candidate keyword, wherein the first threshold is greater than the second threshold; calculating a second similarity between a to-be-recalled sentence and a seed key sentence, wherein the seed key sentence includes at least one seed keyword, and the to-be-recalled sentence includes at least one to-be-recalled word; determining a to-be-recalled sentence whose second similarity is greater than a third threshold as a candidate to-be-recalled sentence, and determining the candidate keyword contained in the candidate to-be-recalled sentence as a target keyword; and recalling the target keyword. The technical solution of the embodiments of the present application can improve the recall rate of keywords.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer information processing technology, and in particular to a keyword recall method, device, electronic device, and storage medium. Background Art

[0002] Keyword-based information recommendation determines the information pushed to users based on the keywords they enter into search engines. When users place information on or off websites, they must select keywords as units of action. Finding the right keywords becomes a critical step. Existing keyword recall methods generally suffer from low recall rates. Summary of the Invention

[0003] To solve the above technical problems, embodiments of the present application provide a keyword recall method, device, electronic device, and storage medium, which can improve the recall rate of keywords.

[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by practice of the present application.

[0005] According to one aspect of an embodiment of the present application, a keyword recall method is provided, including: calculating a first similarity between a to-be-recalled word and a seed keyword, determining a to-be-recalled word having a first similarity greater than a first threshold as a target keyword, and determining a to-be-recalled word having a first similarity less than the first threshold and greater than a second threshold as a candidate keyword, the first threshold being greater than the second threshold; calculating a second similarity between a to-be-recalled sentence and a seed keyword sentence, the seed keyword sentence including at least one seed keyword, and the to-be-recalled sentence including at least one to-be-recalled word; determining a to-be-recalled sentence having a second similarity greater than a third threshold as a candidate to-be-recalled sentence, and determining the candidate keyword contained in the candidate to-be-recalled sentence as a target keyword; and recalling all target keywords.

[0006] According to one aspect of an embodiment of the present application, a keyword recall device is provided, including: a first calculation module, used to calculate the first similarity between a to-be-recalled word and a seed keyword, determine the to-be-recalled word whose first similarity is greater than a first threshold as a target keyword, and determine the to-be-recalled word whose first similarity is less than the first threshold and greater than a second threshold as a candidate keyword, where the first threshold is greater than the second threshold; a second calculation module, used to calculate the second similarity between a to-be-recalled sentence and a seed keyword sentence, where the seed keyword sentence includes at least one seed keyword, and the to-be-recalled sentence includes at least one to-be-recalled word; an analysis module, used to determine the to-be-recalled sentence whose second similarity is greater than a third threshold as a candidate to-be-recalled sentence, and determine the candidate keyword contained in the candidate to-be-recalled sentence as the target keyword; and a recall module, used to recall all target keywords.

[0007] According to one aspect of an embodiment of the present application, an electronic device is provided, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the keyword recall method as described above is implemented.

[0008] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor of a computer, the computer executes the keyword recall method provided above.

[0009] According to one aspect of an embodiment of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the keyword recall method provided in the various optional embodiments described above.

[0010] In the technical solution provided in the embodiment of the present application, the first similarity between the seed keyword and the to-be-recalled word is first calculated, and based on the size of the first similarity, a portion of the to-be-recalled keywords with larger similarity values is determined as the target keywords. Then, the second similarity between the to-be-recalled sentence and the seed key sentence is calculated, and the to-be-recalled words in the portion of the to-be-recalled sentences with larger second similarity values are determined and used as candidate keywords. If the first similarity value between the candidate keyword and the seed keyword is greater than the second threshold and less than the first threshold, the candidate keyword is determined as the target keyword, and finally all the target keywords are recalled. The present application solution recalls the to-be-recalled words through the seed key sentence, which can make up for the problem of insufficient recall rate caused by recalling keywords using only the seed keyword, thereby improving the recall rate of keywords.

[0011] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings are incorporated into and constitute a part of the specification, illustrating embodiments consistent with the present application and, together with the specification, serving to explain the principles of the present application. It is obvious that the drawings described below are merely some embodiments of the present application, and a person of ordinary skill in the art can derive other drawings based on these drawings without inventive effort. In the drawings:

[0013] Figure 1 is a flowchart of a keyword recall method shown in an exemplary embodiment of the present application;

[0014] Figure 2 yes Figure 1 The flowchart of step S100 in the illustrated embodiment in an exemplary embodiment;

[0015] Figure 3 yes Figure 1 The flowchart of step S200 in the illustrated embodiment in an exemplary embodiment;

[0016] Figure 4 yes Figure 3 The flowchart of step S210 in the illustrated embodiment in an exemplary embodiment;

[0017] Figure 5 yes Figure 3 A flowchart of step S210 in the illustrated embodiment in another exemplary embodiment;

[0018] Figure 6 is a flowchart of a keyword recall method shown in another exemplary embodiment of the present application;

[0019] Figure 7 is a flowchart of a keyword recall method shown in another exemplary embodiment of the present application;

[0020] Figure 8 yes Figure 7 The flowchart of step S700 in the illustrated embodiment in an exemplary embodiment;

[0021] Figure 9 is a block diagram of a keyword recall device shown in an exemplary embodiment of the present application;

[0022] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0023] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. When the following description refers to the drawings, identical numerals in different figures represent identical or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.

[0024] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically separate entities. That is, these functional entities may be implemented in software, in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0025] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, while others may be combined or partially combined. Therefore, the actual execution order may vary depending on the actual situation.

[0026] It should also be noted that the term "plurality" used in this application refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0027] Artificial Intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.

[0028] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0029] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning through demonstration.

[0030] The keyword recall method and device, electronic device, and computer-readable storage medium proposed in the embodiments of the present application involve artificial intelligence technology and machine learning technology, and these embodiments will be described in detail below.

[0031] Keywords are words used to retrieve information flows that are highly relevant to the keywords from massive information flows. The keyword recall method provided in this embodiment can expand the keyword set. For example, in the process of personalized information flow recommendations for users, keywords can be words entered by the user into a search box. Based on the user-entered keywords, the backend extracts a series of information related to the keywords from the massive information database and recommends them to the user. For example, if a user enters the keyword "hot" in the search box, the computer backend extracts the currently popular information from the information database and recommends it to the user.

[0032] It can be seen that keywords are crucial in the entire information recommendation process. Since keywords change or increase with the replacement of information, it is necessary to recall more keywords from massive information data. The keyword recall method provided in this embodiment is suitable for the keyword recall process in the information recommendation process.

[0033] One method for recalling keywords is to calculate the similarity between seed keywords and words to be recalled, and recall the words to be recalled with a similarity greater than a set threshold as keywords. The inventors of this application have found through long-term research that this keyword recall method is prone to the problem of insufficient recall of potential keywords due to the OOV (Out-of-vocabulary) problem. For example, a certain word A does not appear during the word2vec model training process, or appears only a few times. This results in these words not being strongly representative when using the word2vec model for feature extraction, and then not being effectively recalled when matching with seed keywords.

[0034] Based on this, the keyword recall method provided in this application focuses on utilizing the grammatical characteristics of the word context, that is, introducing a sentence-level similarity recall strategy, combined with a word-level similarity recall strategy, to alleviate the problem of insufficient keyword recall caused by the OOV problem, thereby improving the recommendation effect on the recommendation side.

[0035] See also Figure 1 , Figure 1 is a flowchart of a keyword recall method shown in an exemplary embodiment of the present application. Figure 1 The keyword recall method shown includes the following steps:

[0036] Step S100: Calculate the first similarity between the to-be-recalled words and the seed keywords, determine the to-be-recalled words whose first similarity is greater than a first threshold as target keywords, and determine the to-be-recalled words whose first similarity is less than the first threshold and greater than a second threshold as candidate keywords, where the first threshold is greater than the second threshold.

[0037] In this embodiment, the words to be recalled and seed keywords are first obtained.

[0038] The computer background stores a library of texts to be recommended uploaded by a large number of users. The library includes a large number of texts to be recommended, such as product information uploaded by merchants on electronic consumer platforms, advertising information uploaded by bloggers, etc., and news texts uploaded by users on the background of a certain browsing web page.

[0039] In this embodiment, the words to be recalled can be obtained from a library of texts to be recommended. Specifically, the words to be recalled are obtained by segmenting the texts to be recalled, and there can be multiple words to be recalled.

[0040] Seed keyword users recall words to be recalled as target keywords. The number of seed keywords can be multiple. Seed keywords can be obtained in advance through manual screening and only need to be imported into the computer when using seed keywords. For example, the seed keywords are {hot, recent, entertainment,..., sports}.

[0041] In this embodiment, the greater the first similarity between the seed keyword and the to-be-recalled word, the more similar the to-be-recalled word is to the seed keyword. Conversely, the less similar the to-be-recalled word is to the seed keyword. Therefore, based on the magnitude of the first similarity, a portion of the to-be-recalled words can be directly determined as target keywords, i.e., to-be-recalled words whose first similarity is greater than a first threshold. Alternatively, a portion of the to-be-recalled words can be directly excluded and determined not to be target keywords, i.e., to-be-recalled words whose first similarity is less than a second threshold. For to-be-recalled words whose first similarity is greater than the second threshold and less than the first threshold, this embodiment determines whether they are target keywords in the steps described below.

[0042] Step S200: Calculating the second similarity between the sentence to be recalled and the seed key sentence.

[0043] In this embodiment, the seed key sentence includes at least one seed keyword, the to-be-recalled sentence includes at least one to-be-recalled word, and the to-be-recalled sentence comes from a to-be-recommended text library.

[0044] The seed key sentences can be retrieved from the to-be-recommended text library based on the seed keywords, for example, by listing or crawling sentences containing the seed keywords in web pages as the seed key sentences.

[0045] Since the meaning of a word in a sentence containing the word can be inferred through the contextual semantic scenario, the meaning of the word is expressed more clearly in the sentence. Based on this, this embodiment introduces a sentence-level recall strategy, which can improve the recall rate to a certain extent.

[0046] Step S300: taking the to-be-recalled sentences whose second similarity is greater than the third threshold as candidate to-be-recalled sentences, and determining the candidate keywords contained in the candidate to-be-recalled sentences as target keywords.

[0047] In this embodiment, the similarity between the candidate keyword and the seed keyword satisfies the condition that the similarity is greater than the second threshold and less than the second threshold. In other words, the similarity between the candidate keyword and the seed keyword is in a relatively ambiguous range. Within this range, it is impossible to determine whether the candidate keyword is the target keyword based solely on the similarity between the candidate keyword and the seed keyword. Since the second similarity between the to-be-recalled sentence containing the candidate keyword and the seed key sentence containing the seed keyword is greater than the third threshold, and since sentence-level similarity can reflect the similarity of the words contained in the sentence to a certain extent, the candidate keyword contained in the candidate to-be-recalled sentence can be determined as the target keyword.

[0048] In this embodiment, the candidate sentence to be recalled does not necessarily contain the candidate keyword. If the candidate sentence to be recalled contains the candidate keyword, the candidate keyword is determined as the keyword.

[0049] Step S400: Recall target keywords.

[0050] In this embodiment, the recalled keywords may continue to be used as seed keywords to recall more keywords to further expand the keyword set.

[0051] In summary, this embodiment first calculates the first similarity between the seed keyword and the to-be-recalled word, and determines a portion of the to-be-recalled keywords with larger similarity values as target keywords based on the size of the first similarity, and then calculates the second similarity between the to-be-recalled sentence and the seed keyword sentence, determines the to-be-recalled words in a portion of the to-be-recalled sentences with larger second similarity values, and uses them as candidate keywords. If the first similarity value between the candidate keyword and the seed keyword is greater than the second threshold and less than the first threshold, the candidate keyword is determined as the target keyword, and finally all target keywords are recalled. This application solution recalls the to-be-recalled words through the seed keyword sentence, which can make up for the problem of insufficient recall rate caused by recalling keywords using only seed keywords, thereby improving the recall rate of keywords.

[0052] See also Figure 2 , Figure 2 yes Figure 1 In the embodiment shown, step S100 is a flowchart of an exemplary embodiment, as shown in FIG. Figure 2 As shown, step S100 includes the following steps:

[0053] Step S110: vectorizing the words to be recalled and the seed keywords respectively to obtain vectors of the words to be recalled and vectors of the seed keywords.

[0054] In this embodiment, the features of the to-be-recalled words and seed keywords can be extracted respectively to obtain the to-be-recalled word vector corresponding to the to-be-recalled words and the seed keyword vector corresponding to the seed keyword. In this embodiment, the Word2vec algorithm can be used to extract the features of the to-be-recalled words and seed keywords, and then obtain the to-be-recalled word vector and the seed keyword vector. Specifically, the Chinese Wikipedia (zhiwiki) can be used as training corpus to pre-train the word2vec model, and the to-be-recalled words and seed keywords can be input into the word2vec model to output the to-be-recalled word vector and the seed keyword vector.

[0055] Step S120: Calculate the similarity between the to-be-recalled word vector and the seed keyword vector, and use the similarity as the first similarity.

[0056] Optionally, the cosine value or Euclidean distance between the seed keyword feature vector and the to-be-recalled word feature vector is calculated, and the cosine value or Euclidean distance is used as the first similarity.

[0057] See also Figure 3 , Figure 3 yes Figure 1 In the embodiment shown, step S200 is a flowchart of an exemplary embodiment, as shown in FIG. Figure 3 As shown, step S200 includes the following steps:

[0058] Step S210: Obtain the first feature vector of the sentence to be recalled and the second feature vector of the seed key sentence.

[0059] In this step, the purpose of extracting the feature vectors of the to-be-recalled sentence and the seed key sentence is to facilitate the calculation of the similarity between the two.

[0060] See also Figure 4 , Figure 4 yes Figure 3 In the embodiment shown, step S210 is a flowchart of an exemplary embodiment, as shown in FIG. Figure 4 As shown, the process of obtaining the first feature vector of the sentence to be recalled in step S210 includes the following steps:

[0061] Step S211: performing word segmentation processing on the sentence to be recalled to obtain multiple word segmentations corresponding to the sentence to be recalled.

[0062] Chinese word segmentation refers to the process of dividing a sequence of Chinese characters into individual words. Word segmentation is the process of recombining a continuous sequence of characters into a word sequence according to certain specifications. In Chinese, only characters, sentences and paragraphs can be simply demarcated by obvious delimiters, but words do not have a formal delimiter. Although English also has the problem of dividing phrases, Chinese is much more complicated and difficult than English at the word level. Word segmentation is the basis of natural language processing, and Chinese word segmentation is crucial for natural language processing. Current word segmentation algorithms are mainly divided into two categories: dictionary-based rule matching methods, and statistics-based machine learning methods. Statistics-based machine learning methods mainly include hidden Markov model HMM, conditional random field CRF, SVM, and deep learning. This embodiment can directly use the existing Chinese word segmentation algorithm to segment the text, and the specific word segmentation process will not be described in detail here.

[0063] Step S212: Obtain feature vectors corresponding to multiple word segments.

[0064] Converting word segments into their corresponding feature vectors is actually a word embedding process, where word embedding is a method of converting words in a text into digital vectors. In order to analyze them using standard machine learning algorithms, these converted vectors need to be used as digital input. The word embedding process involves embedding a high-dimensional space with the same dimension as the number of all words into a continuous vector space with a much lower dimension. Each word or phrase is mapped to a vector in the real number field.

[0065] This embodiment can obtain the feature vector corresponding to the word segmentation based on the pre-trained word2vec model, which includes the skip-gram model and the continuous bag-of-word (CBOW) model. It should be noted that this embodiment can use all existing word embedding methods to obtain the feature vector corresponding to the word segmentation, such as the Global vectors of word representation (GloVe) method, one-hot encoding, information retrieval technology, distributed representation, etc., which are not specifically limited here.

[0066] Step S213: adding the feature vectors corresponding to the multiple word segments to obtain a first result vector, and normalizing the first result vector to obtain a first feature vector.

[0067] Normalization is a way to simplify calculations. It transforms dimensional expressions into dimensionless expressions, becoming pure quantities (scalars). Normalization does not change or affect the relevance between the seed key sentence and the sentence to be recalled. The first result vector is normalized and the data in the first result vector is mapped to the range of -1 to 1, so that the similarity between the first feature vector and the second feature vector that has also been normalized can be calculated.

[0068] Optionally, the second feature vector of the seed key sentence may also be obtained by the method described in steps S211 to S213 above, which will not be described in detail here.

[0069] See also Figure 5 , Figure 5 yes Figure 3 The flowchart of an exemplary embodiment of step S210 in the embodiment shown in the figure, wherein the process of obtaining the first feature vector of the sentence to be recalled in step S210 includes the following steps:

[0070] Step S214: Obtain the word vector corresponding to each word in the sentence to be recalled, and concatenate the word vectors of all words to obtain an initial feature vector corresponding to the sentence to be recalled.

[0071] Since there are clear separators between each word in the sentence, there is no need to segment the sentence to be recalled before obtaining the word vectors corresponding to each word in the sentence to be recalled.

[0072] In this embodiment, word embedding technology can be used to represent each word in the sentence to be recalled in the form of a word vector.

[0073] Vector splicing is a feature fusion method. There are two feature vectors v1∈R n ,v2∈R m , concatenate these two feature vectors to obtain the fused feature vector v = [v1, v2]∈R m+n Obviously, by concatenating the word vectors of each word in the sentence to be recalled, the dimension of the initial feature vector obtained is the dimension obtained by adding the dimensions of each word.

[0074] For example, for the sentence to be recalled, “I want to eat,” let the word vector corresponding to “I” be [1, 4, 2, 6], the word vector corresponding to “want” be [3, 6, 8, 1], the word vector corresponding to “eat” be [8, 4, 5, 3], and the word vector corresponding to “rice” be [9, 7, 2, 6]. By concatenating the word vectors corresponding to each word, we get the initial feature matrix corresponding to the sentence to be recalled:

[0075] [1, 4, 2, 6, 3, 6, 8, 1, 8, 4, 5, 3, 9, 7, 2, 6].

[0076] Step S215: performing dimensionality reduction processing on the initial feature vector to obtain a low-dimensional feature vector.

[0077] Dimensionality reduction is actually a method of feature extraction. This embodiment extracts features from the initial feature vector, which can not only mine deeper semantic features in the sentence to be recalled, but also reduce the computational complexity of subsequent similarity calculations between the first feature vector and the second feature vector.

[0078] The solution of this embodiment can reduce the dimensionality of the initial feature vector in a variety of ways. For example, deep learning can be used to establish and train a neural network model, and then the initial feature vector can be reduced in dimensionality based on the neural network model. For example, the initial feature vector can be reduced in dimensionality based on neural network models such as convolutional neural network (CNN), deep neural network (DNN), and recurrent neural network (RNN).

[0079] Step S216: normalize the low-dimensional feature vector to obtain a first feature vector.

[0080] This embodiment obtains the first feature vector based on the word vectors of the sentence to be recalled, eliminating the need for word segmentation of the sentence to be recalled, thus simplifying the process of obtaining the first feature vector. Furthermore, by performing dimensionality reduction on the initial feature vector of the sentence to be recalled, the computational complexity can be simplified, improving the efficiency of obtaining the first feature vector.

[0081] The second feature vector corresponding to the seed key sentence can also be obtained using the method described in steps S214, S215, and S216 of this embodiment. It should be noted that the dimension of the second feature vector corresponding to the seed key sentence and the first feature vector corresponding to the sentence to be recalled must be the same.

[0082] Step S220: performing a similarity operation on the first eigenvector and the second eigenvector to obtain a second similarity.

[0083] Calculate the cosine value or Euclidean distance between the first eigenvector and the second eigenvector, and use the cosine value or Euclidean distance as the second similarity between the seed key sentence and the sentence to be recalled. In the technical solution provided in this embodiment, first calculate the first similarity between the seed keyword and the word to be recalled, and determine a portion of the recalled keywords with larger similarity values as target keywords based on the size of the first similarity. Then calculate the second similarity between the sentence to be recalled and the seed key sentence, determine the words to be recalled in a portion of the sentences to be recalled with larger second similarity values, and use them as candidate keywords. If the first similarity value between the candidate keyword and the seed keyword is greater than the second threshold and less than the first threshold, the candidate keyword is determined as the target keyword, and finally all target keywords are recalled. This application solution uses seed key sentences to recall the words to be recalled, which can make up for the problem of insufficient recall rate caused by only using seed keywords to recall keywords, thereby improving the recall rate of keywords. Therefore, the flowchart of the keyword recall method shown in this embodiment can be specifically as follows Figure 6 As shown, on the one hand, the keyword recall method extracts features from the seed keywords and the words to be recalled respectively, and then calculates the similarity between the two, and takes the words to be recalled with a similarity score higher than the first threshold as the target keywords, and the words to be recalled with a similarity higher than the second threshold and lower than the first threshold as the candidate keywords; on the other hand, the keyword recall method uses the first CNN dimensionality reduction layer and the second CNN dimensionality reduction layer to reduce the dimensionality of the seed key sentence and the sentence to be recalled respectively, and then calculates the similarity between the two, and takes the sentences to be recalled with a score higher than the third threshold as the candidate sentences to be recalled, and finally takes the candidate keywords contained in the candidate sentences to be recalled as the target keywords, and recalls the target keywords. That is to say, the keyword recall method shown in this embodiment combines word-level keyword recall with sentence-level keyword recall to improve the recall rate.

[0084] See Figure 7 , Figure 7 is a flowchart of a keyword recall method shown in an exemplary embodiment of the present application. Figure 7 As shown, the keyword recall method includes the following steps:

[0085] Step S500: obtaining other word segments in the text library except the word to be recalled, where the other word segments are obtained based on word segmentation processing of all sentences in the text library.

[0086] In this embodiment, the text library is a text library to be recommended, which includes a plurality of sentences to be recalled. The sentences to be recalled are segmented and screened to obtain words to be recalled.

[0087] In fact, the texts to be recommended in the text library are updated in real time as users upload texts in real time, and each word segment obtained by segmenting the texts to be recommended is updated in real time. Obviously, the words to be recalled included in the pre-specified set of words to be recalled are all based on the text library before the update. If there are major changes after the text library is updated and the set of words to be recalled cannot be updated in time, some potential keywords may be missed, reducing the recall efficiency. For this consideration, the keyword recall method provided in this embodiment is a supplement to the above keyword recall method, and focuses more on other word segments in the text library except the words to be recalled.

[0088] For example, after the text library in the background of a certain browser is updated, using the word frequency statistics method, it is found that the frequency of the word segment "so delicious" suddenly increases in the text library and is greater than the set value, indicating that this word segment is very important for the updated text library. The keyword recall method provided in this embodiment can recall the word segment "so delicious" as a keyword.

[0089] Step S600: Statistically calculate the word frequencies corresponding to other word segments.

[0090] The term frequency (TF) is the frequency of a word. Statistically calculating the word frequencies of other word segments is to count the number of times other word segments appear in the text library. If a certain word in the text library appears multiple times, it means that this word is very important for the text library, and this word is very likely to be a target keyword.

[0091] Step S700: Recall the other word segments with word frequencies greater than the fourth threshold as target keywords.

[0092] In this embodiment, the word frequencies of other word segments except the words to be recalled are statistically calculated, and when the word frequency of a certain word segment is greater than the fourth threshold, it is recalled as a target keyword. In this way, it is fully considered that other words not designated as words to be recalled in the text library may be target keywords, which can further optimize the above method of recalling keywords by combining seed keywords and seed key sentences, and further improve the recall rate of keyword recall. Please refer to Figure 8 , Figure 8 is Figure 7 a flowchart of an exemplary embodiment of step S700 in the embodiment shown. As Figure 8 shown, step S700 includes the following steps:

[0093] Step S710: Push the other word segments with word frequencies greater than the fourth threshold to the user terminal.

[0094] For example, when the processor determines that the word frequency of one or more segmented words is greater than the fourth threshold value using the keyword recall method provided by this embodiment, the one or more segmented words are displayed on the display screen of the user terminal. At this time, the user can interact with the terminal through a pre-set terminal interaction interface to decide whether to use the one or more segmented words as target keywords. The terminal interaction interface can be a "determine as target keyword" or "not as target keyword" button displayed on the display screen. For example, the user clicks on a part of the multiple segmented words and clicks or touches the "determine as target keyword" button to determine that the selected segmented words are used as target keywords. It should be noted that the terminal interaction interface mentioned above is only an example. The user can interact with the terminal through any manufacturer or user-defined terminal interaction interface to determine whether to use the segmented words that meet the conditions as keywords.

[0095] For users, words with higher frequency are not necessarily target keywords. Therefore, in order to achieve personalized recommendations for users, this embodiment leaves the decision of whether to recall words with a frequency greater than the fourth threshold as target keywords to the user, which can improve the recall efficiency and accuracy of keywords.

[0096] Step S720: If the notification information returned by the user terminal is received, other segmented words with a frequency greater than the fourth threshold are recalled as target keywords. The notification information is used to instruct the user to determine other segmented words with a frequency greater than the fourth threshold as target keywords.

[0097] The keyword recall method provided in this embodiment can determine whether to recall a segmented word with a word frequency greater than a fourth threshold as a target keyword based on the user's instructions, and can recall keywords in a personalized manner for the user, thereby improving recall efficiency. The keyword recall method mentioned above can be executed by a computer device (or text processing device). The computer device here may include, but is not limited to: terminal devices such as smartphones, tablet computers, laptop computers, desktop computers, or service devices such as data processing servers, web servers, and application servers. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server here can be a node server on the blockchain. The terminal can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal device and service device can be directly or indirectly connected via wired or wireless communication, and this application does not impose any restrictions on this.

[0098] participate Figure 9, Figure 9 is a block diagram of a keyword recall device shown in an exemplary embodiment of the present application. Figure 9 As shown, the keyword recall device 500 provided in this embodiment includes a first calculation module 510 , a second calculation module 520 , an analysis module 530 and a recall module 540 .

[0099] Among them, the first calculation module 510 is used to calculate the first similarity between the to-be-recalled words and the seed keywords, determine the to-be-recalled words whose first similarity is greater than the first threshold as the target keywords, and determine the to-be-recalled words whose first similarity is less than the first threshold and greater than the second threshold as candidate keywords, and the first threshold is greater than the second threshold; the second calculation module 520 is used to calculate the second similarity between the to-be-recalled sentence and the seed keyword sentence, the seed keyword sentence includes at least one seed keyword, and the to-be-recalled sentence includes at least one to-be-recalled word; the analysis module 530 is used to use the to-be-recalled sentence whose second similarity is greater than the third threshold as the candidate to-be-recalled sentence, and determine the candidate keywords contained in the candidate to-be-recalled sentence as the target keywords; the recall module 540 is used to recall the target keyword.

[0100] In an exemplary embodiment, the second calculation module 520 includes an acquisition unit and a calculation unit.

[0101] The acquisition unit is used to acquire the first feature vector of the sentence to be recalled and the second feature vector of the seed key sentence; the calculation unit is used to perform a similarity operation on the first feature vector and the second feature vector to obtain a second similarity.

[0102] In an exemplary embodiment, the computing unit includes a word segmentation subunit, an acquisition subunit, and a processing subunit.

[0103] Among them, the word segmentation subunit is used to perform word segmentation processing on the sentence to be recalled to obtain multiple word segmentations corresponding to the sentence to be recalled; the acquisition subunit is used to obtain feature vectors corresponding to multiple word segmentations; the processing subunit is used to add the feature vectors corresponding to multiple word segmentations to obtain a first result vector, and normalize the first result vector to obtain a first feature vector.

[0104] In an exemplary embodiment, the calculation unit includes an initial feature vector acquisition subunit, a dimension reduction subunit, and a normalization subunit.

[0105] Among them, the initial feature vector acquisition subunit is used to obtain the word vector corresponding to each word in the sentence to be recalled, and concatenate the word vectors of all words to obtain the initial feature vector corresponding to the sentence to be recalled; the dimensionality reduction subunit is used to reduce the dimensionality of the initial feature vector to obtain a low-dimensional feature vector; the normalization subunit is used to normalize the low-dimensional feature vector to obtain the first feature vector.

[0106] In an exemplary embodiment, the keyword recall device 500 provided in the embodiment further includes other word segmentation acquisition modules, a statistics module, and a keyword determination module.

[0107] Among them, the other word segmentation acquisition module is used to obtain other word segmentations in the text library except for the word to be recalled. The other word segmentations are obtained based on the word segmentation processing of all sentences in the text library; the statistical module is used to count the word frequencies corresponding to other word segmentations; and the keyword determination module is used to recall other word segmentations whose word frequencies are greater than the fourth threshold as target keywords.

[0108] In an exemplary embodiment, the keyword determination module includes a pushing unit and a keyword determination unit.

[0109] Among them, the push unit is used to push other word segments whose word frequency is greater than the fourth threshold to the user terminal; the keyword determination unit is used to recall other word segments whose word frequency is greater than the fourth threshold as target keywords if it receives notification information returned by the user terminal, and the notification information is used to instruct the user to determine other word segments whose word frequency is greater than the fourth threshold as target keywords.

[0110] It should be noted that the device provided in the above embodiment and the method provided in the above embodiment belong to the same concept, and the specific manner in which each module, unit or sub-unit performs the operation has been described in detail in the method embodiment and will not be repeated here.

[0111] In another exemplary embodiment, the present application provides an electronic device including a processor and a memory, wherein the memory stores computer-readable instructions, which implement the above keyword recall method when executed by the processor.

[0112] Figure 10 A schematic diagram of the structure of a computer system suitable for implementing an electronic device according to an embodiment of the present application is shown.

[0113] It should be noted that Figure 10 The computer system 1000 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0114] like Figure 10As shown, the computer system 1000 includes a central processing unit (CPU) 1001, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1002 or the program loaded from the storage part 1008 to the random access memory (RAM) 1003, such as executing the information recommendation method in the above embodiment. Various programs and data required for system operation are also stored in the RAM 1003. The CPU 1001, ROM 1002 and RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0115] The following components are connected to the I / O interface 1005: an input section 1006 including a keyboard, a mouse, and the like; an output section 1007 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 1008 including a hard disk and the like; and a communication section 1009 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 1009 performs communication processing via a network such as the Internet. A drive 1010 is also connected to the I / O interface 1005 as needed. Removable media 1011, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 1010 as needed, so that computer programs read therefrom can be installed into the storage section 1008 as needed.

[0116] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 1009, and / or installed from a removable medium 1011. When the computer program is executed by the central processing unit (CPU) 1001, the various functions defined in the system of the present application are executed.

[0117] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0118] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0119] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0120] Another aspect of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon, which, when executed by a processor, implements the keyword recall method as described in any one of the above embodiments.

[0121] Another aspect of the present application further provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the keyword recall method provided in each of the above embodiments.

[0122] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. A computer program embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, or any suitable combination thereof.

[0123] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. Among them, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0124] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. In some cases, the names of these units do not constitute limitations on the units themselves.

[0125] The above content is only a preferred exemplary embodiment of the present application and is not intended to limit the implementation scheme of the present application. Ordinary technicians in this field can easily make corresponding changes or modifications based on the main ideas and spirit of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection required by the claims.

Claims

1. A keyword recall method, characterized in that: include: Calculating a first similarity between the to-be-recalled words and the seed keywords, determining the to-be-recalled words whose first similarity is greater than a first threshold as target keywords, and determining the to-be-recalled words whose first similarity is less than the first threshold and greater than a second threshold as candidate keywords, where the first threshold is greater than the second threshold; calculating a second similarity between a sentence to be recalled and a seed key sentence, the seed key sentence including at least one seed keyword, the seed key sentence being recalled from a text other than a to-be-recommended text library based on the seed keyword, the sentence to be recalled including at least one to-be-recalled word, and the sentence to be recalled being included in the to-be-recommended text library; taking the to-be-recalled sentences whose second similarity is greater than the third threshold as candidate to-be-recalled sentences, and determining the candidate keywords contained in the candidate to-be-recalled sentences as target keywords; Recall the target keyword.

2. The method according to claim 1, characterized in that The calculating the second similarity between the sentence to be recalled and the seed key sentence includes: Obtaining the first eigenvector of the sentence to be recalled and the second eigenvector of the seed key sentence; A similarity operation is performed on the first eigenvector and the second eigenvector to obtain the second similarity.

3. The method according to claim 2, characterized in that The obtaining of the first feature vector of the sentence to be recalled includes: Performing word segmentation processing on the sentence to be recalled to obtain a plurality of word segmentations corresponding to the sentence to be recalled; Obtaining feature vectors corresponding to the multiple word segmentations; The feature vectors corresponding to the multiple word segments are added together to obtain a first result vector, and the first result vector is normalized to obtain the first feature vector.

4. The method according to claim 2, characterized in that The obtaining of the first feature vector of the sentence to be recalled includes: Obtaining the word vector corresponding to each word in the sentence to be recalled, and concatenating the word vectors of all words to obtain an initial feature vector corresponding to the sentence to be recalled; Performing dimensionality reduction processing on the initial feature vector to obtain a low-dimensional feature vector; Normalizing the low-dimensional feature vector to obtain the first feature vector.

5. The method according to claim 1, wherein The sentence to be recalled comes from a text library; the method further includes: Obtaining other segmented words in the text library except the to-be-recalled word, wherein the other segmented words are obtained based on segmentation processing of all sentences in the text library; Count the word frequencies corresponding to the other participles; Other segmented words with a frequency greater than the fourth threshold are recalled as target keywords.

6. The method according to claim 5, characterized in that The step of recalling other segmented words with a frequency greater than the fourth threshold as target keywords includes: Pushing other segmented words with a frequency greater than a fourth threshold to the user terminal; If the notification information returned by the user terminal is received, the other segmented words with a frequency greater than the fourth threshold are recalled as target keywords, and the notification information is used to instruct the user to determine the other segmented words with a frequency greater than the fourth threshold as target keywords.

7. The method according to claim 1, characterized in that The calculating of the first similarity between the to-be-recalled word and the seed keyword includes: Performing vectorization processing on the to-be-recalled word and the seed keyword respectively to obtain a to-be-recalled word vector and a seed keyword vector; The similarity between the to-be-recalled word vector and the seed keyword vector is calculated, and the similarity is used as the first similarity.

8. A keyword recall device, characterized in that: include: a first calculation module, configured to calculate a first similarity between the to-be-recalled words and the seed keywords, determine the to-be-recalled words whose first similarity is greater than a first threshold as target keywords, and determine the to-be-recalled words whose first similarity is less than the first threshold and greater than a second threshold as candidate keywords, wherein the first threshold is greater than the second threshold; a second calculation module, configured to calculate a second similarity between a sentence to be recalled and a seed key sentence, wherein the seed key sentence includes at least one seed keyword, the seed key sentence is recalled from texts other than the to-be-recommended text library based on the seed keyword, the sentence to be recalled includes at least one to-be-recalled word, and the sentence to be recalled is included in the to-be-recommended text library; an analysis module, configured to take the to-be-recalled sentences whose second similarity is greater than a third threshold as candidate to-be-recalled sentences, and determine the candidate keywords contained in the candidate to-be-recalled sentences as target keywords; The recall module is used to recall all target keywords.

9. An electronic device, characterized in that: include: a memory storing computer-readable instructions; The processor reads the computer-readable instructions stored in the memory to execute the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that Computer-readable instructions are stored thereon, and when the computer-readable instructions are executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Apparatus and method for extracting keyword from single document

    CN106557460A

  • Content retrieval method and device

    CN110532354A