Document search sorting model training method, sorting method and system

By combining the training method of preferring network frameworks and matching network frameworks, the problem of the user's interest in the traditional document search sorting method is solved, and the quality and user experience of the document search sorting model are improved, and the needs of personalized sorting are met. .

CN119322943APending Publication Date: 2025-01-17PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411389480.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-01-17

AI Technical Summary

Technical Problem

The results generated by traditional document search sorting methods are prone to the fact that the document that users are actually interested in are not in the front, resulting in poor user experience and difficult to meet the personalized sorting requirements of different users.

Method used

Using a training method combining preference network framework and matching network framework, learn user preferences and document matching degrees by obtaining discrete and continuous characteristics of user preferences and document search sorting rules, update document search sorting model, and ensure that the sorting results take into account user preferences and text. Semantic matching.

Benefits of technology

It improves the practicality and result quality of the document search sorting model, so that the document sorting position that users are interested in is in advance, meets the requirements of personalized sorting, and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119322943A_ABST
    Figure CN119322943A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a training method, sorting method and system for a document search sorting model, and the training method comprises the steps: inputting a first representation and a second representation into a preference network framework, and obtaining a preference prediction result; the preference prediction result is used for representing the user preference and the importance degree of the document search sorting rule to the user query information; the user query information and the search document are input into a matching network framework, a document matching result is obtained, and the document matching result is used for representing the semantic matching degree between the document title and the document content of the search document and the user query information; and according to a document matching result and a preference prediction result, performing parameter updating on the initialized document searching and sorting model to obtain a trained document searching and sorting model. The training method can effectively improve the quality of the document search sorting result output by the text search sorting model and improve the user experience. The invention relates to the technical field of natural language processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of natural language processing technology, and in particular to a training method, a sorting method and a system for a document search and sorting model. Background Art

[0002] At present, traditional document search and ranking methods usually directly use pre-trained language models as document search and ranking models to learn the matching and ranking relationship between user input and candidate documents, and then output the corresponding document search results. The document search and ranking results generated in this way are prone to the situation where the documents that users are actually interested in are not ranked high, the quality of the document search and ranking results is poor, and the user experience is not high.

[0003] Therefore, the problems existing in the prior art still need to be solved and optimized. Summary of the invention

[0004] The object of the present invention is to solve one of the technical problems existing in the related art to at least some extent.

[0005] The main purpose of the embodiments of the present application is to propose a training method, a sorting method and a system for a document search and ranking model, wherein the training method can effectively improve the quality of the document search and ranking results output by the text search and ranking model and improve the user experience.

[0006] To achieve the above-mentioned purpose, a first aspect of an embodiment of the present application proposes a training method for a document search ranking model, wherein the document search ranking model includes a preference network framework and a matching network framework, and the training method includes the following steps:

[0007] Obtaining a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to represent discrete features corresponding to user preferences and document search sorting rules, and the second representation is used to represent continuous features corresponding to the user preferences and the document search sorting rules;

[0008] Inputting the first representation and the second representation into the preference network framework to obtain a preference prediction result, wherein the preference prediction result is used to characterize the importance of the user preference and the document search sorting rule;

[0009] Inputting the user query information and the search document into the matching network framework to obtain a document matching result, wherein the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information;

[0010] According to the document matching results and the preference prediction results, the parameters of the initialized document search ranking model are updated to obtain a trained document search ranking model.

[0011] In some embodiments, inputting the first representation and the second representation into the preference network framework to obtain a preference prediction result includes:

[0012] Performing vector value mapping on the first representation to obtain a vector mapping representation;

[0013] According to the vector mapping representation, embedding and concatenating the second representation to obtain an embedded representation;

[0014] The embedded representation is input into the preference network framework to obtain the preference prediction result.

[0015] In some embodiments, inputting the embedding representation into the preference network framework to obtain the preference prediction result includes:

[0016] Performing low-order feature crossover on the embedding representation through the preference network framework to obtain a low-order crossover result;

[0017] Performing high-order feature combination on the embedding representation through the preference network framework to obtain a high-order combination result;

