Keyword expansion method and device

By dividing the keywords entered by the user into atomic word sequences, and using the atomic word extension lexicon library combination to determine the expansion results, the problem of small scale and low efficiency of synonyms caused by manual annotation in the prior art is solved, and more efficient Keyword extension.

CN113887220BActive Publication Date: 2024-12-24BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111081468.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-15
Publication Date
2024-12-24
Estimated Expiration
2041-09-15

AI Technical Summary

Technical Problem

The existing technology requires manual annotation when building synonyms databases, resulting in high costs and long time, resulting in small scale and few word pairs of synonyms databases, reducing the efficiency of keyword expansion.

Method used

By obtaining the keywords input by the user, dividing them into atomic word sequences, and using the pre-constructed atomic word expansion database, the extended words of the atomic word are determined, and then combining and determining the extension results of the keywords are improved to improve the efficiency of keyword expansion.

Benefits of technology

When the data volume of atomic word expansion lexicon database is consistent with the synonym database, more expansion results can be determined, which improves the efficiency of keyword expansion and reduces the need for manual annotation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113887220B_ABST
    Figure CN113887220B_ABST
Patent Text Reader

Abstract

The specification discloses a keyword expansion method and device, which obtains a keyword input by a user, segments the keyword, determines the atomic word sequence corresponding to the keyword, determines the expansion word of each atomic word in the atomic word sequence according to a pre-constructed atomic word expansion word library including each atomic word and its corresponding expansion word, and then combines each atomic word and its expansion word according to the atomic word sequence to determine the expansion result of the keyword. The method determines the expansion result of the keyword by combining the expansion words corresponding to each atomic word. When the amount of data stored in the atomic word expansion word library and the synonym word library is consistent, more expansion results can be determined, thereby improving the efficiency of keyword expansion.
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 in particular to a keyword expansion method and device. Background Art

[0002] At present, with the development of computer technology, how to recommend to users based on the keywords searched by users has become one of the problems that service providers need to solve. However, when accurate matching is performed based on keywords, the matching results may be small, resulting in insufficient recommended content.

[0003] In the prior art, a commonly used method for providing users with richer recommended content is based on a keyword expansion method. Specifically, the keyword input by the user can be first obtained. Secondly, the synonyms of the keyword can be determined from a pre-constructed synonym library. Then, the synonyms can be used as the expanded results of the keyword. Finally, the search results matching the keyword and the search results matching the expanded results are determined and recommended to the user as recommended content.

[0004] However, in the prior art, when constructing a synonym database, it is necessary to manually annotate the synonyms of keywords. However, the high cost and time of manual annotation make the scale of the constructed synonym database usually small, and the number of keyword pairs it contains is also small, so the determined extension content is also small, which reduces the efficiency of keyword expansion. Summary of the invention

[0005] This specification provides a keyword expansion method and device to partially solve the above problems existing in the prior art.

[0006] This manual adopts the following technical solutions:

[0007] This manual provides a keyword expansion method, including:

[0008] Get the keywords entered by the user;

[0009] Segmenting the keywords to determine atomic word sequences corresponding to the keywords;

[0010] Determining the expansion word of each atomic word in the atomic word sequence by using a pre-constructed atomic word expansion word library, wherein the atomic word expansion word library includes each atomic word and its corresponding expansion word;

[0011] According to the atomic word sequence, the atomic words and the expansion results of the atomic words are respectively combined to determine at least one expansion content corresponding to the keyword as the expansion result of the keyword.

[0012] Optionally, the atomic word expansion vocabulary is constructed by the following method:

[0013] Acquire a plurality of keyword pairs, wherein the keyword pairs include two keywords with similar semantics;

[0014] For each keyword pair, the two keywords included in the keyword pair are segmented respectively to determine the atomic word sequences corresponding to the keywords;

[0015] Determine different atomic words in each atomic word sequence, and according to the position of each atomic word in each atomic word sequence, determine different atomic words located at the same position in the atomic word sequence as specific atomic words of each keyword;

[0016] According to each specific atomic word, determine the synonymous atomic word pair of the keyword pair;

[0017] According to the synonymous atomic word pairs corresponding to each keyword pair, an atomic word extended vocabulary is constructed.

[0018] Optionally, obtain several keyword pairs, including:

