CN113282832A - Search information recommendation method and device, electronic equipment and storage medium - Google Patents

Search information recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113282832A
CN113282832A CN202110648500.6A CN202110648500A CN113282832A CN 113282832 A CN113282832 A CN 113282832A CN 202110648500 A CN202110648500 A CN 202110648500A CN 113282832 A CN113282832 A CN 113282832A
Authority
CN
China
Prior art keywords
search information
information
model
search
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110648500.6A
Other languages
Chinese (zh)
Inventor
龚厚瑜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing IQIYI Science and Technology Co Ltd
Original Assignee
Beijing IQIYI Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing IQIYI Science and Technology Co Ltd filed Critical Beijing IQIYI Science and Technology Co Ltd
Priority to CN202110648500.6A priority Critical patent/CN113282832A/en
Publication of CN113282832A publication Critical patent/CN113282832A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a recommendation method and device of search information, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring target search information input by a user; searching a target characteristic vector corresponding to target search information according to a corresponding relation between the search information and the search information characteristic vector which is established in advance, wherein the corresponding relation is established on the basis of the search information characteristic vector obtained through the first type model and the second type model; determining search information to be recommended from the search information included in the corresponding relation according to the similarity between the target characteristic vector and the other search information characteristic vectors included in the corresponding relation; and ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and recommending the recommended search information to the user. The accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector has pertinence, the recall quality is improved, and the search information recommendation effect is improved.

Description