[0018] The preference prediction result is determined according to the low-order crossover result and the high-order combination result.

[0019] In some embodiments, inputting the user query information and the search document into the matching network framework to obtain a document matching result includes:

[0020] Obtaining a preset query identifier, title identifier, and content identifier;

[0021] splicing the user query information and the search document according to the query identifier, the title identifier and the content identifier to obtain a first splicing sequence;

[0022] Performing vocabulary recognition on the first concatenated sequence to obtain a second concatenated sequence;

[0023] The second concatenated sequence is input into the matching network framework to obtain the document matching result.

[0024] In some embodiments, inputting the second concatenated sequence into the matching network framework to obtain the document matching result includes:

[0025] Performing language feature extraction on the second concatenated sequence through the matching network framework to obtain a feature vector set, wherein the feature vector set includes a query feature vector, a title feature vector, and a content feature vector;

[0026] According to the query feature vector, the title feature vector is subjected to a first splicing mapping to obtain a first splicing result, and according to the query feature vector, the content feature vector is subjected to a second splicing mapping to obtain a second splicing result;

[0027] The document matching result is determined according to the first splicing result and the second splicing result.

[0028] In some embodiments, updating the parameters of the initialized document search ranking model according to the document matching result and the preference prediction result to obtain a trained document search ranking model includes:

[0029] Determining a target loss value based on the document matching result and the preference prediction result;

[0030] The initialized document search ranking model is jointly trained based on the target loss value to obtain the trained document search ranking model.

[0031] To achieve the above purpose, a second aspect of an embodiment of the present application proposes a sorting method for a document search sorting model, the sorting method comprising the following steps:

[0032] Get user information and query statements entered by the user;

[0033] The query statement and the user information are input into the trained document search and ranking model to perform document search and ranking to obtain a document search and ranking result.

[0034] To achieve the above-mentioned purpose, a third aspect of an embodiment of the present application proposes a training system for a document search ranking model, wherein the document search ranking model includes a preference network framework and a matching network framework, and the training system includes:

[0035] A first processing unit, configured to obtain a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to represent discrete features corresponding to user preferences and document search sorting rules, and the second representation is used to represent continuous features corresponding to the user preferences and the document search sorting rules;

[0036] A second processing unit is used to input the first representation and the second representation into the preference network framework to obtain a preference prediction result, wherein the preference prediction result is used to characterize the importance of the user preference and the document search sorting rule;

[0037] A third processing unit, configured to input the user query information and the search document into the matching network framework to obtain a document matching result, wherein the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information;

[0038] The fourth processing unit is used to update the parameters of the initialized document search ranking model according to the document matching result and the preference prediction result to obtain a trained document search ranking model.

[0039] To achieve the above-mentioned purpose, a fourth aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor implements the above-mentioned method when executing the computer program.

[0040] To achieve the above objectives, a fifth aspect of an embodiment of the present application proposes a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.

[0041] The present application proposes a training method, a sorting method and a system for a document search and ranking model, wherein the training method obtains a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to characterize discrete features corresponding to user preferences and document search and ranking rules, and the second representation is used to characterize continuous features corresponding to the user preferences and the document search and ranking rules; the first representation and the second representation are input into the preference network framework to obtain a preference prediction result, and the preference prediction result is used to characterize the importance of the user preferences and the document search and ranking rules; the user query information and the search document are input into the matching network framework to obtain a document matching result, and the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information; according to the document matching result and the preference prediction result, the parameters of the initialized document search and ranking model are updated to obtain a trained document search and ranking model. This training method constrains the parameter update process of the document search ranking model through the preference prediction results learned by the preference network framework and the document matching results learned by the matching network framework. The final document search ranking model can take into account user preferences and document search ranking rules while also considering the text semantic character matching between user query information and search document titles and search document contents. The document search ranking model advances the ranking position of documents that users are actually interested in, thereby improving the practicality of the document search ranking model and the generation quality of document search ranking results, and providing a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the embodiments of the present application or the drawings of the related technical solutions in the prior art are introduced below. It should be understood that the drawings introduced below are only for the convenience of clearly expressing some embodiments of the technical solutions of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0043] Figure 1 It is a schematic diagram of the process principle of a training method for a document search and ranking model provided in an embodiment of the present application;