[0019] According to the click operations of each user when performing search tasks in the past, some historical search data are obtained;

[0020] For each keyword, from each historical search data corresponding to the keyword, determine each search result on which each user performs a click operation;

[0021] Determine other keywords corresponding to each search result, and count the frequencies corresponding to each other keyword;

[0022] According to the frequency, a keyword with semantic similarity to the keyword is determined from other keywords, and the keyword is combined with the keyword to determine a keyword pair.

[0023] Optionally, after determining the expansion result of the keyword, the method further includes:

[0024] receiving a search request;

[0025] Determine the keyword and its expanded results according to the keyword carried in the search request;

[0026] From each search result, determine a search result containing the keyword and a search result containing the extended result as each recall result;

[0027] The recall results are displayed to the user.

[0028] Optionally, the method further comprises:

[0029] Get several keywords and their extended results;

[0030] Each keyword and its expansion result are used as input into the trained semantic model to determine each keyword vector corresponding to each keyword and each expansion vector corresponding to each expansion result;

[0031] Each keyword and its expansion result are updated according to the similarity between each keyword vector and each expansion vector and a preset first similarity threshold.

[0032] Optionally, the semantic model is trained by the following steps:

[0033] According to each keyword and its expansion results, determine each training sample pair and its annotation;

[0034] Each pair of training samples is used as input into the semantic model to be trained, and the similarity corresponding to each training sample is determined;

[0035] The semantic model is trained according to the similarity and annotation of each training sample, and the semantic model is used to determine the semantic vector of each keyword and its extended content.

[0036] Optionally, the method further comprises:

[0037] Using the model parameters of the pre-trained semantic model as the initial model parameters of the semantic model;

[0038] Construct a keyword expansion vocabulary based on the updated keywords and their expansion results;

[0039] Determining each training sample pair and its annotation according to the keyword expansion vocabulary;

[0040] According to each pair of training samples and their annotations, the model parameters of the semantic model are adjusted.

[0041] This specification provides a keyword expansion device, including:

[0042] The acquisition module is used to obtain the keywords input by the user;

[0043] A determination module, used to segment the keyword and determine an atomic word sequence corresponding to the keyword;

[0044] An extension module, used to determine an extension word of each atomic word in the atomic word sequence through a pre-constructed atomic word extension word library, wherein the atomic word extension word library includes each atomic word and its corresponding extension word;

[0045] The combination module is used to combine the atomic words and the expansion results of the atomic words according to the atomic word sequence, and determine at least one expansion content corresponding to the keyword as the expansion result of the keyword.

[0046] This specification provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned keyword expansion method is implemented.

[0047] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned keyword expansion method when executing the program.

[0048] At least one of the above technical solutions adopted in this specification can achieve the following beneficial effects:

[0049] In the keyword expansion method provided in the present specification, the keyword input by the user is obtained, the keyword is segmented, and the atomic word sequence corresponding to the keyword is determined. According to a pre-constructed atomic word extension vocabulary including each atomic word and its corresponding extension word, the extension word of each atomic word in the atomic word sequence is determined, and then according to the atomic word sequence, each atomic word and its extension word are respectively combined to determine the expansion result of the keyword.

[0050] It can be seen from the above method that this method determines the expansion result of the keyword by combining the corresponding expansion words of each atomic word. When the amount of data stored in the atomic word expansion vocabulary and the synonym vocabulary is consistent, more expansion results can be determined, thereby improving the efficiency of keyword expansion. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The illustrative embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation on this specification. In the drawings:

[0052] Figure 1 A flowchart of the keyword expansion method provided in this specification;

[0053] Figure 2 A schematic diagram for determining specific atomic words provided for this specification;

[0054] Figure 3 Schematic diagram for determining each keyword pair;

[0055] Figure 4 A schematic diagram for determining the expansion results of a keyword;

[0056] Figure 5 The keyword expansion device provided for this manual;

[0057] Figure 6 The corresponding Figure 1 Schematic diagram of electronic equipment. DETAILED DESCRIPTION

[0058] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0059] The technical solutions provided by the embodiments of this specification are described in detail below in conjunction with the accompanying drawings.

[0060] Figure 1 The flowchart of the keyword expansion method provided in this specification specifically includes the following steps:

[0061] S100: Acquire keywords input by the user.