Search information recommendation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information search technologies, and in particular, to a method and an apparatus for recommending search information, an electronic device, and a storage medium.
Background
For the website with the search function, accurate search information recommendation is performed for different users, the users are attracted to click the recommended search information for searching, and the purpose of drainage can be effectively achieved. The recommendation method of search information in the related art can be divided into two stages: recall and sort. In the sorting stage, the recalled search information to be recommended is scored and sorted, and finally the search information to be recommended to the user is determined according to the scoring and sorting result.
In the recall stage, generally, in the user search behavior, the more times of continuous occurrence of search information in a period of time, the stronger the relevance is; therefore, the electronic equipment can establish the relationship between the feature vectors of the search information with more continuous occurrence times through the item2vec model, so that after the search information input by the user is obtained, the search information can be input into the trained item2vec model, the related search information with higher similarity of the feature vectors corresponding to the search information is obtained, and the related search information is recommended to the user.
However, in the model training process, there may be no correlation between the acquired search information input by the user over a period of time, such as: the user may have searched for less relevant content such as "soldier assault", "mogitot", "western shorthand" continuously over a period of time. After the model is trained in the above manner, when the user inputs the soldier assault, irrelevant search information such as 'journey to the West' is probably recommended to the user as recommended search information. Therefore, in the recommendation mode of the search information, the recall quality of the search information to be recommended is not high, so that the recommendation of the search information lacks pertinence, and the effect is not good.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for recommending search information, electronic equipment and a storage medium, so as to improve the recall quality of the search information, further improve the recommendation pertinence of the search information and improve the recommendation effect of the search information. The specific technical scheme is as follows:
in a first aspect, an embodiment of the present invention provides a method for recommending search information, where the method includes:
acquiring target search information input by a user;
searching a target characteristic vector corresponding to target search information according to a corresponding relation between the search information and the search information characteristic vector which is established in advance, wherein the corresponding relation is established on the basis of the search information characteristic vector obtained through a first type model and a second type model, the first type model is obtained through training based on the historical search behavior of a user, the second type model is obtained through training based on content information, and the content information is information for identifying specific content of the historical search behavior of the user;
determining search information to be recommended from the search information included in the corresponding relation according to the similarity between the target feature vector and the feature vectors of other search information included in the corresponding relation;
and ranking the search information to be recommended based on the similarity, determining recommended search information based on a ranking result, and recommending the recommended search information to a user.
Optionally, the training mode of the second type of model includes:
acquiring a second type initial model and a plurality of second search information samples;
for each second search information sample, determining 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;
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 the current parameters of the second type initial model, and determining the corresponding prediction information of the second search information sample based on the feature vector;
and adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the second type of initial model converges, and stopping 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.
Optionally, the content information includes at least one of:
the related entity information of the second search information sample in a preset knowledge graph, the word segmentation information corresponding to the second search information sample and the category label of the second search information sample.
Optionally, the second type of model includes a first sub-model, a second sub-model, and a third sub-model, where content information corresponding to the first sub-model, the second sub-model, and the third sub-model is the associated entity information, the word segmentation information, and the category label, respectively;
and the first type model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to a preset training rule.
Optionally, the training mode of the first type model includes:
acquiring a first type of initial model and a plurality of first search information samples, wherein each first search information sample is search information in a pre-acquired user historical search behavior sequence, and the user historical search behavior sequence is a sequence formed by search information continuously input in user historical search behaviors;
selecting any search information as a center search information sample of each first search information sample, and determining other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample;
inputting the center search information sample into the first type initial model, converting the center search information sample into a corresponding feature vector based on the current parameters of the first type initial model, and determining the prediction information corresponding to the center search information sample based on the feature vector;
and adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first-class initial model converges, and stopping training so that the first-class initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.
Optionally, the step of ranking the search information to be recommended based on the similarity, determining recommended search information based on a ranking result, and recommending the recommended search information to the user includes:
sequencing the search information to be recommended according to the sequence of similarity from high to low to obtain a sequencing result;
selecting a preset number of pieces of search information to be recommended from the search information to be recommended as target information based on the sorting result;
and displaying the target information in a search information recommendation area of a user search page according to the sequence of the similarity from high to low.
In a second aspect, an embodiment of the present invention provides an apparatus for recommending search information, where the apparatus includes:
the search information acquisition module is used for acquiring target search information input by a user;
the characteristic vector searching module is used for searching a target characteristic vector corresponding to the target searching information according to a corresponding relation between the pre-established searching information and the searching information characteristic vector, wherein the corresponding relation is established on the basis of the searching information characteristic vector obtained through a first type model and a second type model, the first type model is obtained by training a first type model training module on the basis of the historical searching behavior of the user, the second type model is obtained by training a second type model training module on the basis of content information, and the content information is information for identifying the specific content of the historical searching behavior of the user;
the search information to be recommended determining module is used for determining search information to be recommended from the search information included in the corresponding relation according to the similarity between the target characteristic vector and the other search information characteristic vectors included in the corresponding relation;
and the search information recommending module is used for sequencing the search information to be recommended based on the similarity, determining recommended search information based on a sequencing result and recommending the recommended search information to the user.
Optionally, the second type model training module includes:
the second sample acquisition submodule is used for acquiring a second type initial model and a plurality of second search information samples;
the second calibration submodule is used for determining calibration information of each 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;
the second prediction sub-module is used for 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 the current parameters of the second type initial model, and determining the prediction information corresponding to the second search information sample based on the feature vector;
and the second parameter adjusting submodule is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the second type of initial model converges and stopping 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.
Optionally, the content information includes at least one of:
the method comprises the following steps of associating entity information of a search information sample in a preset knowledge graph, word segmentation information corresponding to the search information sample and a category label of the search information sample.
Optionally, the second type of model includes a first sub-model, a second sub-model, and a third sub-model, where content information corresponding to the first sub-model, the second sub-model, and the third sub-model is the associated entity information, the word segmentation information, and the category label, respectively;
and the first sub-model, the second sub-model and the third sub-model are alternately trained through the corresponding first model training module or the second model training module according to a preset training rule.
Optionally, the first type model training module includes:
the device comprises a first sample acquisition module, a second sample acquisition module and a search information processing module, wherein the first sample acquisition module is used for acquiring a first type of initial model and a plurality of first search information samples, each first search information sample is search information in a user historical search behavior sequence which is acquired in advance, and the user historical search behavior sequence is a sequence formed by search information which is continuously input in user historical search behaviors;
the first calibration submodule is used for selecting any search information as a center search information sample of each first search information sample, and determining other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample;
the first prediction sub-module is used for 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 the 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;
and the first parameter adjusting submodule is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first-class initial model converges and stopping training so that the first-class initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vectors.
Optionally, the search information recommendation module includes:
the recommended search information sorting submodule is used for sorting the search information to be recommended according to the sequence of similarity from high to low to obtain a sorting result;
the recommended search information selection submodule is used for selecting a preset number of pieces of search information to be recommended from the search information to be recommended as target information based on the sorting result;
and the recommended search information display sub-module is used for displaying the target information in a search information recommendation area of the user search page according to the sequence of similarity from high to low.
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, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the above first aspects.
In the solution provided in the embodiment of the present invention, the electronic device may obtain target search information input by a user, and search for a target search word feature vector corresponding to the target search information according to a pre-established correspondence between search information and a search information feature vector, where the correspondence between the search information and the search information feature vector is established based on a search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on training of a historical search behavior of the user, the second type model is obtained based on training of content information, where the content information is information identifying specific content of the historical search behavior of the user, and the search information to be recommended is determined from search information included in the correspondence according to a similarity between the target feature vector and other search information feature vectors included in the correspondence, and ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and finally recommending the recommended search information to the user by the electronic equipment.
In the recall stage, the target characteristic vector is determined by utilizing not only the first type of model obtained by training based on the historical search behavior of the user, but also the second type of model obtained by training based on the specific content information of the historical search behavior of the user, so that the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and the more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is further improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flowchart of a method for recommending search information according to an embodiment of the present invention;
FIG. 2 is a flow chart of a training mode of a second type of model in the embodiment shown in FIG. 1;
FIG. 3 is a schematic illustration of a knowledge-graph in the embodiment shown in FIG. 2;
FIG. 4 is a flow chart illustrating a manner of training the first type of model in the embodiment shown in FIG. 1;
FIG. 5 is a schematic diagram illustrating a manner of establishing correspondence between search information and search information feature vectors in the embodiment shown in FIG. 1;
FIG. 6 is a flowchart illustrating a specific step S104 in the embodiment shown in FIG. 1;
fig. 7 is a schematic structural diagram of a device for recommending search information according to an embodiment of the present invention;
FIG. 8 is a diagram illustrating an exemplary structure of a second type of model training module according to the embodiment shown in FIG. 7;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be described below with reference to the drawings in the embodiments of the present invention.
In order to improve the recall quality of search information, further improve the pertinence of search information recommendation and improve the recommendation effect of search information, the embodiment of the invention provides a recommendation method and device of search information, electronic equipment and a computer-readable storage medium. First, a method for recommending search information according to an embodiment of the present invention is described below.
The method for recommending search information provided by the embodiment of the invention can be applied to any electronic device which needs to recommend search information to a user, for example, the electronic device can be a server, a computer, a processor and the like, and is not particularly limited herein. For clarity of description, the electronic device is referred to hereinafter.
As shown in fig. 1, a method for recommending search information, the method comprising:
s101, acquiring target search information input by a user;
s102, searching a target characteristic vector corresponding to the target search information according to a pre-established corresponding relation between the search information and the search information characteristic vector;
the corresponding relation is established based on a search information feature vector obtained through a first type model and a second type model, the first type model is obtained through training based on user historical search behaviors, the second type model is obtained through training based on content information, and the content information is information for identifying specific content of the user historical search behaviors.
S103, determining search information to be recommended from the search information included in the corresponding relation according to the similarity between the target feature vector and the feature vectors of other search information included in the corresponding relation;
s104, ranking the search information to be recommended based on the similarity, determining recommended search information based on a ranking result, and recommending the recommended search information to a user.
It can be seen that, in the solution provided in the embodiment of the present invention, the electronic device may obtain target search information input by a user, and search for a target search word feature vector corresponding to the target search information according to a pre-established corresponding relationship between the search information and a search information feature vector, where the corresponding relationship between the search information and the search information feature vector is established based on a search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on training of a historical search behavior of the user, the second type model is obtained based on training of content information, where the content information is information identifying specific content of the historical search behavior of the user, and the search information to be recommended is determined from the search information included in the corresponding relationship according to a similarity between the target feature vector and other search information feature vectors included in the corresponding relationship, and ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and finally recommending the recommended search information to the user by the electronic equipment. In the recall stage, the target characteristic vector is determined by utilizing not only the first type of model obtained by training based on the historical search behavior of the user, but also the second type of model obtained by training based on the specific content information of the historical search behavior of the user, so that the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and the more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is further improved.
When a user searches information by using a search function provided by a website, the website server can recommend related search information to the user on a search page, and attract the user to search based on the recommended search information, so that the search requirement of the user can be met, and the purpose of drainage can be effectively achieved.
When the electronic device recommends the search information to the user, generally, the electronic device recommends the search information related to the search information input by the user based on the search information input by the user, and then, in step S101, the electronic device may acquire the search information input by the user as the target search information. The target search information is the search information that the user wants to search. The target search information may be any one of words, phrases or sentences, and is not specifically limited herein.
For example, when a user searches for information using a search function provided by a website, the user inputs search information "western memory" that the user wants to search for, and the electronic device may acquire the search information "western memory", which is target search information.
In order to determine the search information to be recommended, which has a correlation with the target search information input by the user, since the feature vector corresponding to the target search information may represent the feature of the target search information input by the user, in step S102, the electronic device may search for the 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.
In one embodiment, 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", and the "word-vector dictionary" may be recorded in a table manner, for example, as shown in the following table:
search information A Feature vector a
Search information B Feature vector b
Search information C Feature vector c
Search information D Feature vector d
Thus, if the target search information is the search information C, the electronic device may determine the target feature vector corresponding to the target search information as the feature vector C according to the correspondence recorded in the table.
The correspondence between the search information and the search information feature vector may be established based on the search information feature vector obtained by the first-type model and the second-type model. In one embodiment, the electronic device may train the first type initial model in advance based on the historical search behavior of the user to obtain the first type model.
The user inputs search information 1 in a search page, and then continuously inputs search information 2, search information 3 and the like within a period of time, so that the search information 1-search information 2-search information 3. For example, if the user enters a western script in the search page and then successively enters a grandchild monkey and a monk for a certain period of time, the "western script-grandchild monkey-monk monkey" constitutes a search information sequence.
By the method, a plurality of search information sequences can be obtained, and the first type initial model can be trained on the basis of the plurality of search information sequences to obtain the first type model. When the search information is input into the first type model, the first type model can output other search information of the search information under the context corresponding to the historical search behavior of the user based on the feature vector corresponding to the search information, that is, other search information belonging to a search information sequence with the input search information can be output. In the training process of the first type of model, model parameters are continuously adjusted, so that the feature vectors corresponding to the search information are continuously adjusted and are more and more accurate.
In one embodiment, the electronic device may train the second type of initial model in advance based on the content information to obtain the second type of model. The content information is information for identifying specific content of historical search behaviors of the user. In order to improve the accuracy of the feature vectors, besides the first type of model trained on the basis of the historical search behavior of the user, the second type of initial model can be trained in advance.
The user search page inputs search information, and the electronic device can determine information capable of identifying specific content of the user historical search behavior, for example, the user search page inputs search information "western notes", and the content information may include "four famous works", "dream of red building", "watery river biography", and "three kingdoms lecture" of the specific content capable of identifying "western notes".
By the method, the content information corresponding to the plurality of search information can be obtained, and the second type model obtained by training the second type initial model can be further obtained on the basis of the plurality of search information and the content information corresponding to the search information. When the search information is input into the second type model, the second type model may output the content information corresponding to the search information based on the feature vector corresponding to the search information. In the training process of the second type of model, the model parameters are continuously adjusted, so that the feature vectors corresponding to the search information are continuously adjusted and are more and more accurate.
After obtaining the target feature vector corresponding to the target search information, the electronic device may execute the step S103, that is, determine search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and the feature vector of other search information included in the pre-established corresponding relationship.
The similarity between the target feature vector and the other search information feature vectors included in the pre-established correspondence may be determined based on the distance between the respective feature vectors. Specifically, for each piece of other search information included in the correspondence, the electronic device may determine a distance between a feature vector corresponding to the other search information and the target feature vector, determine a similarity between the other search information and the target search information based on the distance, and determine the to-be-recommended search information from the other search information included in the correspondence according to the similarity.
Generally, the smaller the distance between two feature vectors is, the higher the similarity between the search information corresponding to the two feature vectors is; conversely, the larger the distance between two feature vectors is, the lower the similarity between the search information corresponding to the two feature vectors is. The distance between the two feature vectors may be a cosine distance, an euclidean distance, a manhattan distance, a chebyshev distance, or the like, and is not specifically limited herein.
As an embodiment, for the target feature vector a and the feature vector b of any other search information included in the correspondence relationship, the cosine distance between the target feature vector a and the feature vector b is:
Figure BDA0003110147250000111
wherein < 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 included angle between the target feature vector a and the feature vector b. When cos theta is closer to 1, the closer the description direction is, the smaller the distance between the two feature vectors is, and the higher the similarity between the search information corresponding to the two feature vectors is; when cos theta is closer to-1, the difference of the description directions is larger, the distance between the two feature vectors is larger, and the similarity between the search information corresponding to the two feature vectors is lower.
After determining the search information to be recommended, the electronic device may rank the search information to be recommended based on the similarity, determine recommended search information based on a ranking result, and recommend the recommended search information to the user, that is, execute the step S104.
For example, the electronic device determines search information to be recommended 1, search information to be recommended 2, and search information to be recommended 3, and the similarity between the search information to be recommended and the search information input by the user is: 0.75, 0.55, 0.99. The electronic device can sort the search information to be recommended based on the similarity, sort according to the similarity from high to low, and obtain a sorting result as shown in the following table:
serial number Degree of similarity Results of the sorting
1 0.99 Search information to be recommended 3
2 0.75 Search information to be recommended 1
3 0.55 Search information to be recommended 2
Then, in one embodiment, the electronic device may recommend the search information to be recommended 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.
By the aid of the recommendation method for the search information, after the electronic equipment obtains the search information input by the user, according to the corresponding relation between the search information and the search information characteristic vector established by the first type model and the second type model obtained after training based on the historical search behavior and the content information of the user, the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and a more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is improved.
As an implementation manner of the embodiment of the present invention, as shown in fig. 2, the training manner of the second type model may include:
s201, acquiring a second type initial model and a plurality of second search information samples;
in order to train to obtain the second type of model, the electronic device may obtain a second type of initial model and a plurality of second search information samples. The second type of initial model may be a multi-classification neural network model, etc. The second search information sample may be search information included in a user's historical search behavior obtained in advance.
S202, aiming at each second search information sample, determining calibration information of the second search information sample based on a preset calibration rule;
for each second search information sample, the electronic device may determine calibration information of the second search information sample based on a preset calibration rule, where the preset calibration rule may be set based on 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 specific content of the second search information sample.
For example, when the second search information sample is "western", since "sunkening" is the main role in "western", the "western" belongs to "mingxing nova", and the "western" belongs to the segmentation result of "western", the "sunkening", "mingxing" can identify the specific content of the second search information sample "western", so that the electronic device can use "sunkening", "mingxing" as the calibration information of the second search information sample "western".
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 the current parameters of the second type initial model, and determining the prediction information corresponding to the second search information sample based on the feature vector;
in the process of training the second type initial model, the electronic device may input each second search information sample into the second type initial model, and the second type initial model may convert the second search information sample into a corresponding feature vector based on the current parameter, and determine prediction information corresponding to the second search information sample based on the feature vector.
S204, based on the difference between the prediction information and the corresponding calibration information, adjusting the current parameters until the second type initial model converges, and stopping training, so that the second type initial model processes the input second search information sample based on the adjusted parameters to obtain the corresponding feature vector.
The model parameters of the current second-class initial model are probably not appropriate, so that the second search information sample is converted into the corresponding feature vector according to the current model parameters and is not accurate, and therefore when the prediction information corresponding to the second search information sample is determined based on the feature vector, the prediction information cannot be determined accurately. Therefore, after obtaining the prediction information of each second search information sample, the electronic device may adjust the model parameters of the second-type initial model based on the difference between the calibration information and the prediction information of each second search information sample, so that the parameters of the model of the second-type initial model are more suitable, and thus, an accurate feature vector may be obtained when the second search information sample is converted into a corresponding feature vector according to the adjusted model parameters.
The above-mentioned manner for adjusting the model parameters of the second type of initial model may be a gradient descent algorithm, a random gradient descent algorithm, or other model parameter adjustment manners, which is not specifically limited and described herein.
In order to determine whether the second type initial model converges, the electronic device may determine whether the iteration number 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.
If the iteration times of the second-class initial model reach the preset times, or the accuracy of the prediction result of the second-class initial model is greater than the preset value, it is indicated that the second-class initial model has converged, that is, the current second-class initial model can accurately determine the feature vector corresponding to the second search information sample, so that the training can be stopped at this time to obtain the second-class model. At this time, the feature vector corresponding to the second search information sample obtained based on the second type model is accurate.
The preset number of times may be set according to factors such as accuracy requirement of the prediction result, a model structure, and the like, and may be, for example, 6000 times, 9000 times, 12000 times, and the like, which is not specifically limited herein. The preset value may be set according to the accuracy requirement of the prediction result, the model structure, and other factors, and may be, for example, 0.91, 0.89, 0.90, and the like, which is not limited herein.
If the iteration number of the second-class initial model does not reach the preset number, or the accuracy of the prediction result of the second-class initial model is not greater than the preset value, it indicates that the second-class initial model has not converged, that is, the feature vector corresponding to the second search information sample cannot be accurately determined by the current second-class initial model, then the electronic device needs to continue training the second-class initial model.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can train the second type of initial model through the above method to obtain the second type of model. In this way, the electronic device may obtain a 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.
As an implementation manner of the embodiment of the present invention, the content information may include at least one of the following: the related 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.
When the electronic device trains the second-type initial model and determines the calibration information of the second search information sample, at least one of 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 a category label of the second search information sample can be selected as the calibration information capable of identifying specific content of the second search information sample.
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 may pre-establish a knowledge graph including the respective search information. And when the associated entity information of the second search information sample in the preset knowledge graph needs to be determined, searching the entity information associated with the second search information sample from the preset knowledge graph, traversing according to a preset rule by taking the associated entity information as a starting point, and determining the associated entity information of the second search information sample in the preset knowledge graph. When the preset knowledge graph comprises 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, and when the preset knowledge graph does not comprise the second search information sample, the entity information of the second search information sample in the preset knowledge graph, which corresponds to the word meaning of the second search information sample, can be the entity information similar to the word meaning of the second search information sample.
The preset migration rule may be traversal between the entities of the knowledge graph according to any one or more of a top-bottom relationship, a parallel relationship, an integral-partial relationship, and a causal relationship existing between the entities, until a preset condition is reached, the traversal is stopped, and no specific limitation is made herein.
In an embodiment, all the related entity information traversed during the traversal process and the entity information corresponding to the second search information sample in the preset knowledge graph may be used as calibration information of the second search information sample, where the preset condition may be that the number of traversed entities reaches a preset threshold, the distance during the migration process reaches a preset length, and the like, and is not specifically limited herein.
For example, as shown in fig. 3, when the second search information sample 310 is "western-book", the electronic device may associate the second search information sample 310 "western-book" with the entity information 321 "western-book" in the aforementioned knowledge graph in the preset knowledge graph 320, where the entity information 321 "western-book" is the associated entity information of the second search information sample 310. Further, the electronic device may traverse to the entity information 322 "Sunwukong" according to the whole-part relationship, traverse to the entity information 323 "four great famous works" according to the top-bottom relationship, and traverse to the entity information 324 "dream of Red mansions" according to the parallel relationship, with the associated entity information 321 as a starting point. The electronic device may also continue to traverse to the entity information 325 "the tomb of heaven" from the entity information 322 "Sunwukong" as a starting point for the correlation relationship. At this point, the number of traversed entity information is 4, and the electronic device can terminate traversal when a preset condition is reached. The entity information "journey to the west", "Sunwukong", "four famous writings", "dream of Red mansions", and "Ming dynasty heaven palace" may 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 may determine the associated entity information as calibration information of a second search information sample "westernist".
In one embodiment, the electronic device may perform word segmentation processing on the second search information sample, and use word segmentation information obtained after the word segmentation processing as calibration information of the second search information sample. The word segmentation processing may be any word segmentation processing method in the field of text information processing, and is not specifically limited or described herein.
For example, when the second search information sample is "monkey king three-hit white bone essence", the electronic device may perform word segmentation processing on the second search information sample to obtain word segmentation information such as "monkey king", "white bone essence", and "monkey king white bone essence", where the word segmentation information may identify specific contents of the second search information sample "monkey king three-hit white bone essence", and the electronic device may determine the word segmentation information as the calibration information of the second search information sample "monkey king three-hit white bone essence".
In one embodiment, 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 capable of representing the category characteristic of the second search information sample, and the specific form of the label is not specifically limited herein, and may be, for example, a number, a letter, and the like.
For example, when the second search information sample is "western-book", the electronic device may determine the category of the second search information sample "western-book" according to a predetermined classification rule, and further determine the label of the second search information sample "western-book", for example, the category labels may be "tv drama", "mingxing novel", and the like. In turn, the electronic device may determine the category label as calibration information for the second search information sample "westernist".
As can be seen, in this embodiment, the electronic device may determine, as the calibration information, associated entity information, participle information, and/or category label capable of identifying specific content of the second search information sample from different dimensions. Therefore, the second type of model obtained based on calibration information training can more accurately determine the feature vector corresponding to the second search information sample according to the calibration information for identifying the specific content of the second search information sample from different dimensions, and the electronic equipment can also establish the more accurate corresponding relation between the search information and the search information feature vector.
As an implementation manner of the embodiment of the present invention, as shown in fig. 4, the training manner of the first-class model may include:
s401, acquiring a first type initial model and a plurality of first search information samples;
first, the electronic device may obtain a first type initial model and a plurality of first search information samples. The first type of initial model may be a neural network model, and the like, and is not particularly limited herein.
Each first search information sample can be search information in a user history search behavior sequence acquired by the electronic equipment in advance, and the user history search behavior sequence is a sequence formed by search information continuously input in user history search behaviors;
for example, the user continuously inputs the search information "journey to the west", "monkey king" and "monk" in a period of time, then in the historical search behavior of the user, "journey to the west", "monkey king" and "monk" are the search information continuously input by the user, and "journey to the west-monkey king-monk" is the user historical search behavior sequence, the electronic device may use the user historical search behavior sequence of "journey to the west-monkey king-monk" as a first search information sample.
S402, aiming at each first search information sample, selecting any search information as a center search information sample of the first search information sample, and determining other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample;
after obtaining a plurality of first search information samples, for each first search information sample, the electronic device may select any search information in the first search information sample as a center search information sample of the first search information sample, and determine other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample. That is, the electronic device may use the search information included in the first search information sample except for the center search information sample as the calibration information of the center search information sample.
For example, the first search information sample acquired by the electronic device is "western shorthand-grand monkey-monk", and "grand monkey" can be selected from the first search information sample as the center search information sample, and then the search information "western shorthand" and "monk" can be used as the calibration information of the center search information sample "grand monkey".
S403, inputting the center search information sample into the first type initial model, converting the center search information sample into a corresponding feature vector based on the current parameters of the first type initial model, and determining the prediction information corresponding to the center search information sample based on the feature vector;
in the process of training the first-class initial model, the electronic device may input each center search information sample into the first-class initial model, and the first-class initial model may convert the center search information samples into corresponding feature vectors based on the current parameters, and determine prediction information corresponding to the center search information samples based on the feature vectors.
S404, based on the difference between the prediction information and the corresponding calibration information, adjusting the current parameters until the first-class initial model converges, and stopping training, so that the first-class initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vectors.
The model parameters of the current first-class initial model are probably not appropriate, so that the conversion of the center search information sample into the corresponding feature vector according to the model parameters of the current first-class initial model is not accurate, and when the prediction information corresponding to the center search information sample is determined based on the feature vector, the feature vector corresponding to the center search sample is probably not determined accurately, so that the prediction information is inaccurate. Therefore, after obtaining the calibration information and the prediction information of each center search information sample, the electronic device may adjust the model parameters of the first type of initial model based on the difference between the calibration information and the prediction information of each center search information sample, so that the model parameters of the first type of initial model are more suitable, and thus, an accurate feature vector may be obtained when the first search information sample is converted into a corresponding feature vector according to the adjusted model parameters.
If the iteration times of the first-class initial model reach the preset times, or the accuracy of the prediction result of the first-class initial model is greater than the preset value, it is indicated that the first-class initial model has converged, that is, the feature vector corresponding to the center search information sample can be accurately determined by the current first-class initial model, so that the training can be stopped at this time, and the trained first-class model is obtained. At this time, the feature vector corresponding to the first search information sample obtained based on the first-class model is accurate.
If the iteration times of the first-class initial model do not reach the preset times, or the accuracy of the prediction result of the first-class initial model is not greater than the preset value, it indicates that the first-class initial model has not converged, that is, the feature vector corresponding to the center search information sample cannot be accurately determined by the current first-class initial model, then the electronic device needs to continue training the first-class initial model.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can train the first-class initial model in the above manner to obtain the first-class model. In this way, the electronic device may obtain a first type of model that is capable of accurately determining a feature vector corresponding to a center-search information sample based on the center-search information sample in the first search information sample.
As an implementation manner of the embodiment of the present invention, as shown in fig. 5, the second-type model 520 may include a first sub-model 521, a second sub-model 522, and a third sub-model 523, where content information corresponding to the first sub-model, the second sub-model, and the third sub-model is second search information sample associated entity information, word segmentation information, and a category label, respectively. The first type model 510 is trained from search information from a center search information sample in context with 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 may be alternately trained according to a preset training rule.
In the pre-established correspondence 530 between the search information and the feature vector, the feature vector of the search information is obtained by processing based on the first-type model and the second-type model. In the process of training the first-class model and the second-class model, the parameters of the first-class model and the second-class model are adjusted once each iteration is performed, so that the feature vector corresponding to the first search information sample or the second search information sample determined based on the current parameters is changed along with the next iteration, namely, the corresponding relation between the search information and the feature vector is updated once each iteration is performed until the training is finished, the first-class model and the second-class model are obtained, and the final corresponding relation between the search information and the feature vector is also obtained.
In order to make the feature vector more accurate, the first-class model and the second-class model can be trained in an alternating training mode. As an embodiment, the plurality of first search information samples may be divided into a plurality of groups of samples, and similarly, the plurality of second search information samples may be divided into a plurality of groups of samples. The number of the first search information samples or the second search information samples included in each group of samples may be determined according to the total number of the first search information samples or the second search information samples, and the like, and may be, for example, 10, 50, 100, and the like, which is not limited specifically herein.
Furthermore, after the first type of model is trained by using a group of first search information samples, a group of second search information samples are respectively used for a first sub-model, a second sub-model or a third sub-model, and in the training process, the corresponding relation between the search information and the feature vector is continuously updated.
As an embodiment, the alternate training mode may specifically be: a, training a first type of model by utilizing a first group of first search information samples, and updating the corresponding relation between search information and a characteristic vector; b, training a first sub-model by utilizing a first group of second search information samples, and updating the corresponding relation between the search information and the characteristic vector; step C, training a second sub-model by utilizing a second group of second search information samples, and updating the corresponding relation between the search information and the characteristic vector; step D, training a third sub-model by utilizing a third group of second search information samples, and updating the corresponding relation between the search information and the characteristic vector; and E, training the first type of model by utilizing a second group of first search information samples, and updating the corresponding relation between the search information and the characteristic vector. By analogy, until the training is finished, the corresponding relation between the information and the feature vector can be accurately searched, namely the word-vector dictionary is obtained.
It can be seen that, in this embodiment, the electronic device may train the corresponding first-type model, first sub-model, second sub-model, or third sub-model through different search information samples, and update the corresponding relationship between the search information and the feature vector at the same time. Therefore, the first type of model is trained by using the historical search behavior of the user, the corresponding relation between the search information and the characteristic vector is updated, and the second type of model can be trained by using the content information related to the historical search information of the user, and the corresponding relation between the search information and the characteristic vector is updated. The historical search behavior of the user and the specific content information related to the historical search behavior of the user 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.
As an implementation manner of the embodiment of the present invention, as shown in fig. 6, the step of ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and recommending the recommended search information to the user may include:
s601, sequencing the search information to be recommended according to the sequence of similarity from high to low to obtain a sequencing result;
after the electronic device determines the search information to be recommended, in order to determine the search information to be recommended to the user, the electronic device may rank the search information to be recommended according to a sequence of similarity from high to low, and then obtain a ranking result.
For example, the electronic device determines search information to be recommended 1-search information to be recommended 5, and the similarity corresponding to each search information to be recommended is as follows: 0.75, 0.55, 0.99, 0.87, 0.35. The electronic device may sort the search information to be recommended according to the sequence of similarity from high to low, and obtain a sorting result, as shown in the following table:
serial number Degree of similarity Results of the sorting
1 0.99 Search information to be recommended 3
2 0.87 Search information to be recommended 4
3 0.75 Search information to be recommended 1
4 0.55 Search information to be recommended 2
5 0.35 Search information to be recommended 5
S602, based on the sorting result, selecting a preset number of pieces of search information to be recommended from the search information to be recommended as target information;
after the ranking result is determined, the electronic device may select a preset number of pieces of search information to be recommended from the pieces of search information to be recommended as target information based on the ranking result. The preset number can be determined according to factors such as actual recommendation requirements, and the preset number can be smaller than the total number of the search information to be recommended, and can also be equal to the total number of the search information to be recommended, which is reasonable.
In an embodiment, the electronic device may select a preset number of search information to be recommended from the top in the ranking result as the target information. For example, the preset number is 3, and based on the sorting results shown in the above table, the electronic device may select the first three pieces of search information to be recommended in the sorting results as target information, that is, "search information to be recommended 3", "search information to be recommended 4", and "search information to be recommended 1".
S603, displaying the target information in a search information recommendation area of a user search page according to the sequence of similarity from high to low.
After the electronic equipment determines the target information, the target information can be displayed in a search information recommendation area of a user search page according to the sequence of similarity from high to low. As an implementation manner, the corresponding target information may be displayed in the search information recommendation area from top to bottom in the order of the similarity from high to low, so that the user may preferentially see the target information with high similarity to the target search information, which is convenient for the user to perform information search.
Therefore, in this embodiment, the electronic device may sort the search information to be recommended according to the similarity from high to low to obtain a sorting result, 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, and display the target information in the search information recommendation area of the user search page according to the similarity from high to low. Therefore, the electronic equipment can recommend the target information to the user according to the sequence of the similarity from high to low, preferentially recommend the target information with high similarity to the user, and improve the pertinence and accuracy of the search information recommendation, thereby improving the recommendation effect.
Corresponding to the recommendation method for search information, an embodiment of the present invention further provides a recommendation device for search information, and the following introduces a recommendation device for search information provided by an embodiment of the present invention.
As shown in fig. 7, an apparatus for recommending search information, the apparatus comprising:
a search information acquisition module 710 for acquiring target search information input by a user;
the feature vector searching module 720 is configured to search 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;
the corresponding relation is established based on a search information feature vector obtained through a first-class model and a second-class model, the first-class model is obtained by a first-class model training module based on user historical search behaviors in a training mode, the second-class model is obtained by a second-class model training module based on content information in a training mode, and the content information is information for identifying specific contents of the user historical search behaviors.
A to-be-recommended search information determining module 730, configured to determine to-be-recommended search information from search information included in the corresponding relationship according to a similarity between the target feature vector and other search information feature vectors included in the corresponding relationship;
and the search information recommending module 740 is configured to rank the search information to be recommended based on the similarity, determine recommended search information based on a ranking result, and recommend the recommended search information to the user.
It can be seen that, in the solution provided in the embodiment of the present invention, the electronic device may obtain target search information input by a user, and search for a target search word feature vector corresponding to the target search information according to a pre-established corresponding relationship between the search information and a search information feature vector, where the corresponding relationship between the search information and the search information feature vector is established based on a search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on training of a historical search behavior of the user, the second type model is obtained based on training of content information, where the content information is information identifying specific content of the historical search behavior of the user, and the search information to be recommended is determined from the search information included in the corresponding relationship according to a similarity between the target feature vector and other search information feature vectors included in the corresponding relationship, and ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and finally recommending the recommended search information to the user by the electronic equipment. In the recall stage, the target characteristic vector is determined by utilizing not only the first type of model obtained by training based on the historical search behavior of the user, but also the second type of model obtained by training based on the specific content information of the historical search behavior of the user, so that the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and the more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is further improved.
As an implementation manner of the embodiment of the present invention, as shown in fig. 8, the second type model training module may include:
a second sample obtaining submodule 810, configured to obtain a second type initial model and a plurality of second search information samples;
a second calibration sub-module 820, configured to determine, for each second search information sample, calibration information of the second search information sample based on a preset calibration rule;
and the preset calibration rule is set based on the content information of the second search information sample.
The second prediction sub-module 830 is configured to input the second search information sample into the second-class initial model, convert the second search information sample into a corresponding feature vector based on current parameters of the second-class initial model, and determine prediction information corresponding to the second search information sample based on the feature vector;
and the second parameter adjusting submodule 840 is configured to adjust the current parameter based on a difference between the prediction information and the corresponding calibration information 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 parameter to obtain a corresponding feature vector.
As an implementation manner of the embodiment of the present invention, the content information may include at least one of the following: the related 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 an implementation manner of the embodiment of the present invention, the first-class model training module may include:
the first sample obtaining submodule is used for obtaining a first type initial model and a plurality of first search information samples;
each first search information sample is search information in a user history search behavior sequence which is acquired in advance, and the user history search behavior sequence is a sequence formed by search information which is continuously input in user history search behaviors.
The first calibration submodule is used for selecting any search information as a center search information sample of each first search information sample, and determining other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample;
the first prediction sub-module is used for 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 the 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;
and the first parameter adjusting submodule is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first-class initial model converges and stopping training so that the first-class initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vectors.
As an implementation manner of the embodiment of the present invention, the second-type model includes a first sub-model, a second sub-model, and a third sub-model, and content information corresponding to the first sub-model, the second sub-model, and the third sub-model is the associated entity information, the word segmentation information, and the category label, respectively;
and the first sub-model, the second sub-model and the third sub-model are alternately trained through the corresponding first model training module or the second model training module according to a preset training rule.
As an embodiment of the present invention, the search information recommendation module 740 may include:
the recommended search information sorting submodule is used for sorting the search information to be recommended according to the sequence of similarity from high to low to obtain a sorting result;
the recommended search information selection submodule is used for selecting a preset number of pieces of search information to be recommended from the search information to be recommended as target information based on the sorting result;
and the recommended search information display sub-module is used for displaying the target information in a search information recommendation area of the user search page according to the sequence of similarity from high to low.
An embodiment of the present invention further provides an electronic device, as shown in fig. 9, which includes a processor 901, a communication interface 902, a memory 903, and a communication bus 904, where the processor 901, the communication interface 902, and the memory 903 complete mutual communication through the communication bus 904,
a memory 903 for storing computer programs;
the processor 901 is configured to implement the steps of the recommendation method for searching information according to any of the embodiments described above when executing the program stored in the memory 903.
It can be seen that, in the solution provided in the embodiment of the present invention, the electronic device may obtain target search information input by a user, and search for a target search word feature vector corresponding to the target search information according to a pre-established corresponding relationship between the search information and a search information feature vector, where the corresponding relationship between the search information and the search information feature vector is established based on a search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on training of a historical search behavior of the user, the second type model is obtained based on training of content information, where the content information is information identifying specific content of the historical search behavior of the user, and the search information to be recommended is determined from the search information included in the corresponding relationship according to a similarity between the target feature vector and other search information feature vectors included in the corresponding relationship, and ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and finally recommending the recommended search information to the user by the electronic equipment. In the recall stage, the target characteristic vector is determined by utilizing not only the first type of model obtained by training based on the historical search behavior of the user, but also the second type of model obtained by training based on the specific content information of the historical search behavior of the user, so that the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and the more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is further improved.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a non-volatile Memory (non-volatile Memory), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the device can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, a discrete Gate or transistor logic device, or a discrete hardware component.
In still another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the recommendation method for search information described in any of the above embodiments.
It can be seen that in the solution provided in the embodiment of the present invention, when an instruction is stored in a computer-readable storage medium and the instruction is executed on a computer, target search information input by a user may be obtained, and a target search word feature vector corresponding to the target search information is searched according to a pre-established correspondence between search information and a search information feature vector, where the correspondence between the search information and the search information feature vector is established based on a search information feature vector obtained through a first-type model and a second-type model, the first-type model is obtained based on a user history search behavior training, the second-type model is obtained based on a content information training, where the content information is information identifying specific content of the user history search behavior, and according to a similarity between the target feature vector and other search information feature vectors included in the correspondence, and determining search information to be recommended from the search information included in the corresponding relation, sorting the search information to be recommended based on the similarity, determining recommended search information based on a sorting result, and finally recommending the recommended search information to the user by the electronic equipment. In the recall stage, the target characteristic vector is determined by utilizing not only the first type of model obtained by training based on the historical search behavior of the user, but also the second type of model obtained by training based on the specific content information of the historical search behavior of the user, so that the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and the more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is further improved.
In another embodiment of the present invention, there is also provided a computer program product including instructions, which when run on a computer, cause the computer to execute the method for recommending search information according to any one of the above embodiments.
It can be seen that, in the solution provided in the embodiment of the present invention, when a computer program product including instructions runs on a computer, target search information input by a user may be obtained, and a target search word feature vector corresponding to the target search information is found according to a pre-established correspondence between search information and a search information feature vector, where the correspondence between the search information and the search information feature vector is established based on a search information feature vector obtained through a first-type model and a second-type model, the first-type model is obtained by training based on a user history search behavior, the second-type model is obtained by training based on content information, where the content information is information identifying specific content of the user history search behavior, and search information to be recommended is determined from search information included in the correspondence according to a similarity between the target feature vector and other search information feature vectors included in the correspondence, and ranking the search information to be recommended based on the similarity, determining the recommended search information based on the ranking result, and finally recommending the recommended search information to the user by the electronic equipment. In the recall stage, the target characteristic vector is determined by utilizing not only the first type of model obtained by training based on the historical search behavior of the user, but also the second type of model obtained by training based on the specific content information of the historical search behavior of the user, so that the historical search behavior of the user and the specific content information related to the historical search behavior of the user can be comprehensively considered, and the more accurate target characteristic vector can be obtained, so that the search information to be recommended determined based on the target characteristic vector is more targeted, the recall quality is improved, and the recommendation effect of the search information is further improved.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may 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 loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (14)