[0044] Figure 2 This is a schematic diagram of the process principle of the preferred network framework provided by the embodiment of the present application;

[0045] Figure 3 This is a schematic diagram of the process principle of step S103 provided in an embodiment of the present application;

[0046] Figure 4 It is a schematic diagram of the process principle of a sorting method of a document search sorting model provided in an embodiment of the present application;

[0047] Figure 5 It is a structural diagram of a training system for a document search and ranking model provided in an embodiment of the present application;

[0048] Figure 6 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0049] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0050] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0052] At present, traditional document search and ranking methods usually directly use pre-trained language models as document search and ranking models to learn the matching and ranking relationship between user input and candidate documents, and then output the corresponding document search results. The document search and ranking model obtained in this way only considers the matching relationship between document content and user input. The generated document search and ranking results are prone to the situation where the documents that users are actually interested in are not ranked high, and the practicality of the document search and ranking model is not high.

[0053] Specifically, in practical applications, for example, in the enterprise document search and sorting scenario, enterprise users may have certain preferences for document data types; different subsidiaries may have different preferences for the document issuing departments; in addition, enterprise documents generally have titles, and enterprise users may have certain requirements for the sorting rules of enterprise documents, such as giving priority to new enterprise documents over old enterprise documents, giving priority to enterprise documents with matching document titles over enterprise documents with matching document contents, etc. Traditional document search and sorting methods can only provide document search results that consider the matching relationship between document content and user input. The document search and sorting results generated in this way often cannot meet the above requirements, and it is easy for the document that the user is actually interested in to not be ranked high. The resulting document search and sorting model is not very practical for enterprise users, the quality of document search and sorting results is poor, and the user experience is unsatisfactory.

[0054] In view of this, an embodiment of the present application provides a training method, a sorting method and a system for a document search and ranking model, wherein the training method constrains the parameter update process of the document search and ranking model through the preference prediction results learned by the preference network framework and the document matching results learned by the matching network framework, so that the final document search and ranking model can take into account the user preferences and document search and ranking rules, while also taking into account the text semantic character matching between the user query information and the search document title and the search document content, so that the document search and ranking model advances the ranking position of the documents that the user is actually interested in, that is, the document search and ranking model can meet the personalized sorting requirements of different users for text search and ranking results, thereby improving the practicality of the document search and ranking model and the generation quality of the document search and ranking results, and providing a better user experience.

[0055] The present application provides a document search ranking model training method, ranking method and system, which are specifically described through the following embodiments.

[0056] The method provided by the embodiment of the present application can be applied to digital medical application scenarios or digital financial application scenarios. In digital medical application scenarios or digital financial application scenarios, the document search and ranking model provided by the embodiment of the present application can be loaded into a digital medical database or a data financial database, and by inputting a query statement into the document search and ranking model to perform document retrieval and ranking, it is possible to obtain a document search and ranking result that meets the personalized ranking requirements of different users for text search and ranking results and generates better quality, and a better user experience.

[0057] The method provided in the embodiment of the present application can be applied to information retrieval application scenarios, which can be enterprise information retrieval application scenarios, school information retrieval application scenarios, Internet network information retrieval application scenarios, etc. In the information retrieval application scenario, the information retrieval service provider can use the document search ranking model provided in the embodiment of the present application to perform document search and ranking on the query statement provided by the information retrieval service user, and can obtain the document search and ranking results that meet the personalized ranking requirements of the specific user for the text search ranking results and generate better quality, and the user experience of the information retrieval service is better.

[0058] The training method and sorting method of the document search and sorting model provided in the embodiments of the present application can be applied to the terminal, can also be applied to the server side, and can also be software running in the terminal or the server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or distributed system composed of multiple physical servers, and can also be configured as a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the above method, etc., but is not limited to the above forms.

[0059] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0060] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.