[0062] Generally, in the field of content recommendation, the keyword input by the user during the search operation can be expanded through the keyword expansion method to determine multiple expansion results corresponding to the keyword, and then based on the keyword and its corresponding expansion results, the search results matching the keyword and the search results matching each expansion result can be determined from each search result as recall results, and recommendations can be made to the user based on each recall result. Based on this, the keyword input by the user can be obtained first.

[0063] In one or more embodiments provided in this specification, the keyword expansion method is aimed at a scenario in which expansion results are determined based on keywords searched by a user. The keyword expansion method can be specifically executed by a server or a terminal. For the convenience of description, the following description will be given by taking the server executing the keyword expansion method as an example.

[0064] It should be noted that the above keywords input by the user can be keywords directly input by the user when performing a search operation, or keywords determined based on the search content input by the user when performing a search operation. For example, if the search content input by the user is "I want to go to a hot pot restaurant with mango sago", the corresponding keywords can be determined to be "mango sago" and "hot pot restaurant", that is, the keywords input by the user.

[0065] S102: Segment the keyword to determine an atomic word sequence corresponding to the keyword.

[0066] Different from the prior art that manually annotates keywords and constructs a synonym database, which makes the database smaller in scale and contains fewer keyword pairs, so that the determined extended content is less, and the efficiency of keyword expansion is reduced. This specification provides a new keyword expansion method, which determines the extended results of each atomic word included in the keyword through a pre-constructed atomic word expansion database, and then combines and determines the extended results of the keyword. More extended content is determined, ensuring the efficiency of keyword expansion.

[0067] The reasons why the synonym database needs to be constructed in the prior art are:

[0068] In the prior art, it is believed that keywords have specific semantics, and if they are segmented, the semantics of the keywords may change. But in fact, segmenting most keywords does not affect their semantics. For example, "scrambled eggs with tomatoes" can be segmented into three words: "tomatoes", "scrambled", and "eggs". The corresponding semantics have not changed before and after segmentation.

[0069] Based on this, the server may segment the keywords acquired in step S100.

[0070] Specifically, the server can take the keywords input by the user as input, input it into a pre-trained word segmentation model, and obtain the atomic word sequence corresponding to the keyword output by the word segmentation model. After determining the atomic word sequence, the server can perform subsequent steps based on the atomic word sequence. Among them, the word segmentation model can be pre-trained based on each labeled keyword, and can be used to segment each keyword into an atomic word sequence. Atomic words are words that contain semantics and cannot be segmented again. If they are segmented again, the semantics corresponding to the atomic words may change after segmentation. The atomic word sequence is determined by arranging each atomic word according to its position in the keyword, that is, the atomic word sequence contains each atomic word and the position of each atomic word in the original keyword.

[0071] Of course, the server can also segment each keyword according to the part of speech or the number of words contained in the keyword according to the preset word segmentation rules to determine the atomic word sequence. The specific method of determining the atomic word sequence according to the keyword can be set as needed, and this specification does not limit this.

[0072] It should be noted that the keyword expansion method provided in this specification is applied to the scenario where the keyword is a compound word, and the atomic words in this specification at least include simple words composed of monosyllabic morphemes, disyllabic morphemes and polysyllabic morphemes. Of course, the atomic words may also include compound words, such as eggs. The content of the specific atomic words can be set as needed, and this specification does not limit this.

[0073] In addition, when constructing the atomic word expansion word library, the constructed synonym word library can also be used to determine each keyword pair, so as to quickly construct the atomic word expansion word library based on each keyword pair, thereby improving the efficiency of constructing the atomic word expansion word library.

[0074] S104: Determine the extended word of each atomic word in the atomic word sequence through a pre-constructed atomic word extended word library, wherein the atomic word extended word library includes each atomic word and its corresponding extended word.

[0075] In one or more embodiments provided in the present specification, for each keyword, the atomic words in the corresponding atomic word sequence are replaced with synonyms to obtain the expansion result corresponding to the keyword. Based on this, the server can first determine the expansion word of each atomic word in the atomic word sequence corresponding to the keyword.

[0076] Specifically, the server can determine the expansion words corresponding to each atomic word in the atomic word sequence according to the atomic word sequence corresponding to the keyword determined in step S102 through the pre-built atomic word expansion word library. Taking the atomic word "ice cream" in the atomic word sequence "chocolate, ice cream" as an example, its corresponding expansion words can be "ice cream", "ice cream", etc. After determining the expansion words of each atomic word, the server can perform subsequent steps based on each atomic word and its expansion results.

[0077] The atomic word extended word library can be constructed in the following way:

[0078] First, the server may obtain each keyword pair, each keyword pair including two keywords with the same or similar semantics.

[0079] Next, for each keyword pair, the server may segment each keyword included in the keyword pair to determine the atomic word pairs corresponding to the two keywords in the keyword pair. The method for segmenting the keyword pair may be the same as the method for segmenting the keyword in step S102.

[0080] Then, the server can determine different atomic words in each atomic word sequence, and according to the position of each atomic word in each atomic word sequence, determine different atomic words located at the same position in the atomic word sequence as specific atomic words of each keyword. For example, the specific atomic words corresponding to "chocolate ice cream" and "chocolate ice cream" are "ice cream" and "ice cream" respectively. The specific atomic words corresponding to "chocolate ice cream" and "chocolate ice cream" are "chocolate, ice cream" and "chocolate, ice cream" respectively.

[0081] Finally, the server determines the synonymous atomic word pairs of the keyword pair based on the determined specific atomic words, and stores the synonymous atomic word pairs corresponding to each keyword pair to construct an atomic word expansion word library. Figure 2 shown.

[0082] Figure 2 A schematic diagram for determining specific atomic words provided in this specification. Among them, the keyword ABC and the keyword ABD form a keyword pair, and the atomic word sequence corresponding to the keyword ABC is A, B, C, and the atomic word sequence corresponding to the keyword ABD is A, B, D. The server can determine the different atomic words located at the same position in the atomic word sequence according to the position of each atomic word in each atomic word sequence: atomic word C and atomic word D. The server can use atomic word C as the specific atomic word of keyword ABC and atomic word D as the specific atomic word of keyword ABD. Thus, the server can determine that the synonymous atomic word pair composed of atomic word C and atomic word D is the synonymous atomic word pair corresponding to the keyword pair composed of keyword ABC and keyword ABD.

[0083] Obviously, the atomic words in the constructed atomic word extended vocabulary can be combined with each other to determine keywords. Therefore, compared with the number of keywords required to be marked when constructing a keyword extended vocabulary in the prior art, the atomic word extended vocabulary requires fewer keywords when constructing the vocabulary and requires less storage space.

[0084] Furthermore, a dictionary or knowledge base may be pre-stored in the server, and the knowledge base stores information such as keywords and their corresponding categories, keywords and other aliases. Therefore, in order to quickly determine the atomic word expansion vocabulary, when determining each keyword pair, the server can usually also determine the alias and category of each keyword from the pre-stored knowledge base, and use the alias and the category as synonyms of each keyword respectively.

[0085] Furthermore, non-structural information usually also contains keyword pairs. Therefore, in order to ensure the diversity of the content contained in the atomic word extended vocabulary, when determining keywords, the server usually obtains information and builds a template based on the keyword pairs (for example, the synonym of XX is XX), and determines each keyword pair from the obtained non-structural information, and then constructs the atomic word extended vocabulary.

[0086] In addition, the server may also pre-store label words of search results such as merchants or documents, and the server may also more accurately determine each keyword pair through the semantics of the keyword and the semantics of each label word. Specifically, the server may input the keyword and each label word as input into a pre-trained semantic model, determine the semantic vectors of the keyword and each label word, and then determine the similarity between the keyword and each label word. Finally, each label word whose similarity to the keyword is higher than a preset second similarity threshold is combined with the keyword to determine each keyword pair. Among them, the semantic model can be obtained by training the keyword pairs determined by the above template and the thesaurus.

[0087] This manual provides a schematic diagram for determining each keyword pair, such as Figure 3 shown. Figure 3 In the example, the server can determine the alias and category corresponding to each keyword from the pre-stored knowledge base according to the keyword, and use them as synonyms corresponding to the keyword. The server can also determine a template according to the keyword, determine the sentence matching each template from the pre-stored knowledge base, and determine the keyword pair according to the template. The server can also input the keyword and each tag word into the semantic model, determine the keyword vector corresponding to the keyword, and each tag word vector corresponding to each tag word, and then determine the similarity between the keyword and each tag word, and select each tag word with a similarity higher than the second similarity threshold to combine with the keyword to determine each keyword pair. Of course, the server can also select only the tag word with the highest similarity to the keyword, and combine it with the keyword to determine each keyword pair. Among them, the knowledge base is pre-constructed, and the knowledge base used when determining the keyword pair according to the template and the knowledge base used when determining the keyword pair according to the alias and category can be the same knowledge base or different knowledge bases.

