CN115129963A - Search processing method and device - Google Patents

Search processing method and device Download PDF

Info

Publication number
CN115129963A
CN115129963A CN202110325233.9A CN202110325233A CN115129963A CN 115129963 A CN115129963 A CN 115129963A CN 202110325233 A CN202110325233 A CN 202110325233A CN 115129963 A CN115129963 A CN 115129963A
Authority
CN
China
Prior art keywords
candidate
candidate objects
determining
user
head
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110325233.9A
Other languages
Chinese (zh)
Inventor
郑凯夫
陈旭松
吕静
刘鹄
赵夕炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Wodong Tianjun Information Technology Co Ltd
Original Assignee
Beijing Wodong Tianjun Information 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 Wodong Tianjun Information Technology Co Ltd filed Critical Beijing Wodong Tianjun Information Technology Co Ltd
Priority to CN202110325233.9A priority Critical patent/CN115129963A/en
Publication of CN115129963A publication Critical patent/CN115129963A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • 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/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • G06F40/216Parsing using statistical methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a search processing method and device, and relates to the technical field of computers. One embodiment of the method comprises: determining a keyword feature, a user feature and a plurality of candidate object features based on the search instruction; determining prediction probabilities of the candidate objects according to the keyword features, the user features and the candidate object features, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a returned result, and the returned result is generated based on the candidate objects; determining context information of the candidate object according to the candidate object characteristics and the prediction probabilities of the candidate objects; and determining the sorting sequence of the candidate objects in the returned result according to the keyword features, the user features, the candidate object features and the context information of the candidate objects. The method and the device can improve the accuracy of sorting of the candidate objects in the returned result.

Description

