A keyword recommendation method, device and electronic device

Through the trained keyword recommendation model, the sorting feature values of positive and negative samples are used to sort recommended keywords, which solves the problem of not considering user characteristics in the existing technology, and achieves more personalized keyword sorting and user experience improvement.

CN114090895BActive Publication Date: 2025-07-25BEIJING IQIYI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111435807.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2025-07-25
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

When the existing Suggestion system returns the predicted keyword queue that the user wants to search, it fails to consider the characteristics of different users, resulting in the keyword sorting not personalized enough. When selecting keywords, users tend to select words with the highest sorting.

Method used

The trained keyword recommendation model sorts the recommended keywords. The model is obtained through the sorting training of positive samples and negative samples in the keyword queue for the to-recommended samples. The positive samples are the keywords selected by the user, and the negative samples are the keywords that have not been selected. It learns the user's interest preferences and generates the target keyword queue.

Benefits of technology

It improves the personalization of keyword sorting, has a better user experience, and can select keywords based on user interests and preferences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090895B_ABST
    Figure CN114090895B_ABST
Patent Text Reader

Abstract

A keyword recommendation method, device and electronic device provided by an embodiment of the present application are applied to the field of information technology. By obtaining a to-be-query keyword input by a user; searching for a plurality of to-be-recommended keywords corresponding to the to-be-query keyword; sorting the plurality of to-be-recommended keywords through a pre-trained keyword recommendation model to obtain a target keyword queue; and recommending the target keyword queue to the user, it is possible to query to-be-recommended keywords according to the to-be-query keyword input by the user, sort the to-be-recommended keywords, and train the model through the sorted keywords, so as to generate a keyword queue through the trained model and recommend it to the user, thereby facilitating the user to select keywords according to the keyword queue and improving the user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a keyword recommendation method, device and electronic equipment. Background Art

[0002] Suggestion (intelligent suggestion for query keywords) refers to the predicted keywords that the user wants to search for, which are returned to the user based on the keywords entered by the user in the search box. For example Figure 1 As shown, the keyword entered by the user in the search box is "neural network", and the returned query keyword intelligent prompts are "neural network algorithm", "neural network model", "three major categories of neural network algorithms", "neural network principles", "neural network engine", etc.

[0003] The inventors found in their research that when users select keywords based on the predicted keyword queue that the users want to search for, they tend to select keywords that are ranked higher, such as Figure 2 As shown in the figure. However, when the existing Suggestion returns the predicted keyword queue that the user wants to search for to the user, it only sorts the keywords entered by the user in the search box according to the similarity with the keywords in the keyword library, without considering the characteristics of different users. How to sort the keywords according to the characteristics of the user to generate a keyword queue selection has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a keyword recommendation method, device and electronic device to achieve keyword ranking and keyword queue selection. The specific technical solution is as follows:

[0005] In a first aspect of the implementation of the present application, a keyword recommendation method is first provided, the method comprising:

[0006] Get the keywords to be searched entered by the user;

[0007] Searching for multiple keywords to be recommended corresponding to the keyword to be queried;

[0008] The plurality of keywords to be recommended are sorted by a pre-trained keyword recommendation model to obtain a target keyword queue, wherein the pre-trained keyword recommendation model is a network model obtained by sorting positive samples, negative samples, and the positive samples and the negative samples in the keyword queue of the sample to be recommended, the positive samples are keywords selected by the user among the found sample keywords to be recommended, and the negative samples are keywords not selected by the user among the found sample keywords to be recommended;

[0009] The target keyword queue is recommended to the user.

[0010] Optionally, the training method of the pre-trained keyword recommendation model includes:

[0011] Get positive and negative samples;

[0012] Obtaining and calculating the ranking feature value of the positive sample and the ranking feature value of the negative sample according to the ranking of the positive sample and the negative sample in the keyword queue of the sample to be recommended;

[0013] Inputting the positive sample, the negative sample, the ranking feature value of the positive sample and the ranking feature value of the negative sample into the keyword recommendation model to be trained for ranking, and generating a keyword queue of samples to be recommended;

[0014] Selecting a queue consisting of the first N sample keyword queues to be recommended from the sample keyword queues to be recommended, to obtain the target sample keyword queue;

[0015] Calculating the current loss of the keyword recommendation model to be trained according to the target sample keyword queue;

[0016] If the current loss is greater than a preset threshold, the parameters of the keyword recommendation model to be trained are adjusted, and the step of inputting the positive sample, the negative sample, the sorting feature value of the positive sample and the sorting feature value of the negative sample into the keyword recommendation model to be trained for sorting is returned to continue generating a keyword queue of samples to be recommended until the current loss is less than the preset threshold to obtain a trained keyword recommendation model.

[0017] Optionally, obtaining positive samples and negative samples includes:

[0018] The positive samples are obtained by selecting keywords selected by the user from multiple pre-stored target sample keyword queues; the negative samples are obtained by selecting keywords not selected by the user from multiple pre-stored target sample keyword queues, and multiple keywords other than the keywords in the target sample keyword queue are selected from the sample keyword queue to be recommended.

[0019] Optionally, the obtaining and calculating the ranking feature value of the positive sample and the ranking feature value of the negative sample according to the ranking of the positive sample and the negative sample in the keyword queue of samples to be recommended, includes:

[0020] Obtaining the ranking of the positive sample and the negative sample in the keyword queue of samples to be recommended;

[0021] Obtaining the feature value to be output of the positive sample and the feature value to be output of the negative sample by subtracting the ranking of the positive sample and the negative sample in the keyword queue of the sample to be recommended from the total number of keywords in the keyword queue of the sample to be recommended;

[0022] Normalize the eigenvalues to be output for the positive samples and the eigenvalues to be output for the negative samples respectively to obtain the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples.

[0023] Optionally, inputting the positive samples, the negative samples, the sorted eigenvalues of the positive samples, and the sorted eigenvalues of the negative samples into a keyword recommendation model to be trained for sorting to generate a keyword queue of samples to be recommended includes:

