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

CN104615767B - Training method, search processing method and the device of searching order model - Google Patents

Training method, search processing method and the device of searching order model Download PDF

Info

Publication number
CN104615767B
CN104615767B CN201510082145.5A CN201510082145A CN104615767B CN 104615767 B CN104615767 B CN 104615767B CN 201510082145 A CN201510082145 A CN 201510082145A CN 104615767 B CN104615767 B CN 104615767B
Authority
CN
China
Prior art keywords
search
search result
word
vector
ranking model
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
CN201510082145.5A
Other languages
Chinese (zh)
Other versions
CN104615767A (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 Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom 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 Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201510082145.5A priority Critical patent/CN104615767B/en
Publication of CN104615767A publication Critical patent/CN104615767A/en
Application granted granted Critical
Publication of CN104615767B publication Critical patent/CN104615767B/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/903Querying
    • G06F16/90335Query processing
    • G06F16/90348Query processing by searching ordered data, e.g. alpha-numerically ordered data
    • 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/903Querying
    • G06F16/9038Presentation of query results
    • 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/951Indexing; Web crawling techniques

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)
  • Computational Linguistics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiments of the invention provide a kind of training method, search processing method and the device of searching order model.The training method of the searching order model includes:The sample data of multigroup mark is obtained, sample data described in every group includes search term and its corresponding multiple search result entries for being noted as positive example or negative example;Input layer, term vector layer, hidden layer and the output layer of the searching order model of search term and its generation of corresponding search result entry based on Gated RNN in multigroup sample data, the searching order model is trained, to learn the parameter of the searching order model.Training, search processing method and the device of the searching order model of the embodiment of the present invention, it is possible to increase the degree of accuracy for the search result entry ranking score being calculated, and provide the user more accurately searching order result.

Description

Training method, search processing method and device for search ranking model
Technical Field
The invention relates to the technical field of natural language processing, in particular to a training method, a search processing method and a search processing device for a search ranking model.
Background
With the development of internet applications, search processing technology is becoming mature. The search word input by the user is expressed into a specific form to calculate the ranking score with the search result item to be ranked (taking the title of the webpage as an example), so that a more accurate search ranking result is returned according to the ranking score, and the method is a core problem of a search engine system.
The traditional method for calculating the ranking score is as follows: the similarity between the two text strings is calculated as a ranking score by calculating how well the search terms match the terms contained in the search result entry (taking the title of the web page as an example). For example, the search word is "apple new product release", the title of the web page is "apple company releases new mobile phone", and the two words of "apple" and "release" are considered to be completely matched to estimate the ranking score between the search word and the title of the web page. However, this method only considers the degree of matching of words in the literal sense, does not examine a word ambiguity (for example, apple has a meaning as fruit), and does not examine an approximate word match (for example, new and new), and therefore the accuracy of the ranking score obtained based on this method is not high.
In recent years, with the development of deep learning techniques, there has been a method of learning a vector representation of words (representing a word as a vector consisting of real numbers) using a deep neural network technique, and calculating a rank score between a search word and a search result item by calculating a similarity between the search word consisting of a word vector and the search result item. In the method, a feedforward neural network is utilized to map the search words and the words in the search result items into a low-dimensional vector space, the word vectors of all the words in the search words are simply added to obtain the vector representation of the search words, the search result items are also processed in the same way to obtain the vector representation of the search words, and then the similarity between the two vector representations is calculated to be used as the final sorting score. Although the method solves the problem that the traditional method does not consider the word polysemy, the word with similar meaning and the like to some extent, the dependency relationship between words cannot be considered only by simply adding word vectors to form vector representation of sentences, for example, the simple addition of word vectors in a search word 'dragon-forming famous work' does not consider that 'dragon-forming' and 'famous' are both a modification of the word 'work'. Therefore, the ranking score obtained based on this method is also not highly accurate.
Disclosure of Invention
Embodiments of the present invention provide a training method, a search processing method, and an apparatus for a search ranking model, so as to improve accuracy of rank score calculation of search terms and search result items, and provide a more accurate search ranking result for a user.
In order to achieve the above object, an embodiment of the present invention provides a method for training a search ranking model based on a Gated recurrent neural network (Gated RNN), including: acquiring a plurality of groups of labeled sample data, wherein each group of sample data comprises a search word and a plurality of corresponding search result items labeled as positive examples or negative examples; generating an input layer, a word vector layer, a hidden layer and an output layer of a search ranking model based on the Gated RNN according to the search words in the multiple groups of sample data and corresponding search result items; training the search ranking model to learn parameters of the search ranking model.
The embodiment of the invention also provides a training device for searching the ranking model based on the gated recurrent neural network, which comprises the following steps: the system comprises a sample data acquisition module, a search result analysis module and a search result analysis module, wherein the sample data acquisition module is used for acquiring a plurality of groups of labeled sample data, and each group of sample data comprises a search word and a plurality of corresponding search result items labeled as positive examples or negative examples; the search sequencing model generation module is used for generating an input layer, a word vector layer, a hidden layer and an output layer of the search sequencing model based on the Gated RNN according to the search words in the plurality of groups of sample data and the corresponding search result items; and the parameter learning module is used for training the search ranking model so as to learn the parameters of the search ranking model.
The embodiment of the invention also provides a search processing method, which comprises the following steps: receiving a search word of a user; obtaining a plurality of search result items according to the search words; respectively obtaining a ranking score of each search result item from a trained Gated RNN-based search ranking model with the search terms and the plurality of search result items as input; ranking the plurality of search result entries according to the ranking score; the ranked search result entries are transmitted.
An embodiment of the present invention further provides a search processing apparatus, including: the search word receiving module is used for receiving the search words of the user; the search result item acquisition module is used for acquiring a plurality of search result items according to the search words; a ranking score obtaining module, configured to obtain, from a trained GatedRNN-based search ranking model, a ranking score for each search result entry, respectively, with the search term and the plurality of search result entries as inputs; a search result entry ordering module for ordering the plurality of search result entries according to the ordering scores; a search result entry sending module for sending the ranked search result entries.
According to the training method and the search processing method and device for the search ranking model, provided by the embodiment of the invention, by combining the search words, the corresponding search result items and the well-trained gate RNN-based search ranking model trained by using sample data, the similarity value between the search words and the search result items is calculated as the ranking score, and the search result items are ranked according to the ranking score, so that the accuracy of computing the ranking score between the search words and the search result items is improved, and a more accurate search ranking result can be provided for a user.
Drawings
FIG. 1 is a basic functional block diagram illustrating an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a training method of a Gated RNN-based search ranking model according to a first embodiment of the present invention;
FIG. 3 is an exemplary diagram illustrating a Gated RNN based search ranking model according to a first embodiment of the invention;
FIG. 4 is a schematic diagram illustrating hidden layer generation of a Gated RNN-based search ranking model according to a first embodiment of the invention;
FIG. 5 is a schematic diagram illustrating the generation of an output layer of a Gated RNN based search ranking model according to a first embodiment of the invention;
FIG. 6 is a flowchart showing a search processing method according to the second embodiment of the present invention;
FIG. 7 is a logic block diagram of a training apparatus for a Gated RNN-based search ranking model according to a third embodiment of the present invention;
fig. 8 is a logic block diagram showing a search processing apparatus according to a fourth embodiment of the present invention.
Detailed Description
The basic idea of the invention is to obtain a plurality of groups of labeled sample data, generate an input layer, a word vector layer, a hidden layer and an output layer of a search ranking model based on a Gated RNN according to search words in the plurality of groups of sample data and corresponding search result items, and train the search ranking model to learn parameters of the search ranking model. The search words of the user and the obtained search result items are respectively represented as vectors by utilizing the parameters, the similarity between the two vectors is calculated to be used as a sequencing score, and then the search result items are sequenced according to the sequencing score, so that the accuracy of the calculation of the sequencing score between the search words and the search result items is improved, and a more accurate search sequencing result can be provided for the user.
Fig. 1 is a basic functional block diagram illustrating an embodiment of the present invention. Referring to fig. 1, in the present invention, a training sample is first obtained, specifically, sample data may be obtained from a user query log as a training sample; secondly, the training sample is used for training the search ranking model based on the Gated RNN to learn the parameters of the model, namely, the designed training algorithm is used for training the established search ranking model based on the Gated RNN to obtain the optimal parameters of the search ranking model based on the Gated RNN. And finally, obtaining the search word of the user and a plurality of corresponding search result items, respectively representing the search word and the search result items as vectors by using the parameters, obtaining a ranking score between the search word and each search result item through the calculation of the similarity between the two vectors, ranking the search result items according to the ranking score, and finally obtaining the ranked search result items.
The semantic similarity calculation method, the search result processing method, and the search result processing apparatus according to the embodiments of the present invention are described in detail below with reference to the accompanying drawings.
Example one
Fig. 2 is a flowchart illustrating a training method of a Gated RNN-based search ranking model according to a first embodiment of the present invention. Referring to fig. 2, the training method of the Gated RNN-based search ranking model includes the following steps:
in step S110, a plurality of sets of labeled sample data are obtained, where each set of sample data includes a search term and a plurality of corresponding search result entries labeled as positive or negative examples.
According to the inventive concept, the search result items labeled as positive examples are clicked search result items, and the search result items labeled as negative examples are un-clicked search result items. Specifically, after a user inputs a search term, a plurality of search result items are obtained, the user selects a certain search result to further browse, the selected search result item is the clicked search result item, and otherwise, the selected search result item is the non-clicked search result item.
The sample data described in this embodiment is composed of M groups<Q,T+,T->For the composed samples. The value of M is generally large enough to be typically in excess of 1 hundred million.<Q,T+,T->Pairs are obtained from user query logs. Table 1 is a group<Q,T+,T->An example of a pair, where Q represents a search term queried by a user, T+Representing Title, T is the Title corresponding to the search result item clicked by the user after searching the Query-Representing a negative example of Title, the Title corresponds to the search result entry that has not been clicked, as shown in table 1:
TABLE 1
In step S120, an input layer, a word vector layer, a hidden layer, and an output layer of the Gated RNN-based search ranking model are generated according to the search words in the multiple sets of sample data and their corresponding search result entries.
According to an alternative embodiment of the present invention, step S120 may include performing word segmentation on the search word and the search result entry corresponding to the search word, generating an input layer from the word segmentation result, finding a word vector corresponding to each segmented word from a predefined word list, and generating a word vector layer from the word vector.
Specifically, fig. 3 is an exemplary diagram illustrating a Gated RNN-based search ranking model according to a first embodiment of the present invention. Referring to fig. 3, the search term in the training sample and the search result entry corresponding to the search term are segmented separately, for example, assuming that one search term is composed of T segments, it is noted as: query ═ (w)1,…,wT) Similarly, a search result entry labeled as a positive example consists of M words, which are noted as: title+=(w1,…,wM) A search result entry labeled negative consists of L words, noted as: title-=(w1,…,wL) Inputting each participle obtained by the participle processing, and generating an input layer; each participle w in a text stringiAll belonging to a word in a predefined vocabulary of size | V | (including special words identifying OOV's that are not in the dictionary)<OOV>) (ii) a Each participle can find the corresponding word vector by looking up the dictionary, and the vector layer is called as a word vector layer. It should be noted that the output layer is not shown in fig. 3, and the details of generating the output layer will be described later.
It should be noted that the word vector is a way to mathematically transform words in a language, and as the name implies, the word vector represents a word as a vector, the simplest word vector way is to represent a word as a very long vector, the length of the vector is the size of the word list, the vector has only one "1" component, and the other positions, which are all "0" and "1", correspond to the position of the word in the word list, for example, the "microphone" is represented as [ 0001000000000000 ].]However, this method does not well describe the similarity between words, and on the basis of this, a word vector representation appears, which overcomes the aforementioned disadvantages. The basic principle is to represent a word directly with a common vector, e.g., [0.792,0.177,0.107,0.109, 0.542.]I.e. a common vector representation. In practical applications, the word vector of the network represents each input word wiThe corresponding word vector, which is oneColumn vector C (w) of length EMBEDDING _ SIZEi)。
According to another alternative embodiment of the present invention, step S120 may further include performing a nonlinear transformation calculation on the word vector layer to obtain a hidden layer. Specifically, any word vector in the word vector layer is processed as follows until all vectors in the hidden layer are obtained: obtaining a current word vector, obtaining update data and reset data according to the current word vector, hidden layer transformation matrix parameters of search words based on a Gated RNN search sorting model and hidden layer transformation matrix parameters of search result entries, and processing a vector of a hidden layer corresponding to a previous word vector of the current word vector according to the update data and the reset data to obtain a vector of a hidden layer corresponding to the current word vector. Namely, the processing of calculating the non-linear transformation of the word vector layer to obtain the hidden layer is executed by the following formula:
zj=sigmoid[Wze]j+[Uzh<t-1>]j),
rj=sigmoid[Wre]j+[Urh<t-1>]j)
wherein,for the jth element in the tth vector of the hidden layer,for the jth element in the t-1 th vector of the hidden layer,is a dependent coefficient between two vectors of the hidden layer, zjFor updating data from the t-1 th vector of the hidden layer, rjResetting data for the t-1 th vector from the hidden layer, e is the t-th word vector of the word vector layer, W, Wz、WrHidden layer transformation matrix parameters of search terms, U, U, both of which are the Gated RNN search ranking modelz、UrHidden layer transformation matrix parameters of search result items of the Gated RNN search ranking model are all used. Here, W, Wz、WrIs a matrix with three rows of HIDDEN _ SIZE and columns of EMBEDDING _ SIZE, U, Uz、UrThen three columns are a matrix with number of rows being HIDDEN _ SIZE and number of columns also being HIDDEN _ SIZE. tanh and sigmoid are two different nonlinear transformation functions.
Specifically, fig. 4 is a schematic diagram illustrating a principle of generating a hidden layer of a Gated RNN-based search ranking model according to a first embodiment of the present invention. Referring to fig. 4, in the embodiment of the present invention, a non-linear transformation learning UNIT called Gated Recurrent neural network UNIT (Gated current UNIT) is used to generate the vector of the hidden layer, and the non-linear transformation learning UNIT is characterized in that the dependency relationship between words can be automatically learned through Reset Gate ("r" in fig. 4) and Update Gate ("z" in fig. 4), the Reset Gate is used to learn how much information needs to be brought from the previous information to the current non-linear transformation learning UNIT, and the Update Gate is used to learn how much information needs to be updated from the previous information to the current non-linear transformation learning UNIT. Through the combined use of Reset Gate and Update Gate, the search ranking model based on the Gated RNN generated by the invention can automatically learn the dependency relationship between words, such as the formula shown in the foregoing, zjIs a specific mathematical formula for realizing Update gate, rjIs a specific mathematical formula for implementing the Reset Gate.
It should be noted that, in practical application, the HIDDEN layer of the network represents the state of the generated Gated RNN-based search ranking model at each time point i, and is a column vector h with length of HIDDEN _ SIZEiA common value range of EMBEDDING _ SIZE isFrom 50 to 1000, the usual value of HIDDEN _ SIZE is 1 to 4 times greater than EMBEDDING _ SIZE.
According to another alternative embodiment of the present invention, step S120 may further include calculating, according to the obtained hidden layer, similarities between the search term in the sample data and the corresponding search result items labeled as positive examples or negative examples, respectively, and using the calculated values of the similarities as an output layer of the search ranking model.
Further, step S120 may specifically include: and respectively taking the search word and a vector of the last participle in the participle results of the plurality of search result items marked as positive examples or negative examples, which corresponds to the hidden layer, as vectors of the search word and the plurality of search result items marked as positive examples or negative examples, calculating the similarity between the search word and the plurality of search result items marked as positive examples or negative examples respectively by using the vectors, and taking the calculated value of each similarity as an output layer of the search ranking model.
Specifically, the following formula is used to perform the processing of calculating the similarity between the search term and each of the corresponding search result items labeled as positive examples or negative examples by using the vector, and using the calculated value of each similarity as the output layer of the search ranking model:
wherein Q is the vector representation of the search term, T is the vector representation of the search result entry, m is the dimension of the vector, QiIs the i-th element of the vector Q, TiIs the ith element of the vector T.
Specifically, fig. 5 is a schematic diagram illustrating the principle of generating the output layer of the Gated RNN-based search ranking model according to the first embodiment of the present invention, and referring to fig. 5, the vector corresponding to the last participle in the hidden layer is used as the final vector to represent, for example, the search in table 1 aboveThe words "Beijing City Bureau" and "office" are the last word segments, and then "office" is mapped to the vector of the hidden layer (in FIG. 5, "hT") as the vector representation of the search term" Beijing City Bureau ", the similar reasoning can show that" encyclopedia "corresponds to the vector of the hidden layer (in FIG. 5," hM") the vector of the search result entry" Baidu encyclopedia of the Industrial and commercial administration of Beijing City "marked as a positive example indicates that" head office "corresponds to the vector at the hidden layer (" h "in FIG. 5)L") as a vector representation of the search result item labeled as a negative example, the" State administration of Industrial and commercial administration of the people's republic of China ", and then after the search terms and the search result items labeled as positive examples or negative examples are represented as vectors, a similarity value (such as cosine) between the two vectors can be obtained through the formula+、cosine-) As an output layer of the search ranking model.
In step S130, the search ranking model is trained to learn parameters of the search ranking model.
According to an exemplary embodiment of the present invention, step S120 may include establishing a loss function according to similarities between the search term and the corresponding search result entries labeled as positive examples or negative examples, respectively, training the loss function by using the sample data, and obtaining a parameter set of the Gated RNN-based search ranking model that minimizes the loss function. Specifically, the process of training the search ranking model to learn the parameters of the search ranking model is performed by the following formula:
wherein all are<Q,T+,T->For all sample data, θ is the set of parameters of the Gated RNN based search ranking model that minimizes J (θ),for the similarity value between the search term and the search result entry labeled positive,is the similarity value between the search term and the search result entry labeled negative.
It should be noted that the above formula is a loss function, the search ranking model is trained by using a Stochastic Gradient descent method, and specifically, the optimal parameter θ can be obtained by using a Stochastic Gradient descent method (SGD) and a Back Propagation Through Time (BPTT). The idea of the SGD algorithm is to iteratively update the randomly initialized parameters by calculating the gradients (partial derivatives of the parameters) of a certain set of training samples by subtracting a set learning rate (learning rate) times the calculated gradients each time, so that after a number of iterations the difference between the calculated values and the actual values of the parameters from the value calculated by the Gated RNN based search ranking model is minimized over a defined loss function. In addition, the BPTT algorithm is an effective method for calculating the gradient of the parameter in the RNN network.
By the training method of the Gated RNN-based search ranking model, an input layer, a word vector layer, a hidden layer and an output layer of the Gated RNN-based search ranking model can be generated according to search words in multiple groups of acquired sample data and corresponding search result items thereof, the search ranking model is trained to learn parameters of the search ranking model, the search ranking model can learn the dependency relationship between words, so that the search words and the search result items are respectively represented as vectors by using the parameters, the ranking score obtained by calculating the similarity between the two vectors has higher accuracy, and the ranking score can be used for providing more accurate search ranking results for users.
Example two
Fig. 6 is a flowchart showing a search processing method according to the second embodiment of the present invention. Referring to fig. 6, the method may be performed on, for example, a search engine server. The search processing method comprises the following steps:
in step S210, a search term of a user is received.
The search term may be a search term sent from a client. For example, a user enters a "car violation query" for a search on a browser search engine interface, and the browser application sends the search terms to a search engine server.
In step S220, a plurality of search result entries are obtained according to the search term.
The search engine server may retrieve a plurality of search result entries using existing search techniques (e.g., from a pre-compiled index of web pages) using the search terms.
In step S230, with the search term and the plurality of search result entries as input, a ranking score of each of the search result entries is respectively obtained from the trained Gated RNN-based search ranking model.
According to an alternative embodiment of the present invention, step S230 may include obtaining parameters of the trained Gated RNN-based search ranking model, respectively converting the search word and the plurality of search result entries into vector representations according to the parameters, respectively calculating a similarity value between the search word and each of the search result entries according to the search word and the plurality of search result entries represented by the vector, and taking the similarity value corresponding to each of the search result entries as a ranking score of each of the search result entries.
At step 240, the plurality of search result entries are ranked according to the ranking score.
At step 250, the ranked search result entries are sent.
According to the search processing method, based on the search word of the user and a plurality of search result items corresponding to the obtained search word, the ranking score of each search result item is respectively obtained from a trained search ranking model based on the Gated RNN, and the plurality of search result items are ranked according to the ranking scores, so that the ranked search result items can be sent.
EXAMPLE III
Fig. 7 is a logic block diagram illustrating a training apparatus for a Gated RNN-based search ranking model according to a third embodiment of the present invention. Referring to fig. 7, the training apparatus for the Gated RNN-based search ranking model includes a sample data obtaining module 310, a search ranking model generating module 320, and a parameter learning module 330.
The sample data obtaining module 310 is configured to obtain multiple sets of labeled sample data, where each set of sample data includes a search term and a plurality of corresponding search result entries labeled as positive examples or negative examples.
Preferably, the search result item labeled as positive is a clicked search result item, and the search result item labeled as negative is an unchecked search result item.
The search ranking model generating module 320 is configured to generate an input layer, a word vector layer, a hidden layer, and an output layer of the Gated RNN-based search ranking model according to the search words in the multiple sets of sample data and their corresponding search result entries.
Further, the search ranking model generating module 320 is configured to perform word segmentation on the search word and the search result entry corresponding to the search word, generate an input layer from the word segmentation result, find a word vector corresponding to each segmented word from a predefined word list, and generate a word vector layer from the word vector.
Preferably, the search ranking model generating module 320 is further configured to perform a nonlinear transformation calculation on the word vector layer to obtain a hidden layer.
Optionally, the search ranking model generating module 320 is further configured to perform the following processing on any word vector in the word vector layer until all vectors in the hidden layer are obtained: obtaining a current word vector, obtaining update data and reset data according to the current word vector, hidden layer transformation matrix parameters of search words based on a Gated RNN search sorting model and hidden layer transformation matrix parameters of search result entries, and processing a vector of a hidden layer corresponding to a previous word vector of the current word vector according to the update data and the reset data to obtain a vector of a hidden layer corresponding to the current word vector. Specifically, the processing of performing the nonlinear transformation calculation on the word vector layer to obtain the hidden layer is performed by the following formula:
zj=sigmoid([Wze]j+[Uzh<t-1>]j),
rj=sigmoid([Wre]j+[Urh<t-1>]j)
wherein,for the jth element in the tth vector of the hidden layer,for the jth element in the t-1 th vector of the hidden layer,is two of the hidden layerDependency coefficient between vectors, zjFor updating data from the t-1 th vector of the hidden layer, rjResetting data for the t-1 th vector from the hidden layer, e is the t-th word vector of the word vector layer, W, Wz、WrHidden layer transformation matrix parameters of search terms, U, U, both of which are the Gated RNN search ranking modelz、UrHidden layer transformation matrix parameters of search result items of the Gated RNN search ranking model are all used.
Further, the search ranking model generating module 320 is further configured to calculate, according to the obtained hidden layer, similarities between the search terms in the sample data and corresponding search result items labeled as positive examples or negative examples, respectively, and use the calculated values of the similarities as output layers of the search ranking model.
Optionally, the search ranking model generating module 320 is further configured to use, as the search term and the vectors of the search result entries labeled as positive examples or negative examples, the vectors of the hidden layer corresponding to the last participle in the search term and the corresponding participle results labeled as positive examples or negative examples, respectively, calculate similarities between the search term and the corresponding search result entries labeled as positive examples or negative examples, respectively, and use the calculated similarity values as the output layer of the search ranking model.
Specifically, the following formula is used to perform the processing of calculating the similarity between the search term and each of the corresponding search result items labeled as positive examples or negative examples by using the vector, and using the calculated value of each similarity as the output layer of the search ranking model:
where Q is the vector representation of the search term, T is the vector representation of the search result entry, and m is the dimension of the vectorNumber, QiIs the i-th element of the vector Q, TiIs the ith element of the vector T.
A parameter learning module 330, configured to train the search ranking model to learn parameters of the search ranking model.
Further, the parameter learning module 330 is configured to establish a loss function according to similarities between the search terms and corresponding search result entries labeled as positive examples or negative examples, respectively, train the loss function by using the sample data, and obtain a parameter set of the Gated RNN-based search ranking model that minimizes the loss function.
Specifically, the process of training the search ranking model to learn the parameters of the search ranking model is performed by the following formula:
wherein all are<Q,T+,T->For all sample data, θ is the set of parameters of the Gated RNN based search ranking model that minimizes J (θ),for the similarity value between the search term and the search result entry labeled positive,is the similarity value between the search term and the search result entry labeled negative.
By the aid of the training device of the Gated RNN-based search ranking model, an input layer, a word vector layer, a hidden layer and an output layer of the Gated RNN-based search ranking model can be generated according to search words in multiple groups of acquired sample data and corresponding search result items of the search words, the search ranking model can be trained to learn parameters of the search ranking model, the search ranking model can learn dependence relationships between words, accordingly, the search words and the search result items are respectively represented as vectors by the parameters, ranking scores obtained through similarity calculation between the two vectors are high in accuracy, and accurate search ranking results can be provided for users by the ranking scores.
Example four
Fig. 8 is a logic block diagram showing a search processing apparatus according to a fourth embodiment of the present invention. Referring to fig. 8, the search processing apparatus includes a search word receiving module 410, a search result entry obtaining module 420, a ranking score obtaining module 430, a search result entry ranking module 440, and a search result entry transmitting module 450.
The search word receiving module 410 is used for receiving a search word of a user.
The search result item obtaining module 420 is configured to obtain a plurality of search result items according to the search term.
The ranking score obtaining module 430 is configured to obtain a ranking score for each of the search result entries from the trained Gated RNN-based search ranking model, respectively, with the search term and the plurality of search result entries as inputs.
Further, the ranking score obtaining module 430 may include:
a parameter obtaining unit for obtaining parameters of the trained Gated RNN based search ranking model,
a vector representation unit for converting the search term and the plurality of search result entries into vector representations respectively according to the parameters,
a ranking score calculating unit for calculating a similarity value between the search word and each of the search result items, respectively, based on the search word represented by the vector and the plurality of search result items, and taking the similarity value corresponding to each of the search result items as a ranking score of each of the search result items.
Search result entry ranking module 440 is configured to rank the plurality of search result entries according to the ranking score.
Search result entry sending module 450 is used to send the ranked search result entries.
By the search processing device, based on the search word of the user and a plurality of search result items corresponding to the obtained search word, the ranking score of each search result item is respectively obtained from a trained search ranking model based on the Gated RNN, and the plurality of search result items are ranked according to the ranking scores, so that the ranked search result items can be sent.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is only one logical functional division, and other divisions may be realized in practice.
In addition, functional modules in the embodiments of the present invention may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware form, and can also be realized in a form of hardware and a software functional module.
The integrated module implemented in the form of a software functional module may be stored in a computer-readable storage medium. The software functional module is stored in a storage medium and includes several instructions to enable a computer device (which may be a personal computer, a server, or a network device) or a processor (processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (20)

1. A method for training a Gated recurrent neural network (Gated RNN) -based search ranking model, the method comprising:
acquiring a plurality of groups of labeled sample data, wherein each group of sample data comprises a search word and a plurality of corresponding search result items labeled as positive examples or negative examples;
generating an input layer, a word vector layer, a hidden layer and an output layer of a search ranking model based on the Gated RNN according to search words in a plurality of groups of sample data and corresponding search result items;
training the search ranking model to learn parameters of the search ranking model.
2. The training method of claim 1, wherein the search result entries labeled as positive examples are clicked search result entries and the search result entries labeled as negative examples are un-clicked search result entries.
3. The training method of claim 2, wherein the process of generating an input layer and a word vector layer of a Gated RNN based search ranking model from search words and their corresponding search result entries in the plurality of sets of sample data comprises:
the search words and the search result items corresponding to the search words are respectively segmented, an input layer is generated by the segmentation results,
and respectively finding the word vector corresponding to each segmented word from a predefined word list, and generating a word vector layer by the word vector.
4. The training method of claim 3, wherein the process of generating a hidden layer of a Gated RNN-based search ranking model from search terms and their corresponding search result entries in the plurality of sets of sample data comprises: and carrying out nonlinear transformation calculation on the word vector layer to obtain a hidden layer.
5. The training method of claim 4, wherein the process of generating an output layer of a Gated RNN-based search ranking model from search terms and their corresponding search result entries in the plurality of sets of sample data comprises:
and calculating the similarity between the search terms in the sample data and the corresponding search result items marked as positive examples or negative examples according to the obtained hidden layer, and taking the calculated value of each similarity as an output layer of the search ranking model.
6. The training method according to claim 4, wherein the processing of calculating the non-linear transformation of the word vector layer to obtain the hidden layer comprises:
and any word vector of the word vector layer is processed as follows until all vectors in the hidden layer are obtained:
a current word vector is obtained and,
obtaining update data and reset data according to the current word vector, hidden layer transformation matrix parameters of search words based on a Gated RNN search ranking model and hidden layer transformation matrix parameters of search result entries,
and processing the vector of the hidden layer corresponding to the previous word vector of the current word vector according to the updating data and the resetting data to obtain the vector of the hidden layer corresponding to the current word vector.
7. The training method according to claim 5, wherein the calculating, according to the obtained hidden layer, the similarity between the search word in the sample data and the corresponding search result items labeled as positive examples or negative examples respectively, and the processing of using the calculated similarity values as the output layer of the search ranking model comprises:
taking the search word, the vector of the last participle in the participle result of the plurality of search result items marked as positive examples or negative examples corresponding to the hidden layer as the vector of the search word, the plurality of search result items marked as positive examples or negative examples respectively,
and calculating the similarity between the search word and a plurality of corresponding search result items marked as positive examples or negative examples respectively by using the vector, and taking the calculated value of each similarity as an output layer of the search ranking model.
8. A training method according to claim 1, wherein the process of training the search ranking model to learn parameters of the search ranking model comprises:
establishing a loss function based on the similarity of the search term with a corresponding plurality of search result entries labeled positive or negative examples respectively,
and training the loss function by using the sample data to obtain a parameter set of the search ranking model based on the Gated RNN, wherein the parameter set is used for minimizing the loss function.
9. A method of search processing, the method comprising:
receiving a search word of a user;
obtaining a plurality of search result items according to the search words;
respectively obtaining a ranking score of each search result item from a trained Gated RNN-based search ranking model with the search terms and the plurality of search result items as input;
ranking the plurality of search result entries according to the ranking score;
the ranked search result entries are transmitted.
10. The method of claim 9, wherein the process of separately obtaining a ranking score for each of the search result entries from a trained Gated RNN-based search ranking model using the search term and the plurality of search result entries as inputs comprises:
obtaining parameters of the trained Gated RNN-based search ranking model,
converting the search terms and the plurality of search result entries into vector representations respectively according to the parameters,
calculating a similarity value between the search word and each of the search result items according to the search word represented by the vector and the plurality of search result items, respectively, and taking the similarity value corresponding to each of the search result items as an ordering score of each of the search result items.
11. An apparatus for training a Gated recurrent neural network (Gated RNN) -based search ranking model, the apparatus comprising:
the system comprises a sample data acquisition module, a search result analysis module and a search result analysis module, wherein the sample data acquisition module is used for acquiring a plurality of groups of labeled sample data, and each group of sample data comprises a search word and a plurality of corresponding search result items labeled as positive examples or negative examples;
the search sequencing model generation module is used for generating an input layer, a word vector layer, a hidden layer and an output layer of the search sequencing model based on the Gated RNN according to the search words in the multiple groups of sample data and the corresponding search result items;
and the parameter learning module is used for training the search ranking model so as to learn the parameters of the search ranking model.
12. The training apparatus of claim 11, wherein the search result entries labeled as positive examples are clicked search result entries and the search result entries labeled as negative examples are unchecked search result entries.
13. The training apparatus as claimed in claim 12, wherein the search ranking model generating module is configured to perform word segmentation on the search word and the search result entry corresponding to the search word, generate an input layer from the word segmentation result, find a word vector corresponding to each segmented word from a predefined word list, and generate a word vector layer from the word vectors.
14. The training apparatus of claim 13, wherein the search ranking model generation module is further configured to perform a nonlinear transformation calculation on the word vector layer to obtain a hidden layer.
15. The training apparatus according to claim 14, wherein the search ranking model generating module is further configured to calculate, according to the obtained hidden layer, similarities between the search terms in the sample data and corresponding search result entries labeled as positive examples or negative examples, respectively, and use the calculated values of the similarities as an output layer of the search ranking model.
16. The training apparatus of claim 14, wherein the search ranking model generating module is further configured to perform the following processing on any word vector in the word vector layer until all vectors in the hidden layer are obtained: obtaining a current word vector, obtaining update data and reset data according to the current word vector, hidden layer transformation matrix parameters of search words based on a Gated RNN search sorting model and hidden layer transformation matrix parameters of search result entries, and processing a vector of a hidden layer corresponding to a previous word vector of the current word vector according to the update data and the reset data to obtain a vector of a hidden layer corresponding to the current word vector.
17. The training apparatus according to claim 15, wherein the search ranking model generating module is further configured to use a vector of the search term, a last participle in the participle results of the corresponding multiple search result entries labeled as positive examples or negative examples, which corresponds to the hidden layer, as the vector of the search term, the corresponding multiple search result entries labeled as positive examples or negative examples, calculate similarities between the search term and the corresponding multiple search result entries labeled as positive examples or negative examples, respectively, and use the calculated similarity values as output layers of the search ranking model.
18. The training apparatus of claim 11, wherein the parameter learning module is configured to establish a loss function according to similarities between the search term and corresponding search result entries labeled as positive or negative examples, respectively, train the loss function using the sample data, and obtain a parameter set of the GatedRNN-based search ranking model that minimizes the loss function.
19. A search processing apparatus, characterized in that the apparatus comprises:
the search word receiving module is used for receiving the search words of the user;
the search result item acquisition module is used for acquiring a plurality of search result items according to the search words;
a ranking score obtaining module, configured to obtain a ranking score of each search result entry from a trained Gated RNN-based search ranking model with the search term and the plurality of search result entries as inputs;
a search result entry ordering module for ordering the plurality of search result entries according to the ordering scores;
a search result entry sending module for sending the ranked search result entries.
20. The apparatus of claim 19, wherein the ranking score obtaining module comprises:
a parameter obtaining unit for obtaining parameters of the trained Gated RNN based search ranking model,
a vector representation unit for converting the search term and the plurality of search result entries into vector representations respectively according to the parameters,
a ranking score calculating unit for calculating a similarity value between the search word and each of the search result items, respectively, based on the search word represented by the vector and the plurality of search result items, and taking the similarity value corresponding to each of the search result items as a ranking score of each of the search result items.
CN201510082145.5A 2015-02-15 2015-02-15 Training method, search processing method and the device of searching order model Active CN104615767B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510082145.5A CN104615767B (en) 2015-02-15 2015-02-15 Training method, search processing method and the device of searching order model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510082145.5A CN104615767B (en) 2015-02-15 2015-02-15 Training method, search processing method and the device of searching order model

Publications (2)

Publication Number Publication Date
CN104615767A CN104615767A (en) 2015-05-13
CN104615767B true CN104615767B (en) 2017-12-29

Family

ID=53150209

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510082145.5A Active CN104615767B (en) 2015-02-15 2015-02-15 Training method, search processing method and the device of searching order model

Country Status (1)

Country Link
CN (1) CN104615767B (en)

Families Citing this family (39)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104915448B (en) * 2015-06-30 2018-03-27 中国科学院自动化研究所 A kind of entity based on level convolutional network and paragraph link method
CN105809473B (en) * 2016-02-29 2021-11-23 北京百度网讯科技有限公司 Training method for matching model parameters, service recommendation method and corresponding device
CN105930413A (en) * 2016-04-18 2016-09-07 北京百度网讯科技有限公司 Training method for similarity model parameters, search processing method and corresponding apparatuses
CN107491447B (en) * 2016-06-12 2021-01-22 百度在线网络技术(北京)有限公司 Method for establishing query rewrite judging model, method for judging query rewrite and corresponding device
CN106095966B (en) * 2016-06-15 2019-12-27 成都品果科技有限公司 User extensible label labeling method and system
CN106294584B (en) * 2016-07-28 2019-11-05 北京百度网讯科技有限公司 The training method and device of order models
CN106250464B (en) * 2016-07-28 2020-04-28 北京百度网讯科技有限公司 Training method and device of ranking model
CN106294635B (en) * 2016-08-02 2019-09-03 北京百度网讯科技有限公司 Application program searching method, the training method of deep neural network model and device
CN106326338B (en) * 2016-08-03 2020-02-04 北京百度网讯科技有限公司 Service providing method and device based on search engine
CN107688493B (en) * 2016-08-05 2021-06-18 阿里巴巴集团控股有限公司 Method, device and system for training deep neural network
CN106327240A (en) * 2016-08-11 2017-01-11 中国船舶重工集团公司第七0九研究所 Recommendation method and recommendation system based on GRU neural network
CN106202574A (en) * 2016-08-19 2016-12-07 清华大学 The appraisal procedure recommended towards microblog topic and device
CN106354852A (en) * 2016-09-02 2017-01-25 北京百度网讯科技有限公司 Search method and device based on artificial intelligence
CN106354856B (en) * 2016-09-05 2020-02-21 北京百度网讯科技有限公司 Artificial intelligence-based deep neural network enhanced search method and device
CN106557554B (en) * 2016-11-04 2019-11-08 北京百度网讯科技有限公司 The display methods and device of search result based on artificial intelligence
CN106777088A (en) * 2016-12-13 2017-05-31 飞狐信息技术(天津)有限公司 The method for sequencing search engines and system of iteratively faster
CN106779467A (en) * 2016-12-31 2017-05-31 成都数联铭品科技有限公司 Enterprises ' industry categorizing system based on automatic information screening
CN106682217A (en) * 2016-12-31 2017-05-17 成都数联铭品科技有限公司 Method for enterprise second-grade industry classification based on automatic screening and learning of information
CN107402954B (en) 2017-05-26 2020-07-10 百度在线网络技术(北京)有限公司 Method for establishing sequencing model, application method and device based on sequencing model
CN107832476B (en) * 2017-12-01 2020-06-05 北京百度网讯科技有限公司 Method, device, equipment and storage medium for understanding search sequence
CN108121814B (en) * 2017-12-28 2022-04-22 北京百度网讯科技有限公司 Search result ranking model generation method and device
CN108256583B (en) * 2018-01-25 2020-12-01 北京东方科诺科技发展有限公司 Multi-label classification learning method based on matching learning
CN110309255A (en) * 2018-03-07 2019-10-08 同济大学 A kind of entity search method for incorporating entity description distribution and indicating
CN109299344B (en) * 2018-10-26 2020-12-29 Oppo广东移动通信有限公司 Generation method of ranking model, and ranking method, device and equipment of search results
CN109902823B (en) * 2018-12-29 2024-06-07 华为技术有限公司 Model training method and device based on generation countermeasure network
CN109815406B (en) * 2019-01-31 2022-12-13 腾讯科技(深圳)有限公司 Data processing and information recommendation method and device
CN110222160B (en) * 2019-05-06 2023-09-15 平安科技(深圳)有限公司 Intelligent semantic document recommendation method and device and computer readable storage medium
CN110188360B (en) * 2019-06-06 2023-04-25 北京百度网讯科技有限公司 Model training method and device
CN110598756A (en) * 2019-08-22 2019-12-20 腾讯音乐娱乐科技(深圳)有限公司 Model training method and device and storage medium
CN111026849B (en) * 2019-12-17 2023-09-19 北京百度网讯科技有限公司 Data processing method and device
CN112084435A (en) * 2020-08-07 2020-12-15 北京三快在线科技有限公司 Search ranking model training method and device and search ranking method and device
CN113761140A (en) * 2020-08-13 2021-12-07 北京沃东天骏信息技术有限公司 Answer sorting method and device
CN112100493B (en) * 2020-09-11 2024-04-26 北京三快在线科技有限公司 Document ordering method, device, equipment and storage medium
CN112597208A (en) * 2020-12-29 2021-04-02 深圳价值在线信息科技股份有限公司 Enterprise name retrieval method, enterprise name retrieval device and terminal equipment
CN112860889A (en) * 2021-01-29 2021-05-28 太原理工大学 BERT-based multi-label classification method
CN113590796B (en) * 2021-08-04 2023-09-05 百度在线网络技术(北京)有限公司 Training method and device for ranking model and electronic equipment
CN113505204B (en) * 2021-09-09 2021-12-07 腾讯科技(深圳)有限公司 Recall model training method, search recall device and computer equipment
CN114281935A (en) * 2021-09-16 2022-04-05 腾讯科技(深圳)有限公司 Training method, device, medium and equipment for search result classification model
CN115186163B (en) * 2022-06-27 2023-04-07 北京百度网讯科技有限公司 Training of search result ranking model and search result ranking method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211339A (en) * 2006-12-29 2008-07-02 上海芯盛电子科技有限公司 Intelligent web page classifier based on user behaviors
CN101566998A (en) * 2009-05-26 2009-10-28 华中师范大学 Chinese question-answering system based on neural network
CN103678599A (en) * 2013-12-13 2014-03-26 北京奇虎科技有限公司 Method and device for judging document correlation based on PLSA algorithm
CN103744951A (en) * 2014-01-02 2014-04-23 上海大学 Method for ordering significance of keywords in text
CN104049755A (en) * 2014-06-18 2014-09-17 中国科学院自动化研究所 Information processing method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9519858B2 (en) * 2013-02-10 2016-12-13 Microsoft Technology Licensing, Llc Feature-augmented neural networks and applications of same

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101211339A (en) * 2006-12-29 2008-07-02 上海芯盛电子科技有限公司 Intelligent web page classifier based on user behaviors
CN101566998A (en) * 2009-05-26 2009-10-28 华中师范大学 Chinese question-answering system based on neural network
CN103678599A (en) * 2013-12-13 2014-03-26 北京奇虎科技有限公司 Method and device for judging document correlation based on PLSA algorithm
CN103744951A (en) * 2014-01-02 2014-04-23 上海大学 Method for ordering significance of keywords in text
CN104049755A (en) * 2014-06-18 2014-09-17 中国科学院自动化研究所 Information processing method and device

Also Published As

Publication number Publication date
CN104615767A (en) 2015-05-13

Similar Documents

Publication Publication Date Title
CN104615767B (en) Training method, search processing method and the device of searching order model
WO2020182019A1 (en) Image search method, apparatus, device, and computer-readable storage medium
WO2020062770A1 (en) Method and apparatus for constructing domain dictionary, and device and storage medium
CN106295796B (en) entity link method based on deep learning
EP3180742B1 (en) Generating and using a knowledge-enhanced model
CN108280114B (en) Deep learning-based user literature reading interest analysis method
CN107944559B (en) Method and system for automatically identifying entity relationship
US20180336193A1 (en) Artificial Intelligence Based Method and Apparatus for Generating Article
CN109376222B (en) Question-answer matching degree calculation method, question-answer automatic matching method and device
CN110737758A (en) Method and apparatus for generating a model
CN110162749A (en) Information extracting method, device, computer equipment and computer readable storage medium
CN109241294A (en) A kind of entity link method and device
CN105095444A (en) Information acquisition method and device
CN111159485B (en) Tail entity linking method, device, server and storage medium
KR20160144384A (en) Context-sensitive search using a deep learning model
CN105809473B (en) Training method for matching model parameters, service recommendation method and corresponding device
CN105930413A (en) Training method for similarity model parameters, search processing method and corresponding apparatuses
CN114238573A (en) Information pushing method and device based on text countermeasure sample
CN104484380A (en) Personalized search method and personalized search device
CN108073576A (en) Intelligent search method, searcher and search engine system
WO2018068648A1 (en) Information matching method and related device
CN112434533B (en) Entity disambiguation method, entity disambiguation device, electronic device, and computer-readable storage medium
CN109145083B (en) Candidate answer selecting method based on deep learning
CN113868387A (en) Word2vec medical similar problem retrieval method based on improved tf-idf weighting
JP7121819B2 (en) Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant