Nothing Special   »   [go: up one dir, main page]

CN113282832B - Recommendation method and device for search information, electronic equipment and storage medium - Google Patents

Recommendation method and device for search information, electronic equipment and storage medium Download PDF

Info

Publication number
CN113282832B
CN113282832B CN202110648500.6A CN202110648500A CN113282832B CN 113282832 B CN113282832 B CN 113282832B CN 202110648500 A CN202110648500 A CN 202110648500A CN 113282832 B CN113282832 B CN 113282832B
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.)
Active
Application number
CN202110648500.6A
Other languages
Chinese (zh)
Other versions
CN113282832A (en
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/CN113282832B/en
Publication of CN113282832A publication Critical patent/CN113282832A/en
Application granted granted Critical
Publication of CN113282832B publication Critical patent/CN113282832B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

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, a recommendation device, electronic equipment and a storage medium for search information, wherein the method comprises the following steps: acquiring target search information input by a user; searching a target feature vector corresponding to target search information according to a pre-established corresponding relation between the search information and the search information feature vector, wherein the corresponding relation is established based on the search information feature vector obtained through the first type model and the second type model; determining search information to be recommended from the search information contained in the corresponding relation according to the similarity between the target feature vector and other search information feature vectors contained in the corresponding relation; and sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user. The accurate target feature vector can be obtained, so that the search information to be recommended determined based on the target feature vector has more pertinence, recall quality is improved, and the search information recommendation effect is improved.

Description

Recommendation method and device for search information, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information searching technologies, and in particular, to a method and apparatus for recommending search information, an electronic device, and a storage medium.
Background
For websites with search functions, accurate search information recommendation is performed for different users, and the users are attracted to click the recommended search information to search, so that 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. And the sorting stage is used for scoring and sorting the recalled search information to be recommended, and finally determining the search information to be recommended to the user according to the scoring and sorting result.
In the recall stage, it is generally considered that in the search behavior of the user, the more times the search information continuously appears in a period of time, the stronger the relevance is; therefore, the electronic equipment can establish the relation between the feature vectors of the search information with more continuous occurrence times through the item2vec model, after the search information input by the user is obtained, the search information can be input into the trained item2vec model, so that 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, during the model training process, there may be no correlation between the acquired search information input by the user over a period of time, for example: the user may have continuously searched for less relevant content such as "soldier assault", "mojitolo", "western tour" and the like for a period of time. After the model is trained in the mode, when a user inputs 'soldier assaults', irrelevant search information such as 'West-tour' is likely to be recommended to the user as recommended search information. Therefore, in the above search information recommendation method, recall quality of the search information to be recommended is not high, so that recommendation of the search information is lack of pertinence and poor effect is caused.
Disclosure of Invention
The embodiment of the invention aims to provide a recommendation method, a recommendation device, electronic equipment and a storage medium for search information, so as to improve recall quality of the search information, further improve recommendation pertinence of the search information and improve 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 feature vector corresponding to target search information according to a pre-established corresponding relation between the search information and the search information feature vector, wherein the corresponding relation is established based on the search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on user historical search behavior training, the second type model is obtained based on content information training, and the content information is information for identifying specific content of the user historical search behavior;
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 other search information feature vectors included in the corresponding relation;
And sorting the search information to be recommended based on the similarity, determining recommended search information based on a sorting 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;
Determining calibration information of each second search information sample based on a preset calibration rule for each second search information sample, 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 prediction information corresponding to 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 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.
Optionally, the content information includes at least one of:
The related entity information of the second search information sample in the preset knowledge graph, word segmentation information corresponding to the second search information sample and the category label of the second search information sample.
Optionally, the second 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;
the first model, the first sub-model, the second sub-model and the third sub-model are trained alternately according to preset training rules.
Optionally, the training manner of the first model includes:
acquiring a first type initial model and a plurality of first search information samples, wherein each first search information sample is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence formed by search information continuously input in user history search behaviors;
For each first search information sample, selecting any one 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;
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 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 type initial model converges, and stopping training so that the first type initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.
Optionally, the step of sorting the search information to be recommended based on the similarity, determining recommended search information based on a sorting result, and recommending the recommended search information to the user includes:
sequencing the search information to be recommended according to the sequence from high to low of similarity to obtain a sequencing result;
selecting 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 displaying the target information in a search information recommendation area of the 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 a recommendation apparatus for searching information, where the apparatus includes:
the search information acquisition module is used for acquiring target search information input by a user;
The feature vector searching module is used for searching a target feature vector corresponding to the target search information according to a pre-established corresponding relation between search information and search information feature vectors, wherein the corresponding relation is established based on the search information feature vectors obtained through a first model and a second model, the first model is obtained through training of a first model training module based on historical search behaviors of a user, the second model is obtained through training of a second model training module based on content information, and the content information is information of specific content identifying the historical search behaviors of the user;
the to-be-recommended search information determining module is used for determining to-be-recommended search information from the search information included in the corresponding relation according to the similarity between the target feature vector and other search information feature 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 a user.
Optionally, the second model training module includes:
the second sample acquisition sub-module is used for acquiring a second type initial model and a plurality of second search information samples;
The second calibration sub-module is used for determining calibration information of each second search information sample based on a preset calibration rule for each second search information sample, 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 parameter of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector;
And the second parameter adjustment sub-module is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information 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.
Optionally, the content information includes at least one of:
related entity information of the 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 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;
The first model, the first sub model, the second sub model and the third sub model are trained alternately through the corresponding first model training module or second model training module according to preset training rules.
Optionally, the first model training module includes:
The system comprises a first sample acquisition module, a second sample acquisition module and a first search module, wherein the first sample acquisition module is used for acquiring 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 acquired in advance, and the user history search behavior sequence is a sequence formed by search information continuously input in user history search behaviors;
The first calibration sub-module is used for selecting any piece of search information as a center search information sample of the first search information sample aiming at each first search information sample, and determining other search information of the center search information sample under 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 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 prediction information corresponding to the center search information sample based on the feature vector;
And the first parameter adjustment sub-module is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first type initial model converges, and stopping training so that the first type initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.
Optionally, the search information recommending module includes:
The recommended search information sorting sub-module is used for sorting the search information to be recommended according to the sequence from high to low of the similarity, and obtaining a sorting result;
The recommended search information selecting sub-module is used for selecting a preset number of to-be-recommended search information from the to-be-recommended search information based on the sorting result, and taking the to-be-recommended search information as target information;
and the recommended search information display sub-module is used for displaying the target information in the search information recommendation area of the user search page according to the sequence of the 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, the communication interface, and the memory complete communication with each other through the communication bus;
A memory for storing a computer program;
a processor for implementing the method steps of any of the above first aspects when executing a program stored on a memory.
In a fourth aspect, embodiments of the present invention provide a computer-readable storage medium having a computer program stored therein, which when executed by a processor, implements the method steps of any of the first aspects described above.
According to the scheme provided by the embodiment of the invention, the electronic equipment can acquire target search information input by a user, search the target search word feature vector corresponding to the target search information according to the corresponding relation between the pre-established search information and the search information feature vector, wherein the corresponding relation between the search information and the search information feature vector is established based on the search information feature vector obtained through a first type model and a second type model, the first type model is trained based on the historical search behavior of the user, the second type model is trained based on content information, wherein the content information is information for identifying specific content of the historical search behavior of the user, search information to be recommended is determined from search information included in the corresponding relation according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relation, the search information to be recommended is ranked based on the similarity, the recommended search information is determined based on the ranking result, and finally the electronic equipment recommends the recommended search information to the user.
In the recall stage, not only the first model obtained based on the training of the user history search behavior, but also the second model obtained based on the training of the specific content information of the user history search behavior are utilized to determine the target feature vector, so that the user history search behavior and the specific content information related to the user history search behavior can be comprehensively considered, more accurate target feature vectors can be obtained, the search information to be recommended determined based on the target feature vector is more targeted, recall quality is improved, and further the search information recommendation effect is 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 the second model in the embodiment shown in FIG. 1;
FIG. 3 is a schematic diagram of the knowledge graph in the embodiment shown in FIG. 2;
FIG. 4 is a flow chart of a training method of the first model in the embodiment shown in FIG. 1;
FIG. 5 is a schematic diagram illustrating a manner of establishing a correspondence between search information and search information feature vectors in the embodiment shown in FIG. 1;
FIG. 6 is a specific flowchart of step S104 in the embodiment shown in FIG. 1;
fig. 7 is a schematic structural diagram of a recommending apparatus for searching information according to an embodiment of the present invention;
FIG. 8 is a schematic diagram showing a specific structure of a second model training module in 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 accompanying drawings in the embodiments of the present invention.
In order to improve recall quality of search information and further improve pertinence of search information recommendation and recommendation effect of the search information, the embodiment of the invention provides a recommendation method, device, electronic equipment and computer-readable storage medium of the search information. The following first describes a method for recommending search information provided by the embodiment of the present invention.
The method for recommending search information provided by the embodiment of the invention can be applied to any electronic equipment which needs to recommend search information to a user, for example, a server, a computer, a processor and the like, and is not particularly limited. For clarity of description, hereinafter, referred to as an electronic device.
As shown in fig. 1, a recommendation method for searching information, the method includes:
S101, acquiring target search information input by a user;
S102, searching a target feature vector corresponding to the target search information according to a pre-established corresponding relation between the search information and the search information feature vector;
the corresponding relation is established based on search information feature vectors obtained through a first type model and a second type model, the first type model is obtained based on user historical search behavior training, the second type model is obtained based on content information training, and the content information is information for identifying specific content of the user historical search behavior.
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 other search information feature vectors included in the corresponding relation;
S104, sorting the search information to be recommended based on the similarity, determining recommended search information based on a sorting 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, an electronic device may obtain target search information input by a user, and find a target search word feature vector corresponding to the target search information according to a pre-established correspondence between the target 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 the search information feature vector obtained through a first model and a second model, the first model is obtained based on user historical search behavior training, the second model is obtained based on content information training, where the content information is information identifying specific content of the user historical search behavior, determine search information to be recommended from search information included in the correspondence according to similarity between the target feature vector and other search information feature vectors included in the correspondence, rank the search information to be recommended based on the similarity, and determine recommended search information based on the ranking result, and finally, the electronic device recommends the recommended search information to the user. In the recall stage, not only the first model obtained based on the training of the user history search behavior, but also the second model obtained based on the training of the specific content information of the user history search behavior are utilized to determine the target feature vector, so that the user history search behavior and the specific content information related to the user history search behavior can be comprehensively considered, more accurate target feature vectors can be obtained, the search information to be recommended determined based on the target feature vector is more targeted, recall quality is improved, and further the search information recommendation effect is improved.
When a user searches information by using a search function provided by a website, the website server can recommend relevant search information to the user on a search page, and the user is attracted 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, based on the search information input by the user, the electronic device may acquire the search information input by the user as the target search information in step S101. The target search information is the search information that the user wants to search. The target search information may specifically be any one of a word, a phrase, or a sentence, and is not specifically limited herein.
For example, when a user performs information search using a search function provided by a website, the user inputs search information "western character" that he wants to search, and the electronic device may acquire the search information "western character", which is the target search information.
In order to determine the search information to be recommended, which has relevance to 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 the above step S102, the electronic device may search for the target feature vector corresponding to the target search information according to the pre-established correspondence between the search information and the search information feature vector.
In one embodiment, the correspondence between the search information and the feature vector of the search information may include a one-to-one correspondence between the search information and the feature vector of the search information, which may be referred to as a "word-vector dictionary", where the "word-vector dictionary" may be recorded in a tabular 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, according to the correspondence recorded in the table, the target feature vector corresponding to the target search information as the feature vector C.
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 model and the second model. In one embodiment, the electronic device may train the first type of initial model to obtain the first type of model in advance based on the user's historical search behavior.
The user inputs the search information 1 in the search page, and then continuously inputs the search information 2, the search information 3 and the like in a period of time, so that the search information 1-the search information 2-the search information 3. The search information n forms a search information sequence, and the search information sequence can represent the historical search behavior of the user, wherein n is the number of the search information input by the user in the period of time. For example, if the user enters a western diary in the search page and then continuously enters a grand monkey and a tangheng monkey for a period of time, the "western diary-grand monkey-tangheng" constitutes the search information sequence.
By the method, a plurality of search information sequences can be obtained, and then the first type initial model can be trained based on the plurality of search information sequences to obtain a 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, can output other search information which belongs to the same search information sequence as the input search information. In the training process of the first model, the model parameters are continuously adjusted, so that the feature vectors corresponding to the search information are also continuously adjusted, and the model parameters are more accurate.
In one embodiment, the electronic device may train the second type of initial model to obtain the second type of model based on the content information in advance. The content information is information for identifying specific content of the user history searching behavior. In order to improve the accuracy of the feature vector, in addition to training to obtain the first type model based on the user's historical search behavior, a second type initial model may be trained in advance.
The search information is input in the user search page, and the electronic device may determine information capable of identifying specific content of the user's historical search behavior, for example, "four-pronounce," "dream," "enteromorpha," and "three-kingdom" which are capable of identifying specific content of "western-pronounce" may be used as content information.
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 based on the plurality of search information and the corresponding content information can be obtained. When the search information is input into the second model, the second model may output content information corresponding to the search information based on the feature vector corresponding to the search information. In the training process of the second model, the model parameters are continuously adjusted, so that the feature vectors corresponding to the search information are also continuously adjusted, and the model parameters are more accurate.
After obtaining the target feature vector corresponding to the target search information, the electronic device may execute step S103, namely, determine the search information to be recommended from the search information included in the corresponding relationship according to the similarity between the target feature vector and the feature vector of other search information included in the pre-established corresponding relationship.
The similarity between the target feature vector and other search information feature vectors included in the pre-established correspondence may be determined based on the distance between the feature vectors. Specifically, for each piece of other search information included in the corresponding relationship, the electronic device may determine a distance between a feature vector corresponding to the other search information and a target feature vector, determine a similarity between the other search information and the target search information based on the distance, and determine the search information to be recommended from the other search information included in the corresponding relationship according to the similarity.
In general, the smaller the distance between two feature vectors, the higher the similarity between the search information corresponding to the two feature vectors; conversely, the larger the distance between two feature vectors, the lower the similarity between the search information corresponding to the two feature vectors. The distance between the two feature vectors may be a cosine distance, an euclidean distance, a manhattan distance, a chebyshev distance, or the like, which 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:
wherein < a, b > is an inner product between the target feature vector a and the feature vector b, |a| is a length of the target feature vector a, |b| is a length of the feature vector b, and θ is an angle between the target feature vector a and the feature vector b. When cos θ is closer to 1, the description direction is closer, and the distance between the two feature vectors is smaller, so that the similarity between the search information corresponding to the two feature vectors is higher; when cos θ is closer to-1, the larger the difference in description direction is, the larger the distance between the two feature vectors is, and the lower the similarity between the search information corresponding to the two feature vectors is.
After determining the search information to be recommended, the electronic device may sort the search information to be recommended based on the similarity, determine the recommended search information based on the sorting result, and recommend the recommended search information to the user, that is, execute the step S104.
For example, the electronic device determines to-be-recommended search information 1, to-be-recommended search information 2, and to-be-recommended search information 3, where the similarity between the to-be-recommended search information and the search information input by the user is respectively: 0.75, 0.55, 0.99. The electronic device may sort the search information to be recommended based on the similarity, and sort the search information according to the sorting from high to low of the similarity, so as to obtain a sorting result as shown in the following table:
Sequence number Similarity degree Ranking results
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 to the user as the recommended search information based on the ranking result of the similarity shown in the above table.
According to the recommendation method of the search information, after the search information input by the user is obtained, the electronic equipment can comprehensively consider the user history search behavior and the specific content information related to the user history search behavior according to the corresponding relation between the search information established by the first type model and the second type model and the search information feature vector and obtained after the training based on the user history search behavior and the content information, so that the search information to be recommended determined based on the target feature vector is more targeted, 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 model may include:
S201, acquiring a second type initial model and a plurality of second search information samples;
To train to obtain the second model, the electronic device may obtain a second initial model and a plurality of second search information samples. Wherein the second type of initial model may be a multi-classification neural network model or the like. The second search information sample may be search information included in a previously acquired user history search behavior.
S202, determining calibration information of each second search information sample based on a preset calibration rule according to each second search information sample;
For each second search information sample, the electronic device may determine calibration information for 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-style memory", since "sun wu" is a main role in "western-style memory", the "western-style memory" belongs to the word segmentation result of "Ming qing novel" and "xi you" belongs to "western-style memory", and thus "sun wu", "Ming qing novel" and "xi you" can identify the specific content of the second search information sample "western-style memory", the electronic device can use "sun wu", "Minqing novel" and "xi you" as the calibration information of the second search information sample "western-style memory".
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 prediction information corresponding to the second search information sample based on the feature vector;
In the training process of the second type initial model, the electronic equipment can input each second search information sample into the second type initial model, the second type initial model can convert the second search information sample into a corresponding feature vector based on the current parameters, and prediction information corresponding to the second search information sample is determined based on the feature vector.
And S204, adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information 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 current model parameters of the second type initial model are likely to be unsuitable, so that the conversion of the second search information sample into the corresponding feature vector according to the current model parameters is inaccurate, and further prediction information corresponding to the second search information sample is likely to be incapable of being accurately determined when the prediction information corresponding to the second search information sample is determined based on the feature vector. Therefore, after obtaining the prediction information of each second search information sample, the electronic device can 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, accurate feature vectors can be obtained when the second search information sample is converted into corresponding feature vectors according to the adjusted model parameters.
The mode of adjusting the model parameters of the second type of initial model may be a mode of adjusting model parameters such as a gradient descent algorithm, a random gradient descent algorithm, etc., which are not specifically limited and described herein.
In order to determine whether the second type initial model converges, the electronic device may determine whether the number of iterations of the second type initial model reaches a preset number, or whether the accuracy of the predicted result of the second type initial model is greater than a preset value.
If the iteration times of the second type initial model reach the preset times or the accuracy of the prediction result of the second type initial model is larger than the preset value, the second type initial model is proved to be converged, that is, the current second type initial model can accurately determine the feature vector corresponding to the second search information sample, so that training can be stopped at the moment, and the second type model is obtained. The feature vector corresponding to the second search information sample obtained based on the second model is accurate.
The preset number of times may be set according to factors such as accuracy requirements of the prediction result and model structure, for example, 6000 times, 9000 times, 12000 times, and the like, which are not limited herein. The preset value may be set according to factors such as accuracy requirements of the prediction result, model structure, and the like, and may be, for example, 0.91, 0.89, 0.90, and the like, which are not particularly limited herein.
If the number of iterations of the second-type initial model does not reach the preset number of iterations, or the accuracy of the prediction result of the second-type initial model is not greater than the preset value, which indicates that the second-type initial model has not converged, that is, the current second-type initial model cannot accurately determine the feature vector corresponding to the second search information sample, then the electronic device needs to continue training the second-type initial model.
Therefore, in the scheme provided by the embodiment of the invention, the electronic equipment can train the second type initial model in the mode to obtain the second type model. In this way, the electronic device can obtain the second type model capable of accurately determining 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, word segmentation information corresponding to the second search information sample and class labels of the second search information sample.
When the electronic equipment 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 class labels 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 the 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, the entity information associated with the second search information sample is searched from the preset knowledge graph, and then traversing is performed by taking the associated entity information as a starting point according to a preset rule, so that the associated entity information of the second search information sample in the preset knowledge graph is determined. 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 corresponding to the second search information sample in the preset knowledge graph can be the entity information similar to the word meaning of the second search information sample.
The preset migration rule may be any one or more of a relationship between entities of the knowledge graph according to a relationship between the entities, a parallel relationship, an overall-partial relationship, and a causal relationship, and the traversal is stopped until a preset condition is reached, which is not limited herein.
In an embodiment, all relevant entity information traversed in the traversing process and corresponding entity information of 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 value, the distance of the travelling process reaches a preset length, and the like, which is not limited herein specifically.
For example, as shown in fig. 3, when the second search information sample 310 is "western character", the electronic device may associate the second search information sample 310 "western character" to the entity information 321 "western character" in the above-mentioned knowledge graph in the preset knowledge graph 320, where the entity information 321 "western character" is the associated entity information of the second search information sample 310. The electronic device may further traverse to entity information 322 "Sunwuk" according to the whole-part relationship, to entity information 323 "four-grand reputation" according to the upper-lower relationship, and to entity information 324 "red building dream" according to the parallel relationship, with associated entity information 321 as a starting point. The electronic device may also continue traversing to entity information 325 "Darhodo Tiangong" according to the correlation with entity information 322 "Sunwuk" as a starting point. The number of the traversed entity information is 4, the preset condition is reached, and the electronic equipment can terminate the traversal. The entity information "western pleasure", "grand wu", "four famous books", "dream of the red building" and "great alarm Tiangong" can be used as the related entity information of the second search information sample "western pleasure" in the preset knowledge graph. Finally, the electronic device may determine the above-mentioned associated entity information as calibration information of the second search information sample "western tour".
In one embodiment, the electronic device may perform word segmentation on the second search information sample, and use word segmentation information obtained after the word segmentation as calibration information of the second search information sample. The word segmentation processing may be any word segmentation processing mode in the text information processing field, and is not specifically limited and described herein.
For example, when the second search information sample is "the third monkey King and white bone essence of the West tour", the electronic device may perform word segmentation processing on the second search information sample to obtain word information such as "the West tour", "the third monkey King", "the white bone essence", "the third monkey King and white bone essence", where the word segmentation information may identify the specific content of the second search information sample "the third monkey King and white bone essence of the West tour", and the electronic device may determine the word segmentation information as the calibration information of the second search information sample "the third monkey King and white bone essence of the West tour".
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 calibration information of the second search information sample. The category label may be any label capable of representing a category characteristic of the second search information sample, and the specific form thereof is not specifically limited herein, and may be, for example, a number, a letter, or the like.
For example, when the second search information sample is "western character", the electronic device may determine a category of the second search information sample "western character" according to a predetermined classification rule, and further determine a tag of the second search information sample "western character", for example, may be a category tag such as "television play", "Mingqing novel", and the like. Further, the electronic device may determine the category label as calibration information for the second search information sample "western tour".
It can be seen that, in this embodiment, the electronic device may determine, as the calibration information, associated entity information, word segmentation information, and/or category labels capable of identifying the specific content of the second search information sample from different dimensions. Therefore, the second 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 of specific content of the second search information sample marked from different dimensions, and the electronic equipment can establish more accurate corresponding relation between the search information and the search information feature vector.
As shown in fig. 4, the training manner of the first 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 specifically limited herein.
Each first search information sample can be search information in a user history search behavior sequence obtained in advance by the electronic equipment, wherein the user history search behavior sequence is a sequence formed by search information continuously input in the user history search behavior;
for example, the user continuously inputs the search information "western pleasure", "grand wu", "tangheng", in a period of time, and then in the user history search behavior, "western pleasure", "grand wu", and "tangheng" are the search information continuously input by the user, and "western pleasure-grand wu-tangheng" is the user history search behavior sequence, and the electronic device can use the user history search behavior sequence "western pleasure-grandwu-tangheng" as a first search information sample.
S402, selecting any piece of search information as a center search information sample of the first search information sample aiming at 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;
After a plurality of first search information samples are obtained, 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 other search information included in the first search information sample than the center search information sample as calibration information of the center search information sample.
For example, the first search information sample acquired by the electronic device is "the west tour" and "the sun monkey" and can be selected from the first search information sample as the center search information sample, and the first search information sample can be used as the calibration information of the center search information sample "the sun 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 prediction information corresponding to the center search information sample based on the feature vector;
In the training process of the first type initial model, the electronic equipment can input each center search information sample into the first type initial model, the first type initial model can convert the center search information sample into a corresponding feature vector based on the current parameters, and the prediction information corresponding to the center search information sample is determined based on the feature vector.
And S404, adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first type initial model converges, and stopping training so that the first type initial model processes the input center search information sample based on the adjusted parameters to obtain the corresponding feature vector.
The model parameters of the current first-type initial model are likely to be unsuitable, so that the conversion of the center search information sample into the corresponding feature vector according to the model parameters of the current first-type initial model is inaccurate, and further, 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 likely to be inaccurate, and the prediction information is also likely to be inaccurate. Therefore, after the calibration information and the prediction information of each center search information sample are obtained, the electronic device can adjust the model parameters of the first type initial model based on the difference between the calibration information and the prediction information of each center search information sample, so that the parameters of the model of the first type initial model are more suitable, and therefore, accurate feature vectors can be obtained when the first search information sample is converted into the corresponding feature vectors according to the adjusted model parameters.
If the iteration times of the first type initial model reach the preset times or the accuracy of the prediction result of the first type initial model is larger than the preset value, the first type initial model is converged, that is, the current first type initial model can accurately determine the feature vector corresponding to the center search information sample, so that training can be stopped at the moment, and the trained first type model is obtained. At this time, the feature vector corresponding to the first search information sample obtained based on the first type model is accurate.
If the iteration times of the first type initial model do not reach the preset times, or the accuracy of the prediction result of the first type initial model is not greater than the preset value, the first type initial model is not converged, that is, the current first type initial model cannot accurately determine the feature vector corresponding to the center search information sample, and then the electronic equipment needs to train the first type initial model continuously.
Therefore, in the scheme provided by the embodiment of the invention, the electronic device can train the first type initial model in the mode to obtain the first type model. In this way, the electronic device can obtain the first type model capable of accurately determining the feature vector corresponding to the center search information sample based on the center search information sample in the first search information samples.
As shown in fig. 5, the second 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 are respectively related entity information, word segmentation information, and category labels of the second search information sample. The first type model 510 is trained based on search information of the central search information sample in the context of the first search information sample. In this case, the first class 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 correspondence 530 between the search information and the feature vector, which is pre-established by the electronic device, the feature vector of the search information is obtained based on the first model and the second model. In the process of training the first model and the second model, parameters of the first model and the second model are adjusted once every time of iteration, so that feature vectors corresponding to the first search information sample or the second search information sample determined based on the current parameters are changed along with the next iteration, namely, the corresponding relation between the search information and the feature vectors is updated once every time of iteration until the training is finished, the first model and the second model are obtained, and meanwhile, the corresponding relation between the final search information and the feature vectors is also obtained.
In order to make the feature vector more accurate, the first model and the second model can be trained by adopting an alternate 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 set of samples may be determined according to factors such as the total number of the first search information samples or the second search information samples, for example, 10, 50, 100, etc., which are not particularly limited herein.
Furthermore, after the first model is trained by using a set of first search information samples, the corresponding relationship between the search information and the feature vector may be continuously updated in the training process by using a set of second search information samples to respectively perform the training on the first sub-model, the second sub-model or the third sub-model.
As an embodiment, the manner of alternate training may specifically be: step A, training a first model by using a first group of first search information samples, and updating the corresponding relation between the search information and the feature vector; step B, training a first sub-model by using a first group of second search information samples, and simultaneously updating the corresponding relation between the search information and the feature vector; step C, training a second sub-model by using a second group of second search information samples, and simultaneously updating the corresponding relation between the search information and the feature vector; step D, training a third sub-model by using a third group of second search information samples, and simultaneously updating the corresponding relation between the search information and the feature vector; and E, training a first model by using a second group of first search information samples, and updating the corresponding relation between the search information and the feature vector. And the like, until 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 model, the first sub-model, the second sub-model, or the third sub-model through different search information samples, and update the correspondence between the search information and the feature vector. In this way, not only the first model is trained by using the user history search behavior, the corresponding relation between the search information and the feature vector is updated, but also the second model is trained by using the content information related to the user history search information, and the corresponding relation between the search information and the feature 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 further, 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, recall quality is improved, and the search information recommendation effect is further improved.
As shown in fig. 6, the step of sorting the search information to be recommended based on the similarity, determining the recommended search information based on the sorting result, and recommending the recommended search information to the user may include:
S601, sorting the search information to be recommended according to the sequence from high to low of similarity, and obtaining a sorting result;
after the electronic device determines the search information to be recommended, in order to determine the recommended search information to be recommended to the user, the electronic device may sort the search information to be recommended according to the order of the similarity from high to low, so as to obtain a sorting result.
For example, the electronic device determines the search information to be recommended 1-the search information to be recommended 5, and the similarity corresponding to each search information to be recommended is respectively: 0.75, 0.55, 0.99, 0.87, 0.35. The electronic device may sort the search information to be recommended according to the order of the similarity from high to low, to obtain a sorting result, as shown in the following table:
Sequence number Similarity degree Ranking results
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 5 to be recommended
S602, selecting a preset number of search information to be recommended from the search information to be recommended as target information based on the sorting result;
After the sorting result is determined, the electronic device may select a preset number of search information to be recommended from the search information to be recommended as the target information based on the sorting result. The preset number may be determined according to factors such as actual recommendation requirements, and the preset number may be smaller than the total number of search information to be recommended, which may be equal to the total number of search information to be recommended, which is reasonable.
In one embodiment, the electronic device may select a preset number of search information to be recommended, which is located in front 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 search information to be recommended in the sorting results as the target information, that is, "search information to be recommended 3", "search information to be recommended 4", and "search information to be recommended 1".
And S603, 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.
After the electronic device determines the target information, the target information can be displayed in the search information recommendation area of the user search page according to the sequence of the similarity from high to low. As an implementation mode, the corresponding target information can be displayed in the search information recommendation area from top to bottom according to the sequence of the similarity from top to bottom, so that a user can preferentially see the target information with high similarity with the target search information, and the user can conveniently search information.
It can be seen that, in this embodiment, the electronic device may sort the search information to be recommended according to the order of the similarity from high to low, to obtain a sorting result, and select, based on the sorting result, a preset number of search information to be recommended from the search information to be recommended, as the target information, and further, display the target information in the search information recommendation area of the user search page according to the order of the similarity from high to low. In this way, the electronic device can recommend the target information to the user according to the sequence from high to low in similarity, and preferentially recommend the target information with high similarity to the user, so that the pertinence and the accuracy of recommending the search information are improved, and the recommending effect is improved.
Corresponding to the above method for recommending search information, the embodiment of the present invention further provides an apparatus for recommending search information, and the following description describes an apparatus for recommending search information provided by the embodiment of the present invention.
As shown in fig. 7, a recommendation device for searching information, the device 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 search information and search information feature vectors;
The corresponding relation is established based on search information feature vectors obtained through a first model and a second model, the first model is obtained through training of a first model training module based on historical search behaviors of a user, the second model is obtained through training of a second model training module based on content information, and the content information is information for identifying specific content of the historical search behaviors of the user.
The to-be-recommended search information determining module 730 is configured to determine to-be-recommended search information from the search information included in the corresponding relationship according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relationship;
And a search information recommending module 740, configured to rank the search information to be recommended based on the similarity, determine recommended search information based on the 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, an electronic device may obtain target search information input by a user, and find a target search word feature vector corresponding to the target search information according to a pre-established correspondence between the target 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 the search information feature vector obtained through a first model and a second model, the first model is obtained based on user historical search behavior training, the second model is obtained based on content information training, where the content information is information identifying specific content of the user historical search behavior, determine search information to be recommended from search information included in the correspondence according to similarity between the target feature vector and other search information feature vectors included in the correspondence, rank the search information to be recommended based on the similarity, and determine recommended search information based on the ranking result, and finally, the electronic device recommends the recommended search information to the user. In the recall stage, not only the first model obtained based on the training of the user history search behavior, but also the second model obtained based on the training of the specific content information of the user history search behavior are utilized to determine the target feature vector, so that the user history search behavior and the specific content information related to the user history search behavior can be comprehensively considered, more accurate target feature vectors can be obtained, the search information to be recommended determined based on the target feature vector is more targeted, recall quality is improved, and further the search information recommendation effect is improved.
As shown in fig. 8, the second model training module may include:
A second sample acquiring sub-module 810, configured to acquire a second type initial model and a plurality of second search information samples;
A second calibration sub-module 820, configured to determine, for each of the second search information samples, calibration information of the second search information sample based on a preset calibration rule;
the preset calibration rule is set based on the content information of the second search information sample.
A second prediction sub-module 830, configured to input the second search information sample into the second type initial model, convert the second search information sample into a corresponding feature vector based on a current parameter of the second type initial model, and determine prediction information corresponding to the second search information sample based on the feature vector;
and the second parameter adjustment sub-module 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 initial model converges, and stop training, so that the second type 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, word segmentation information corresponding to the second search information sample and class labels of the second search information sample.
As an implementation manner of the embodiment of the present invention, the first model training module may include:
the first sample acquisition sub-module is used for acquiring a first type initial model and a plurality of first search information samples;
Each first search information sample is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence formed by search information continuously input in the user history search behavior.
The first calibration sub-module is used for selecting any piece of search information as a center search information sample of the first search information sample aiming at each first search information sample, and determining other search information of the center search information sample under 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 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 prediction information corresponding to the center search information sample based on the feature vector;
And the first parameter adjustment sub-module is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first type initial model converges, and stopping training so that the first type initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.
As an implementation manner of the embodiment of the present invention, the second 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 class label, respectively;
The first model, the first sub model, the second sub model and the third sub model are trained alternately through the corresponding first model training module or second model training module according to preset training rules.
As an embodiment of the present invention, the search information recommending module 740 may include:
The recommended search information sorting sub-module is used for sorting the search information to be recommended according to the sequence from high to low of the similarity, and obtaining a sorting result;
The recommended search information selecting sub-module is used for selecting a preset number of to-be-recommended search information from the to-be-recommended search information based on the sorting result, and taking the to-be-recommended search information as target information;
and the recommended search information display sub-module is used for displaying the target information in the search information recommendation area of the user search page according to the sequence of the similarity from high to low.
The embodiment of the present invention also provides an electronic device, as shown in fig. 9, including 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 perform communication with each other through the communication bus 904,
A memory 903 for storing a computer program;
the processor 901 is configured to implement the steps of the search information recommendation method according to any one 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, an electronic device may obtain target search information input by a user, and find a target search word feature vector corresponding to the target search information according to a pre-established correspondence between the target 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 the search information feature vector obtained through a first model and a second model, the first model is obtained based on user historical search behavior training, the second model is obtained based on content information training, where the content information is information identifying specific content of the user historical search behavior, determine search information to be recommended from search information included in the correspondence according to similarity between the target feature vector and other search information feature vectors included in the correspondence, rank the search information to be recommended based on the similarity, and determine recommended search information based on the ranking result, and finally, the electronic device recommends the recommended search information to the user. In the recall stage, not only the first model obtained based on the training of the user history search behavior, but also the second model obtained based on the training of the specific content information of the user history search behavior are utilized to determine the target feature vector, so that the user history search behavior and the specific content information related to the user history search behavior can be comprehensively considered, more accurate target feature vectors can be obtained, the search information to be recommended determined based on the target feature vector is more targeted, recall quality is improved, and further the search information recommendation effect is improved.
The communication bus mentioned by the above electronic device may be a peripheral component interconnect standard (PERIPHERAL COMPONENT INTERCONNECT, abbreviated as PCI) bus or an extended industry standard architecture (Extended Industry Standard Architecture, abbreviated as EISA) bus, etc. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, the figures are shown with only one bold line, but not with only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include random access memory (Random Access Memory, RAM) or may include 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 aforementioned processor.
The processor may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), etc.; but may also be a digital signal Processor (DIGITAL SIGNAL Processor, DSP), application Specific Integrated Circuit (ASIC), field-Programmable gate array (FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In yet another embodiment of the present invention, there is also provided a computer readable storage medium having stored therein a computer program which, when executed by a processor, implements the recommendation method for searching 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 an instruction is stored in a computer readable storage medium and the instruction runs on the computer, target search information input by a user may be obtained, and according to a pre-established correspondence between the search information and a search information feature vector, a target search word feature vector corresponding to the target search information is searched, where the correspondence between the search information and the search information feature vector is established based on the search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on user history search behavior training, the second type model is obtained based on content information training, where the content information is information identifying specific content of user history search behavior, according to similarity between the target feature vector and other search information feature vectors included in the correspondence, search information to be recommended is determined from the search information included in the correspondence, the search information to be recommended is ordered based on the similarity, and the recommended search information is determined based on the ordering result, and finally the electronic device recommends the recommended search information to the user. In the recall stage, not only the first model obtained based on the training of the user history search behavior, but also the second model obtained based on the training of the specific content information of the user history search behavior are utilized to determine the target feature vector, so that the user history search behavior and the specific content information related to the user history search behavior can be comprehensively considered, more accurate target feature vectors can be obtained, the search information to be recommended determined based on the target feature vector is more targeted, recall quality is improved, and further the search information recommendation effect is improved.
In a further embodiment of the present invention, a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of recommending search information according to any of the above embodiments is also provided.
It can be seen that, in the solution provided in the embodiment of the present invention, when a computer program product including an instruction 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 searched according to a pre-established correspondence between the 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 model and a second model, the first model is obtained based on a user history search behavior training, the second model is obtained based on a content information training, where the content information is information identifying specific content of the user history search behavior, search information to be recommended is determined from search information included in the correspondence according to similarity between the target feature vector and other search information feature vectors included in the correspondence, search information to be recommended is ordered based on the similarity, and the recommended search information is determined based on the ordering result, and finally the electronic device recommends the recommended search information to the user. In the recall stage, not only the first model obtained based on the training of the user history search behavior, but also the second model obtained based on the training of the specific content information of the user history search behavior are utilized to determine the target feature vector, so that the user history search behavior and the specific content information related to the user history search behavior can be comprehensively considered, more accurate target feature vectors can be obtained, the search information to be recommended determined based on the target feature vector is more targeted, recall quality is improved, and further the search information recommendation effect is improved.
In the above embodiments, it may be implemented in whole or in part 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, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in or transmitted from one computer-readable storage medium to another, for example, by wired (e.g., coaxial cable, optical fiber, digital Subscriber Line (DSL)), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk Solid STATE DISK (SSD)), etc.
It is noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
In this specification, each embodiment is described in a related manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the apparatus, electronic device, computer readable storage medium, and computer program product embodiments, the description is relatively simple, as relevant to the method embodiments being referred to in the section of the description of the method embodiments.
The foregoing description is only of the preferred embodiments of the present invention and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims (14)