[0024] Select multiple target samples from the sorted eigenvalues of the positive samples and / or the sorted eigenvalues of the negative samples, and set the sorted eigenvalues of the target samples to 0 to obtain the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples after setting, where the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples after setting include the sorted eigenvalues of multiple samples with sorted eigenvalues of 0 and the sorted eigenvalues of the unselected samples;

[0025] Input the positive samples, the negative samples, the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples after setting into a keyword recommendation model to be trained for sorting to generate the keyword queue of samples to be recommended.

[0026] Optionally, inputting the positive samples, the negative samples, the sorted eigenvalues of the positive samples, and the sorted eigenvalues of the negative samples into a keyword recommendation model to be trained for sorting to generate a keyword queue of samples to be recommended includes:

[0027] Select multiple target samples from the sorted eigenvalues of the positive samples and / or the sorted eigenvalues of the negative samples, and remove the sorted eigenvalues of the multiple target samples to obtain the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples after processing;

[0028] Input the positive samples, the negative samples, the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples after processing into a keyword recommendation model to be trained to generate a keyword queue of the currently predicted keywords.

[0029] Optionally, obtaining and calculating the sorted eigenvalues of the positive samples and the sorted eigenvalues of the negative samples according to the sorting of the positive samples and the negative samples respectively in the keyword queue of samples to be recommended includes:

[0030] Obtain the sorting of the positive samples and the negative samples respectively in the keyword queue of samples to be recommended;

[0031] The sorting feature values of the positive samples and the negative samples are calculated through a preset formula: pos - value=(g - pos)*a, where g is the total number of keywords in the keyword queue of the samples to be recommended, pos - value is the sorting feature value of the positive sample or the negative sample, pos is the sorting of the positive sample or the negative sample in the keyword queue of the samples to be recommended, and a is a preset coefficient.

[0032] Optionally, sorting the multiple keywords to be recommended through a pre - trained keyword recommendation model to obtain a target keyword queue includes:

[0033] Sorting the multiple keywords to be recommended through the trained keyword recommendation model to obtain a keyword queue to be recommended;

[0034] Selecting the first N keywords from the keyword queue to be recommended through the trained keyword recommendation model to form a queue, and obtaining the target keyword queue.

[0035] In the second aspect of the implementation of this application, a keyword recommendation device is further provided. The above - mentioned device includes:

[0036] A keyword acquisition module, configured to acquire the keywords to be queried input by the user;

[0037] A keyword search module, configured to search for multiple keywords to be recommended corresponding to the keywords to be queried;

[0038] A keyword sorting module, configured to sort the multiple keywords to be recommended through a pre - trained keyword recommendation model to obtain a target keyword queue. The pre - trained keyword recommendation model is a network model trained through positive samples, negative samples, and the sorting of positive samples and negative samples in the keyword queue of the samples to be recommended respectively. The positive samples are the keywords selected by the user from the found keywords to be recommended samples, and the negative samples are the keywords not selected by the user from the found keywords to be recommended samples;

[0039] A keyword recommendation module, configured to recommend the target keyword queue to the user.

[0040] Optionally, the above - mentioned device further includes:

[0041] A sample acquisition module, configured to acquire positive samples and negative samples;

[0042] A sorting feature value calculation module, configured to acquire and calculate the sorting feature values of the positive samples and the negative samples according to the sorting of the positive samples and the negative samples in the keyword queue of the samples to be recommended respectively;

[0043] A recommended model acquisition module, which is used to train a keyword recommendation model to be trained through positive samples, negative samples, sorting eigenvalue of positive samples and sorting eigenvalue of negative samples, and obtain a trained keyword recommendation model.

[0044] Optionally, the recommended model acquisition module includes:

[0045] A queue generation module, which is used to input positive samples, negative samples, sorting eigenvalue of positive samples and sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting, and generate a queue of keywords of samples to be recommended;

[0046] A keyword selection module, which is used to select the first N keywords of the queue of samples to be recommended from the queue of keywords of samples to be recommended to obtain a target queue of keywords of samples;

[0047] A loss calculation module, which is used to calculate the current loss of the keyword recommendation model to be trained according to the target queue of keywords of samples;

[0048] A model generation module, which is used to adjust the parameters of the keyword recommendation model to be trained if the current loss is greater than a preset threshold, return to the step of inputting positive samples, negative samples, sorting eigenvalue of positive samples and sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting, and generate a queue of keywords of samples to be recommended, and continue to execute until the current loss is less than the preset threshold to obtain a trained keyword recommendation model.

[0049] Optionally, the sample acquisition module includes:

[0050] A positive sample selection sub-module, which is used to select the keywords selected by the user from multiple pre-stored target queues of keywords of samples to obtain positive samples;

[0051] A negative sample selection sub-module, which is used to select the keywords not selected by the user from multiple pre-stored target queues of keywords of samples, and select multiple keywords other than the keywords in the target queue of keywords of samples from the queue of keywords of samples to be recommended to form negative samples.

[0052] Optionally, the sorting eigenvalue calculation module includes:

[0053] A sorting acquisition sub-module, which is used to obtain the sorting of positive samples and negative samples respectively in the queue of keywords of samples to be recommended;

[0054] An output feature calculation sub-module to be used, which is used to subtract the sorting of positive samples and negative samples respectively in the queue of keywords of samples to be recommended from the total number of keywords in the queue of keywords of samples to be recommended to obtain the output eigenvalue to be of positive samples and the output eigenvalue to be of negative samples;

[0055] A normalization sub-module for normalizing the to-be-output eigenvalues of positive samples and negative samples respectively to obtain the sorted eigenvalues of positive samples and negative samples.

[0056] Optionally, the sorted eigenvalue calculation module includes:

[0057] A sample sorting acquisition sub-module for obtaining the sorting of positive samples and negative samples respectively in the keyword queue of samples to be recommended;

[0058] A formula calculation sub-module for calculating the sorted eigenvalues of positive samples and negative samples through a preset formula: pos-value = (g - pos) * a, where g is the total number of keywords in the keyword queue of samples to be recommended, pos-value is the sorted eigenvalue of a positive sample or a negative sample, pos is the sorting of the positive sample or negative sample in the keyword queue of samples to be recommended, and a is a preset coefficient.