1. A recommendation method for search information, the method comprising:
acquiring target search information input by a user;
searching a target characteristic vector corresponding to target search information according to a corresponding relation between the search information and the search information characteristic vector which is established in advance, wherein the corresponding relation is established on the basis of the search information characteristic vector obtained through a first type model and a second type model, the first type model is obtained through training based on the historical search behavior of a user, the second type model is obtained through training based on content information, and the content information is information for identifying specific content of the historical search behavior of the user;
determining search information to be recommended from the search information included in the corresponding relation according to the similarity between the target feature vector and the feature vectors of other search information included in the corresponding relation;
and ranking the search information to be recommended based on the similarity, determining recommended search information based on a ranking result, and recommending the recommended search information to a user.
2. The method of claim 1, wherein the second type of model is trained by:
acquiring a second type initial model and a plurality of second search information samples;
for each second search information sample, determining 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;
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 the current parameters of the second type initial model, and determining the corresponding prediction information of the second search information sample based on the feature vector;
and adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the second type of initial model converges, and stopping 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.
3. The method of claim 2, wherein the content information comprises at least one of:
the related entity information of the second search information sample in a 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 of claim 3, wherein the second type of model includes a first sub-model, a second sub-model and a third sub-model, and content information corresponding to the first sub-model, the second sub-model and the third sub-model is the associated entity information, the word segmentation information and the category label, respectively;
and the first type model, the first sub-model, the second sub-model and the third sub-model are alternately trained according to a preset training rule.
5. The method of claim 1, wherein the training of the first class of models comprises:
acquiring a first type of initial model and a plurality of first search information samples, wherein each first search information sample is search information in a pre-acquired user historical search behavior sequence, and the user historical search behavior sequence is a sequence formed by search information continuously input in user historical search behaviors;
selecting any search information as a center search information sample of each first search information sample, and determining other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample;
inputting the center search information sample into the first type initial model, converting the center search information sample into a corresponding feature vector based on the current parameters of the first type initial model, and determining the prediction information corresponding to the center search information sample based on the feature vector;
and adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first-class initial model converges, and stopping training so that the first-class 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, wherein the step of ranking the search information to be recommended based on the similarity, determining recommended search information based on a ranking result, and recommending the recommended search information to the user comprises:
sequencing the search information to be recommended according to the sequence of similarity from high to low to obtain a sequencing result;
selecting a preset number of pieces of search information to be recommended from the search information to be recommended as target information based on the sorting result;
and displaying the target information in a search information recommendation area of a user search page according to the sequence of the similarity from high to low.
7. An apparatus for recommending search information, said apparatus comprising:
the search information acquisition module is used for acquiring target search information input by a user;
the characteristic vector searching module is used for searching a target characteristic vector corresponding to the target searching information according to a corresponding relation between the pre-established searching information and the searching information characteristic vector, wherein the corresponding relation is established on the basis of the searching information characteristic vector obtained through a first type model and a second type model, the first type model is obtained by training a first type model training module on the basis of the historical searching behavior of the user, the second type model is obtained by training a second type model training module on the basis of content information, and the content information is information for identifying the specific content of the historical searching behavior of the user;
the search information to be recommended determining module is used for determining search information to be recommended from the search information included in the corresponding relation according to the similarity between the target characteristic vector and the other search information characteristic vectors included in the corresponding relation;
and the search information recommending module is used for sequencing the search information to be recommended based on the similarity, determining recommended search information based on a sequencing result and recommending the recommended search information to the user.
8. The apparatus of claim 7, wherein the second class model training module comprises:
the second sample acquisition submodule is used for acquiring a second type initial model and a plurality of second search information samples;
the second calibration submodule is used for determining calibration information of each 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;
the second prediction sub-module is used for 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 the current parameters of the second type initial model, and determining the prediction information corresponding to the second search information sample based on the feature vector;
and the second parameter adjusting submodule is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the second type of initial model converges and stopping 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 apparatus of claim 8, wherein the content information comprises at least one of:
the method comprises the following steps of associating entity information of a search information sample in a preset knowledge graph, word segmentation information corresponding to the search information sample and a category label of the search information sample.
10. The apparatus of claim 9, wherein the second type of model includes a first sub-model, a second sub-model, and a third sub-model, and content information corresponding to the first sub-model, the second sub-model, and the third sub-model is the associated entity information, the word segmentation information, and the category label, respectively;
and the first sub-model, the second sub-model and the third sub-model are alternately trained through the corresponding first model training module or the second model training module according to a preset training rule.
11. The apparatus of claim 7, wherein the first class model training module comprises:
the device comprises a first sample acquisition module, a second sample acquisition module and a search information processing module, wherein the first sample acquisition module is used for acquiring a first type of initial model and a plurality of first search information samples, each first search information sample is search information in a user historical search behavior sequence which is acquired in advance, and the user historical search behavior sequence is a sequence formed by search information which is continuously input in user historical search behaviors;
the first calibration submodule is used for selecting any search information as a center search information sample of each first search information sample, and determining other search information of the center search information sample in the context of the first search information sample as calibration information of the center search information sample;
the first prediction sub-module is used for 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 the 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;
and the first parameter adjusting submodule is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first-class initial model converges and stopping training so that the first-class initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vectors.
12. The apparatus according to any one of claims 7-11, wherein the search information recommendation module comprises:
the recommended search information sorting submodule is used for sorting the search information to be recommended according to the sequence of similarity from high to low to obtain a sorting result;
the recommended search information selection submodule is used for selecting a preset number of pieces of search information to be recommended from the search information to be recommended as target information based on the sorting result;
and the recommended search information display sub-module is used for displaying the target information in a search information recommendation area of the user search page according to the sequence of similarity from high to low.
13. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1-6 when executing a program stored in the memory.
14. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 6.
CN202110648500.6A 2021-06-10 2021-06-10 Search information recommendation method and device, electronic equipment and storage medium Pending CN113282832A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110648500.6A CN113282832A (en) 2021-06-10 2021-06-10 Search information recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110648500.6A CN113282832A (en) 2021-06-10 2021-06-10 Search information recommendation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113282832A true CN113282832A (en) 2021-08-20