[0061] Figure 1 is an optional flow chart of a training method for a document search ranking model provided in an embodiment of the present application, wherein the document search ranking model includes a preference network framework and a matching network framework. Figure 1 The training method may include but is not limited to steps S101 to S104.

[0062] Step S101, obtaining a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to represent discrete features corresponding to user preferences and document search sorting rules, and the second representation is used to represent continuous features corresponding to the user preferences and the document search sorting rules;

[0063] In an embodiment of the present application, user query information may be a query statement input by a user into a document database, and the search document is a data document corresponding to the user query information retrieved from the document database. The first representation and the second representation are used to record discrete features and continuous features corresponding to user preferences and document search sorting rules, respectively. Specifically, the user preferences in an embodiment of the present application may be preference information of an enterprise user, and the enterprise user may be an enterprise entity or an enterprise employee of the enterprise entity. The specific preference information may be the enterprise user's personalized requirements for document data types, attributes, etc.; the document search sorting rules may be sorting rules preferred by enterprise users, etc. The specific sorting rules may be that the priority of enterprise documents is higher than that of old enterprise documents, and the priority of enterprise documents with matching document titles is higher than that of enterprise documents with matching document contents, etc. The examples in this application are for illustration only and are not intended to limit this application.

[0064] It can be understood that the first representation in the embodiment of the present application may include discrete document feature data such as the enterprise document source category, enterprise document data type, issuing department, user department, office supplies, etc., and the discrete document feature data is usually non-numeric; the second representation can be the numerical attribute of the enterprise document, specifically the issuance time, document size, etc. of the enterprise document. The example in this application is for illustrative purposes only.

[0065] It should be noted that the second representation in the embodiment of the present application may also include a user intent score and a character-level text matching score, wherein the user intent score is used to characterize the user's document search intent, which can be specifically classified and predicted by a pre-trained multi-label classification model for the document search intent represented by the user query information, thereby obtaining the user intent score, and the multi-label classification model can be any one of a deep neural network (DNN), a K-nearest neighbor model (KNN), a multi-label decision tree model (ML-DT), a ranking support vector machine (Rank-SVM), etc. The character-level text matching score can be determined by calculating the matching score of the longest common subsequence of the user query information for the search document title and content, the longest common subsequence can be composed of several words with corresponding word weights, and the word weight of each word can be provided by a pre-trained deepCT model, or based on unsupervised methods such as TF-IDF and Word2Vec to provide corresponding word weights for each word in the longest common subsequence. The example of the present application is only for illustration and is not intended to limit the present application.

[0066] Step S102: input the first representation and the second representation into the preference network framework to obtain a preference prediction result, wherein the preference prediction result is used to characterize the importance of the user preference and the document search sorting rule;

[0067] In some embodiments, the step S102, inputting the first representation and the second representation into the preference network framework to obtain a preference prediction result, includes:

[0068] A1. Perform vector value mapping on the first representation to obtain a vector mapping representation;

[0069] A2. According to the vector mapping representation, embedding and concatenating the second representation to obtain an embedded representation;

[0070] In the embodiment of the present application, the vector value mapping in step A1 is used to map the discrete features in the user preferences and document search sorting rules into independent vector representations. Specifically, the vector value mapping in step A1 can be one-hot encoding of the first representation, specifically mapping each discrete feature in the first representation to a different integer value; then converting the integer value corresponding to each discrete feature into a vector composed of 0 and 1, thereby obtaining a vector mapping representation corresponding to the first representation.

[0071] It can be understood that the vector mapping representation obtained by step A1 is usually a sparse long vector, so in the embodiment of the present application, the vector mapping representation can be converted into a dense embedding representation through the embedding concatenation in step A2. Specifically, the embedding concatenation in step A2 can convert the sparse vector mapping representation into a low-dimensional dense vector representation through the embedding layer Dense Embedding, and then concatenate the obtained low-dimensional dense vector representation with the second representation to obtain an embedded representation, which is used to represent the continuous vector representation corresponding to the user preference and document search sorting rules.

[0072] A3. Input the embedded representation into the preference network framework to obtain the preference prediction result.