1. A recommendation method for searching information, the method comprising:
acquiring target search information input by a user;
Searching a target feature vector corresponding to target search information according to a pre-established corresponding relation between the search information and the search information feature vector, wherein the corresponding relation is established based on the search information feature vector obtained through a first type model and a second type model, the first type model is obtained based on user historical search behavior training, the second type model is obtained based on content information training, and the content information is information for identifying specific content of the user historical search behavior;
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 other search information feature vectors included in the corresponding relation;
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;
The first model is used for outputting other search information belonging to the same search information sequence as the search information based on the feature vector corresponding to the search information, wherein the search information sequence is a sequence formed by each search information input by a historical user in a preset duration; the second model is used for outputting content information corresponding to the search information based on the feature vector corresponding to the search information.
2. The method of claim 1, wherein the training pattern of the second model comprises:
acquiring a second type initial model and a plurality of second search information samples;
Determining calibration information of each second search information sample based on a preset calibration rule for each second search information sample, 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 prediction information corresponding to 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 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.
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 the preset knowledge graph, 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 class model comprises a first sub model, a second sub model, and a third sub model, and wherein the 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 class label, respectively;
the first model, the first sub-model, the second sub-model and the third sub-model are trained alternately according to preset training rules.
5. The method of claim 1, wherein the training pattern of the first model comprises:
acquiring a first type initial model and a plurality of first search information samples, wherein each first search information sample is search information in a pre-acquired user history search behavior sequence, and the user history search behavior sequence is a sequence formed by search information continuously input in user history search behaviors;
For each first search information sample, selecting any one 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;
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 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 type initial model converges, and stopping training so that the first type 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 steps of ranking the search information to be recommended based on the similarity and determining recommended search information based on the ranking result, recommending the recommended search information to a user, include:
sequencing the search information to be recommended according to the sequence from high to low of similarity to obtain a sequencing result;
selecting 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 displaying the target information in a search information recommendation area of the user search page according to the sequence of the similarity from high to low.
7. A recommendation device for searching information, the device comprising:
the search information acquisition module is used for acquiring target search information input by a user;
The feature vector searching module is used for searching a target feature vector corresponding to the target search information according to a pre-established corresponding relation between search information and search information feature vectors, wherein the corresponding relation is established based on the search information feature vectors obtained through a first model and a second model, the first model is obtained through training of a first model training module based on historical search behaviors of a user, the second model is obtained through training of a second model training module based on content information, and the content information is information of specific content identifying the historical search behaviors of the user;
the to-be-recommended search information determining module is used for determining to-be-recommended search information from the search information included in the corresponding relation according to the similarity between the target feature vector and other search information feature vectors included in the corresponding relation;
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 a user;
The first model is used for outputting other search information belonging to the same search information sequence as the search information based on the feature vector corresponding to the search information, wherein the search information sequence is a sequence formed by each search information input by a historical user in a preset duration; the second model is used for outputting content information corresponding to the search information based on the feature vector corresponding to the search information.
8. The apparatus of claim 7, wherein the second model training module comprises:
the second sample acquisition sub-module is used for acquiring a second type initial model and a plurality of second search information samples;
The second calibration sub-module is used for determining calibration information of each second search information sample based on a preset calibration rule for each second search information sample, 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 parameter of the second type initial model, and determining prediction information corresponding to the second search information sample based on the feature vector;
And the second parameter adjustment sub-module is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information 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.
9. The apparatus of claim 8, wherein the content information comprises at least one of:
related entity information of the 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 class model comprises a first sub model, a second sub model, and a third sub model, and wherein the 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 class label, respectively;
The first model, the first sub model, the second sub model and the third sub model are trained alternately through the corresponding first model training module or second model training module according to preset training rules.
11. The apparatus of claim 7, wherein the first type of model training module comprises:
The system comprises a first sample acquisition module, a second sample acquisition module and a first search module, wherein the first sample acquisition module is used for acquiring 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 acquired in advance, and the user history search behavior sequence is a sequence formed by search information continuously input in user history search behaviors;
The first calibration sub-module is used for selecting any piece of search information as a center search information sample of the first search information sample aiming at each first search information sample, and determining other search information of the center search information sample under 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 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 prediction information corresponding to the center search information sample based on the feature vector;
And the first parameter adjustment sub-module is used for adjusting the current parameters based on the difference between the prediction information and the corresponding calibration information until the first type initial model converges, and stopping training so that the first type initial model processes the input search information sample based on the adjusted parameters to obtain the corresponding feature vector.
12. The apparatus according to any one of claims 7-11, wherein the search information recommending module includes:
The recommended search information sorting sub-module is used for sorting the search information to be recommended according to the sequence from high to low of the similarity, and obtaining a sorting result;
The recommended search information selecting sub-module is used for selecting a preset number of to-be-recommended search information from the to-be-recommended search information based on the sorting result, and taking the to-be-recommended search information as target information;
and the recommended search information display sub-module is used for displaying the target information in the search information recommendation area of the user search page according to the sequence of the similarity from high to low.
13. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
A memory for storing a computer program;
a processor for carrying out the method steps of any one of claims 1-6 when executing a program stored on a memory.
14. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-6.
CN202110648500.6A 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium Active CN113282832B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110648500.6A CN113282832B (en) 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110648500.6A CN113282832B (en) 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113282832A CN113282832A (en) 2021-08-20
CN113282832B true CN113282832B (en) 2024-10-25