[0059] Optionally, the queue generation module includes:

[0060] A sorted eigenvalue setting sub-module for selecting multiple target samples from the sorted eigenvalues of positive samples and / or negative samples, setting the sorted eigenvalues of the target samples to 0 to obtain the set sorted eigenvalues of positive samples and negative samples, where the set sorted eigenvalues of positive samples and negative samples include the sorted eigenvalues of multiple samples with sorted eigenvalues of 0 and the sorted eigenvalues of unselected samples;

[0061] A keyword queue generation sub-module for inputting positive samples, negative samples, the set sorted eigenvalues of positive samples and negative samples into a keyword recommendation model to be trained for sorting to generate a keyword queue of samples to be recommended.

[0062] Optionally, the queue generation module includes:

[0063] A sorted eigenvalue removal sub-module for selecting multiple target samples from the sorted eigenvalues of positive samples and / or negative samples, removing the sorted eigenvalues of the multiple target samples to obtain the processed sorted eigenvalues of positive samples and negative samples;

[0064] A prediction queue generation sub-module for inputting positive samples, negative samples, the processed sorted eigenvalues of positive samples and negative samples into a keyword recommendation model to be trained to generate a currently predicted keyword queue.

[0065] Optionally, the keyword sorting module includes:

[0066] A keyword sorting sub-module for sorting multiple keywords to be recommended through a trained keyword recommendation model to obtain a keyword queue to be recommended;

[0067] A keyword queue selection sub-module for selecting the top N keywords to be recommended from the keyword queue to be recommended through a trained keyword recommendation model to form a queue, thereby obtaining a target keyword queue.

[0068] In another aspect of the implementation of the present application, an electronic device is further provided, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;

[0069] The memory is used for storing a computer program;

[0070] The processor is configured to execute the above-mentioned keyword recommendation method when executing the program stored on the memory.

[0071] In another aspect of the implementation of the present application, a computer-readable storage medium is further provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned keyword recommendation method is implemented.

[0072] In another aspect of the implementation of the present application, a computer program product containing instructions is further provided. When it runs on a computer, it causes the computer to execute the above-mentioned keyword recommendation method.

[0073] A keyword recommendation method, device, and electronic device provided by an embodiment of the present application obtain a keyword to be queried input by a user; search for multiple keywords to be recommended corresponding to the keyword to be queried; sort the multiple keywords to be recommended through a pre-trained keyword recommendation model to obtain a target keyword queue, where the pre-trained keyword recommendation model is a network model trained through positive samples, negative samples, and the sorting of the positive samples and negative samples in the keyword queue to be recommended respectively. The positive samples are the keywords selected by the user among the found keywords to be recommended, and the negative samples are the keywords not selected by the user among the found keywords to be recommended; recommend the target keyword queue to the user, which can query the keywords to be recommended according to the keyword to be queried input by the user, sort the keywords to be recommended, and train the model through the sorted keywords, so as to generate a keyword queue through the trained model and recommend it to the user. Since the pre-trained keyword recommendation model is a network model trained through the keywords selected by the user, the model can learn the user's interest preferences, and thus sort the keywords to be recommended according to the user's interest preferences, so as to facilitate the user to select keywords according to the keyword queue and improve the user experience. Description of the Drawings

[0074] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art.

[0075] Figure 1 An example diagram of search discovery provided for the embodiments of the present application;

[0076] Figure 2 A statistical chart of the click probability of keywords provided for the embodiments of the present application;

[0077] Figure 3 A schematic flowchart of a keyword recommendation method provided for the embodiments of the present application;

[0078] Figure 4 A schematic flowchart of a method for training a keyword recommendation model provided for the embodiments of the present application;

[0079] Figure 5 A schematic flowchart of a process for calculating sorting eigenvalue provided for the embodiments of the present application;

[0080] Figure 6 A schematic flowchart of a process for obtaining a target keyword queue provided for the embodiments of the present application;

[0081] Figure 7 A schematic structural diagram of a keyword recommendation device provided for the embodiments of the present application;

[0082] Figure 8 A schematic structural diagram of an electronic device provided for the embodiments of the present application. Specific embodiments

[0083] The following will describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application.

[0084] In order to realize the sorting of keywords to generate a keyword queue selection, in the first aspect of the embodiments of the present application, a keyword recommendation method is first provided, and the above method includes:

[0085] Obtain the keyword to be queried input by the user;

[0086] Search for multiple keywords to be recommended corresponding to the keyword to be queried;

[0087] Sort multiple keywords to be recommended through a pre-trained keyword recommendation model to obtain a target keyword queue. The pre-trained keyword recommendation model is a network model trained through positive samples, negative samples, and the rankings of positive and negative samples in the keyword queue of samples to be recommended respectively. Positive samples are the keywords selected by users among the found keywords of samples to be recommended, and negative samples are the keywords not selected by users among the found keywords of samples to be recommended. The pre-trained keyword recommendation model is a network model pre-trained through an offline training method;

[0088] Recommend the target keyword queue to the user.

[0089] It can be seen that through the method of the embodiments of the present application, the keywords to be recommended can be queried according to the keywords to be queried input by the user, and the keywords to be recommended can be sorted. The sorted keywords are used for training the model, so as to generate a keyword queue through the trained model and recommend it to the user. Since the pre-trained keyword recommendation model is a network model trained through the keywords selected by the user, the model can learn the user's interest preferences, so as to sort the keywords to be recommended according to the user's interest preferences, facilitating the user to select keywords according to the keyword queue and improving the user experience.

[0090] Specifically, refer to Figure 3 , Figure 3 which is a schematic flowchart of a keyword recommendation method provided by the embodiments of the present application, including:

[0091] Step S31, obtain the keyword to be queried input by the user.

[0092] The keyword to be queried input by the user can be the keyword in the content that the user hopes to retrieve. For example, when the user hopes to retrieve knowledge related to neural networks, the neural network can be used as the keyword for retrieval. Specifically, when the user conducts a retrieval, the keyword to be queried can be input in the retrieval box for retrieval. For example, refer to Figure 1 where the keyword to be queried input by the user is neural network.

[0093] The method of the embodiments of the present application is applied to a server or an intelligent terminal and can be implemented through the server or the intelligent terminal. Specifically, the intelligent terminal can be a computer, a smart phone, etc.

[0094] Step S32, find multiple keywords to be recommended corresponding to the keyword to be queried.

[0095] The above-mentioned multiple keywords to be recommended can be the keywords that the user hopes to search predicted according to the keyword input by the user. For example, refer to Figure 1, when the keyword to be queried entered by the user is "neural network", the multiple keywords to be recommended corresponding to the keyword to be queried can be "neural network algorithm", "neural network model", "three categories of neural network algorithms", "neural network principle", "neural network engine", etc. Specifically, to find multiple keywords to be recommended corresponding to the keyword to be queried, keyword matching can be performed based on the keyword to be queried entered by the user, and the multiple keywords obtained by matching are used as the keywords to be recommended. In the actual use process, to find multiple keywords to be recommended corresponding to the keyword to be queried, the keyword to be queried can be matched with each keyword in the preset keyword library, and the keywords obtained by matching are used as the keywords to be recommended. In the actual use process, the keyword library can be formed by recording the keywords searched by the user historically.

[0096] Step S33, sort the multiple keywords to be recommended through a pre-trained keyword recommendation model to obtain a target keyword queue.

[0097] Among them, the pre-trained keyword recommendation model is a network model trained through positive samples, negative samples, and the sorting of positive samples and negative samples in the keyword queue of the samples to be recommended. The positive sample is the keyword selected by the user among the keywords to be recommended for the sample found, and the negative sample is the keyword not selected by the user among the keywords to be recommended for the sample found. The pre-trained keyword recommendation model in the embodiment of the present application can be a model pre-trained through an offline training method. Specifically, through an offline training method, training can be performed through the sorting of the keywords selected by the user in the keyword queue to obtain the pre-trained keyword recommendation model. In the actual use process, this model can be used to receive and sort multiple keywords to be recommended to obtain a target keyword queue, so as to realize the sorting of the current keywords to be recommended through the sorting of the keywords selected by the user in the keyword queue.

[0098] In an example, the pre-trained keyword recommendation model is a network model trained through positive samples, negative samples, and the sorting of positive samples and negative samples in the keyword queue of the samples to be recommended. Specifically, the sorting of each keyword to be recommended in the positive sample or negative sample in the keyword queue can be used as the sorting feature value of each keyword to be recommended in the positive sample or negative sample, and then training is performed according to the sorting feature value. For example, see Figure 1, when the sorting of the neural network principle in the keyword queue is 4, the corresponding sorting eigenvalue is 4, and the sorting eigenvalues corresponding to the neural network algorithm, neural network model, three categories of neural network algorithms, and neural network engine are 1, 2, 3, and 5 respectively. Or, the corresponding sorting eigenvalue can be calculated according to the number of keywords in the keyword queue and the sorting of each keyword to be recommended in the positive sample or negative sample. For example, the sorting eigenvalue corresponding to each keyword to be recommended in the positive sample or negative sample can be calculated by subtracting the sorting of each keyword from the number of keywords in the keyword queue. For example, when the number of keywords in the keyword queue is 6 and the sorting of the neural network principle in the keyword queue is 4, the sorting eigenvalue is 2, and the sorting eigenvalues corresponding to the neural network algorithm, neural network model, three categories of neural network algorithms, and neural network engine are 5, 4, 3, and 1 respectively. Then, the network model is trained through the positive sample, negative sample, and the sorting of the positive sample and negative sample in the keyword queue of the sample to be recommended, and a trained keyword recommendation model is obtained.

[0099] Among them, the positive sample is the keyword selected by the user among the keywords to be recommended found, and the negative sample is the keyword not selected by the user among the keywords to be recommended found. For example, see Figure 1 , the token entered by the user in the search box is "neural network", and the returned Query is a queue composed of three categories of neural network algorithms, neural network models, three categories of neural network algorithms, neural network principles, neural network engines, etc. When the user selects the neural network principle and conducts a search, the neural network principle is the positive sample, and three categories of neural network algorithms, neural network models, three categories of neural network algorithms, neural network engines, etc. are the negative samples. In actual use, multiple groups of keywords selected by the user and the corresponding unselected keywords can be selected as the positive sample and negative sample. For example, the multiple groups of keywords selected by the user and the corresponding unselected keywords in the Query returned by multiple users entering tokens within a certain period of time can be counted as the positive sample and negative sample.

[0100] Step S34, recommend the target keyword queue to the user.

[0101] To recommend the target keyword queue to the user, the keyword queue can be displayed in the user interface. For example, see Figure 1 , when the keyword to be queried entered by the user is "neural network", the target keyword queue recommended to the user is three categories of neural network algorithms, neural network models, three categories of neural network algorithms, neural network principles, neural network engines, etc.

[0102] It can be seen that, through the method of the embodiments of the present application, the keywords to be recommended can be queried according to the keywords to be queried input by the user, and the keywords to be recommended can be sorted. The model is trained through the sorted keywords, so as to generate a keyword queue through the trained model and recommend it to the user. Since the pre-trained keyword recommendation model is a network model trained through the keywords selected by the user, the model can learn the user's interest preferences, and thus sort the keywords to be recommended according to the user's interest preferences, so as to facilitate the user to select keywords according to the keyword queue and improve the user experience.

[0103] Optionally, referring to Figure 4 , the training method of the pre-trained keyword recommendation model includes:

[0104] Step S41, obtain positive samples and negative samples;

[0105] Step S42, obtain and calculate the sorting feature values of the positive samples and the sorting feature values of the negative samples according to the sorting of the positive samples and the negative samples in the keyword queue of the samples to be recommended respectively;

[0106] Step S43, train the keyword recommendation model to be trained through the positive samples, negative samples, the sorting feature values of the positive samples and the sorting feature values of the negative samples, and obtain the trained keyword recommendation model.

[0107] Optionally, step S41 of obtaining positive samples and negative samples includes: selecting the keywords selected by the user from multiple pre-stored target sample keyword queues to obtain positive samples; selecting the keywords not selected by the user from multiple pre-stored target sample keyword queues, and selecting multiple keywords other than the keywords in the target sample keyword queue from the keyword queue of the samples to be recommended to form negative samples. Among them, when performing keyword recommendation, some keywords are selected from the keyword queue of the samples to be recommended to form a target sample keyword queue and recommended to the user. When selecting negative samples, the keywords not selected by the user in the target sample keyword queue and the keywords not selected into the target sample keyword queue in the keyword queue of the samples to be recommended can be selected to form negative samples. In the actual use process, the number of keywords not selected by the user selected from multiple pre-stored target sample keyword queues is greater than the number of keywords other than the keywords in the target sample keyword queue selected from the keyword queue of the samples to be recommended. The inventor's research finds that: the ratio of the number of keywords not selected by the user selected from multiple pre-stored target sample keyword queues to the number of keywords other than the keywords in the target sample keyword queue selected from the keyword queue of the samples to be recommended is 3:1, which is the best.

[0108] It can be seen that through the method of the embodiments of the present application, the keyword recommendation model to be trained can be trained by positive samples, negative samples, the sorting eigenvalue of positive samples, and the sorting eigenvalue of negative samples, and a trained keyword recommendation model can be obtained. Thus, a keyword queue can be generated by the trained model and recommended to users, facilitating users to select keywords according to the keyword queue and improving the user experience.

[0109] Optionally, referring to Figure 5 , step S42 of obtaining and calculating the sorting eigenvalue of positive samples and the sorting eigenvalue of negative samples according to the sorting of positive samples and negative samples respectively in the keyword queue of samples to be recommended includes:

[0110] Step S421 of obtaining the sorting of positive samples and negative samples respectively in the keyword queue of samples to be recommended;

[0111] Step S422 of subtracting the sorting of positive samples and negative samples respectively in the keyword queue of samples to be recommended from the total number of keywords in the keyword queue of samples to be recommended to obtain the eigenvalue to be output of positive samples and the eigenvalue to be output of negative samples;

[0112] Step S423 of normalizing the eigenvalue to be output of positive samples and the eigenvalue to be output of negative samples respectively to obtain the sorting eigenvalue of positive samples and the sorting eigenvalue of negative samples.

[0113] Optionally, obtaining and calculating the sorting eigenvalue of positive samples and the sorting eigenvalue of negative samples according to the sorting of positive samples and negative samples respectively in the keyword queue of samples to be recommended includes: obtaining the sorting of positive samples and negative samples respectively in the keyword queue of samples to be recommended; calculating the sorting eigenvalue of positive samples and the sorting eigenvalue of negative samples through the preset formula: pos-value = (g - pos) * a, where g is the total number of keywords in the keyword queue of samples to be recommended, pos-value is the sorting eigenvalue of positive samples or negative samples, pos is the sorting of positive samples or negative samples in the keyword queue of samples to be recommended, and a is a preset coefficient. For example, when a positive sample or a negative sample ranks 3rd in the keyword queue of samples to be recommended, pos is 3. Among them, since in actual use, the keyword queue generally includes 10 keywords, a can be set to 0.1, and normalization can be performed by multiplying each calculation result by 0.1. By normalizing the eigenvalue to be output of positive samples and the eigenvalue to be output of negative samples respectively, the influence of position-bias can be learned during training, and the model can be prevented from being strongly correlated with position-bias, making the influence of other dimensions of features on position-bias smaller.

[0114] Optionally, step S43 trains the keyword recommendation model to be trained by using positive samples, negative samples, the sorting eigenvalue of positive samples, and the sorting eigenvalue of negative samples to obtain a trained keyword recommendation model, including: inputting the positive samples, negative samples, the sorting eigenvalue of positive samples, and the sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting to generate a queue of keywords of samples to be recommended; selecting a queue composed of the first N keywords of samples to be recommended from the queue of keywords of samples to be recommended to obtain a queue of target keywords of samples; calculating the current loss of the keyword recommendation model to be trained according to the queue of target keywords of samples; if the current loss is greater than a preset threshold, adjusting the parameters of the keyword recommendation model to be trained, and returning to the step of inputting the positive samples, negative samples, the sorting eigenvalue of positive samples, and the sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting to generate a queue of keywords of samples to be recommended, and continuing to execute until the current loss is less than the preset threshold to obtain a trained keyword recommendation model.

[0115] Optionally, inputting the positive samples, negative samples, the sorting eigenvalue of positive samples, and the sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting to generate a queue of keywords of samples to be recommended includes: selecting multiple target samples from the sorting eigenvalue of positive samples and / or the sorting eigenvalue of negative samples, and removing the sorting eigenvalue of the multiple target samples to obtain the sorting eigenvalue of the processed positive samples and the sorting eigenvalue of the processed negative samples; inputting the positive samples, negative samples, the sorting eigenvalue of the processed positive samples, and the sorting eigenvalue of the processed negative samples into the keyword recommendation model to be trained to generate a current predicted keyword queue. By removing the sorting eigenvalue of the multiple target samples, it is possible to prevent the model from being strongly correlated with the sorting eigenvalue during the training process, and the model from relying too much on the sorting eigenvalue when performing sorting. In actual use, the removal rate can be set, and the number of target samples whose sorting eigenvalue needs to be removed is obtained by calculating the product of the removal rate and the total number of positive samples and negative samples, and then the sorting eigenvalue of the target samples is selected and removed. The inventor's research finds that the effect is the best when the removal rate is about 0.25.