Family

ID=77284089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110648500.6A Pending CN113282832A (en) 2021-06-10 2021-06-10 Search information recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282832A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114741605A (en) * 2022-04-26 2022-07-12 泰康保险集团股份有限公司 Method and device for recommending annuity products, electronic equipment and readable medium
CN115718772A (en) * 2022-11-24 2023-02-28 腾讯科技(深圳)有限公司 Recommended resource determination method, data processing method, device and computer medium
CN116226297A (en) * 2023-05-05 2023-06-06 深圳市唯特视科技有限公司 Visual search method, system, equipment and storage medium for data model
WO2023151576A1 (en) * 2022-02-08 2023-08-17 中兴通讯股份有限公司 Search recommendation method, search recommendation system, computer device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912630A (en) * 2016-04-07 2016-08-31 北京搜狗科技发展有限公司 Information expansion method and device
US20180107742A1 (en) * 2016-10-18 2018-04-19 Facebook, Inc. Systems and methods for providing service directory predictive search recommendations
CN109189990A (en) * 2018-07-25 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method of search term, device and electronic equipment
CN110532454A (en) * 2019-08-28 2019-12-03 北京奇艺世纪科技有限公司 A kind of search words recommending method and device
CN111666450A (en) * 2020-06-04 2020-09-15 北京奇艺世纪科技有限公司 Video recall method and device, electronic equipment and computer-readable storage medium
CN111859138A (en) * 2020-07-27 2020-10-30 小红书科技有限公司 Searching method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105912630A (en) * 2016-04-07 2016-08-31 北京搜狗科技发展有限公司 Information expansion method and device
US20180107742A1 (en) * 2016-10-18 2018-04-19 Facebook, Inc. Systems and methods for providing service directory predictive search recommendations
CN109189990A (en) * 2018-07-25 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method of search term, device and electronic equipment
CN110532454A (en) * 2019-08-28 2019-12-03 北京奇艺世纪科技有限公司 A kind of search words recommending method and device
CN111666450A (en) * 2020-06-04 2020-09-15 北京奇艺世纪科技有限公司 Video recall method and device, electronic equipment and computer-readable storage medium
CN111859138A (en) * 2020-07-27 2020-10-30 小红书科技有限公司 Searching method and device

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023151576A1 (en) * 2022-02-08 2023-08-17 中兴通讯股份有限公司 Search recommendation method, search recommendation system, computer device and storage medium
CN114741605A (en) * 2022-04-26 2022-07-12 泰康保险集团股份有限公司 Method and device for recommending annuity products, electronic equipment and readable medium
CN115718772A (en) * 2022-11-24 2023-02-28 腾讯科技(深圳)有限公司 Recommended resource determination method, data processing method, device and computer medium
CN116226297A (en) * 2023-05-05 2023-06-06 深圳市唯特视科技有限公司 Visual search method, system, equipment and storage medium for data model