Family

ID=77284089

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110648500.6A Active CN113282832B (en) 2021-06-10 2021-06-10 Recommendation method and device for search information, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113282832B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114003772A (en) * 2021-11-05 2022-02-01 北京爱奇艺科技有限公司 Video searching method and device, electronic equipment and storage medium
CN116610853A (en) * 2022-02-08 2023-08-18 中兴通讯股份有限公司 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
CN115718772B (en) * 2022-11-24 2024-08-20 腾讯科技(深圳)有限公司 Recommended resource determining method, data processing method, device and computer medium
CN116226297B (en) * 2023-05-05 2023-07-25 深圳市唯特视科技有限公司 Visual search method, system, equipment and storage medium for data model

Citations (2)

* 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
CN109189990A (en) * 2018-07-25 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method of search term, device and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10846350B2 (en) * 2016-10-18 2020-11-24 Facebook, Inc. Systems and methods for providing service directory predictive search recommendations
CN110532454B (en) * 2019-08-28 2022-04-22 北京奇艺世纪科技有限公司 Search term recommendation method and device
CN111666450B (en) * 2020-06-04 2024-04-26 北京奇艺世纪科技有限公司 Video recall method, device, electronic equipment and computer readable storage medium
CN111859138B (en) * 2020-07-27 2024-05-14 小红书科技有限公司 Searching method and device