[0116] Optionally, input the positive samples, negative samples, the sorting eigenvalue of the positive samples, and the sorting eigenvalue of the negative samples into the keyword recommendation model to be trained for sorting, and generate a keyword queue of samples to be recommended, including: selecting multiple target samples from the sorting eigenvalue of the positive samples and / or the sorting eigenvalue of the negative samples, and setting the sorting eigenvalue of the target samples to 0 to obtain the sorted eigenvalues of the positive samples and negative samples after setting. Among them, the sorted eigenvalues of the positive samples and negative samples after setting include the sorted eigenvalues of multiple samples with a sorting eigenvalue of 0 and the sorted eigenvalues of the unselected samples; input the positive samples, negative samples, the sorted eigenvalues of the positive samples and negative samples after setting into the keyword recommendation model to be trained for sorting, and generate a keyword queue of samples to be recommended. By selecting multiple target samples from the sorting eigenvalue of the positive samples and / or the sorting eigenvalue of the negative samples and setting the sorting eigenvalue of the target samples to 0, multiple target samples can be selected from the sorting eigenvalue of the positive samples and / or the sorting eigenvalue of the negative samples and the sorting eigenvalue can be set to zero. By setting the sorting eigenvalue to zero, it is possible to prevent the model from being strongly correlated with the sorting eigenvalue during the training process and the model relying too much on the sorting eigenvalue when performing sorting. Among them, by selecting multiple target samples from the sorting eigenvalue of the positive samples and / or the sorting eigenvalue of the negative samples and setting the sorting eigenvalue of the target samples to 0, the discard rate (pos-dropout-ratio) can be set, that is, a certain proportion of the pos-values of the positive samples and negative samples are set to 0. In actual use, the removal rate can be set, and the number of target samples whose sorting eigenvalues need to be removed can be obtained by calculating the product of the removal rate and the total number of positive samples and negative samples, and then the target samples are selected and the sorting eigenvalues of the target samples are set to 0. The inventor's research found that the effect is best when the removal rate is about 0.25.

[0117] Optionally, see Figure 6 , step S33 sorts multiple keywords to be recommended through a pre-trained keyword recommendation model to obtain a target keyword queue, including:

[0118] Step S331, sort multiple keywords to be recommended through the trained keyword recommendation model to obtain a keyword queue to be recommended;

[0119] Step S332, select the first N keyword queues to be recommended from the keyword queue to be recommended through the trained keyword recommendation model to form a queue, and obtain a target keyword queue.

[0120] In the actual usage process, there are generally 10 keywords in the keyword queue. After sorting multiple keywords to be recommended by a trained keyword recommendation model, the keyword queue to be recommended often contains more than 10 keywords. Therefore, when making recommendations to users, some keywords in the keyword queue to be recommended can be selected to form a target keyword queue and recommended to the users. For example, after sorting multiple keywords to be recommended by a trained keyword recommendation model, the keyword queue to be recommended contains 14 keywords. The first 10 keywords can be selected from this keyword queue to be recommended to form a target keyword queue for the users.

[0121] It can be seen that through the method of the embodiment of the present application, a keyword queue to be recommended can be generated, and the first N keywords to be recommended in the keyword queue to be recommended can be selected by a trained keyword recommendation model to form a target keyword queue, so as to facilitate users to select keywords according to the keyword queue and improve the user experience.

[0122] In the second aspect of the implementation of the present application, a keyword recommendation device is further provided. Refer to Figure 7 , the above device includes:

[0123] A keyword acquisition module 701, configured to acquire the keyword to be queried input by the user;

[0124] A keyword search module 702, configured to search for multiple keywords to be recommended corresponding to the keyword to be queried;

[0125] A keyword sorting module 703, configured to sort multiple keywords to be recommended by a pre-trained keyword recommendation model to obtain a target keyword queue, where the pre-trained keyword recommendation model is a network model trained by positive samples, negative samples, and the sorting of positive samples and negative samples in the keyword queue of samples to be recommended respectively. The positive samples are the keywords selected by the user among the found keywords to be recommended for samples, and the negative samples are the keywords not selected by the user among the found keywords to be recommended for samples;

[0126] A keyword recommendation module 704, configured to recommend the target keyword queue to the user.

[0127] Optionally, the above device further includes:

[0128] A sample acquisition module, configured to acquire positive samples and negative samples;

[0129] A sorting eigenvalue calculation module, configured to acquire and calculate the sorting eigenvalues of positive samples and negative samples respectively according to the sorting of positive samples and negative samples in the keyword queue of samples to be recommended;

[0130] A recommended model acquisition module, configured to train a keyword recommendation model to be trained by using positive samples, negative samples, sorting eigenvalue of positive samples, and sorting eigenvalue of negative samples, so as to obtain a trained keyword recommendation model.

[0131] Optionally, the recommended model acquisition module includes:

[0132] A queue generation module, configured to input positive samples, negative samples, sorting eigenvalue of positive samples, and sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting, so as to generate a queue of keywords of samples to be recommended;

[0133] A keyword selection module, configured to select a queue composed of the top N keywords of samples to be recommended from the queue of keywords of samples to be recommended, so as to obtain a queue of target sample keywords;

[0134] A loss calculation module, configured to calculate the current loss of the keyword recommendation model to be trained according to the queue of target sample keywords;

[0135] A model generation module, configured to, if the current loss is greater than a preset threshold, adjust parameters of the keyword recommendation model to be trained, return to the step of inputting positive samples, negative samples, sorting eigenvalue of positive samples, and sorting eigenvalue of negative samples into the keyword recommendation model to be trained for sorting to generate a queue of keywords of samples to be recommended, and continue to execute until the current loss is less than the preset threshold to obtain a trained keyword recommendation model.

[0136] Optionally, the sample acquisition module includes:

[0137] A positive sample selection sub-module, configured to select keywords selected by a user from multiple pre-stored queues of target sample keywords, so as to obtain positive samples;

[0138] A negative sample selection sub-module, configured to select keywords not selected by the user from multiple pre-stored queues of target sample keywords, and select multiple keywords other than the keywords in the target sample keyword queue from the queue of keywords of samples to be recommended, so as to form negative samples.

[0139] Optionally, the sorting eigenvalue calculation module includes:

[0140] A sorting acquisition sub-module, configured to obtain the sorting of positive samples and negative samples in the queue of keywords of samples to be recommended respectively;

[0141] An output feature calculation sub-module to be used, configured to subtract the sorting of positive samples and negative samples in the queue of keywords of samples to be recommended respectively from the total number of keywords in the queue of keywords of samples to be recommended, so as to obtain the eigenvalue of output features of positive samples and the eigenvalue of output features of negative samples;