Search processing method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a search processing method and apparatus.
Background
Search result ranking is a cornerstone of many internet businesses. In a plurality of internet service scenes, the search is the first way for users to actively acquire information and is also an important flow entrance of an internet platform. The user inputs a search keyword, the platform returns a return result related to the keyword, and a plurality of candidate objects in the return result are sequenced according to the preference degree of the user. However, the existing method for ranking a plurality of candidate objects is not accurate, so that the experience of a user on a search platform is influenced.
Disclosure of Invention
In view of this, embodiments of the present invention provide a search processing method and apparatus, which can improve the accuracy of sorting a plurality of candidate objects in a returned result.
In a first aspect, an embodiment of the present invention provides a search processing method, including:
receiving a search instruction sent by a user, wherein the search instruction comprises at least one keyword;
determining keyword characteristics of the keywords and user characteristics of the user;
according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the candidate objects;
determining prediction probabilities of the candidate objects according to the keyword features, the user features and the candidate object features, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a return result;
determining context information of the candidate object according to the plurality of candidate object characteristics and the prediction probabilities of the plurality of candidate objects;
and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
Optionally, the determining context information of the candidate object according to the plurality of candidate object features and the prediction probabilities of the plurality of candidate objects includes:
combining the plurality of candidate object features to generate a combination matrix of the candidate objects;
generating a weight matrix of the candidate objects according to the prediction probabilities of the candidate objects;
inputting the combination matrix and the weight matrix of the candidate object into a first attention model to obtain a self-attention matrix of the candidate object;
and inputting the keyword features, the user features and the self-attention matrix of the candidate object into a second attention model to obtain the context information of the candidate object.
Optionally, the determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features, and the context information of the candidate objects includes:
inputting the keyword features, the user features, the candidate object features and the context information of the candidate objects into a first scoring model to obtain first matching scores of the candidate objects;
and carrying out normalization processing on the first matching scores of the candidate objects to obtain the ranking scores of the candidate objects.
Optionally, the method further comprises:
obtaining a first training sample, the first training sample comprising: the first candidate object features comprise a first keyword feature, a first user feature and a plurality of first candidate object features;
determining at least one head object from the plurality of first candidate objects, the at least one head object being arranged at a head of a first returned result, the first returned result being generated based on the plurality of first candidate objects;
determining a first ranking score for the at least one head object using the first attention model, the second attention model, and the first scoring model;
determining a second ranking score of the at least one head object according to the first keyword feature, the first user feature, and the at least one head object feature;
constructing a first loss function by using the first ranking score and the second ranking score;
optimizing the first attention model, the second attention model, and the first scoring model according to the first loss function.
Optionally, the determining a second ranking score of the at least one head object according to the first keyword feature, the first user feature, and the at least one head object feature includes:
combining the at least one head object feature to generate a combined matrix of the head objects;
inputting the combination matrix of the head object into a third attention model to obtain a self-attention matrix of the head object;
inputting the first keyword feature, the first user feature and the self-attention matrix of the head object into a fourth attention model to obtain context information of the head object;
inputting the first keyword feature, the first user feature, the at least one head object feature and the context information of the head object into a second scoring model to obtain a second matching score of the at least one head object;
and carrying out normalization processing on the second matching score of the at least one head object to obtain a second ranking score of the at least one head object.
Optionally, the method further comprises:
optimizing the third attention model and the second scoring model according to the first loss function.
Optionally, the method further comprises:
determining click information of the at least one head object;
determining a third ranking score of the at least one head object according to the click information of the head object;
constructing a second loss function by using the second ranking score and the third ranking score;
optimizing the third attention model and the second scoring model according to the second loss function.
Optionally, the method further comprises:
obtaining a second training sample, the second training sample comprising: the second keyword characteristic, the second user characteristic and a plurality of second candidate object characteristics;
determining click information of the plurality of second candidate objects;
determining a fourth ranking score of the plurality of second candidate objects according to the click information of the second candidate objects;
determining a fifth ranking score for the plurality of second candidate objects using the first attention model, the second attention model, and the first scoring model;
constructing a third loss function by using the fourth ranking score and the fifth ranking score;
optimizing the first attention model, the second attention model, and the first scoring model according to the third loss function.
Optionally, the determining the prediction probabilities of the candidate objects according to the keyword feature, the user feature and the candidate object features includes:
inputting the keyword features, the user features and the candidate object features into a third scoring model to obtain a third matching score of the candidate objects;
and carrying out normalization processing on the third matching scores of the candidate objects to obtain the prediction probabilities of the candidate objects.
Optionally, the method further comprises:
obtaining a third training sample, the third training sample comprising: a third keyword feature, a third user feature and a plurality of third candidate object features;
determining at least one head object from the plurality of third candidate objects, the at least one head object being arranged at a head of a second returned result, the second returned result being generated based on the plurality of third candidate objects;
determining a first prediction probability for the plurality of third candidate objects based on the at least one head object;
determining a second prediction probability for the third plurality of candidate objects using the third scoring model;
constructing a fourth loss function by using the first prediction probability and the second prediction probability;
optimizing the third scoring model according to the fourth loss function.
In a second aspect, an embodiment of the present invention provides a search processing apparatus, including:
the instruction receiving module is used for receiving a search instruction sent by a user, and the search instruction comprises at least one keyword;
the characteristic determining module is used for determining the keyword characteristics of the keywords and the user characteristics of the user; according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the candidate objects;
the selection module is used for determining the prediction probabilities of the candidate objects according to the keyword features, the user features and the candidate object features, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a returned result;
the sorting module is used for determining the context information of the candidate objects according to the characteristics of the candidate objects and the prediction probabilities of the candidate objects; and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any of the embodiments described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method of any one of the above embodiments.
One embodiment of the above invention has the following advantages or benefits: the user, seeing the returned results, compares the multiple candidate objects in the returned results to determine which candidate objects to browse through. Thus, the degree of mutual comparison and influence between candidate objects can be characterized by context information. When the sorting processing is performed on the multiple candidate objects in the returned result, the sorting result of the multiple candidate objects can be optimized by considering the context information of the candidate objects.
Further, in the actual browsing process of the user, the number of the candidate objects browsed is limited, and only the candidate objects arranged at the head of the returned result can really influence the user decision. The method of the embodiment of the invention comprehensively considers the characteristics of a plurality of candidate objects and the prediction probabilities of the plurality of candidate objects to determine the context information of the candidate objects. Wherein the prediction probability characterizes the probability of the candidate object being ranked at the head of the returned result. Compared with a mode of indiscriminately processing the characteristics of all candidate objects to generate the context information of the candidate objects, the method provided by the embodiment of the invention can more accurately embody the process of actually browsing the returned result by the user and generate more effective context information, so that the accuracy of sequencing a plurality of candidate objects in the returned result is higher.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1a is a schematic diagram of a search scenario provided by an embodiment of the present invention;
FIG. 1b is a schematic diagram illustrating a principle of a context information determining method according to an embodiment of the present invention;
FIG. 1c is a schematic diagram of another principle of a context information determination method according to an embodiment of the present invention;
FIG. 2 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 3 is a schematic diagram illustrating a flow of a search processing method according to an embodiment of the present invention;
FIG. 4 is a flowchart illustrating a method for determining a prediction probability of a candidate according to an embodiment of the present invention;
fig. 5 is a schematic diagram illustrating a flow of a context information determining method according to an embodiment of the present invention;
FIG. 6 is a flow chart of a method for determining context information for a head candidate according to an embodiment of the present invention;
FIG. 7 is a block diagram of a search processing system architecture according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a search processing apparatus according to an embodiment of the present invention;
fig. 9 is a schematic block diagram of a computer system suitable for use in implementing a terminal device or server according to an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
The problem of search ranking in the embodiment of the present invention may be set as follows: given a user feature vector x u Search keyword feature vector x input by user q The platform returns N candidates with their feature vectors [ x ] respectively i 1 ,x i 2 ,...,x i N ]And N is an integer greater than 1. The system learns a search ranking model f to predict each individual x of the N candidates i n Rank score of
Figure BDA0002994324080000071
And the more preferred candidate objects of the user have larger ranking scores, so that the search results are ranked according to the preference of the user, namely the ranking scores in the follow-up process. To summarize the search ranking model f can be expressed as:
Figure BDA0002994324080000072
search result ranking with better performance can be realized based on context-aware ranking to Rank (context-aware) Learning. The implementation idea of the ranking model based on context comparison is as follows: the user will compare the entire candidate set seen and determine his preferences. In other words, the user's preference, i.e., the ranking score for each candidate object
Figure BDA0002994324080000073
Not only on the own characteristic x of a certain candidate object i n But rather based on the overall characteristics of the N candidates and the mutual comparison of the N candidates.
When predicting the ranking score of the candidate objects, the algorithm takes the characteristics of all N candidate objects as a 'context' information input model to accurately simulate the context comparison process when the user actually faces the ranking result, thereby optimizing the accuracy of the ranking of the search results.
Fig. 1a is a schematic diagram of a search scenario provided in an embodiment of the present invention. In a real search scenario, the user's browsing depth is very limited, as shown in fig. 1 a. Most users will only browse the search results of the first 1, 2 pages without continuing to turn back. This indicates that only the search results presented in the header are actually seen by the user, i.e., actually compared by the user, affecting user preferences and decisions. The candidate object ranked behind is not actually valid "context information".
The industry-level candidate set of search results is typically voluminous. Search results that are presented only at the head are of great relevance to the search keywords. The search results ranked later are generally of little relevance, and are not "context information" that can effectively describe the search task.
Fig. 1b is a schematic diagram illustrating a principle of a context information determining method according to an embodiment of the present invention. In the approach shown in FIG. 1b, all candidates are used consistently and indiscriminately for extracting context features, without distinguishing between head-ranked and tail-ranked candidates. Therefore, in the extracted context features, the really useful context information, namely the search result arranged at the head (hereinafter referred to as the head context), has a small weight and is buried in a large amount of non-head context information. This makes the context information used by the model inaccurate, neither effectively simulating the user's comparison process, nor effectively characterizing the search task.
Based on the above, the method of the embodiment of the invention aims to solve the technical problem of search ranking based on context comparison learning, and is used for solving the technical defect of inaccurate context characteristics extracted by the prior art caused by two practical problems of limited browsing depth and weak correlation of a large number of non-head results in a real search scene.
Fig. 1c is a schematic diagram of another principle of the context information determining method according to an embodiment of the present invention. The approach shown in fig. 1c increases the importance of the head context so that it is not submerged in a large number of non-head contexts with little use, thereby solving the problem of inaccurate context feature extraction. The extracted context characteristics can accurately simulate the comparison process of the user, describe the search task and enable the sequencing of the returned results to be more accurate.
Fig. 2 is an exemplary system architecture diagram in which embodiments of the present invention may be applied. As shown in fig. 2, the system architecture 200 may include terminal devices 201, 202, 203, a network 204, and a server 205. The network 204 is used to provide a medium between the terminal devices 201, 202, 203 and the server 205 in which the terminal devices 201, 202, 203 may store communication links. Network 204 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user sends a search instruction through the terminal device 201, 202, 203, the search instruction including at least one keyword. The server 205 receives the search instruction from each of the terminal devices 201, 202, and 203, determines the keyword feature and the corresponding user feature of the search instruction of this time based on the search instruction, and then determines a plurality of candidate objects corresponding to the request of this time. And respectively determining the prediction probabilities of a plurality of candidate objects, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of the returned result. Determining context information of the candidate objects according to the prediction probabilities of the candidate objects, and further determining ranking scores of the candidate objects. And finally, generating a return result according to the ranking score, and returning the return result to the corresponding terminal equipment 201, 202 and 203.
It should be noted that the search processing method provided by the embodiment of the present invention is generally executed by the server 205, and accordingly, the search processing apparatus is generally disposed in the server 205.
It should be understood that the number of terminal devices, networks, and servers in fig. 2 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for an implementation.
Fig. 3 is a schematic diagram illustrating a flow of a search processing method according to an embodiment of the present invention, where as shown in fig. 3, the method includes:
step 301: receiving a search instruction sent by a user, wherein the search instruction comprises at least one keyword.
Step 302: determining keyword characteristics of the keywords and user characteristics of the user; and according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the plurality of candidate objects.
The user issues a search instruction based on the keyword. The system returns a returned result including a plurality of candidate objects based on the search instruction. The candidate objects may be related articles, related videos, related web pages, etc. that match the keywords.
The user characteristic information may be composed of user attribute information and user behavior information. The user attribute information may include: age, gender, occupation, cultural degree, etc. The user behavior information may include: browsing information, search information, focus information, collection information, etc.
The candidate object feature information is information characterizing the attribute of the candidate object. For example, the title of the related article, the title of the related video, the title of the related picture, and the like can be provided.
The keywords, the user characteristic information and the candidate object characteristic information can be vectorized respectively to obtain a keyword vector, a user vector and each candidate object vector. And characterizing the keyword features, the user features and the candidate object features by the keyword vectors, the user vectors and the candidate object vectors respectively. Vectorization refers to expressing a natural language into a vector capable of expressing self semantics, and a text expression algorithm can be used for vectorizing keywords, user feature information and each candidate object, and the text expression algorithm includes a vector idle model-based method, a topic model-based method, a neural network-based method and the like.
Step 303: and determining the prediction probabilities of the candidate objects according to the keyword characteristics, the user characteristics and the candidate object characteristics, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a return result.
The returned results are generated based on the plurality of candidate objects. The candidates of the returned result header, which are visible to the user and contribute to the user decision, are arranged at the earlier positions of the returned result. Which positions in the returned result can be determined according to specific requirements, user characteristics and the number of candidate objects, and can be used as the head of the returned result. For example, it may be set that the top 10 candidates in the returned result are ranked at the head of the returned result, the candidates shown in the top 2 pages returned are ranked at the head of the returned result, and so on.
Step 304: and determining the context information of the candidate object according to the characteristics of the candidate objects and the prediction probabilities of the candidate objects.
The context information characterizes the degree to which the candidates are compared and affected. The user, seeing the returned results, compares the multiple candidate objects in the returned results to determine which candidate objects to browse through. Therefore, when the sorting processing is performed on the plurality of candidate objects in the returned result, the sorting result of the plurality of candidate objects can be optimized by considering the context information of the candidate objects.
Step 305: and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
In the actual browsing process of the user, the number of the browsed candidate objects is limited, and only the candidate objects arranged at the head of the returned result can really influence the decision of the user. The method of the embodiment of the invention comprehensively considers the characteristics of a plurality of candidate objects and the prediction probabilities of the plurality of candidate objects to determine the context information of the candidate objects. Wherein the prediction probability characterizes the probability of the candidate object being ranked at the head of the returned result. Compared with a mode of indiscriminately processing the characteristics of all candidate objects to generate the context information of the candidate objects, the method provided by the embodiment of the invention can more accurately embody the process of actually browsing the returned result by the user and generate more effective context information, thereby solving the problem of low accuracy of the candidate object sequencing.
Fig. 4 is a flowchart illustrating a method for determining a prediction probability of a candidate according to an embodiment of the present invention. As shown in fig. 4, the method includes:
step 401: and inputting the keyword features, the user features and the plurality of candidate object features into a third scoring model to obtain a third matching score of the plurality of candidate objects.
Step 402: and carrying out normalization processing on the third matching scores of the candidate objects to obtain the prediction probabilities of the candidate objects.
The third matching score characterizes the matching degree of the candidate object characteristics with the keyword characteristics and the user characteristics. The higher the third match score, the greater the probability that the candidate will be ranked at the head of the returned result. The third match score can be derived in a variety of ways. The third matching score may be determined, for example, by calculating a distance value between the candidate object vector and the keyword vector or the user vector, or by using a neural network model.
The normalization process is used to normalize the third match score to between (0, 1) to obtain a predicted probability of the candidate object, by which the performance of the subsequent rank comparison step may be facilitated.
For example, assume a user feature vector x u Search keyword feature vector x input by user q The platform returns N candidates with their feature vectors [ x i 1 ,x i 2 ,...,x i N ]。
The third matching scoring model can be implemented by using MLP (Deep Learning architecture), which is a basic Deep neural network structure. The third match score may be determined by a third match score model as follows:
Figure BDA0002994324080000111
namely, the probability that the current candidate object is ranked at the head is predicted according to the characteristics of the search key words, the characteristics of the user and the characteristics of the current candidate object. The third matching score is normalized to be within the interval of (0, 1) through the sigmoid function, namely, the prediction probability of the candidate object is generated.
In an embodiment of the present invention, the search processing method further includes:
obtaining a third training sample, the third training sample comprising: a third keyword feature, a third user feature and a plurality of third candidate object features;
determining at least one head object from the plurality of third candidate objects, the at least one head object being arranged at the head of a second returned result, the second returned result being generated based on the plurality of third candidate objects;
determining a first prediction probability of a plurality of third candidate objects according to the at least one head object;
determining a second prediction probability for a third plurality of candidate objects using a third scoring model;
constructing a fourth loss function by utilizing the first prediction probability and the second prediction probability;
the third scoring model is optimized according to a fourth loss function.
In the training process using the third training sample, the head object actually arranged on the head will be seen by the user and a record will be left in the system, and the object that can be seen by the user is the head object. Only the ranking score of the head object may be determined and the model that scores the rankings for all candidate objects is corrected by the ranking score of the head object.
First prediction probability y e Is the probability that the candidate is actually ranked at the head, when y e When the number is 1, the characterization candidate object is arranged at the head, namely the candidate object is seen by a user; when y is e When equal to 0The token candidate is not head-ranked, i.e., the candidate is not seen by the user. Second prediction probability
Figure BDA0002994324080000121
Representing the probability of the candidate object being head-ranked as determined using the third scoring model.
Ye may be used as the supervision information, ye and
Figure BDA0002994324080000122
the hinge loss function (change loss) is calculated and used as a fourth loss function, so that the gradient decline of the fourth loss function is calculated to update the parameters in the third scoring model.
Fig. 5 is a schematic diagram illustrating a flow of a context information determining method according to an embodiment of the present invention. As shown in fig. 5, the method includes:
step 501: and combining the plurality of candidate object characteristics to generate a combination matrix of the candidate objects.
Step 502: and generating a weight matrix of the candidate objects according to the prediction probabilities of the candidate objects.
Step 503: and inputting the combination matrix and the weight matrix of the candidate object into the first attention model to obtain a self-attention matrix of the candidate object.
Step 504: and inputting the keyword features, the user features and the self-attention matrix of the candidate object into the second attention model to obtain the context information of the candidate object.
The self-attention moment matrix refers to an object feature matrix obtained by using a self-attention mechanism. In natural language processing, a self-attention mechanism is used to learn mutual reference relationships between individual object features.
The embodiment of the invention adopts a Transformer (Q, K, V) to build an attention model, wherein the Transformer is a neural network module for calculating an attention mechanism, Q is a model target, K is a set with the length of N, and V is a set with the length of N. In particular, the amount of the solvent to be used,
Figure BDA0002994324080000131
wherein, P is a linear transformation module, d is the dimension after Q and K linear transformation. In short, the Transformer is an attention module, and performs weighted average on N individuals V, and the weight is the distance between K corresponding to the N individuals V and the overall target Q.
Using features x of N candidates i n Connecting, combining into a combination matrix, the combination matrix is an original context matrix X generated by indiscriminately combining all the candidate objects, and firstly determining the self-attention matrix of the candidate objects through the following first attention model:
Figure BDA0002994324080000132
wherein X' is the self-attention matrix of the candidate object.
Figure BDA0002994324080000133
Is a weight matrix for the candidate object,
Figure BDA0002994324080000134
so as to make
Figure BDA0002994324080000135
A diagonal matrix in the N x N dimension of the diagonal. By passing
Figure BDA0002994324080000136
The predicted header context in the context may be emphasized.
Then, calculating the distance between the attention matrix X 'and the user and the distance between the attention matrix X' and the keyword to calculate the attention by using the following second attention model, and obtaining the context information c of the candidate object:
c=Transformer 2 ([x q ,x u ],X′,X′)。
in an embodiment of the invention, a weight matrix of the candidate objects is generated based on prediction probabilities of a plurality of candidate objects, the prediction probabilities characterizing the probability of the candidate objects being ranked at the head of the return result. And generating context information of the candidate object according to the weight matrix. The method of the embodiment of the invention considers that the candidate objects seen by the user are basically concentrated on the head of the returned object, and generates the candidate object as the context information by utilizing the prediction probability. The context information can better depict the process of the user for browsing the returned result, and further improve the accuracy of the ranking and scoring of the candidate objects.
In one embodiment of the present invention, determining ranking scores of a plurality of candidate objects according to a keyword feature, a user feature, a plurality of candidate object features, and context information of the candidate objects includes:
inputting the keyword features, the user features, the plurality of candidate object features and the context information of the candidate objects into a first scoring model to obtain first matching scores of the plurality of candidate objects;
and carrying out normalization processing on the first matching scores of the candidate objects to obtain the ranking scores of the candidate objects.
With the context information c of the candidate objects, it is possible to calculate a first score for each candidate object: the first match scoring module may be implemented using MLP, and may determine the first match score by a first scoring model as follows:
Figure BDA0002994324080000141
the first matching score is normalized to be within the interval of (0, 1) through the sigmoid function, namely, the ranking score of the candidate object is generated.
In an embodiment of the present invention, the search processing method further includes:
obtaining a first training sample, the first training sample comprising: the first keyword characteristic, the first user characteristic and a plurality of first candidate object characteristics;
determining at least one head object from the plurality of first candidate objects, the at least one head object being arranged at a head of a first return result, the first return result being generated based on the plurality of first candidate objects;
determining a first ranking score for the at least one head object using the first attention model, the second attention model, and the first scoring model;
determining a second ranking score of at least one head object according to the first keyword feature, the first user feature and the at least one head object feature;
constructing a first loss function by using the first ranking score and the second ranking score;
the first attention model, the second attention model and the first scoring model are optimized according to the first loss function.
During training with the first training sample, the head object actually arranged on the head will be seen by the user and a record will be left in the system, and the object that can be seen by the user is the head object. The ranking score of the head candidate seen by the user is predicted more accurately using only the context information of the head object, and is used for assisting in correcting the output of the first attention model, the second attention model and the first scoring model.
The first loss function may be constructed using a cross entropy loss function (cross entropy loss). The cross entropy loss function is a calculation method of the loss function, and encourages the scores of positive samples to be close to 1 and the scores of negative samples to be close to 0, and is commonly used in classification. The specific formula of the first loss function may be:
Figure BDA0002994324080000151
the loss represents the value of the first loss function,
Figure BDA0002994324080000152
a first ranking score is represented that indicates that,
Figure BDA0002994324080000153
representing a second ranking score. By minimizing the value of the first loss function, the output distribution of the first ranking score is made more similar to the output distribution of the second ranking score,thereby optimizing the first attention model, the second attention model, and the first scoring model.
Fig. 6 is a schematic diagram illustrating a flow of a method for determining context information for a head candidate according to an embodiment of the present invention. As shown in fig. 6, the method includes:
step 601: obtaining a first training sample, the first training sample comprising: the first candidate object feature comprises a first keyword feature, a first user feature and a plurality of first candidate object features.
Step 602: at least one head object is determined from the plurality of first candidate objects.
Step 603: combining the at least one head object feature to generate a combined matrix of head objects.
Step 604: and inputting the combination matrix of the head object into the third attention model to obtain a self-attention matrix of the head object.
Step 605: and inputting the first keyword feature, the first user feature and the self-attention matrix of the head object into a fourth attention model to obtain the context information of the head object.
Step 606: and inputting the first keyword characteristic, the first user characteristic, at least one head object characteristic and the context information of the head object into a second scoring model to obtain a second matching score of the at least one head object.
Step 607: and carrying out normalization processing on the second matching score of the at least one head object to obtain a second ranking score of the at least one head object.
Feature x of candidate object actually seen by user i n Connected and combined into a combined matrix X e . Determining a self-attention matrix X 'through a third attention model' e
X′ e =Transformer 3 (X e ,X e ,X e )
The following fourth attention model was reused as a self-attention matrix X' e Calculating attention from the distance between the user and the keyword to obtain the context information c e
c e =Transformer 4 ([x q ,x u ],X e ′,X e ′)。
And then reuse the context information c e And a second scoring model for calculating a ranking score for each candidate actually seen by the user
Figure BDA0002994324080000154
Figure BDA0002994324080000161
In the embodiment of the invention, only the context information of the head object is used to more accurately predict the ranking score of the head candidate seen by the user, so as to assist in correcting the output of the first attention model, the second attention model and the first scoring model and improve the accuracy of the ranking score.
In an embodiment of the present invention, the search processing method further includes: and optimizing the third attention model and the second scoring model according to the first loss function.
The ranking score of the head candidate object seen by the user is predicted more accurately using only the context information of the head object. The first loss function can not only assist in correcting the outputs of the first attention model, the second attention model and the first scoring model, but also can be used for correcting the third attention model and the second scoring model so as to enable the head context information to be more accurate and further enable the accuracy of the finally obtained ranking score to be higher.
In an embodiment of the present invention, the search processing method further includes: determining click information of at least one head object; determining a third ranking score of at least one head object according to the click information of the head object; constructing a second loss function by using the second ranking score and the third ranking score; and optimizing the third attention model and the second scoring model according to the second loss function.
The ranking scoring model for head candidates may be optimized as followsAnd (4) marking a third ranking score y of the candidate object according to whether the actual user clicks the candidate object or not n . If the user clicks on a candidate, y n 1 is ═ 1; if the user does not click on the candidate object, y n =0。
Scoring according to a second ranking of the candidate objects
Figure BDA0002994324080000162
And a third ranking score y n And constructing a second loss function. The second loss function may be a cross-entropy loss function or a hinge loss function. And optimizing a third attention model and a second scoring model according to the two loss functions.
A first ranking score determined using the first attention model, the second attention model, and the first scoring model
Figure BDA0002994324080000163
Second order score
Figure BDA0002994324080000164
It can also be scored against the first order
Figure BDA0002994324080000165
A cross entropy loss function is calculated. The gradients generated by the three loss functions are used together to assist in correcting the first attention model, the second attention model, the first scoring model, the third attention model and the second scoring model.
In one embodiment of the present invention, the search processing method further includes:
obtaining a second training sample, the second training sample comprising: the second keyword characteristic, the second user characteristic and a plurality of second candidate object characteristics;
determining click information of a plurality of second candidate objects;
determining a fourth ranking score of the plurality of second candidate objects according to the click information of the second candidate objects;
determining a fifth ranking score of the plurality of second candidate objects using the first attention model, the second attention model, and the first scoring model;
constructing a third loss function by using the fourth ranking score and the fifth ranking score;
and optimizing the first attention model, the second attention model and the first scoring model according to the third loss function.
The ranking score model can be optimized in such a way that a fourth ranking score y 'of the candidate object is marked according to whether the candidate object is clicked by an actual user or not' n . If the user clicks on a candidate object, y' n 1; if the user does not click on the candidate object, y' n =0。
Scoring according to fifth ranking of candidate objects
Figure BDA0002994324080000171
And a fourth ranking score y' n And constructing a third loss function. The third loss function may cross the entropy loss function or the hinge loss function. And optimizing the first attention model, the second attention model and the first scoring model according to the third loss function.
Fig. 7 is a schematic structural diagram of a search processing system architecture according to an embodiment of the present invention. As shown in fig. 7, the system is mainly divided into three parts:
a selection module for selecting for each candidate x i n Predicting the probability of its occurrence in the head
Figure BDA0002994324080000172
Therefore, the candidate of the head context needs to be emphasized from the N candidates.
A ranking module for promoting the importance of the head context and predicting ranking scores of all candidates according to the extracted context features,
Figure BDA0002994324080000173
and the learning module is used for more accurately predicting the ranking score of the head candidate seen by the user by using the head context only and is used for assisting in correcting the output of the ranking module.
In the prior art, the sequencing method of a plurality of candidate objects cannot emphasize the head context characteristics, consistently uses all the candidate object characteristics, extracts the context characteristics, and causes the important head context to have small proportion in the whole, thereby influencing the final sequencing accuracy.
In the method of the embodiment of the present invention, firstly, a scheme of emphasizing the context of the head to make the extracted context features more accurate is innovatively proposed. Secondly, the scheme of the embodiment of the invention is realized on the basis of firstly determining the probability of the candidate objects arranged at the head of the returned result and then determining the ranking scores of the candidate objects. The context information to be emphasized is found by predicting which candidates are head-ranked candidates. Finally, when considering only the head context, a more accurate ranking score can be predicted, so it is proposed to use the head context information to assist the output of all models for rectification.
Fig. 8 is a schematic structural diagram of a search processing apparatus according to an embodiment of the present invention, including:
an instruction receiving module 801, configured to receive a search instruction sent by a user, where the search instruction includes at least one keyword;
a feature determination module 802, configured to determine a keyword feature of the keyword and a user feature of the user; according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the candidate objects;
a selecting module 803, configured to determine prediction probabilities of multiple candidate objects according to the keyword features, the user features, and the multiple candidate object features, where the prediction probabilities are used to represent probabilities that the candidate objects are arranged at the head of a returned result;
a sorting module 804, configured to determine context information of the candidate object according to the multiple candidate object features and the prediction probabilities of the multiple candidate objects; and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
Optionally, the sorting module 804 is specifically configured to:
combining the plurality of candidate object characteristics to generate a combination matrix of the candidate objects;
generating a weight matrix of the candidate objects according to the prediction probabilities of the candidate objects;
inputting the combination matrix and the weight matrix of the candidate object into a first attention model to obtain a self-attention matrix of the candidate object;
and inputting the keyword features, the user features and the self-attention matrix of the candidate object into the second attention model to obtain the context information of the candidate object.
Optionally, the sorting module 804 is specifically configured to:
inputting the keyword features, the user features, the plurality of candidate object features and the context information of the candidate objects into a first scoring model to obtain first matching scores of the plurality of candidate objects;
and carrying out normalization processing on the first matching scores of the candidate objects to obtain the ranking scores of the candidate objects.
Optionally, the method further comprises: a learning module 805, configured to apply to obtain a first training sample, where the first training sample includes: the first candidate object features comprise a first keyword feature, a first user feature and a plurality of first candidate object features;
determining at least one head object from the plurality of first candidate objects, the at least one head object being arranged at a head of a first return result, the first return result being generated based on the plurality of first candidate objects;
determining a first ranking score for the at least one head object using the first attention model, the second attention model, and the first scoring model;
determining a second ranking score of at least one head object according to the first keyword feature, the first user feature and the at least one head object feature;
constructing a first loss function by using the first ranking score and the second ranking score;
the first attention model, the second attention model and the first scoring model are optimized according to the first loss function.
Optionally, the learning module 805 is further configured to:
combining at least one head object feature to generate a combined matrix of the head objects;
inputting the combination matrix of the head object into a third attention model to obtain a self-attention matrix of the head object;
inputting the first keyword feature, the first user feature and the self-attention matrix of the head object into a fourth attention model to obtain context information of the head object;
inputting the first keyword feature, the first user feature, at least one head object feature and context information of the head object into a second scoring model to obtain a second matching score of the at least one head object;
and carrying out normalization processing on the second matching score of the at least one head object to obtain a second ranking score of the at least one head object.
Optionally, the learning module 805 is further configured to:
and optimizing the third attention model and the second scoring model according to the first loss function.
Optionally, the learning module 805 is further configured to:
determining click information of at least one head object;
determining a third ranking score of at least one head object according to the click information of the head object;
constructing a second loss function by using the second ranking score and the third ranking score;
and optimizing the third attention model and the second scoring model according to the second loss function.
Optionally, the sorting module 804 is configured to:
obtaining a second training sample, the second training sample comprising: the second keyword characteristic, the second user characteristic and a plurality of second candidate object characteristics;
determining click information of a plurality of second candidate objects;
determining a fourth ranking score of the plurality of second candidate objects according to the click information of the second candidate objects;
determining a fifth ranking score of the plurality of second candidate objects using the first attention model, the second attention model, and the first scoring model;
constructing a third loss function by using the fourth ranking score and the fifth ranking score;
and optimizing the first attention model, the second attention model and the first scoring model according to the third loss function.
Optionally, the selecting module 803 is specifically configured to:
inputting the keyword characteristics, the user characteristics and the plurality of candidate object characteristics into a third scoring model to obtain third matching scores of the plurality of candidate objects;
and carrying out normalization processing on the third matching scores of the candidate objects to obtain the prediction probabilities of the candidate objects.
Optionally, the selecting module 803 is further configured to:
obtaining a third training sample, the third training sample comprising: a third keyword feature, a third user feature and a plurality of third candidate object features;
determining at least one head object from the plurality of third candidate objects, the at least one head object being arranged at the head of a second returned result, the second returned result being generated based on the plurality of third candidate objects;
determining a first prediction probability of a plurality of third candidate objects according to the at least one head object;
determining a second prediction probability for a third plurality of candidate objects using a third scoring model;
constructing a fourth loss function by utilizing the first prediction probability and the second prediction probability;
and optimizing the third scoring model according to a fourth loss function.
Referring now to FIG. 9, shown is a block diagram of a computer system 900 suitable for use with a terminal device implementing an embodiment of the present invention. The terminal device shown in fig. 9 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 9, the computer system 900 includes a Central Processing Unit (CPU)901 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)902 or a program loaded from a storage section 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data necessary for the operation of the system 900 are also stored. The CPU 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
The following components are connected to the I/O interface 905: an input portion 906 including a keyboard, a mouse, and the like; an output section 907 including components such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 908 including a hard disk and the like; and a communication section 909 including a network interface card such as a LAN card, a modem, or the like. The communication section 909 performs communication processing via a network such as the internet. The drive 910 is also connected to the I/O interface 905 as necessary. A removable medium 911 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 910 as necessary, so that a computer program read out therefrom is mounted into the storage section 908 as necessary.
In particular, according to the embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 909, and/or installed from the removable medium 911. The above-described functions defined in the system of the present invention are executed when the computer program is executed by a Central Processing Unit (CPU) 901.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: the device comprises an instruction receiving module, a characteristic determining module, a selecting module and a sorting module. The names of these modules do not constitute a limitation to the module itself in some cases, and for example, the instruction receiving module may also be described as a "module that receives a search instruction issued by a user".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
receiving a search instruction sent by a user, wherein the search instruction comprises at least one keyword;
determining keyword characteristics of the keywords and user characteristics of the user;
according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the candidate objects;
determining the prediction probabilities of the candidate objects according to the keyword features, the user features and the candidate object features, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a returned result;
determining context information of the candidate object according to the plurality of candidate object characteristics and the prediction probabilities of the plurality of candidate objects;
and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
According to the technical scheme of the embodiment of the invention, the context information is used for representing the information of mutual comparison and influence among the candidate objects. In the actual browsing process of the user, the number of the browsed candidate objects is limited, and only the candidate objects arranged at the head of the returned result can really influence the decision of the user. The method of the embodiment of the invention determines the context information of the candidate object according to the characteristics of the candidate objects and the prediction probabilities of the candidate objects. Wherein the prediction probability characterizes the probability of the candidate object being ranked at the head of the returned result. Compared with the mode of indiscriminately processing the characteristics of all candidate objects to generate the context information of the candidate objects, the method provided by the embodiment of the invention can more accurately embody the process of actually browsing the returned result by the user and generate more effective context information, thereby optimizing the accuracy of search result sequencing.
The above-described embodiments should not be construed as limiting the scope of the invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (13)