Similar Documents

Publication Publication Date Title
CN108073568B (en) Keyword extraction method and device
CN113282832A (en) Search information recommendation method and device, electronic equipment and storage medium
CN109101481B (en) Named entity identification method and device and electronic equipment
CN103544267B (en) Search method and device based on search recommended words
CN111949898A (en) Search result ordering method, device, equipment and computer readable storage medium
CN109189990B (en) Search word generation method and device and electronic equipment
CN112214670A (en) Online course recommendation method and device, electronic equipment and storage medium
CN1637744A (en) Machine-learned approach to determining document relevance for search over large electronic collections of documents
CN109657137B (en) Public opinion news classification model construction method, device, computer equipment and storage medium
CN112395487B (en) Information recommendation method and device, computer readable storage medium and electronic equipment
CN110991187A (en) Entity linking method, device, electronic equipment and medium
US20160170993A1 (en) System and method for ranking news feeds
CN112307182B (en) Question-answering system-based pseudo-correlation feedback extended query method
CN112199602B (en) Post recommendation method, recommendation platform and server
CN110688452A (en) Text semantic similarity evaluation method, system, medium and device
CN109063171B (en) Resource matching method based on semantics
CN110991476A (en) Training method and device for decision classifier, recommendation method and device for audio and video, and storage medium
CN112380421A (en) Resume searching method and device, electronic equipment and computer storage medium
CN111291086A (en) Course content searching method, system, equipment and storage medium
CN108268466B (en) Webpage ordering method and device based on neural network model
CN113343091A (en) Industrial and enterprise oriented science and technology service recommendation calculation method, medium and program
CN110083766B (en) Query recommendation method and device based on meta-path guiding embedding
CN113282831A (en) Search information recommendation method and device, electronic equipment and storage medium
CN111079011A (en) Deep learning-based information recommendation method
CN112163415A (en) User intention identification method and device for feedback content and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination