Search association word generation method, electronic device and computer readable storage medium
By using error correction and discrimination models to correct and cluster search terms, the problem of chaotic search suggestion generation is solved, and the accuracy of generated search suggestions is improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
- Filing Date
- 2024-06-26
- Publication Date
- 2026-07-24
AI Technical Summary
In existing technologies, search suggestion results are often chaotic, causing confusion for users and lacking accuracy.
The search terms are corrected using an error correction model, and clustering is performed using the corrected terms as cluster centers. By combining vector representation and a discriminant model, search terms that do not belong to the category are removed, and the final clustering result is generated.
It improves the accuracy of search suggestions, avoids the generation of incorrect suggestions, and enhances the accuracy of search results.
Smart Images

Figure CN118606511B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of music technology, and more specifically, to methods for generating search association terms, electronic devices, and computer-readable storage media. Background Technology
[0002] With the rapid development of digital and mobile music, a massive amount of songs have been created, making it easy for users to misremember song titles. Search suggestions, which recommend words based on partial phrases entered in the search box, can help users find correct and grammatically correct terms. However, because search suggestions include many user-selected terms, including some song titles with misspellings, the generated search results are often chaotic, causing confusion for users and failing to adequately meet their needs.
[0003] Therefore, improving the accuracy of generated search association terms is a technical problem that needs to be solved by those skilled in the art. Summary of the Invention
[0004] The purpose of this application is to provide a method, apparatus, server, and computer-readable storage medium for generating search association terms, thereby improving the accuracy of generating search association terms.
[0005] To achieve the above objectives, the first aspect of this application provides a method for generating search association terms, comprising:
[0006] Input multiple search terms from the search term set into the trained error correction model to obtain the error correction term and error correction probability corresponding to the search term;
[0007] Using the correction word as the cluster center, cluster the search terms corresponding to the same correction word;
[0008] Generate a vector representation corresponding to the search term, and calculate a similarity score for the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs;
[0009] The error correction probability and similarity score corresponding to the search term are input into the trained discrimination model to determine whether the search term belongs to the corresponding category. Search terms that do not belong to the corresponding category are removed to obtain the final clustering result.
[0010] Obtain the target search term, and generate search association terms corresponding to the target search term based on the final clustering result.
[0011] The step of generating search association terms corresponding to the target search term based on the final clustering result includes:
[0012] Generate candidate search association terms corresponding to the target search term, determine the cluster center corresponding to the candidate search association terms in the final clustering result, and use the cluster center as the search association term corresponding to the target search term.
[0013] Before inputting multiple search terms from the search term set into the trained error correction model, the method further includes:
[0014] Obtain click data for training search terms, and construct training search term pairs based on training search terms that click on the same document;
[0015] The training search terms in the training search term pairs are labeled; wherein the labeling results include correct and incorrect ones;
[0016] The error correction model is trained using the training search term pair and the annotation results of the training search terms in the training search term pair, and the trained error correction model is obtained.
[0017] The error correction model includes a neural machine translation model or a Transformer-based bidirectional encoder representation model.
[0018] The step of generating the vector representation corresponding to the search term includes:
[0019] The search term, the search results for the search term, and the click behavior are input into the trained vector representation model to generate the vector representation corresponding to the search term.
[0020] Before inputting the search term, the search results for the search term, and the click behavior into the trained vector representation model, the method further includes:
[0021] Obtain the search results and click behavior of the training search terms, and annotate the training search terms with vector representations;
[0022] The vector representation model is trained using the search results, click behavior, and labeled vector representations of the training search terms, resulting in a trained vector representation model.
[0023] Before inputting the error correction probability and similarity score corresponding to the search term into the trained discrimination model, the method further includes:
[0024] Input the training search terms into the trained error correction model to obtain the training error correction terms and error correction probabilities corresponding to the training search terms;
[0025] Using the training error correction words as cluster centers, cluster the training search words corresponding to the same training error correction word;
[0026] Generate a vector representation corresponding to the training search term, and calculate a similarity score for the training search term based on the similarity between the vector representation of the training search term and the vector representation of the cluster center of the category to which the training search term belongs;
[0027] The training search terms are labeled; the labeling results include whether they belong to the corresponding category.
[0028] The discrimination model is trained using the training search terms and their annotation results to obtain the trained discrimination model.
[0029] The step of calculating the similarity score of the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs includes:
[0030] The cosine similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs is calculated as the similarity score corresponding to the search term.
[0031] To achieve the above objectives, a second aspect of this application provides an electronic device, comprising:
[0032] Memory, used to store computer programs;
[0033] A processor is used to implement the steps of the search association word generation method described above when executing the computer program.
[0034] To achieve the above objectives, a fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the search association term generation method described above.
[0035] As can be seen from the above scheme, the search association term generation method provided in this application includes: inputting multiple search terms from a search term set into a trained error correction model to obtain the error correction term and error correction probability corresponding to the search term; clustering the search terms corresponding to the same error correction term using the error correction term as the cluster center; generating a vector representation corresponding to the search term, and calculating a similarity score corresponding to the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs; inputting the error correction probability and similarity score corresponding to the search term into a trained discriminant model to determine whether the search term belongs to the corresponding category, removing search terms that do not belong to the corresponding category to obtain the final clustering result; obtaining the target search term, and generating search association terms corresponding to the target search term based on the final clustering result.
[0036] In this application, an error correction model is used to correct search terms, preventing the generation of incorrect search suggestions. Search terms corresponding to the same corrected term are clustered using the corrected term as the cluster center, enabling the generation of subsequent search suggestions. Furthermore, a discriminative model is used to remove search terms that do not belong to each category, obtaining the final clustering result, thus improving the accuracy of search term clustering and consequently improving the accuracy of generated search suggestions. Therefore, the search suggestion generation method provided in this application improves the accuracy of generated search suggestions. This application also discloses an electronic device and a computer-readable storage medium that can achieve the same technical effects.
[0037] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. The drawings are used to provide a further understanding of this disclosure and constitute a part of the specification. They are used together with the following detailed description to explain this disclosure, but do not constitute a limitation of this disclosure. In the drawings:
[0039] Figure 1 An architecture diagram of a search association word generation system provided in this application embodiment;
[0040] Figure 2 A flowchart illustrating a method for generating search association terms provided in this application embodiment;
[0041] Figure 3 A flowchart illustrating another method for generating search association terms provided in this application embodiment;
[0042] Figure 4 A flowchart illustrating the calculation of error correction probability using an error correction model in an application embodiment provided in this application;
[0043] Figure 5 A flowchart for calculating a similarity score in an application embodiment provided in this application;
[0044] Figure 6 A flowchart illustrating the discrimination model in an application embodiment provided in this application.
[0045] Figure 7 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0046] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0047] To facilitate understanding of the search association term generation method provided in this application, the system used is described below. See [link to relevant documentation]. Figure 1 It illustrates an architecture diagram of a search association word generation system provided in an embodiment of this application, such as... Figure 1 As shown, it includes server 10 and client 20.
[0048] Server 10 is used to cluster multiple search terms in a search term set. Specifically, it inputs multiple search terms in the search term set into a trained error correction model to obtain the error correction term and error correction probability corresponding to the search term; it uses the error correction term as the cluster center to cluster the search terms corresponding to the same error correction term; it generates a vector representation corresponding to the search term, and calculates the similarity score corresponding to the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs; it inputs the error correction probability and similarity score corresponding to the search term into a trained discriminant model to determine whether the search term belongs to the corresponding category, and removes search terms that do not belong to the corresponding category to obtain the final clustering result.
[0049] Client 20 may include fixed terminals such as PCs (Personal Computers) and mobile terminals such as mobile phones, and is used to receive the target search terms entered by the user and send them to server 10.
[0050] Server 10 is also used to generate search suggestions corresponding to the target search term based on the final clustering result, and return them to client 20. Client 20 is also used to output the search suggestions corresponding to the target search term.
[0051] This application discloses a method for generating search association terms, which improves the accuracy of generating search association terms.
[0052] See Figure 2 The flowchart of a search association word generation method provided in this application embodiment is as follows: Figure 2 As shown, it includes:
[0053] S101: Input multiple search terms from the search term set into the trained error correction model to obtain the error correction term and error correction probability corresponding to the search term;
[0054] The execution entity in this embodiment is the server in the aforementioned search association term generation system, and its purpose is to generate search association terms corresponding to the target search term.
[0055] In this step, the search term set contains multiple search terms collected by the server, which form the basis for generating search suggestions. In other words, the process of generating search suggestions can be understood as selecting search terms related to the target search term from the search term set as search suggestions. The error correction model is used to correct the search terms to generate correct words, i.e., error-correcting words.
[0056] This embodiment does not limit the specific type of error correction model, and may include Neural Machine Translation (NMT) models, Transformer-based (attention mechanism) bidirectional encoder representation models (BERT), etc. As a feasible implementation, the training process of the error correction model may include: acquiring click data of training search terms; constructing training search term pairs based on training search terms that click the same document; labeling the training search terms in the training search term pairs; wherein the labeling results include correct and incorrect; training the error correction model using the training search term pairs and the labeling results of the training search terms in the training search term pairs, to obtain the trained error correction model.
[0057] In practice, high-quality click data is collected as training data for the error correction model. Based on this click data, two training search terms that click on the same document are constructed into a training search term pair. The two training search terms in the training search term pair are labeled to determine whether they are correct words. The training search term pair is then input into the error correction model to obtain the prediction results of whether the two training search terms in the training search term pair are correct words. The loss value is calculated using a loss function based on the prediction results and the labeling results. No specific limitation is made to the loss function here. Backpropagation is performed based on the loss value to adjust the model parameters of the error correction model. The above process is repeated until the loss value is less than the preset value or the number of training iterations reaches the preset number, resulting in a trained error correction model. The trained error correction model is used to correct search terms and generate error correction words and corresponding error correction probabilities. The error correction probability can be understood as the confidence level of the error correction words predicted by the error correction model.
[0058] S102: Using the correction word as the cluster center, cluster the search terms corresponding to the same correction word;
[0059] In this step, the error correction words generated in the previous step are used as cluster centers to group the search terms corresponding to the same error correction word into one category.
[0060] S103: Generate a vector representation corresponding to the search term, and calculate a similarity score for the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs;
[0061] In this step, vector representations of each search term, including the error correction term, are generated. This embodiment does not limit the specific method of generating vector representations of search terms; different types of vector representation models can be used for generation.
[0062] Furthermore, the similarity between the vector representation of each search term and the vector representation of the cluster center of the category to which the search term belongs is calculated as the similarity score for the search term. That is, the similarity between the vector representation of each search term and the vector representation of its corresponding error-correction term is calculated as the similarity score for the search term. This embodiment does not limit the method of similarity calculation. As a feasible implementation, calculating the similarity score for the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs includes: calculating the cosine similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs as the similarity score for the search term. Of course, other similarity calculation methods can also be used, and this embodiment does not specifically limit them.
[0063] S104: Input the error correction probability and similarity score corresponding to the search term into the trained discrimination model to determine whether the search term belongs to the corresponding category, and remove search terms that do not belong to the corresponding category to obtain the final clustering result;
[0064] In this step, the discriminative model is used to determine whether a search term belongs to a corresponding category. The input to the discriminative model is the error correction probability and similarity score corresponding to the search term, and the output is whether the search term belongs to the corresponding category. Search terms that do not belong to the corresponding category are removed to obtain the final clustering result. The final clustering result can be used for generating subsequent search association terms. It should be noted that the discriminative model can remove erroneous search terms in each category, including misspelled search terms and search terms with low similarity to the cluster centers.
[0065] As a feasible implementation method, the training process of the discriminative model may include: inputting training search terms into the trained error correction model to obtain training error correction terms and error correction probabilities corresponding to the training search terms; clustering training search terms corresponding to the same training error correction term using the training error correction term as the cluster center; generating vector representations corresponding to the training search terms, and calculating similarity scores corresponding to the training search terms based on the similarity between the vector representations of the training search terms and the vector representations of the cluster centers of the categories to which the training search terms belong; labeling the training search terms; wherein the labeling results include whether they belong to the corresponding category; and training the discriminative model using the training search terms and the labeling results of the training search terms to obtain the trained discriminative model.
[0066] In practical implementation, a discriminative model can be trained using training search terms. The training search terms are then input into the trained error correction model to obtain the corresponding training error correction terms and their probabilities. Using the training error correction terms as cluster centers, training search terms corresponding to the same training error correction term are clustered, generating vector representations for the training search terms. Similarity scores are calculated for the training search terms, and whether each training search term is input into its corresponding category is labeled. The error correction probabilities and similarity scores of the training search terms are then input into the discriminative model to predict whether the training search term belongs to its corresponding category. Based on the prediction and labeling results, a loss function is used to calculate the loss value (no specific limitation is made to the loss function here). Backpropagation is then performed based on this loss value to adjust the model parameters of the discriminative model. This process is repeated until the loss value is less than a preset value or the number of training iterations reaches a preset number, resulting in a trained discriminative model.
[0067] S105: Obtain the target search term and generate search association terms corresponding to the target search term based on the final clustering result.
[0068] In this step, the target search term input by the user is obtained, and search suggestions corresponding to the target search term are generated based on the final clustering results. As a possible implementation, generating search suggestions corresponding to the target search term based on the final clustering results includes: generating candidate search suggestions corresponding to the target search term; determining the cluster centers corresponding to the candidate search suggestions in the final clustering results; and using the cluster centers as the search suggestions corresponding to the target search term.
[0069] In practice, candidate search terms are first generated for the target search term. The generation method for these candidate search terms is not limited here; they may contain incorrect or similar terms. Then, the cluster centers for each candidate search term are determined from the final clustering results, and these cluster centers are used as the search terms for the target search term. Since the search terms in each category of the final clustering results are corrected and do not contain any incorrect terms, no incorrect candidate search terms or their corresponding cluster centers are found. Therefore, the generated search terms can eliminate incorrect candidate search terms, improving the accuracy of the generated search terms. Furthermore, for similar candidate search terms, they belong to the same category in the final clustering results, meaning they have the same cluster centers. Therefore, the generated search terms can merge similar candidate search terms, further improving the accuracy of the generated search terms.
[0070] In this embodiment, an error correction model is used to correct search terms, preventing the generation of incorrect search suggestions. Search terms corresponding to the same corrected term are clustered using the corrected term as the cluster center, enabling the generation of subsequent search suggestions. Furthermore, a discriminative model is used to remove search terms that do not belong to each category, obtaining the final clustering result, thus improving the accuracy of search term clustering and consequently improving the accuracy of generated search suggestions. Therefore, the search suggestion generation method provided in this embodiment improves the accuracy of generated search suggestions.
[0071] This application discloses a method for generating search association terms. Compared with the above embodiments, this embodiment further explains and optimizes the technical solution. Specifically:
[0072] See Figure 3 The flowchart of another search association word generation method provided in this application embodiment is as follows: Figure 3 As shown, it includes:
[0073] S201: Input multiple search terms from the search term set into the trained error correction model to obtain the error correction term and error correction probability corresponding to the search term;
[0074] S202: Using the correction word as the cluster center, cluster the search terms corresponding to the same correction word;
[0075] S203: Input the search term, the search results for the search term, and the click behavior into the trained vector representation model to generate the vector representation corresponding to the search term;
[0076] In this embodiment, a vector representation model is used to generate vector representations corresponding to search terms. The input of the vector representation model is the search term and its corresponding search results and click behavior. The corresponding vector representation is generated using the search results and click behavior of the search term. Compared with the method of generating vector representations through text representation, this method is more suitable for the music field and accurately reflects the internal representation of search terms in the music field.
[0077] As a feasible implementation method, the vector representation model training process in this embodiment may include: obtaining the search results and click behavior of the training search terms, and labeling the training search terms with vector representations; using the search results, click behavior, and labeled vector representations of the training search terms to train the vector representation model, thereby obtaining the trained vector representation model.
[0078] In practice, a vector representation model can be trained using training search terms. Search results and click behaviors for the training search terms are obtained, and the vector representations of the training search terms are labeled. The training search terms, along with their corresponding search results and click behaviors, are input into the vector representation model to predict the vector representations of the training search terms. Based on the prediction and labeling results, a loss value is calculated using a loss function (the specific loss function is not limited here). Backpropagation is performed based on this loss value to adjust the model parameters of the vector representation model. This process is repeated until the loss value is less than a preset value or the number of training iterations reaches a preset number, resulting in a trained vector representation model.
[0079] S204: Calculate the similarity score corresponding to the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs;
[0080] S205: Input the error correction probability and similarity score corresponding to the search term into the trained discrimination model to determine whether the search term belongs to the corresponding category, and remove search terms that do not belong to the corresponding category to obtain the final clustering result;
[0081] S206: Obtain the target search term, and generate search association terms corresponding to the target search term based on the final clustering result.
[0082] Therefore, this embodiment utilizes a vector representation model to generate vector representations of search terms based on search results and click behavior. This accurately reflects the internal representation of search terms in the music field, improves the accuracy of generating vector representations of search terms in the music field, further improves the accuracy of search term clustering, and further improves the accuracy of generating search association terms.
[0083] The following describes an application embodiment provided by this application, which specifically includes the following steps:
[0084] Step 1: Filter high-quality click data, link search terms with the same clicks to each other, and learn the error correction model: , Two search terms that received the same number of clicks.
[0085] Step 2: Obtain the corrected term for each search term using the error correction model: And the probability of error correction: .like Figure 4 As shown, the error correction model is used to calculate respectively. Error correction probability .
[0086] Step 3: Based on the search results and click behavior after the user searches for each search term, learn the vector representation (embedding) of the search terms. vector representation ,in, For search terms Search results For search terms Click behavior.
[0087] Step 4: Cluster the search terms around the correction term to obtain cluster families, for example... .
[0088] Step 5: Calculate the similarity score between the search term and the cluster center within each cluster: .
[0089] like Figure 5 As shown, , The corresponding vector representations are respectively After passing through the vector representation model, the corresponding vector representations are obtained, and then the results are calculated respectively. and Similarity score between .
[0090] Step 6: Learn the fusion coefficient and use a discriminative model to determine whether the search term belongs to the corresponding cluster, such as... Figure 6 As shown, the determination Does it belong to the corresponding cluster family? .
[0091] Step 7: Obtain the final cluster families: This is used for subsequent calculations based on search association terms.
[0092] The following describes a search association term generation device provided in an embodiment of this application. The search association term generation device described below can be referred to in conjunction with the search association term generation method described above. The search association term generation device includes:
[0093] The first input module is used to input multiple search terms from the search term set into the trained error correction model to obtain the error correction term and error correction probability corresponding to the search term.
[0094] The clustering module is used to cluster search terms corresponding to the same error correction word, with the error correction word as the cluster center.
[0095] The calculation module is used to generate a vector representation corresponding to the search term, and calculate a similarity score for the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs;
[0096] The second input module is used to input the error correction probability and similarity score corresponding to the search term into the trained discrimination model to determine whether the search term belongs to the corresponding category, and remove search terms that do not belong to the corresponding category to obtain the final clustering result.
[0097] The generation module is used to obtain the target search term and generate search association terms corresponding to the target search term based on the final clustering result.
[0098] In this embodiment, an error correction model is used to correct search terms, preventing the generation of incorrect search suggestions. Search terms corresponding to the same corrected term are clustered using the corrected term as the cluster center, thus generating subsequent search suggestions. Furthermore, a discriminative model is used to remove search terms that do not belong to each category, obtaining the final clustering result, improving the accuracy of search term clustering, and consequently improving the accuracy of generated search suggestions. Therefore, the search suggestion generation device provided in this embodiment improves the accuracy of generated search suggestions.
[0099] Based on the above embodiments, as a preferred implementation, the generation module is specifically used to: generate candidate search association terms corresponding to the target search term, determine the cluster center corresponding to the candidate search association terms in the final clustering result, and use the cluster center as the search association term corresponding to the target search term.
[0100] Based on the above embodiments, as a preferred embodiment, it further includes:
[0101] The first training module is used to acquire click data of training search terms, construct training search term pairs based on training search terms that click the same document, label the training search terms in the training search term pairs, wherein the labeling results include correct and incorrect; and train an error correction model using the training search term pairs and the labeling results of the training search terms in the training search term pairs to obtain the trained error correction model.
[0102] Based on the above embodiments, as a preferred implementation, the error correction model includes a neural machine translation model or a Transformer-based bidirectional encoder representation model.
[0103] Based on the above embodiments, as a preferred implementation, the calculation module is specifically used to: input the search term, the search results of the search term, and the click behavior into the trained vector representation model to generate the vector representation corresponding to the search term.
[0104] Based on the above embodiments, as a preferred embodiment, it further includes:
[0105] The second training module is used to obtain the search results and click behavior of the training search terms, and to annotate the training search terms with vector representations; and to train the vector representation model using the search results, click behavior, and annotated vector representations of the training search terms, thereby obtaining the trained vector representation model.
[0106] Based on the above embodiments, as a preferred embodiment, it further includes:
[0107] The third training module is used to input training search terms into the trained error correction model to obtain the training error correction terms and error correction probabilities corresponding to the training search terms; to cluster the training search terms corresponding to the same training error correction term using the training error correction term as the cluster center; to generate the vector representation of the training search term, and to calculate the similarity score of the training search term based on the similarity between the vector representation of the training search term and the vector representation of the cluster center of the category to which the training search term belongs; to label the training search term, wherein the labeling result includes whether it belongs to the corresponding category; and to train the discriminant model using the training search term and the labeling result of the training search term to obtain the trained discriminant model.
[0108] Based on the above embodiments, as a preferred implementation, the calculation module is specifically used to: calculate the cosine similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs as the similarity score corresponding to the search term.
[0109] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0110] This application also provides an electronic device, see [link to document]. Figure 7 The present application provides a structural diagram of an electronic device, such as... Figure 7 As shown, it may include a processor 71 and a memory 72.
[0111] The processor 71 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 71 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 71 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 71 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 71 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0112] The memory 72 may include one or more computer-readable storage media, which may be non-transitory. The memory 72 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 72 is used to store at least the following computer program 721, which, after being loaded and executed by the processor 71, is capable of implementing the relevant steps in the search association term generation method executed by the electronic device side as disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 72 may also include an operating system 722 and data 723, etc., and the storage method may be temporary storage or permanent storage. The operating system 722 may include Windows, Unix, Linux, etc.
[0113] In some embodiments, the electronic device may further include a display screen 73, an input / output interface 74, a communication interface 75, a sensor 76, a power supply 77, and a communication bus 78.
[0114] certainly, Figure 7 The structure of the electronic device shown does not constitute a limitation on the electronic device in the embodiments of this application. In practical applications, the electronic device may include more than [other components]. Figure 7 More or fewer components as shown, or combinations of certain components.
[0115] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, which, when executed by a processor, implement the steps of the search association word generation method performed by the electronic device of any of the above embodiments.
[0116] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.
[0117] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
Claims
1. A method for generating search association terms, characterized in that, include: Input multiple search terms from the search term set into the trained error correction model to obtain the error correction term and error correction probability corresponding to the search term; Using the correction word as the cluster center, cluster the search terms corresponding to the same correction word; Generate a vector representation corresponding to the search term, and calculate a similarity score for the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs; The error correction probability and similarity score corresponding to the search term are input into the trained discrimination model to determine whether the search term belongs to the corresponding category. Search terms that do not belong to the corresponding category are removed to obtain the final clustering result. Obtain the target search term, and generate search association terms corresponding to the target search term based on the final clustering result; Before inputting the error correction probability and similarity score corresponding to the search term into the trained discrimination model, the method further includes: Input the training search terms into the trained error correction model to obtain the training error correction terms and error correction probabilities corresponding to the training search terms; Using the training error correction words as cluster centers, cluster the training search words corresponding to the same training error correction word; Generate a vector representation corresponding to the training search term, and calculate a similarity score for the training search term based on the similarity between the vector representation of the training search term and the vector representation of the cluster center of the category to which the training search term belongs; The training search terms are labeled; the labeling results include whether they belong to the corresponding category. The discrimination model is trained using the training search terms and their annotation results to obtain the trained discrimination model.
2. The method for generating search association terms according to claim 1, characterized in that, The step of generating search association terms corresponding to the target search term based on the final clustering result includes: Generate candidate search association terms corresponding to the target search term, determine the cluster center corresponding to the candidate search association terms in the final clustering result, and use the cluster center as the search association term corresponding to the target search term.
3. The method for generating search association terms according to claim 1, characterized in that, Before inputting multiple search terms from the search term set into the trained error correction model, the process also includes: Obtain click data for training search terms, and construct training search term pairs based on training search terms that click on the same document; The training search terms in the training search term pairs are labeled; wherein the labeling results include correct and incorrect ones; The error correction model is trained using the training search term pair and the annotation results of the training search terms in the training search term pair, and the trained error correction model is obtained.
4. The method for generating search association terms according to claim 3, characterized in that, The error correction model includes a neural machine translation model or a Transformer-based bidirectional encoder representation model.
5. The method for generating search association terms according to claim 1, characterized in that, The generation of the vector representation corresponding to the search term includes: The search term, the search results for the search term, and the click behavior are input into the trained vector representation model to generate the vector representation corresponding to the search term.
6. The method for generating search association terms according to claim 5, characterized in that, Before inputting the search term, the search results for the search term, and the click behavior into the trained vector representation model, the method further includes: Obtain the search results and click behavior of the training search terms, and annotate the training search terms with vector representations; The vector representation model is trained using the search results, click behavior, and labeled vector representations of the training search terms, resulting in a trained vector representation model.
7. The method for generating search association terms according to claim 1, characterized in that, The step of calculating the similarity score corresponding to the search term based on the similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs includes: The cosine similarity between the vector representation of the search term and the vector representation of the cluster center of the category to which the search term belongs is calculated as the similarity score corresponding to the search term.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the search association word generation method as described in any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the search association word generation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
CN105701119A
CN111950254A