[0073] Reference Figure 2 Further, the step A3, inputting the embedding representation into the preference network framework to obtain the preference prediction result, includes:

[0074] A31, performing low-order feature crossover on the embedding representation through the preference network framework to obtain a low-order crossover result;

[0075] A32, performing high-order feature combination on the embedded representation through the preference network framework to obtain a high-order combination result;

[0076] A33. Determine the preference prediction result according to the low-order crossover result and the high-order combination result.

[0077] In an embodiment of the present application, the preference prediction result is used to characterize the user preference and the importance of the document search sorting rule to the user query information. The preference network framework can be specifically constructed based on the DeepFM model, which is not elaborated in this application.

[0078] It can be understood that step A31 can be specifically implemented based on the factorization machine (FM) structure of the DeepFM model, which can be specifically linearly summing all continuous vector representations in the input embedded representation to calculate the low-order crossover result; or, the low-order feature crossover can also be inner product operation on all continuous vector representations in the embedded representation to calculate the low-order crossover result. In addition, in other feasible implementations, the low-order feature crossover in step A31 can also be linearly summing the embedded representation to obtain the linear summation result, while performing inner product operation on all continuous vector representations in the embedded representation to obtain the inner product result, and then jointly determining the low-order crossover result based on the calculated linear summation result and inner product result. The examples in this application are for illustration only and are not intended to limit this application.

[0079] It should be noted that step A32 can specifically be based on the hidden layer (Hidden Layer) in the DeepFM model to extract the deep feature information in the embedded representation. The hidden layer can be specifically constructed based on a combination of a fully connected layer, a convolutional layer and an activation function. There are many specific implementation methods, which are not described in detail in this application. In addition, step A33 can be to combine the cross feature scores in the low-order cross result and the combined feature scores in the high-order combination result, and determine the combination of the cross feature score and the combined feature score as the high-order combination result.

[0080] Step S103: input the user query information and the search document into the matching network framework to obtain a document matching result, wherein the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information;

[0081] Reference Figure 3 In some embodiments, the step S103 of inputting the user query information and the search document into the matching network framework to obtain a document matching result includes:

[0082] B1. Obtaining a preset query identifier, title identifier, and content identifier;

[0083] B2. splicing the user query information and the search document according to the query identifier, the title identifier and the content identifier to obtain a first splicing sequence;

[0084] B3, performing vocabulary recognition on the first splicing sequence to obtain a second splicing sequence;

[0085] In the embodiment of the present application, the matching network framework can specifically be any one of the pre-trained large language models such as the Ernie model, the GPT series model, etc., or any one of the BERT model, the ELMO model, etc. The query identifier in step B1 is used to identify the user query information, and its form can be [query], the title identifier is used to identify the document title of the search document, and its form can be [title], and the content identifier is used to identify the document content of the search document, and its form can be [content].

[0086] It is understandable that step B2 can be to concatenate the user query information with the corresponding query identifier, concatenate the document title in the search document with the title identifier, and concatenate the document content in the search document with the content identifier, and then determine the first concatenation sequence in the form of an array sequence based on the concatenated user query information, search document title and content.

[0087] It is worth mentioning that the vocabulary recognition in step B3 can be specifically performed by performing Tokenizer recognition on the user query information, search document title and content in the first concatenated sequence to obtain a second concatenated sequence. The expression form of the second concatenated sequence can be specifically:

[0088] [CLS][query]X q [SEP][title]X t [SEP][content]X c [SEP]

[0089] Among them, X q The Tokenize result generated when the user query information is recognized by the Tokenizer; X t The Tokenize result generated when the document title of the search document is recognized by the Tokenizer; X c It is the Tokenize result generated when the document content of the search document is recognized by the Tokenizer; [CLS] and [SEP] are the characteristic marking symbols in the second concatenated sequence.