[0142] A normalization sub-module for normalizing the to-be-output eigenvalue of the positive sample and the to-be-output eigenvalue of the negative sample respectively to obtain the sorted eigenvalue of the positive sample and the sorted eigenvalue of the negative sample.

[0143] Optionally, the sorted eigenvalue calculation module includes:

[0144] A sample sorting acquisition sub-module for obtaining the sorting of the positive sample and the negative sample respectively in the keyword queue of the to-be-recommended samples;

[0145] A formula calculation sub-module for calculating the sorted eigenvalue of the positive sample and the sorted eigenvalue of the negative sample through the preset formula: pos-value = (g - pos) * a, where g is the total number of keywords in the keyword queue of the to-be-recommended samples, pos-value is the sorted eigenvalue of the positive sample or the sorted eigenvalue of the negative sample, pos is the sorting of the positive sample or the negative sample in the keyword queue of the to-be-recommended samples, and a is a preset coefficient.

[0146] Optionally, the queue generation module includes:

[0147] A sorted eigenvalue setting sub-module for selecting multiple target samples from the sorted eigenvalues of the positive sample and / or the sorted eigenvalues of the negative sample, setting the sorted eigenvalues of the target samples to 0, to obtain the set sorted eigenvalues of the positive sample and the sorted eigenvalues of the negative sample, where the set sorted eigenvalues of the positive sample and the sorted eigenvalues of the negative sample include the sorted eigenvalues of multiple samples with sorted eigenvalues of 0 and the sorted eigenvalues of the unselected samples;

[0148] A keyword queue generation sub-module for inputting the positive sample, the negative sample, the set sorted eigenvalues of the positive sample and the sorted eigenvalues of the negative sample into the keyword recommendation model to be trained for sorting to generate a keyword queue of the to-be-recommended samples.

[0149] Optionally, the queue generation module includes:

[0150] A sorted eigenvalue removal sub-module for selecting multiple target samples from the sorted eigenvalues of the positive sample and / or the sorted eigenvalues of the negative sample, removing the sorted eigenvalues of the multiple target samples, to obtain the processed sorted eigenvalues of the positive sample and the sorted eigenvalues of the negative sample;

[0151] A prediction queue generation sub-module for inputting the positive sample, the negative sample, the processed sorted eigenvalues of the positive sample and the sorted eigenvalues of the negative sample into the keyword recommendation model to be trained to generate the currently predicted keyword queue.

[0152] Optionally, the keyword sorting module 703 includes:

[0153] A keyword sorting sub-module, configured to sort multiple keywords to be recommended through a trained keyword recommendation model to obtain a keyword queue to be recommended;

[0154] A keyword queue selection sub-module, configured to select the top N keywords to be recommended from the keyword queue to be recommended through a trained keyword recommendation model to form a queue, and obtain a target keyword queue.

[0155] It can be seen that through the device according to the embodiments of the present application, the keywords to be recommended can be queried according to the keywords to be queried input by the user, and the keywords to be recommended can be sorted, and the model can be trained through the sorted keywords, so as to generate a keyword queue through the trained model and recommend it to the user. Since the pre-trained keyword recommendation model is a network model trained through the keywords selected by the user, the model can learn the user's interest preferences, so as to sort the keywords to be recommended according to the user's interest preferences, so as to facilitate the user to select keywords according to the keyword queue and improve the user experience.

[0156] The embodiments of the present application also provide an electronic device, as Figure 8 shown, including a processor 801, a communication interface 802, a memory 803, and a communication bus 804. Among them, the processor 801, the communication interface 802, and the memory 803 complete mutual communication through the communication bus 804.

[0157] The memory 803 is used to store a computer program;

[0158] When the processor 801 is used to execute the program stored in the memory 803, the following steps are implemented:

[0159] Obtain the keywords to be queried input by the user;

[0160] Search for multiple keywords to be recommended corresponding to the keywords to be queried;

[0161] Sort the multiple keywords to be recommended through a pre-trained keyword recommendation model to obtain a target keyword queue, where the pre-trained keyword recommendation model is a network model trained through positive samples, negative samples, and the sorting of the positive samples and the negative samples in the keyword queue to be recommended respectively. The positive sample is the keyword selected by the user among the found keywords to be recommended for samples, and the negative sample is the keyword not selected by the user among the found keywords to be recommended for samples. The pre-trained keyword recommendation model is a network model pre-trained through an offline training method;

[0162] Recommend the target keyword queue to the user.

[0163] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0164] The communication interface is used for communication between the above terminal and other devices.

[0165] The memory can include a Random Access Memory (RAM), and can also include a non-volatile memory, such as at least one disk memory. Optionally, the memory can also be at least one storage device located far from the aforementioned processor.

[0166] The above-mentioned processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0167] In another embodiment provided by the present application, a computer-readable storage medium is also provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the keyword recommendation method described in any one of the above embodiments is implemented.

[0168] In another embodiment provided by the present application, a computer program product containing instructions is also provided. When it runs on a computer, it causes the computer to execute the keyword recommendation method described in any one of the above embodiments.

[0169] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0170] It should be noted that, in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising a..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.

[0171] Each embodiment in this specification is described in a related manner. The same or similar parts between the embodiments can be referred to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the embodiments of the device, electronic device, storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0172] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.

Claims

1. A keyword recommendation method, characterized in that, The method comprises: Get the keywords to be searched entered by the user; Searching for multiple keywords to be recommended corresponding to the keyword to be queried; The plurality of keywords to be recommended are sorted by a pre-trained keyword recommendation model to obtain a target keyword queue, wherein the training method of the pre-trained keyword recommendation model comprises: obtaining positive samples and negative samples; obtaining and calculating the sorting feature value of the positive sample and the sorting feature value of the negative sample according to the sorting of the positive sample and the negative sample in the keyword queue of samples to be recommended; inputting the positive sample, the negative sample, the sorting feature value of the positive sample and the sorting feature value of the negative sample into the keyword recommendation model to be trained for sorting to generate a keyword queue of samples to be recommended; selecting a queue consisting of the first N keyword queues of samples to be recommended from the keyword queue of samples to be recommended to obtain to the target sample keyword queue; calculate the current loss of the keyword recommendation model to be trained according to the target sample keyword queue; if the current loss is greater than a preset threshold, adjust the parameters of the keyword recommendation model to be trained, return to the step of inputting the positive sample, the negative sample, the sorting feature value of the positive sample and the sorting feature value of the negative sample into the keyword recommendation model to be trained for sorting, and continue to execute the step of generating the keyword queue of the sample to be recommended until the current loss is less than the preset threshold to obtain a trained keyword recommendation model, the positive sample is a keyword selected by the user among the found sample keywords to be recommended, and the negative sample is a keyword not selected by the user among the found sample keywords to be recommended; The target keyword queue is recommended to the user.