Patent Citations (2)

* 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
CN109189990A (en) * 2018-07-25 2019-01-11 北京奇艺世纪科技有限公司 A kind of generation method of search term, device and electronic equipment

Also Published As

Publication number Publication date
CN113282832A (en) 2021-08-20

Similar Documents

Publication Publication Date Title
CN113282832B (en) Recommendation method and device for search information, electronic equipment and storage medium
CN110046304B (en) User recommendation method and device
CN108073568B (en) Keyword extraction method and device
CN108829808B (en) Page personalized sorting method and device and electronic equipment
CN111949898A (en) Search result ordering method, device, equipment and computer readable storage medium
CN109189990B (en) Search word generation method and device and electronic equipment
CN110532479A (en) A kind of information recommendation method, device and equipment
CN111428138A (en) Course recommendation method, system, equipment and storage medium
WO2018157625A1 (en) Reinforcement learning-based method for learning to rank and server
CN107944629A (en) A kind of recommendation method and device based on heterogeneous information network representation
CA3059929C (en) Text searching method, apparatus, and non-transitory computer-readable storage medium
CN111914159B (en) Information recommendation method and terminal
CN110704626A (en) Short text classification method and device
CN111967264B (en) Named entity identification method
CN109492217B (en) Word segmentation method based on machine learning and terminal equipment
US11238124B2 (en) Search optimization based on relevant-parameter selection
CN112380421A (en) Resume searching method and device, electronic equipment and computer storage medium
CN113343091A (en) Industrial and enterprise oriented science and technology service recommendation calculation method, medium and program
CN110688452A (en) Text semantic similarity evaluation method, system, medium and device
CN112199602A (en) Post recommendation method, recommendation platform and server
CN113672793A (en) Information recall method and device, electronic equipment and storage medium
CN112417848A (en) Corpus generation method and device and computer equipment
CN115374362A (en) Multi-way recall model training method, multi-way recall device and electronic equipment
CN113282831A (en) Search information recommendation method and device, electronic equipment and storage medium
CN113656575B (en) Training data generation method and device, electronic equipment and readable medium

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
GR01 Patent grant
GR01 Patent grant