[0090] It should be noted that, since the matching network framework usually has certain restrictions on the length of the input text (i.e., the length of the second concatenated sequence), the search document in the embodiment of the present application can be the entire candidate document, or it can be a document fragment in a longer candidate document. The document fragment can be obtained based on the end of the paragraph in the candidate document, or it can be obtained by segmenting the document content of the longer candidate document based on a fixed length. The present application does not limit this. In addition, for a certain candidate document, the document content segmentation method of the candidate document can be that there is a certain length of mutual overlap between adjacent document fragments, or it can be that the end content of the previous document fragment is used as the starting content of the next document fragment, etc. The present application does not limit the specific segmentation method.

[0091] B4. Inputting the second concatenated sequence into the matching network framework to obtain the document matching result.

[0092] Furthermore, the step B4, inputting the second concatenated sequence into the matching network framework to obtain the document matching result, includes:

[0093] B41, extracting language features from the second concatenated sequence through the matching network framework to obtain a feature vector set, wherein the feature vector set includes a query feature vector, a title feature vector, and a content feature vector;

[0094] B42, performing a first splicing mapping on the title feature vector according to the query feature vector to obtain a first splicing result, and performing a second splicing mapping on the content feature vector according to the query feature vector to obtain a second splicing result;

[0095] B43. Determine the document matching result according to the first splicing result and the second splicing result.

[0096] In an embodiment of the present application, step B41 can be to input the second splicing sequence into a matching network framework, and then use the vector representation output by the matching network framework as a feature vector set, which includes a query feature vector corresponding to the user query information, a title feature vector corresponding to the document title of the search document, and a content feature vector corresponding to the document content of the search document.

[0097] It can be understood that the first concatenation mapping in step B42 can be to concatenate the query feature vector with the title feature vector, and input the concatenated feature vector into the fully connected layer to obtain the score corresponding to the user query information and the document title of the search document (i.e., semantic matching degree), and determine it as the first concatenation result; the second concatenation mapping can be to concatenate the query feature vector with the content feature vector, and input the concatenated feature vector into the fully connected layer to obtain the score corresponding to the user query information and the document content of the search document (i.e., semantic matching degree), and determine it as the second concatenation result. Step B43 can be to combine the first concatenation result and the second concatenation result to obtain the document matching result.

[0098] Step S104: update the parameters of the initialized document search and ranking model according to the document matching result and the preference prediction result to obtain a trained document search and ranking model.

[0099] In some embodiments, the step S104, updating the parameters of the initialized document search ranking model according to the document matching result and the preference prediction result to obtain a trained document search ranking model, includes:

[0100] C1. Determine a target loss value based on the document matching result and the preference prediction result;

[0101] C2. Jointly train the initialized document search ranking model based on the target loss value to obtain the trained document search ranking model.

[0102] In the embodiment of the present application, step C1 may first add the scores in the document matching results and the preference results, and then obtain the final score through sigmoid normalization. The final score may be expressed as:

[0103] S = Sigmoid (S fm +S dm +S qt +S qc )

[0104] Among them, S is the final score, Sigmoid() is the sigmoid normalization function; S fm S is the cross-feature score in the preference prediction results; dm is the combined feature score in the preference prediction result; S qt is the first concatenation result in the document matching result; S qc It is the second concatenation result in the document matching results.

[0105] It can be understood that after obtaining the final score, the target loss value can be determined based on the training loss function, and the target loss value can be expressed as:

[0106] L=max(s(query,pos)-s(query,neg)+margin,0)

[0107] Among them, L is the target loss value, max() is the maximization function, s(query,pos) is the final score between the user query statement query and the positive document pos; s(query,ner) is the final score between the user query statement query and the negative document neg; margin is used to represent the minimum acceptable difference between the positive document and the negative document for the document search ranking model, and margin,0 is used to represent that the minimum acceptable difference is 0.

[0108] It should be noted that there are usually many candidate documents involved in the training of the document search and ranking model. For a certain user query statement, its positive example document can be the candidate document corresponding to the user query statement among all candidate documents (i.e., the search document), and its negative example document can be the candidate document other than the search document among all candidate documents.

[0109] It is worth mentioning that the target loss value can be used to jointly train the preference network framework and the matching network framework in the document search ranking model. Specifically, the relevant parameters of the preference network framework and the matching network framework can be updated by the back propagation algorithm to improve their performance. In the embodiment of the present application, the training method can be carried out in a cyclic iteration, that is, the parameters of the preference network framework and the matching network framework can be updated round by round. Exemplarily, for example, multiple user query information can be obtained, and then these user query information can be divided into different training data groups, and the corresponding target loss value is first calculated using the data of a training data group, and the parameters of the preference network framework and the matching network framework are updated. Then, based on the updated preference network framework and the matching network framework, the corresponding target loss value is calculated using the data of another training data group, and the parameters of the preference network framework and the matching network framework are continued to be updated. In this way, the trained document search ranking model is obtained by iterating in a cyclic manner. Here, the conditions for determining the end of training can be set according to actual needs. For example, in some embodiments, the target round of training iteration can be set, the iteration round can be recorded during the training process, and the parameters of the model are updated each time, and the iteration round can be increased by 1. If the iteration round reaches the target round after the current model parameters are updated, the training can be considered to be completed and a trained document search ranking model is obtained; if the iteration round does not reach the target round after the current model parameters are updated, iterative training can continue. In some embodiments, a test data set can also be obtained, and the trained document search ranking model is tested with the test data set. Each time the model parameters are updated, the test data set is used for testing. If the prediction accuracy obtained by the test meets the pre-set index requirements after the current model parameters are updated, the training can be considered to be completed and a trained document search ranking model is obtained; if the prediction accuracy obtained by the test does not meet the pre-set index requirements after the current model parameters are updated, iterative training can continue. Of course, the above embodiments are only used to exemplify the process of jointly training the document search ranking model in this application, and do not mean to limit its specific implementation.

[0110] Figure 4 is an optional flowchart of a sorting method of a document search sorting model provided in an embodiment of the present application. Figure 4 The identification method may include but is not limited to steps S105 to S106.

[0111] Step S105: obtaining user information and a query statement input by the user;

[0112] Step S106: input the query statement and the user information into the trained document search and ranking model to perform document search and ranking to obtain a document search and ranking result.

[0113] In an embodiment of the present application, a trained document search and ranking model can be deployed in a document database. When the trained document search and ranking model receives a query statement input by a user, the document search and ranking model can also obtain user information corresponding to the user. The user information can record user preferences and document search and ranking rules. The document search and ranking model searches the document database according to the query statement, and sorts the retrieved candidate documents based on the obtained user information, thereby obtaining a document search and ranking result.

[0114] It is understandable that the trained document search ranking model can also receive the query statement input by the user, user information and several candidate documents corresponding to the query statement, and sort the candidate documents through the document search ranking model to obtain the document search ranking result.

[0115] See also Figure 5 The embodiment of the present application also provides a document search ranking model training system, which can implement the above document search ranking model training method, and the training system includes:

[0116] A first processing unit 801 is used to obtain a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to represent discrete features corresponding to user preferences and document search sorting rules, and the second representation is used to represent continuous features corresponding to the user preferences and the document search sorting rules;

[0117] A second processing unit 802 is used to input the first representation and the second representation into the preference network framework to obtain a preference prediction result, wherein the preference prediction result is used to characterize the importance of the user preference and the document search sorting rule;

[0118] The third processing unit 803 is used to input the user query information and the search document into the matching network framework to obtain a document matching result, wherein the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information;

[0119] The fourth processing unit 804 is used to update the parameters of the initialized document search ranking model according to the document matching result and the preference prediction result to obtain a trained document search ranking model.

[0120] The specific implementation of the document search ranking model training system is basically the same as the specific implementation of the document search ranking model training method described above, and will not be repeated here.

[0121] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0122] See also Figure 6 , Figure 6 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0123] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;

[0124] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 902, and the processor 901 calls and executes the methods of the embodiments of this application;

[0125] Input / output interface 903, used to implement information input and output;

[0126] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);

[0127] A bus 905 that transmits information between the various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);

[0128] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .

[0129] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and the computer program implements the above method when executed by a processor.

