Recommendation method, device, electronic device and storage medium for searching information
By combining the multi-model method of user historical search behavior and content information, the corresponding relationship between search information and feature vectors is established, which solves the problem of low recall quality in the existing technology and improves the pertinence and effect of search information recommendation.
Patent Information
- Application Number
- CN202110648500.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-10
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2041-06-10
AI Technical Summary
In the recall stage, existing search information recommendation methods have low correlation between the search information input by users, resulting in low recall quality, lack of pertinence in recommendations, and poor results.
Using the first type model based on user historical search behavior training and the second type model based on content information training, comprehensively considering user historical search behavior and related content information, establishing the corresponding relationship between search information and feature vectors, and recommending searches through similarity ranking information.
It improves the quality of search information recall, enhances the pertinence and effect of recommendations, and provides more accurate target feature vectors, thereby improving the effect of search information recommendation.
Smart Images

Figure CN113282832B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information search technology, and in particular to a method, device, electronic device and storage medium for recommending information search. Background Art
[0002] For websites with search functions, accurate search information recommendations for different users can be made to attract users to click on the recommended search information for search, which can effectively achieve the purpose of attracting traffic. The search information recommendation method in the related art can be divided into two stages: recall and sorting. Among them, the sorting stage is to score and sort the recalled search information to be recommended, and finally determine the search information to be recommended to the user based on the results of scoring and sorting.
[0003] In the recall stage, it is generally believed that in user search behavior, the more times the search information appears continuously within a period of time, the stronger the correlation is; therefore, the electronic device can establish a relationship between the feature vectors of search information that appears continuously for a large number of times through the item2vec model. In this way, after obtaining the search information input by the user, the search information can be input into the trained item2vec model to obtain relevant search information with a high similarity to the feature vector corresponding to the search information, and the relevant search information can be recommended to the user.
[0004] However, during the model training process, the search information entered by the user within a period of time may have no correlation with each other. For example, the user may have continuously searched for "Soldier Assault", "Mojito", "Journey to the West" and other unrelated content within a period of time. After the model is trained in the above manner, when the user enters "Soldier Assault", irrelevant search information such as "Journey to the West" is likely to be recommended to the user as recommended search information. It can be seen that in the above search information recommendation method, the recall quality of the search information to be recommended is not high, resulting in a lack of pertinence in the recommendation of search information and poor results. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide a method, device, electronic device and storage medium for recommending search information, so as to improve the recall quality of search information, thereby enhancing the pertinence of search information recommendation and improving the recommendation effect of search information. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a method for recommending search information, the method comprising:
[0007] Get the target search information entered by the user;
[0008] According to a pre-established correspondence between search information and search information feature vectors, a target feature vector corresponding to the target search information is searched, wherein the correspondence is established based on the search information feature vectors obtained through a first type of model and a second type of model, the first type of model is trained based on the user's historical search behavior, the second type of model is trained based on content information, and the content information is information identifying the specific content of the user's historical search behavior;
[0009] Determining the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship;
[0010] The to-be-recommended search information is sorted based on the similarity, and recommended search information is determined based on the sorting result, and the recommended search information is recommended to the user.
[0011] Optional training methods for the second type of model include:
[0012] obtaining a second type of initial model and a plurality of second search information samples;
[0013] For each of the second search information samples, determining the calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on the content information of the second search information sample;
[0014] Inputting the second search information sample into the second type initial model, converting the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector;
[0015] Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the second type of initial model converges, and the training is stopped so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0016] Optionally, the content information includes at least one of the following:
[0017] The associated entity information of the second search information sample in the preset knowledge graph, the word segmentation information corresponding to the second search information sample, and the category label of the second search information sample.
[0018] Optionally, the second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the associated entity information, the word segmentation information and the category label respectively;
[0019] The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules.
[0020] Optionally, the training method of the first type of model includes:
[0021] Acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior;
[0022] For each of the first search information samples, select any search information as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;
[0023] Inputting the center search information sample into the first type of initial model, converting the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determining prediction information corresponding to the center search information sample based on the feature vector;
[0024] Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the first type of initial model converges, and the training is stopped so that the first type of initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0025] Optionally, the step of sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user includes:
[0026] Sorting the search information to be recommended in descending order of similarity to obtain a sorting result;
[0027] Based on the ranking result, selecting a preset number of search information to be recommended from the search information to be recommended as target information;
[0028] The target information is displayed in a search information recommendation area of a user search page in a descending order of similarity.
[0029] In a second aspect, an embodiment of the present invention provides a device for recommending search information, the device comprising:
[0030] A search information acquisition module, used to acquire target search information input by a user;
[0031] A feature vector search module, used to search for a target feature vector corresponding to the target search information according to a pre-established correspondence between search information and search information feature vectors, wherein the correspondence is established based on the search information feature vector obtained through a first type of model and a second type of model, the first type of model is obtained by training a first type of model training module based on user historical search behavior, the second type of model is obtained by training a second type of model training module based on content information, and the content information is information identifying the specific content of the user's historical search behavior;
[0032] A module for determining search information to be recommended, configured to determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship;
[0033] The search information recommendation module is used to sort the search information to be recommended based on the similarity, determine the recommended search information based on the sorting result, and recommend the recommended search information to the user.
[0034] Optionally, the second type of model training module includes:
[0035] A second sample acquisition submodule, used to acquire a second type of initial model and a plurality of second search information samples;
[0036] A second calibration submodule, configured to determine, for each of the second search information samples, calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on content information of the second search information sample;
[0037] a second prediction submodule, configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector;
[0038] The second parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the second type of initial model converges and stops training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0039] Optionally, the content information includes at least one of the following:
[0040] The associated entity information of the search information sample in the preset knowledge graph, the word segmentation information corresponding to the search information sample, and the category label of the search information sample.
[0041] Optionally, the second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the associated entity information, the word segmentation information and the category label respectively;
[0042] The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules through the corresponding first type of model training module or the second type of model training module.
[0043] Optionally, the first type of model training module includes:
[0044] A first sample acquisition module, used to acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior;
[0045] A first calibration submodule is configured to select, for each of the first search information samples, any search information as a central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;
[0046] a first prediction submodule, configured to input the center search information sample into the first type of initial model, convert the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determine prediction information corresponding to the center search information sample based on the feature vector;
[0047] The first parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the first type of initial model converges and stops training so that the first type of initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0048] Optionally, the search information recommendation module includes:
[0049] The recommended search information sorting submodule is used to sort the search information to be recommended in descending order of similarity to obtain a sorting result;
[0050] A recommended search information selection submodule, configured to select a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result;
[0051] The recommended search information display submodule is used to display the target information in the search information recommendation area of the user search page in the order of similarity from high to low.
[0052] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0053] Memory, used to store computer programs;
[0054] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.
[0055] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.
[0056] In the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and search for the target search word feature vector corresponding to the target search information according to the pre-established correspondence between the search information and the search information feature vector, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, and according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user.
[0057] Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0059] Figure 1 A flowchart of a method for recommending information search provided by an embodiment of the present invention;
[0060] Figure 2 for Figure 1 A flow chart of the training method of the second type of model in the illustrated embodiment;
[0061] Figure 3 for Figure 2 A schematic diagram of the knowledge graph in the illustrated embodiment;
[0062] Figure 4 for Figure 1 A flow chart of the training method of the first type of model in the illustrated embodiment;
[0063] Figure 5 for Figure 1 A schematic diagram of a method for establishing a corresponding relationship between search information and a search information feature vector in the illustrated embodiment;
[0064] Figure 6 for Figure 1 A specific flow chart of step S104 in the illustrated embodiment;
[0065] Figure 7 A schematic diagram of the structure of a recommendation device for searching information provided by an embodiment of the present invention;
[0066] Figure 8 for Figure 7 A specific structural diagram of the second type of model training module in the illustrated embodiment;
[0067] Fig. 9 The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0068] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0069] In order to improve the recall quality of search information, thereby enhancing the pertinence of search information recommendation and improving the recommendation effect of search information, an embodiment of the present invention provides a search information recommendation method, device, electronic device and computer-readable storage medium. First, a search information recommendation method provided by an embodiment of the present invention is introduced.
[0070] The method for recommending search information provided by the embodiment of the present invention can be applied to any electronic device that needs to recommend search information to a user, for example, a server, a computer, a processor, etc., which is not specifically limited here. For the sake of clarity, it is referred to as an electronic device in the following.
[0071] like Figure 1 As shown, a method for recommending searching information includes:
[0072] S101, obtaining target search information input by a user;
[0073] S102, searching for a target feature vector corresponding to the target search information according to a pre-established correspondence between the search information and the search information feature vector;
[0074] Among them, the corresponding relationship is established based on the search information feature vector obtained through the first type of model and the second type of model, the first type of model is trained based on the user's historical search behavior, and the second type of model is trained based on content information, and the content information is information that identifies the specific content of the user's historical search behavior.
[0075] S103, determining the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship;
[0076] S104, sorting the search information to be recommended based on the similarity, determining recommended search information based on the sorting result, and recommending the recommended search information to the user.
[0077] It can be seen that in the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and according to the pre-established correspondence between the search information and the search information feature vector, find the target search word feature vector corresponding to the target search information, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.
[0078] When users use the search function provided by the website to search for information, the website server can recommend relevant search information to users on the search page, attracting users to search based on the recommended search information, which can meet the user's search needs and effectively achieve the purpose of attracting traffic.
[0079] When the electronic device recommends search information to the user, it is generally based on the search information input by the user, and recommends search information related to the search information input by the user. Then, in the above step S101, the electronic device can obtain the search information input by the user and use it as the target search information. The target search information is the search information that the user wants to search. The target search information can be any one of a word, a phrase or a sentence, which is not specifically limited here.
[0080] For example, when a user uses the search function provided by the website to search for information, he enters the search information "Journey to the West" that he wants to search for, and the electronic device can obtain the search information "Journey to the West". The obtained search information "Journey to the West" is the target search information.
[0081] In order to determine the recommended search information that is associated with the target search information input by the user, since the feature vector corresponding to the target search information can represent the characteristics of the target search information input by the user, in the above step S102, the electronic device can search for the target feature vector corresponding to the target search information based on the pre-established correspondence between the search information and the search information feature vector.
[0082] In one implementation, the correspondence between the search information and the search information feature vector may include a one-to-one correspondence between the search information and the search information feature vector, which may be referred to as a “word-vector dictionary”. The “word-vector dictionary” may be recorded in a table, for example, as shown in the following table:
[0083] Search Information A Eigenvector a Search Information B Eigenvector b Search Information C Eigenvector c Search information D Eigenvector d
[0084] In this way, if the target search information is search information C, the electronic device can determine that the target feature vector corresponding to the target search information is feature vector c according to the corresponding relationship recorded in the above table.
[0085] The correspondence between the search information and the search information feature vector may be established based on the search information feature vector obtained through the first model and the second model. In one embodiment, the electronic device may pre-train the first initial model based on the user's historical search behavior to obtain the first model.
[0086] The user enters search information 1 in the search page, and then enters search information 2, search information 3, etc. in succession within a period of time, then "search information 1-search information 2-search information 3.. search information n" constitutes a search information sequence, which can represent the user's historical search behavior, where n is the number of search information entered by the user during this period of time. For example, the user enters Journey to the West in the search page, and then enters Sun Wukong and Tang Monk in succession within a period of time, then "Journey to the West-Sun Wukong-Tang Monk" constitutes a search information sequence.
[0087] In this way, multiple search information sequences can be obtained, and then the first type of initial model can be trained based on multiple search information sequences to obtain the first type of model. When the search information is input into the first type of model, the first type of model can output other search information of the search information in the context corresponding to the user's historical search behavior based on the feature vector corresponding to the search information, that is, it can output other search information belonging to the same search information sequence as the input search information. During the training process of the first type of model, its model parameters will be continuously adjusted, so that the feature vector corresponding to the search information will also be continuously adjusted, becoming more and more accurate.
[0088] In one embodiment, the electronic device may pre-train the second type of initial model based on content information to obtain the above second type of model. The above content information is information identifying the specific content of the user's historical search behavior. In order to improve the accuracy of the feature vector, in addition to training the first type of model based on the user's historical search behavior, the second type of initial model may also be pre-trained.
[0089] When a user enters search information in a search page, the electronic device can determine information that can identify the specific content of the user's historical search behavior. For example, when a user enters the search information "Journey to the West" in a search page, the "Four Great Classical Novels", "Dream of Red Mansions", "Water Margin" and "Romance of the Three Kingdoms" that are related to the specific content that can identify "Journey to the West" can be used as content information.
[0090] In this way, content information corresponding to multiple search information can be obtained, and then the second type of model can be obtained by training the second type of initial model based on the multiple search information and its corresponding content information. When the search information is input into the second type of model, the second type of model can output the content information corresponding to the search information based on the feature vector corresponding to the search information. During the training process of the second type of model, its model parameters will be continuously adjusted, so that the feature vector corresponding to the search information will also be continuously adjusted, and it will become more and more accurate.
[0091] After obtaining the target feature vector corresponding to the target search information, the electronic device may execute step S103, that is, determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the pre-established corresponding relationship.
[0092] The similarity between the target feature vector and the feature vectors of other search information included in the pre-established correspondence can be determined based on the distance between the feature vectors. Specifically, for each other search information included in the above correspondence, the electronic device can determine the distance between the feature vector corresponding to the other search information and the target feature vector, and determine the similarity between the other search information and the target search information based on the distance, and determine the search information to be recommended from the other search information included in the correspondence according to the similarity.
[0093] Generally speaking, the smaller the distance between two feature vectors, the higher the similarity between the search information corresponding to the two feature vectors; conversely, the larger the distance between two feature vectors, the lower the similarity between the search information corresponding to the two feature vectors. The distance between two feature vectors can be cosine distance, Euclidean distance, Manhattan distance, Chebyshev distance, etc., which is not specifically limited here.
[0094] As an implementation manner, for the target feature vector a and the feature vector b of any other search information included in the above correspondence, the cosine distance between the target feature vector a and the feature vector b is:
[0095]
[0096] in,<a,b> is the inner product between the target feature vector a and the feature vector b, |a| is the length of the target feature vector a, |b| is the length of the feature vector b, and θ is the angle between the target feature vector a and the feature vector b. When cosθ is closer to 1, the directions are closer, the distance between the two feature vectors is smaller, and the similarity between the search information corresponding to the two feature vectors is higher; when cosθ is closer to -1, the directions are different, the distance between the two feature vectors is larger, and the similarity between the search information corresponding to the two feature vectors is lower.
[0097] After determining the search information to be recommended, the electronic device can sort the search information to be recommended based on similarity, determine recommended search information based on the sorting result, and recommend the recommended search information to the user, that is, execute the above step S104.
[0098] For example, the electronic device determines the recommended search information 1, the recommended search information 2, and the recommended search information 3, and the similarities between the recommended search information and the search information input by the user are 0.75, 0.55, and 0.99, respectively. The electronic device can sort the recommended search information based on the similarity, and sort them from high to low according to the similarity, and the sorting results are shown in the following table:
[0099] Serial number Similarity Sorting results 1 0.99 Recommended search information 3 2 0.75 Recommended search information 1 3 0.55 Recommended search information 2
[0100] Then, in one implementation, the electronic device may recommend the to-be-recommended search information 3 with the highest similarity as the recommended search information to the user based on the ranking results of the similarities shown in the above table.
[0101] Through the above-mentioned search information recommendation method, after obtaining the search information input by the user, the electronic device can, based on the correspondence between the search information and the search information feature vector established by the first type of model and the second type of model obtained after training based on the user's historical search behavior and content information, comprehensively consider the user's historical search behavior and the specific content information related to the user's historical search behavior, and can obtain a more accurate target feature vector, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.
[0102] As an implementation method of the embodiment of the present invention, Figure 2 As shown, the training method of the second type of model mentioned above may include:
[0103] S201, obtaining a second type of initial model and a plurality of second search information samples;
[0104] In order to train the second type of model, the electronic device may obtain a second type of initial model and a plurality of second search information samples, wherein the second type of initial model may be a multi-classification neural network model, etc. The second search information samples may be search information included in the user's historical search behavior acquired in advance.
[0105] S202: for each second search information sample, determine calibration information of the second search information sample based on a preset calibration rule;
[0106] For each second search information sample, the electronic device may determine the calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule may be set based on the content information of the second search information sample. The calibration information of the second search information sample determined based on the preset calibration rule may identify the specific content of the second search information sample.
[0107] For example, when the second search information sample is "Journey to the West", since "Sun Wukong" is the main character in "Journey to the West", "Journey to the West" belongs to "Ming and Qing Novels", and "Journey to the West" is the word segmentation result of "Journey to the West", "Sun Wukong", "Ming and Qing Novels", and "Journey to the West" can identify the specific content of the second search information sample "Journey to the West", so the electronic device can use "Sun Wukong", "Ming and Qing Novels", and "Journey to the West" as the calibration information of the second search information sample "Journey to the West".
[0108] S203, inputting the second search information sample into the second type initial model, converting the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector;
[0109] During the training of the second type of initial model, the electronic device can input each second search information sample into the second type of initial model. The second type of initial model can convert the second search information sample into a corresponding feature vector based on the current parameters, and determine the prediction information corresponding to the second search information sample based on the feature vector.
[0110] S204, based on the difference between the predicted information and the corresponding calibration information, adjust the current parameters until the second type of initial model converges, and stop training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0111] The model parameters of the current second type of initial model are likely to be inappropriate, resulting in inaccurate conversion of the second search information sample into the corresponding feature vector based on the current model parameters, and further, when the prediction information corresponding to the second search information sample is determined based on the feature vector, the prediction information may not be accurately determined. Therefore, after obtaining the prediction information of each second search information sample, the electronic device can adjust the model parameters of the second type of initial model based on the difference between the calibration information and the prediction information of each second search information sample to make the model parameters of the second type of initial model more appropriate, so that when the second search information sample is converted into the corresponding feature vector based on the adjusted model parameters, an accurate feature vector can be obtained.
[0112] Among them, the above-mentioned method of adjusting the model parameters of the second type of initial model can be a model parameter adjustment method such as a gradient descent algorithm, a stochastic gradient descent algorithm, etc., which is not specifically limited or explained here.
[0113] In order to determine whether the second type initial model converges, the electronic device may determine whether the number of iterations of the second type initial model reaches a preset number, or whether the accuracy of the prediction result of the second type initial model is greater than a preset value.
[0114] If the number of iterations of the second type of initial model reaches the preset number, or the accuracy of the prediction result of the second type of initial model is greater than the preset value, it means that the second type of initial model has converged, that is, the current second type of initial model can accurately determine the feature vector corresponding to the second search information sample, so the training can be stopped at this time to obtain the second type of model. At this time, the feature vector corresponding to the second search information sample obtained based on the second type of model is accurate.
[0115] The above-mentioned preset number of times can be set according to the accuracy requirements of the prediction results, the model structure and other factors, for example, it can be 6000 times, 9000 times, 12000 times, etc., which are not specifically limited here. The preset value can be set according to the accuracy requirements of the prediction results, the model structure and other factors, for example, it can be 0.91, 0.89, 0.90, etc., which are not specifically limited here.
[0116] If the number of iterations of the second type of initial model does not reach the preset number, or the accuracy of the prediction result of the second type of initial model is not greater than the preset value, it means that the second type of initial model has not converged, that is, the current second type of initial model cannot accurately determine the feature vector corresponding to the second search information sample, then the electronic device needs to continue training the second type of initial model.
[0117] It can be seen that in the solution provided by the embodiment of the present invention, the electronic device can train the second type of initial model in the above manner to obtain the second type of model. In this way, the electronic device can obtain the second type of model that can accurately determine the feature vector corresponding to the second search information sample based on the content information in the second search information sample.
[0118] As an implementation mode of an embodiment of the present invention, the above-mentioned content information may include at least one of the following: associated entity information of the second search information sample in a preset knowledge graph, word segmentation information corresponding to the second search information sample, and category label of the second search information sample.
[0119] When the electronic device trains the above-mentioned second type of initial model and determines the calibration information of the second search information sample, it can select at least one of the associated entity information of the second search information sample in the preset knowledge graph, the word segmentation information corresponding to the second search information sample, and the category label of the second search information sample as the calibration information that can identify the specific content of the second search information sample.
[0120] In one embodiment, in order to determine the associated entity information of the second search information sample in the preset knowledge graph, the electronic device can pre-establish a knowledge graph including various search information. Then, when it is necessary to determine the associated entity information of the second search information sample in the preset knowledge graph, the entity information associated with the second search information sample is found from the preset knowledge graph, and then the associated entity information is used as the starting point to traverse according to the preset rules to determine the associated entity information of the second search information sample in the preset knowledge graph. When the preset knowledge graph includes the second search information sample, the entity information of the second search information sample in the preset knowledge graph is the second search information sample itself. When the preset knowledge graph does not include the second search information sample, the entity information corresponding to the second search information sample in the preset knowledge graph can be entity information with a similar meaning to the second search information sample.
[0121] Among them, the above-mentioned preset roaming rules can be to traverse the entities in the knowledge graph according to any one or more of the hierarchical relationships, parallel relationships, whole-part relationships, and causal relationships between entities until the traversal is stopped when the preset conditions are met, and no specific limitation is made here.
[0122] In one embodiment, all the related entity information traversed during the above-mentioned traversal process and the entity information corresponding to the above-mentioned second search information sample in the preset knowledge graph can be used as calibration information of the second search information sample, wherein the above-mentioned preset conditions can be that the number of traversed entities reaches a preset threshold, the walking process distance reaches a preset length, etc., which are not specifically limited here.
[0123] For example, Figure 3 As shown, when the second search information sample 310 is "Journey to the West", the electronic device can associate the second search information sample 310 "Journey to the West" with the entity information 321 "Journey to the West" in the above-mentioned knowledge graph in the preset knowledge graph 320, and the entity information 321 "Journey to the West" is the associated entity information of the second search information sample 310. Then the electronic device can use the associated entity information 321 as the starting point, traverse to the entity information 322 "Sun Wukong" according to the whole-part relationship, traverse to the entity information 323 "Four Great Classics" according to the superior-subordinate relationship, and traverse to the entity information 324 "Dream of Red Mansions" according to the parallel relationship. The electronic device can also continue to use the entity information 322 "Sun Wukong" as the starting point and traverse to the entity information 325 "Havoc in Heaven" according to the related relationship. So far, the number of entity information traversed is 4, and the preset condition is met, and the electronic device can terminate the traversal. The above entity information "Journey to the West", "Sun Wukong", "Four Great Classics", "Dream of Red Mansions", and "Havoc in Heaven" can all be used as the associated entity information of the second search information sample "Journey to the West" in the preset knowledge graph. Finally, the electronic device can determine the above associated entity information as the calibration information of the second search information sample "Journey to the West".
[0124] In one implementation, the electronic device may perform word segmentation processing on the second search information sample, and use the word segmentation information obtained after the word segmentation processing as the calibration information of the second search information sample. The word segmentation processing may adopt any word segmentation processing method in the field of text information processing, which is not specifically limited or described here.
[0125] For example, when the second search information sample is "Journey to the West: The Monkey King Strikes the White Bone Demon Three Times", the electronic device can perform word segmentation processing on the above second search information sample to obtain word segmentation information such as "Journey to the West", "Journey to the West", "Sun Wukong", "White Bone Demon", "Three Strikes on the White Bone Demon", etc. The above word segmentation information can all identify the specific content of the above second search information sample "Journey to the West: The Monkey King Strikes the White Bone Demon Three Times", and the electronic device can determine the above word segmentation information as the calibration information of the second search information sample "Journey to the West: The Monkey King Strikes the White Bone Demon Three Times".
[0126] In one implementation, the electronic device may determine a category label for the second search information sample in advance according to the specific content of the second search information sample, and determine the category label as the calibration information of the second search information sample. The category label may be any label that can represent the category characteristics of the second search information sample, and its specific form is not specifically limited herein, for example, it may be a number, a letter, etc.
[0127] For example, when the second search information sample is "Journey to the West", the electronic device can determine the category of the second search information sample "Journey to the West" according to a predetermined classification rule, and then determine a label of the second search information sample "Journey to the West", for example, the label can be a category label such as "TV series", "Ming and Qing novels", etc. Then, the electronic device can determine the category label as the calibration information of the second search information sample "Journey to the West".
[0128] It can be seen that in this embodiment, the electronic device can determine the associated entity information, word segmentation information and / or category label that can identify the specific content of the second search information sample from different dimensions as the calibration information. In this way, the second type of model trained based on the calibration information can more accurately determine the feature vector corresponding to the second search information sample according to the calibration information that identifies the specific content of the second search information sample from different dimensions, and the electronic device can also establish a more accurate correspondence between the search information and the search information feature vector.
[0129] As an implementation method of the embodiment of the present invention, Figure 4 As shown, the training method of the first type of model mentioned above may include:
[0130] S401, obtaining a first type of initial model and a plurality of first search information samples;
[0131] First, the electronic device may obtain a first type of initial model and a plurality of first search information samples, wherein the first type of initial model may be a neural network model, etc., which is not specifically limited here.
[0132] Each first search information sample may be search information in a user's historical search behavior sequence pre-acquired by the electronic device, and the user's historical search behavior sequence is a sequence composed of search information continuously input in the user's historical search behavior;
[0133] For example, a user continuously inputs the search information "Journey to the West", "Sun Wukong", and "Tang Monk" within a period of time. Then in the user's historical search behavior, "Journey to the West", "Sun Wukong", and "Tang Monk" are the search information continuously input by the user, and "Journey to the West-Sun Wukong-Tang Monk" is the user's historical search behavior sequence. The electronic device can use the user's historical search behavior sequence "Journey to the West-Sun Wukong-Tang Monk" as a first search information sample.
[0134] S402, for each of the first search information samples, select any search information as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;
[0135] After obtaining multiple first search information samples, for each first search information sample, the electronic device can select any search information in the first search information sample as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as the calibration information of the central search information sample. In other words, the electronic device can use other search information included in the first search information sample except the central search information sample as the calibration information of the central search information sample.
[0136] For example, the first search information sample acquired by the electronic device is "Journey to the West - Sun Wukong - Tang Monk", and "Sun Wukong" can be selected as the central search information sample. Then, in the search information "Journey to the West" and "Tang Monk", the calibration information of the central search information sample "Sun Wukong" can be used.
[0137] S403, inputting the center search information sample into the first type of initial model, converting the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determining prediction information corresponding to the center search information sample based on the feature vector;
[0138] During the training of the first type of initial model, the electronic device can input each center search information sample into the first type of initial model, and the first type of initial model can convert the center search information sample into a corresponding feature vector based on the current parameters, and determine the prediction information corresponding to the center search information sample based on the feature vector.
[0139] S404, based on the difference between the predicted information and the corresponding calibration information, adjust the current parameters until the first type of initial model converges, and stop training so that the first type of initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0140] The model parameters of the current first-class initial model are likely to be inappropriate, resulting in inaccurate conversion of the center search information sample into the corresponding feature vector based on the model parameters of the current first-class initial model. When the prediction information corresponding to the center search information sample is determined based on the feature vector, it is also likely that the feature vector corresponding to the center search sample cannot be accurately determined, resulting in inaccurate prediction information. Therefore, after obtaining the calibration information and prediction information of each of the above-mentioned center search information samples, the electronic device can adjust the model parameters of the first-class initial model based on the difference between the calibration information and the prediction information of each center search information sample to make the model parameters of the first-class initial model more appropriate. In this way, when the first search information sample is converted into the corresponding feature vector according to the adjusted model parameters, an accurate feature vector can be obtained.
[0141] If the number of iterations of the first type of initial model reaches the preset number, or the accuracy of the prediction result of the first type of initial model is greater than the preset value, it means that the first type of initial model has converged, that is, the current first type of initial model can accurately determine the feature vector corresponding to the central search information sample, so the training can be stopped at this time to obtain the trained first type of model. At this time, the feature vector corresponding to the first search information sample obtained based on the first type of model is accurate.
[0142] If the number of iterations of the first type of initial model does not reach the preset number, or the accuracy of the prediction result of the first type of initial model is not greater than the preset value, it means that the first type of initial model has not converged, that is, the current first type of initial model cannot accurately determine the feature vector corresponding to the central search information sample, then the electronic device needs to continue training the first type of initial model.
[0143] It can be seen that in the solution provided by the embodiment of the present invention, the electronic device can train the first type of initial model in the above manner to obtain the first type of model. In this way, the electronic device can obtain the first type of model that can accurately determine the feature vector corresponding to the central search information sample in the first search information sample based on the central search information sample.
[0144] As an implementation method of the embodiment of the present invention, Figure 5 As shown, the above-mentioned second type model 520 may include a first sub-model 521, a second sub-model 522 and a third sub-model 523, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are the second search information sample associated entity information, word segmentation information and category label. The first type model 510 is trained according to the search information of the central search information sample in the context of the first search information sample. In this case, the first type model 510, the first sub-model 521, the second sub-model 522 and the third sub-model 523 can be alternately trained according to the preset training rules.
[0145] In the correspondence 530 between the search information and the feature vector pre-established by the electronic device, the feature vector of the search information is obtained based on the first type of model and the second type of model. In the process of training the first type of model and the second type of model, the parameters of the first type of model and the second type of model are adjusted once for each iteration, so in the next iteration, the feature vector corresponding to the first search information sample or the second search information sample determined based on the current parameters will also change accordingly, that is, the correspondence between the search information and the feature vector is updated once for each iteration until the training is completed, the first type of model and the second type of model are obtained, and the final correspondence between the search information and the feature vector is also obtained.
[0146] In order to make the feature vector more accurate, an alternating training method can be used to train the first type of model and the second type of model. As an implementation method, the above-mentioned multiple first search information samples can be divided into several groups of samples, and similarly, the above-mentioned multiple second search information samples can also be divided into several groups of samples. Among them, the number of first search information samples or second search information samples included in each group of samples can be determined based on factors such as the total number of first search information samples or second search information samples, for example, it can be 10, 50, 100, etc., and is not specifically limited here.
[0147] Furthermore, after using a group of first search information samples to train the first type of model, a group of second search information samples can be used for the first sub-model, the second sub-model or the third sub-model respectively. During the training process, the correspondence between the search information and the feature vector is continuously updated.
[0148] As an implementation method, the alternating training method can be specifically as follows: Step A, using the first group of first search information samples to train the first type of model, and updating the corresponding relationship between the search information and the feature vector; Step B, using the first group of second search information samples to train the first sub-model, and updating the corresponding relationship between the search information and the feature vector; Step C, using the second group of second search information samples to train the second sub-model, and updating the corresponding relationship between the search information and the feature vector; Step D, using the third group of second search information samples to train the third sub-model, and updating the corresponding relationship between the search information and the feature vector; Step E, using the second group of first search information samples to train the first type of model, and updating the corresponding relationship between the search information and the feature vector. And so on, until the end of the training, the correspondence between the search information and the feature vector can be accurately obtained, that is, the above-mentioned "word-vector dictionary" is obtained.
[0149] It can be seen that in this embodiment, the electronic device can train the corresponding first type model, first sub-model, second sub-model or third sub-model through different search information samples, and update the correspondence between the search information and the feature vector. In this way, not only the user's historical search behavior is used to train the first type model and update the correspondence between the search information and the feature vector, but also the content information related to the user's historical search information can be used to train the second type model and update the correspondence between the search information and the feature vector. The user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and then a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is further improved.
[0150] As an implementation method of the embodiment of the present invention, Figure 6As shown, the steps of sorting the recommended search information based on similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user may include:
[0151] S601, sorting the search information to be recommended in descending order of similarity to obtain a sorting result;
[0152] After the electronic device determines the above-mentioned search information to be recommended, in order to determine the recommended search information that needs to be recommended to the user, the electronic device can sort the recommended search information in order of similarity from high to low, and then obtain the sorting result.
[0153] For example, the electronic device determines the recommended search information 1 to the recommended search information 5, and the similarities corresponding to the recommended search information are 0.75, 0.55, 0.99, 0.87, and 0.35 respectively. The electronic device can sort the recommended search information in descending order of similarity to obtain the sorting result as shown in the following table:
[0154] Serial number Similarity Sorting results 1 0.99 Recommended search information 3 2 0.87 Recommended search information 4 3 0.75 Recommended search information 1 4 0.55 Recommended search information 2 5 0.35 Recommended search information 5
[0155] S602, based on the ranking result, selecting a preset number of search information to be recommended from the search information to be recommended as target information;
[0156] After determining the above ranking results, the electronic device can select a preset number of search information to be recommended from the search information to be recommended as target information based on the ranking results. The preset number can be determined based on factors such as actual recommendation needs, and the preset number can be less than the total number of search information to be recommended, and of course, it can also be equal to the total number of search information to be recommended, which is reasonable.
[0157] In one embodiment, the electronic device may select a preset number of search information to be recommended in the sorting results as target information. For example, the preset number is 3. Based on the sorting results shown in the above table, the electronic device may select the first three search information to be recommended in the sorting results as target information, namely, "search information to be recommended 3", "search information to be recommended 4" and "search information to be recommended 1".
[0158] S603: Display the target information in a search information recommendation area of a user search page in descending order of similarity.
[0159] After the electronic device determines the target information, it can display the target information in the search information recommendation area of the user search page in the order of high to low similarity. As an implementation method, the corresponding target information can be displayed from top to bottom in the search information recommendation area in the order of high to low similarity, so that the user can preferentially see the target information with high similarity to the target search information, which is convenient for the user to search for information.
[0160] It can be seen that in this embodiment, the electronic device can sort the search information to be recommended in the order of similarity from high to low to obtain the sorting result, and based on the sorting result, select a preset number of search information to be recommended from the search information to be recommended as target information, and then display the target information in the search information recommendation area of the user search page in the order of similarity from high to low. In this way, the electronic device can recommend the target information to the user in the order of similarity from high to low, and give priority to recommending the target information with high similarity to the user, thereby improving the pertinence and accuracy of the search information recommendation, thereby improving the recommendation effect.
[0161] Corresponding to the above-mentioned method for recommending search information, an embodiment of the present invention further provides a device for recommending search information. The following is an introduction to the device for recommending search information provided by an embodiment of the present invention.
[0162] like Figure 7 As shown, a device for recommending search information includes:
[0163] Search information acquisition module 710, used to acquire target search information input by the user;
[0164] The feature vector search module 720 is used to search for a target feature vector corresponding to the target search information according to a pre-established correspondence between the search information and the search information feature vector;
[0165] Among them, the corresponding relationship is established based on the search information feature vector obtained through the first type of model and the second type of model, the first type of model is obtained by training the first type of model training module based on the user's historical search behavior, and the second type of model is obtained by training the second type of model training module based on content information, and the content information is information that identifies the specific content of the user's historical search behavior.
[0166] A module 730 for determining search information to be recommended, configured to determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship;
[0167] The search information recommendation module 740 is used to sort the search information to be recommended based on the similarity, determine the recommended search information based on the sorting result, and recommend the recommended search information to the user.
[0168] It can be seen that in the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and according to the pre-established correspondence between the search information and the search information feature vector, find the target search word feature vector corresponding to the target search information, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.
[0169] As an implementation method of the embodiment of the present invention, Figure 8 As shown, the second type of model training module may include:
[0170] The second sample acquisition submodule 810 is used to acquire a second type of initial model and a plurality of second search information samples;
[0171] A second calibration submodule 820, configured to determine, for each second search information sample, calibration information of the second search information sample based on a preset calibration rule;
[0172] The preset calibration rule is set based on the content information of the second search information sample.
[0173] A second prediction submodule 830 is configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector;
[0174] The second parameter adjustment submodule 840 is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the second type of initial model converges and stops training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0175] As an implementation mode of an embodiment of the present invention, the above-mentioned content information may include at least one of the following: associated entity information of the second search information sample in a preset knowledge graph, word segmentation information corresponding to the second search information sample, and category label of the second search information sample.
[0176] As an implementation of an embodiment of the present invention, the first type of model training module may include:
[0177] A first sample acquisition submodule, used to acquire a first type of initial model and a plurality of first search information samples;
[0178] Each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence consisting of search information continuously input in the user history search behavior.
[0179] A first calibration submodule is configured to select, for each of the first search information samples, any search information as a central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample;
[0180] a first prediction submodule, configured to input the center search information sample into the first type of initial model, convert the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determine prediction information corresponding to the center search information sample based on the feature vector;
[0181] The first parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the first type of initial model converges and stops training so that the first type of initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.
[0182] As an implementation manner of an embodiment of the present invention, the above-mentioned second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are respectively the associated entity information, the word segmentation information and the category label;
[0183] The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules through the corresponding first type of model training module or the second type of model training module.
[0184] As an implementation of the present invention, the search information recommendation module 740 may include:
[0185] The recommended search information sorting submodule is used to sort the search information to be recommended in descending order of similarity to obtain a sorting result;
[0186] A recommended search information selection submodule, configured to select a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result;
[0187] The recommended search information display submodule is used to display the target information in the search information recommendation area of the user search page in the order of similarity from high to low.
[0188] The embodiment of the present invention further provides an electronic device, such as Fig. 9 As shown, it includes a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904.
[0189] Memory 903, used for storing computer programs;
[0190] The processor 901 is configured to implement the steps of the recommended method for searching information described in any of the above embodiments when executing the program stored in the memory 903 .
[0191] It can be seen that in the scheme provided by the embodiment of the present invention, the electronic device can obtain the target search information input by the user, and according to the pre-established correspondence between the search information and the search information feature vector, find the target search word feature vector corresponding to the target search information, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.
[0192] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0193] The communication interface is used for communication between the above electronic device and other devices.
[0194] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0195] 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.
[0196] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method for recommending search information described in any of the above embodiments is implemented.
[0197] It can be seen that in the scheme provided by the embodiment of the present invention, the computer-readable storage medium stores instructions that, when executed on a computer, can obtain the target search information input by the user, and find the target search term feature vector corresponding to the target search information based on the pre-established correspondence between the search information and the search information feature vector, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained through the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, and according to the similarity between the target feature vector and other search information feature vectors included in the correspondence, the search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.
[0198] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is executed on a computer, the computer executes the method for recommending search information described in any one of the above embodiments.
[0199] It can be seen that in the scheme provided by the embodiment of the present invention, when the computer program product containing instructions is run on a computer, it can obtain the target search information input by the user, and find the target search word feature vector corresponding to the target search information according to the pre-established correspondence between the search information and the search information feature vector, wherein the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained by the first type of model and the second type of model, the first type of model is obtained by training based on the user's historical search behavior, and the second type of model is obtained by training based on content information, wherein the content information is information that identifies the specific content of the user's historical search behavior, according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship, the search information to be recommended is determined from the search information included in the corresponding relationship, the search information to be recommended is sorted based on the similarity, and the recommended search information is determined based on the sorting result, and finally the electronic device recommends the recommended search information to the user. Because in the recall stage, not only the first type of model trained based on the user's historical search behavior but also the second type of model trained based on the specific content information of the user's historical search behavior is used to determine the target feature vector, the user's historical search behavior and the specific content information related to the user's historical search behavior can be comprehensively considered, and a more accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector is more targeted, the recall quality is improved, and the search information recommendation effect is improved.
[0200] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by 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 process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. 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 site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., 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 available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0201] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0202] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0203] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A recommendation method for searching information, It is characterized in that The method comprises: Get the target search information entered by the user; According to a pre-established correspondence between search information and search information feature vectors, a target feature vector corresponding to the target search information is searched, wherein the correspondence is established based on the search information feature vectors obtained through a first type of model and a second type of model, the first type of model is trained based on the user's historical search behavior, the second type of model is trained based on content information, and the content information is information identifying the specific content of the user's historical search behavior; Determining the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship; sorting the search information to be recommended based on the similarity, determining recommended search information based on the sorting result, and recommending the recommended search information to the user; Among them, the first type of model is used to output other search information belonging to the same search information sequence as the search information based on the feature vector corresponding to the search information, and the search information sequence is a sequence composed of various search information input by historical users within a preset time length; the second type of model is used to output content information corresponding to the search information based on the feature vector corresponding to the search information.
2. The method according to claim 1, It is characterized in that The training method of the second type of model includes: obtaining a second type of initial model and a plurality of second search information samples; For each of the second search information samples, determining the calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on the content information of the second search information sample; Inputting the second search information sample into the second type initial model, converting the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector; Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the second type of initial model converges, and the training is stopped so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
3. The method according to claim 2, It is characterized in that The content information includes at least one of the following: The associated entity information of the second search information sample in the preset knowledge graph, the word segmentation information corresponding to the second search information sample, and the category label of the second search information sample.
4. The method according to claim 3, It is characterized in that The second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are respectively the associated entity information, the word segmentation information and the category label; The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules.
5. The method according to claim 1, It is characterized in that The training method of the first type of model includes: Acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior; For each of the first search information samples, select any search information as the central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample; Inputting the center search information sample into the first type of initial model, converting the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determining prediction information corresponding to the center search information sample based on the feature vector; Based on the difference between the predicted information and the corresponding calibration information, the current parameters are adjusted until the first type of initial model converges, and the training is stopped so that the first type of initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.
6. The method according to any one of claims 1 to 5, It is characterized in that The step of sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user includes: Sorting the search information to be recommended in descending order of similarity to obtain a sorting result; Based on the ranking result, selecting a preset number of search information to be recommended from the search information to be recommended as target information; The target information is displayed in a search information recommendation area of a user search page in a descending order of similarity.
7. A recommendation device for searching information, It is characterized in that The device comprises: A search information acquisition module, used to acquire target search information input by a user; A feature vector search module, used to search for a target feature vector corresponding to the target search information according to a pre-established correspondence between search information and search information feature vectors, wherein the correspondence is established based on the search information feature vector obtained through a first type of model and a second type of model, the first type of model is obtained by training a first type of model training module based on user historical search behavior, the second type of model is obtained by training a second type of model training module based on content information, and the content information is information identifying the specific content of the user's historical search behavior; A module for determining search information to be recommended, configured to determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and feature vectors of other search information included in the corresponding relationship; A search information recommendation module, configured to sort the search information to be recommended based on the similarity, determine recommended search information based on the sorting result, and recommend the recommended search information to the user; Among them, the first type of model is used to output other search information belonging to the same search information sequence as the search information based on the feature vector corresponding to the search information, and the search information sequence is a sequence composed of various search information input by historical users within a preset time length; the second type of model is used to output content information corresponding to the search information based on the feature vector corresponding to the search information.
8. The device according to claim 7, It is characterized in that The second type of model training modules includes: A second sample acquisition submodule, used to acquire a second type of initial model and a plurality of second search information samples; A second calibration submodule, configured to determine, for each of the second search information samples, calibration information of the second search information sample based on a preset calibration rule, wherein the preset calibration rule is set based on content information of the second search information sample; a second prediction submodule, configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector; The second parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the second type of initial model converges and stops training so that the second type of initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
9. The device according to claim 8, It is characterized in that The content information includes at least one of the following: The associated entity information of the search information sample in the preset knowledge graph, the word segmentation information corresponding to the search information sample, and the category label of the search information sample.
10. The device according to claim 9, It is characterized in that The second type of model includes a first sub-model, a second sub-model and a third sub-model, and the content information corresponding to the first sub-model, the second sub-model and the third sub-model are respectively the associated entity information, the word segmentation information and the category label; The first type of model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to preset training rules through the corresponding first type of model training module or the second type of model training module.
11. The device according to claim 7, It is characterized in that The first type of model training modules includes: A first sample acquisition module, used to acquire a first type of initial model and a plurality of first search information samples, wherein each of the first search information samples is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence of search information continuously input in the user history search behavior; A first calibration submodule is configured to select, for each of the first search information samples, any search information as a central search information sample of the first search information sample, and determine other search information of the central search information sample in the context of the first search information sample as calibration information of the central search information sample; a first prediction submodule, configured to input the center search information sample into the first type of initial model, convert the center search information sample into a corresponding feature vector based on current parameters of the first type of initial model, and determine prediction information corresponding to the center search information sample based on the feature vector; The first parameter adjustment submodule is used to adjust the current parameters based on the difference between the predicted information and the corresponding calibration information until the first type of initial model converges and stops training so that the first type of initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.
12. The device according to any one of claims 7 to 11, It is characterized in that The search information recommendation module includes: The recommended search information sorting submodule is used to sort the search information to be recommended in descending order of similarity to obtain a sorting result; A recommended search information selection submodule, configured to select a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result; The recommended search information display submodule is used to display the target information in the search information recommendation area of the user search page in the order of similarity from high to low.
13. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.
14. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.