1. A search processing method, comprising:
receiving a search instruction sent by a user, wherein the search instruction comprises at least one keyword;
determining keyword characteristics of the keywords and user characteristics of the user;
according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the candidate objects;
determining the prediction probabilities of the candidate objects according to the keyword features, the user features and the candidate object features, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a returned result;
determining context information of the candidate object according to the plurality of candidate object characteristics and the prediction probabilities of the plurality of candidate objects;
and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
2. The method of claim 1, wherein determining context information of the candidate object according to the plurality of candidate object features and the prediction probabilities of the plurality of candidate objects comprises:
combining the plurality of candidate object features to generate a combination matrix of the candidate objects;
generating a weight matrix of the candidate objects according to the prediction probabilities of the candidate objects;
inputting the combination matrix and the weight matrix of the candidate object into a first attention model to obtain a self-attention matrix of the candidate object;
and inputting the keyword features, the user features and the self-attention matrix of the candidate object into a second attention model to obtain the context information of the candidate object.
3. The method of claim 2, wherein determining the ranking score for the plurality of candidate objects based on the keyword feature, the user feature, the plurality of candidate object features, and the context information of the candidate object comprises:
inputting the keyword features, the user features, the candidate object features and the context information of the candidate objects into a first scoring model to obtain first matching scores of the candidate objects;
and carrying out normalization processing on the first matching scores of the candidate objects to obtain the ranking scores of the candidate objects.
4. The method of claim 3, further comprising:
obtaining a first training sample, the first training sample comprising: the first candidate object features comprise a first keyword feature, a first user feature and a plurality of first candidate object features;
determining at least one head object from the plurality of first candidate objects, the at least one head object being arranged at a head of a first returned result, the first returned result being generated based on the plurality of first candidate objects;
determining a first ranking score for the at least one head object using the first attention model, the second attention model, and the first scoring model;
determining a second ranking score of the at least one head object according to the first keyword feature, the first user feature and the at least one head object feature;
constructing a first loss function by using the first ranking score and the second ranking score;
optimizing the first attention model, the second attention model, and the first scoring model according to the first loss function.
5. The method of claim 4, wherein determining a second ranking score for the at least one head object based on the first keyword feature, the first user feature, and the at least one head object feature comprises:
combining the at least one head object feature to generate a combined matrix of the head objects;
inputting the combination matrix of the head object into a third attention model to obtain a self-attention matrix of the head object;
inputting the first keyword feature, the first user feature and the self-attention matrix of the head object into a fourth attention model to obtain context information of the head object;
inputting the first keyword feature, the first user feature, the at least one head object feature and the context information of the head object into a second scoring model to obtain a second matching score of the at least one head object;
and carrying out normalization processing on the second matching score of the at least one head object to obtain a second sequencing score of the at least one head object.
6. The method of claim 5, further comprising:
optimizing the third attention model and the second scoring model according to the first loss function.
7. The method of claim 5, further comprising:
determining click information of the at least one head object;
determining a third ranking score of the at least one head object according to the click information of the head object;
constructing a second loss function by using the second ranking score and the third ranking score;
optimizing the third attention model and the second scoring model according to the second loss function.
8. The method of claim 3, further comprising:
obtaining a second training sample, the second training sample comprising: the second keyword characteristic, the second user characteristic and a plurality of second candidate object characteristics;
determining click information of the plurality of second candidate objects;
determining fourth ranking scores of the plurality of second candidate objects according to click information of the second candidate objects;
determining a fifth ranking score for the plurality of second candidate objects using the first attention model, the second attention model, and the first scoring model;
constructing a third loss function by using the fourth ranking score and the fifth ranking score;
optimizing the first attention model, the second attention model, and the first scoring model according to the third loss function.
9. The method of claim 1, wherein determining the prediction probabilities of the candidate objects based on the keyword feature, the user feature, and the candidate object features comprises:
inputting the keyword features, the user features and the candidate object features into a third scoring model to obtain third matching scores of the candidate objects;
and carrying out normalization processing on the third matching scores of the candidate objects to obtain the prediction probabilities of the candidate objects.
10. The method of claim 9, further comprising:
obtaining a third training sample, the third training sample comprising: a third keyword feature, a third user feature and a plurality of third candidate object features;
determining at least one head object from the plurality of third candidate objects, the at least one head object being ranked at a head of a second returned result, the second returned result being generated based on the plurality of third candidate objects;
determining a first prediction probability for the plurality of third candidate objects based on the at least one head object;
determining a second prediction probability for the third plurality of candidate objects using the third scoring model;
constructing a fourth loss function by using the first prediction probability and the second prediction probability;
optimizing the third scoring model according to the fourth loss function.
11. A search processing apparatus, characterized by comprising:
the instruction receiving module is used for receiving a search instruction sent by a user, and the search instruction comprises at least one keyword;
the characteristic determining module is used for determining the keyword characteristics of the keywords and the user characteristics of the user; according to the search instruction, determining a return result containing a plurality of candidate objects, and determining candidate object characteristics of the candidate objects;
the selection module is used for determining the prediction probabilities of the candidate objects according to the keyword features, the user features and the candidate object features, wherein the prediction probabilities are used for representing the probability that the candidate objects are arranged at the head of a returned result;
the sorting module is used for determining the context information of the candidate objects according to the characteristics of the candidate objects and the prediction probabilities of the candidate objects; and determining the ranking scores of the candidate objects according to the keyword features, the user features, the candidate object features and the context information of the candidate objects so as to determine the ranking sequence of the candidate objects in the returned result.
12. An electronic device, comprising:
one or more processors;
a storage device to store one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-10.
13. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-10.
CN202110325233.9A 2021-03-26 2021-03-26 Search processing method and device Pending CN115129963A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110325233.9A CN115129963A (en) 2021-03-26 2021-03-26 Search processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110325233.9A CN115129963A (en) 2021-03-26 2021-03-26 Search processing method and device

Publications (1)

Publication Number Publication Date
CN115129963A true CN115129963A (en) 2022-09-30

Family

ID=83373824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110325233.9A Pending CN115129963A (en) 2021-03-26 2021-03-26 Search processing method and device

Country Status (1)

Country Link
CN (1) CN115129963A (en)

Similar Documents

Publication Publication Date Title
CN107491534B (en) Information processing method and device
CN111444340B (en) Text classification method, device, equipment and storage medium
CN108829822B (en) Media content recommendation method and device, storage medium and electronic device
CN109657054B (en) Abstract generation method, device, server and storage medium
TW202009749A (en) Human-machine dialog method, device, electronic apparatus and computer readable medium
CN107491547A (en) Searching method and device based on artificial intelligence
CN109471978B (en) Electronic resource recommendation method and device
CN112395487B (en) Information recommendation method and device, computer readable storage medium and electronic equipment
CN111159485A (en) Tail entity linking method, device, server and storage medium
CN112084307B (en) Data processing method, device, server and computer readable storage medium
CN109977292B (en) Search method, search device, computing equipment and computer-readable storage medium
CN113806582B (en) Image retrieval method, image retrieval device, electronic equipment and storage medium
CN113051368B (en) Double-tower model training method, retrieval device and electronic equipment
CN111831924A (en) Content recommendation method, device, equipment and readable storage medium
CN112818091A (en) Object query method, device, medium and equipment based on keyword extraction
CN112380421A (en) Resume searching method and device, electronic equipment and computer storage medium
CN115470313A (en) Information retrieval and model training method, device, equipment and storage medium
CN112926308B (en) Method, device, equipment, storage medium and program product for matching text
CN113360683A (en) Method for training cross-modal retrieval model and cross-modal retrieval method and device
CN112506864A (en) File retrieval method and device, electronic equipment and readable storage medium
JP7121819B2 (en) Image processing method and apparatus, electronic device, computer-readable storage medium, and computer program
CN115599953A (en) Training method and retrieval method of video text retrieval model and related equipment
CN112330387B (en) Virtual broker applied to house watching software
CN114817478A (en) Text-based question and answer method and device, computer equipment and storage medium
CN110472140B (en) Object word recommendation method and device and electronic equipment

Legal Events

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