2. The method according to claim 1, characterized in that, The obtaining of positive samples and negative samples comprises: Selecting keywords selected by the user from a plurality of pre-stored target sample keyword queues to obtain the positive sample; Keywords that have not been selected by the user are selected from a plurality of pre-stored target sample keyword queues, and a plurality of keywords other than the keywords in the target sample keyword queue are selected from the to-be-recommended sample keyword queue to form the negative samples.

3. The method according to claim 1, wherein The obtaining and calculating the ranking feature value of the positive sample and the ranking feature value of the negative sample according to the ranking of the positive sample and the negative sample in the keyword queue of the sample to be recommended respectively, comprises: Obtaining the ranking of the positive sample and the negative sample in the keyword queue of samples to be recommended; Obtaining the feature value to be output of the positive sample and the feature value to be output of the negative sample by subtracting the ranking of the positive sample and the negative sample in the keyword queue of the sample to be recommended from the total number of keywords in the keyword queue of the sample to be recommended; The to-be-output feature values of the positive sample and the to-be-output feature values of the negative sample are respectively normalized to obtain the sorting feature values of the positive sample and the sorting feature values of the negative sample.

4. The method according to claim 1, wherein The step of inputting the positive sample, the negative sample, the sorting feature value of the positive sample and the sorting feature value of the negative sample into the keyword recommendation model to be trained for sorting, and generating a keyword queue of samples to be recommended, comprises: Select a plurality of target samples from the sorted eigenvalue of the positive samples and / or the sorted eigenvalue of the negative samples, and set the sorted eigenvalue of the target samples to 0, so as to obtain the sorted eigenvalue of the positive samples and the sorted eigenvalue of the negative samples after setting. Wherein, the sorted eigenvalue of the positive samples and the sorted eigenvalue of the negative samples after setting include the sorted eigenvalue of the samples with a plurality of sorted eigenvalues being 0 and the sorted eigenvalue of the unselected samples; Input the positive samples, the negative samples, the sorted eigenvalue of the positive samples and the sorted eigenvalue of the negative samples after setting into the keyword recommendation model to be trained for sorting, and generate the queue of keywords of the samples to be recommended.

5. The method according to claim 1, characterized in that The obtaining and calculating the sorted eigenvalue of the positive samples and the sorted eigenvalue of the negative samples according to the sorting of the positive samples and the negative samples respectively in the queue of keywords of the samples to be recommended includes: Obtain the sorting of the positive samples and the negative samples respectively in the queue of keywords of the samples to be recommended; Calculate the sorted eigenvalue of the positive samples and the sorted eigenvalue of the negative samples through the preset formula: pos-value = (g - pos) * a, where g is the total number of keywords in the queue of keywords of the samples to be recommended, pos-value is the sorted eigenvalue of the positive samples or the sorted eigenvalue of the negative samples, pos is the sorting of the positive samples or the negative samples in the queue of keywords of the samples to be recommended, and a is a preset coefficient.

6. The method according to claim 1, characterized in that, The sorting the plurality of keywords to be recommended through the pre-trained keyword recommendation model to obtain the target keyword queue includes: Sort the plurality of keywords to be recommended through the trained keyword recommendation model to obtain the queue of keywords to be recommended; Select the first N queues of keywords to be recommended from the queue of keywords to be recommended through the trained keyword recommendation model to form a queue, and obtain the target keyword queue.

7. A keyword recommendation device, characterized in that, The device includes: A keyword acquisition module, configured to acquire the keyword to be queried input by the user; A keyword search module, configured to search for a plurality of keywords to be recommended corresponding to the keyword to be queried; A keyword sorting module, configured to sort the multiple keywords to be recommended through a pre-trained keyword recommendation model to obtain a target keyword queue. The training method of the pre-trained keyword recommendation model includes: obtaining positive samples and negative samples; obtaining and calculating, according to the sorting of the positive samples and the negative samples in the keyword queue of the samples to be recommended respectively, the sorting feature values of the positive samples and the sorting feature values of the negative samples; inputting the positive samples, the negative samples, the sorting feature values of the positive samples and the sorting feature values of the negative samples into the keyword recommendation model to be trained for sorting to generate a keyword queue of samples to be recommended; selecting a queue composed of the first N keyword queues of the samples to be recommended from the keyword queue of the samples to be recommended to obtain a target sample keyword queue; calculating the current loss of the keyword recommendation model to be trained according to the target sample keyword queue; if the current loss is greater than a preset threshold, adjusting the parameters of the keyword recommendation model to be trained, and returning to the step of inputting the positive samples, the negative samples, the sorting feature values of the positive samples and the sorting feature values of the negative samples into the keyword recommendation model to be trained for sorting to generate a keyword queue of samples to be recommended and continuing to execute until the current loss is less than the preset threshold to obtain a trained keyword recommendation model. The positive samples are the keywords selected by the user among the keywords to be recommended found, and the negative samples are the keywords not selected by the user among the keywords to be recommended found; A keyword recommendation module, configured to recommend the target keyword queue to the user.

8. An electronic device, characterized in that, It includes a processor, a communication interface, a memory and a communication bus. Among them, the processor, the communication interface and the memory complete communication with each other through the communication bus; The memory is used to store a computer program; The processor is configured to, when executing the program stored on the memory, implement the method steps described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method steps described in any one of claims 1-6 are implemented.

Citation Information

Patent Citations

  • Search recommendation method, CTR estimation model training method, device and apparatus

    CN110390052A