[0088] It should be noted that when determining each keyword pair, only one of determining from a knowledge base, determining according to a template, or determining according to a semantic model can be selected to determine each keyword pair. The server for constructing the atomic word expansion word library and the server for executing the keyword expansion method can be the same server or different servers.

[0089] S106: According to the atomic word sequence, the atomic words and the expansion results of the atomic words are respectively combined to determine at least one expansion content corresponding to the keyword as the expansion result of the keyword.

[0090] In one or more embodiments provided in the present specification, after determining the expanded words corresponding to each atomic word in the atomic word sequence corresponding to the keyword, the server can perform this operation on each atomic word and the expanded results of each atomic word according to the atomic word sequence to determine the expanded result of the keyword.

[0091] Specifically, the server can determine the expansion result of the keyword based on the atomic word sequence corresponding to the keyword, for the atomic word in each position, by combining the expansion word of the atomic word with the atomic words in other positions, and combining the atomic word with the expansion words of the atomic words in other positions, etc. Take the keyword "AB" as an example, the corresponding atomic word sequence contains the keywords atomic word "A" and atomic word "B", and the expansion words of atomic word "A" are atomic word "C" and atomic word "D", then "CB" and "DB" are both expansion results of the keyword "AB". Figure 4 shown.

[0092] Figure 4 The schematic diagram for determining the extended results of a keyword is that the server can segment the keyword to determine the atomic word sequence corresponding to the keyword. Each atomic word in the atomic word sequence in the figure includes atomic word A1 and atomic word B1. The server can determine the extended words of atomic word A1 and atomic word B1 respectively through a pre-constructed atomic word extended word library. Among them, the extended words of atomic word A1 are atomic word A2 and atomic word A3, and the extended word of atomic word B1 is atomic word B2. Therefore, the server can combine the atomic word with the extended words of atomic words at other positions, combine the extended words of the atomic word with atomic words at other positions, and combine the extended words of the atomic word with the extended words of atomic words at other positions, etc., according to the extended words of the above-mentioned atomic words, for the atomic words at each position in the atomic word sequence, and determine each extended content as the extended result of the keyword. Among them, each extended result is A1+B2, A2+B1, A2+B2, A3+B1 and A3+B2.

[0093] Among them, in the step of determining the expansion result by the above combination, only the atomic word can be combined with the expansion words of other atomic words, or only the expansion words of the atomic word can be combined with other atomic words. The specific combination method can be set as needed, and the combination can be carried out according to the positions of the atomic words contained in the atomic word sequence in the atomic word sequence. This specification does not impose any restrictions on this.

[0094] based on Figure 1The keyword expansion method obtains the keyword input by the user, segments the keyword, determines the atomic word sequence corresponding to the keyword, determines the expansion word of each atomic word in the atomic word sequence according to a pre-constructed atomic word expansion word library including each atomic word and its corresponding expansion word, and then combines each atomic word and its expansion word according to the atomic word sequence to determine the expansion result of the keyword. The method determines the expansion result of the keyword by combining the expansion words corresponding to each atomic word. When the amount of data stored in the atomic word expansion word library and the synonym word library is consistent, more expansion results can be determined, thereby improving the efficiency of keyword expansion.

[0095] In addition, in one or more embodiments provided in this specification, the atomic word expansion word library can determine the expansion results of each keyword by combining each atomic word. Therefore, when the number of expansion results is the same, it is obvious that the number of synonymous atomic word pairs required by the atomic word expansion word library is small. Then, the atomic word expansion word library can be determined by manually marking a small number of atomic words.

[0096] Furthermore, when constructing the atomic word expansion word library, an incorrect keyword pair may be determined, resulting in an error in the determined synonymous atomic word pair. However, by extracting the semantic features of the keywords, the semantics corresponding to the keywords can be determined. Therefore, the server can also filter each keyword pair according to the semantic model.

[0097] Specifically, the server may first obtain each keyword and its expansion results.

[0098] Then, the server can input each keyword and its expansion result as input into a pre-trained semantic model to determine the keyword vector corresponding to each keyword and the expansion vector corresponding to each expansion result.

[0099] Finally, the server may retain the expansion results corresponding to each expansion vector whose similarity to the keyword vector is not less than the first similarity threshold according to the preset first similarity threshold, and delete each expansion result corresponding to each expansion vector whose similarity to the keyword vector is less than the first similarity threshold. Taking the first similarity threshold as 90% as an example, the server may only select the expansion results whose similarity to the keyword is higher than 90% as the expansion results of the keyword.

[0100] The semantic model can be trained in the following way:

[0101] The server may first obtain each keyword and its expansion results, and determine each training sample pair and its annotation.

[0102] Then, each training sample pair is taken as input and input into the semantic model to be trained to determine the similarity of each training sample pair.

[0103] Finally, the semantic model is trained based on the similarity of each training sample pair and its annotation.

[0104] Furthermore, in the field of recommendation, the recommended information actually clicked by the user is often strongly correlated with the content searched by the user. Therefore, the server can also determine the keyword pair according to the user's search operation.

[0105] Specifically, the server may first obtain a number of historical search data according to the click operations of each user when performing search tasks in the past.

[0106] Secondly, for each keyword, the server can determine the search results clicked by each user from the historical search data corresponding to the keyword.

[0107] Then, the server can count and determine the keywords corresponding to each search result, and the frequency of each keyword. The frequency can be the frequency corresponding to the keywords of all the information to be recommended, or the frequency corresponding to the keywords before the specified ranking, such as the frequency of the keywords corresponding to each search result in the first ten search results.

[0108] Finally, the server can determine keywords with similar semantics to the keyword based on the frequency corresponding to each keyword, and combine them with the keyword to determine a keyword pair. For example, when the keyword with the highest frequency is the keyword searched by the user, the keyword with the second highest frequency is selected to be combined with the searched keyword to determine a keyword pair.

[0109] In addition, in order to make recommendations based on keywords in a timely manner when users perform search operations, the server can also expand the vocabulary based on the atomic word and pre-determine the extended results corresponding to the keywords. When receiving a recommendation request sent by the user, the server determines the keyword and its corresponding extended results based on the keywords carried in the recommendation request, and determines from each search result the search results that match the keyword and the search results that match the extended results as recall results, and displays them to the user based on the recall results.

[0110] Furthermore, the above description is based on the keyword input by the user as one. In actual applications, the user may input multiple keywords. In this case, the corresponding extended results can be determined for each keyword input by the user, and each keyword can be combined with the extended results of other keywords to determine each combined result. When determining the recall result, the search result containing each keyword in the combined result can be determined as the extended result.

[0111] Furthermore, the server can also construct a keyword expansion vocabulary based on the atomic word expansion vocabulary, and re-train the semantic model based on the keyword expansion vocabulary to determine a more accurate semantic model and a more accurate atomic word expansion vocabulary.

[0112] Specifically, the server can use the model parameters of the pre-trained semantic model as the initial model parameters of the semantic model, and then build a keyword expansion vocabulary based on the updated keywords and their expansion results. Finally, based on the keyword expansion vocabulary, each training sample pair and its annotation are determined, and the model parameters of the semantic model are adjusted based on each training sample pair and its annotation.

[0113] In addition, since the hypernym of a word often contains the semantics corresponding to the word, in order to ensure the number of determined expansion results, when constructing the atomic word expansion vocabulary, the server can also determine the hypernym corresponding to each keyword, and combine it with each keyword to determine each keyword pair.

[0114] It should be noted that, as mentioned above, the keyword expansion method provided in this specification is applied to the scenario where the keyword is a compound word, but if the keyword input by the user is an atomic word, the server can split the keyword into space and the atomic word, or directly determine the expansion word of the atomic word according to the pre-built atomic word expansion word library as the expansion result corresponding to the keyword. When the keyword is an atomic word, how to determine the expansion result can be set as needed, and this specification does not limit this.

[0115] The above is a keyword expansion method provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding keyword expansion device, such as Figure 5 shown.

[0116] Figure 5 The keyword expansion device provided for this specification includes:

[0117] The acquisition module 200 is used to acquire keywords input by the user;

[0118] A determination module 202, configured to segment the keyword and determine an atomic word sequence corresponding to the keyword;

[0119] An expansion module 204 is used to determine an expansion word of each atomic word in the atomic word sequence through a pre-constructed atomic word expansion word library, wherein the atomic word expansion word library includes each atomic word and its corresponding expansion word;

[0120] The combining module 206 is used to combine the atomic words and the expansion results of the atomic words according to the atomic word sequence, and determine at least one expansion content corresponding to the keyword as the expansion result of the keyword.

[0121] Optionally, the expansion module 204 is also used to obtain a number of keyword pairs, each keyword pair containing two keywords with similar semantics, and for each keyword pair, the two keywords contained in the keyword pair are segmented respectively to determine the atomic word sequences corresponding to each keyword, determine the different atomic words in each atomic word sequence, and according to the position of each atomic word in each atomic word sequence, determine the different atomic words located at the same position in the atomic word sequence as the specific atomic words of each keyword, and determine the synonymous atomic word pairs of the keyword pair according to each specific atomic word, and construct an atomic word expansion vocabulary according to the synonymous atomic word pairs corresponding to each keyword pair.

[0122] Optionally, the expansion module 204 is also used to obtain a number of historical search data based on the click operations of each user when performing search tasks in the past, and for each keyword, determine the search results of each user performing the click operation from the historical search data corresponding to the keyword, determine other keywords corresponding to each search result, and count the frequencies corresponding to each other keyword, and based on the frequencies, determine the keyword with similar semantics to the keyword from the other keywords, and combine it with the keyword to determine a keyword pair.

[0123] Optionally, the combination module 206 is used to receive a search request, determine the keywords and their extended results based on the keywords carried in the search request, determine the search results containing the keywords and the search results containing the extended results from each search result as recall results, and display them to the user based on each recall result.

[0124] Optionally, the combination module 206 is used to obtain a number of keywords and their expansion results, take each keyword and its expansion result as input, input it into the trained semantic model, determine each keyword vector corresponding to each keyword, and each expansion vector corresponding to each expansion result, and update each keyword and its expansion result according to the similarity between each keyword vector and each expansion vector and a preset first similarity threshold.

[0125] Optionally, the combination module 206 is used to determine each training sample pair and its annotation based on each keyword and its expansion result, and input each training sample pair as input into the semantic model to be trained, determine the similarity corresponding to each training sample, and train the semantic model based on the similarity of each training sample and its annotation. The semantic model is used to determine the semantic vector of each keyword and its expansion content.

[0126] Optionally, the combination module 206 is used to use the model parameters of the pre-trained semantic model as the initial model parameters of the semantic model, construct a keyword extension vocabulary based on the updated keywords and their expansion results, determine each training sample pair and their annotations based on the keyword extension vocabulary, and adjust the model parameters of the semantic model based on each training sample pair and their annotations.

[0127] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provided keyword expansion method.

[0128] This specification also provides a computer-readable storage medium, which stores a computer program, which can be used to execute the above Figure 1 Provided keyword expansion method.

[0129] This manual also provides Figure 6 The schematic structure diagram of the electronic device shown in FIG. Figure 6 As mentioned above, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include other hardware required for the business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to achieve the above Figure 1 Of course, in addition to the software implementation, this specification does not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0130] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0131] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0132] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0133] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0134] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0135] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0136] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0137] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0138] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0139] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0140] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0141] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0142] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0143] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0144] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0145] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.

Claims

1. A keyword expansion method, characterized in that: The method comprises: Get the keywords entered by the user; Segmenting the keyword to determine an atomic word sequence corresponding to the keyword, wherein the atomic word is a word that contains semantic meaning and cannot be further segmented; Determining the expansion word of each atomic word in the atomic word sequence by using a pre-constructed atomic word expansion word library, wherein the atomic word expansion word library includes each atomic word and its corresponding expansion word; According to the atomic word sequence, the atomic words and the expansion results of the atomic words are respectively combined to determine at least one expansion content corresponding to the keyword as the expansion result of the keyword; According to the atomic word sequence, the atomic words and the expansion results of the atomic words are respectively combined to determine at least one expansion content corresponding to the keyword, including combining the atomic word at each position in the atomic word sequence with the expansion words of the atomic words at other positions, combining the expansion words of the atomic word with the atomic words at other positions, and combining the expansion words of the atomic word with the expansion words of the atomic words at other positions to determine each expansion content; The atomic word expansion word library is constructed by the following method: Acquire a plurality of keyword pairs, wherein the keyword pairs include two keywords with similar semantics; For each keyword pair, the two keywords included in the keyword pair are segmented respectively to determine the atomic word sequences corresponding to the keywords; Determine different atomic words in each atomic word sequence, and according to the position of each atomic word in each atomic word sequence, determine different atomic words located at the same position in the atomic word sequence as specific atomic words of each keyword; According to each specific atomic word, determine the synonymous atomic word pair of the keyword pair; According to the synonymous atomic word pairs corresponding to each keyword pair, an atomic word extended vocabulary is constructed.

2. The method according to claim 1, characterized in that Get several keyword pairs, including: According to the click operations of each user when performing search tasks in the past, some historical search data are obtained; For each keyword, determine the search results for each user's click operation from the historical search data corresponding to the keyword; determine other keywords corresponding to each search result, and count the frequencies of each other keyword; based on the frequency, determine the keyword with similar semantics to the keyword from the other keywords, and combine it with the keyword to determine a keyword pair.

3. The method according to claim 1, characterized in that After determining the extended results of the keyword, the method also includes: receiving a search request; determining the keyword and its extended results based on the keyword carried in the search request; determining, from each search result, the search result containing the keyword and the search result containing the extended result as each recall result; and displaying the recall results to the user.

4. The method according to claim 1, characterized in that The method also includes: obtaining a number of keywords and their expansion results; taking each keyword and its expansion result as input, inputting them into a trained semantic model, determining each keyword vector corresponding to each keyword, and each expansion vector corresponding to each expansion result; and updating each keyword and its expansion result according to the similarity between each keyword vector and each expansion vector and a preset first similarity threshold.

5. The method according to claim 4, characterized in that The semantic model is trained through the following steps: determining each training sample pair and its annotation according to each keyword and its extension result; inputting each training sample pair as input into the semantic model to be trained to determine the similarity corresponding to each training sample; training the semantic model according to the similarity of each training sample and its annotation, and the semantic model is used to determine the semantic vector of each keyword and its extension content.

6. The method according to claim 5, characterized in that The method also includes: using the model parameters of the pre-trained semantic model as the initial model parameters of the semantic model; constructing a keyword extension vocabulary based on the updated keywords and their extension results; determining each training sample pair and its annotation based on the keyword extension vocabulary; and adjusting the model parameters of the semantic model based on each training sample pair and its annotation.

7. A keyword expansion device, characterized in that: The device comprises: an acquisition module for acquiring a keyword input by a user; a determination module for segmenting the keyword to determine an atomic word sequence corresponding to the keyword, wherein the atomic word is a word that contains semantics and cannot be segmented any further; an extension module for determining an extension word of each atomic word in the atomic word sequence through a pre-constructed atomic word extension word library, wherein the atomic word extension word library comprises each atomic word and its corresponding extension word; a combination module for combining each atomic word and an extension result of each atomic word according to the atomic word sequence respectively to determine at least one extension content corresponding to the keyword as an extension result of the keyword; combining each atomic word and an extension result of each atomic word according to the atomic word sequence respectively to determine at least one extension content corresponding to the keyword, including combining the atomic word at each position in the atomic word sequence with an extension word of an atomic word at another position, combining the extension word of the atomic word with an atomic word at another position, and combining the extension word of the atomic word with an extension word of an atomic word at another position to determine each extension content; The atomic word expansion word library is constructed by the following method: Acquire a plurality of keyword pairs, wherein the keyword pairs include two keywords with similar semantics; For each keyword pair, the two keywords included in the keyword pair are segmented respectively to determine the atomic word sequences corresponding to the keywords; Determine different atomic words in each atomic word sequence, and according to the position of each atomic word in each atomic word sequence, determine different atomic words located at the same position in the atomic word sequence as specific atomic words of each keyword; According to each specific atomic word, determine the synonymous atomic word pair of the keyword pair; According to the synonymous atomic word pairs corresponding to each keyword pair, an atomic word extended vocabulary is constructed.

8. A computer-readable storage medium, characterized in that: The 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 6 is implemented.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 6 is implemented.