[0130] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0131] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0132] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0133] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0134] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0135] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0136] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0137] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0138] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0139] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0140] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0141] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A training method for a document search and ranking model, characterized in that: The document search ranking model includes a preference network framework and a matching network framework, and the training method includes the following steps: Obtaining a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to represent discrete features corresponding to user preferences and document search sorting rules, and the second representation is used to represent continuous features corresponding to the user preferences and the document search sorting rules; Inputting the first representation and the second representation into the preference network framework to obtain a preference prediction result, wherein the preference prediction result is used to characterize the importance of the user preference and the document search sorting rule; Inputting the user query information and the search document into the matching network framework to obtain a document matching result, wherein the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information; According to the document matching results and the preference prediction results, the parameters of the initialized document search ranking model are updated to obtain a trained document search ranking model.

2. The training method according to claim 1, characterized in that: The step of inputting the first representation and the second representation into the preference network framework to obtain a preference prediction result includes: Performing vector value mapping on the first representation to obtain a vector mapping representation; According to the vector mapping representation, embedding and concatenating the second representation to obtain an embedded representation; The embedded representation is input into the preference network framework to obtain the preference prediction result.

3. The training method according to claim 2, characterized in that: The step of inputting the embedding representation into the preference network framework to obtain the preference prediction result includes: Performing low-order feature crossover on the embedding representation through the preference network framework to obtain a low-order crossover result; Performing high-order feature combination on the embedding representation through the preference network framework to obtain a high-order combination result; The preference prediction result is determined according to the low-order crossover result and the high-order combination result.

4. The training method according to claim 1, characterized in that: The step of inputting the user query information and the search document into the matching network framework to obtain a document matching result includes: Obtaining a preset query identifier, title identifier, and content identifier; splicing the user query information and the search document according to the query identifier, the title identifier and the content identifier to obtain a first splicing sequence; Performing vocabulary recognition on the first concatenated sequence to obtain a second concatenated sequence; The second concatenated sequence is input into the matching network framework to obtain the document matching result.

5. The training method according to claim 4, characterized in that: The step of inputting the second concatenated sequence into the matching network framework to obtain the document matching result includes: Performing language feature extraction on the second concatenated sequence through the matching network framework to obtain a feature vector set, wherein the feature vector set includes a query feature vector, a title feature vector, and a content feature vector; According to the query feature vector, the title feature vector is subjected to a first splicing mapping to obtain a first splicing result, and according to the query feature vector, the content feature vector is subjected to a second splicing mapping to obtain a second splicing result; The document matching result is determined according to the first splicing result and the second splicing result.

6. The training method according to claim 1, characterized in that: The step of updating the parameters of the initialized document search ranking model according to the document matching result and the preference prediction result to obtain a trained document search ranking model includes: Determining a target loss value based on the document matching result and the preference prediction result; The initialized document search ranking model is jointly trained based on the target loss value to obtain the trained document search ranking model.

7. A sorting method for a document search sorting model, characterized in that: The sorting method comprises the following steps: Get user information and query statements entered by the user; The query statement and the user information are input into the document search and ranking model trained as described in any one of claims 1 to 6 to perform document search and ranking to obtain a document search and ranking result.

8. A document search ranking model training system, characterized in that: The document search ranking model includes a preference network framework and a matching network framework, and the training system includes: A first processing unit, configured to obtain a first representation and a second representation, as well as user query information and a search document, wherein the first representation is used to represent discrete features corresponding to user preferences and document search sorting rules, and the second representation is used to represent continuous features corresponding to the user preferences and the document search sorting rules; A second processing unit is used to input the first representation and the second representation into the preference network framework to obtain a preference prediction result, wherein the preference prediction result is used to characterize the importance of the user preference and the document search sorting rule; A third processing unit, configured to input the user query information and the search document into the matching network framework to obtain a document matching result, wherein the document matching result is used to characterize the semantic matching degree between the document title and document content of the search document and the user query information; The fourth processing unit is used to update the parameters of the initialized document search ranking model according to the document matching result and the preference prediction result to obtain a trained document search ranking model.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.