Search result ranking method, apparatus, device, and medium
By transforming the profile features of users and doctors from continuous variables to dispersed variables, and using a search prediction model to calculate click probabilities, the problem of inappropriate doctor recommendations in existing technologies is solved, resulting in more accurate search result ranking and improved user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KANG JIAN INFORMATION TECH (SHENZHEN) CO LTD
- Filing Date
- 2022-08-17
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, doctor search ranking schemes cannot effectively balance feature cross-fertilization capability and feature deployment performance, resulting in unsuitable recommended doctors that fail to meet user needs.
By converting continuous variables in the initial profile features of users and doctors into dispersed variables, a trained search prediction model is used to calculate the click probability, and search results are recommended in order of click probability.
It improves the predictive power of the search prediction model, provides search objects that are more suitable for the current user, and enhances the user experience.
Smart Images

Figure CN115329222B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent decision-making technology, and in particular to a method, apparatus, device, and medium for ranking search results. Background Technology
[0002] With the development of internet technology, more and more people are using online consultations to seek medical advice and medication. As a result, many health and medical applications, apps, and mini-programs have emerged, such as the health and medical projects on the Ping An Bank app. Whether these applications are user-friendly and can truly help those who need medical advice largely depends on whether the respective app platform can recommend suitable doctors.
[0003] In existing technologies, when users search for doctors for consultation, the corresponding app platforms typically sort doctors according to their click-through rates and then recommend the top-ranked doctors. However, existing doctor search and ranking schemes suffer from the drawback of not being able to simultaneously consider feature cross-referencing capabilities and feature deployment performance. They cannot accurately predict which doctor a user wants to consult, resulting in unsuitable doctor recommendations that fail to meet user needs. Summary of the Invention
[0004] This invention provides a search result ranking method, apparatus, computer equipment, and medium that can accurately calculate the click-through rate of search objects and has good search result prediction capabilities.
[0005] Firstly, a method for ranking search results is provided, including:
[0006] Receive a search request sent by a user terminal and determine the search object corresponding to the search request;
[0007] Obtain the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all the search objects;
[0008] The continuous variables in the first initial portrait features and the second initial portrait features are all converted into dispersed variables to obtain the first target portrait features and the second target portrait features, respectively.
[0009] Based on the first target profile features, the behavioral features, the second target profile features, and the current search object features, the click probability of each search object is calculated using a trained search prediction model;
[0010] The search results are sorted from highest to lowest based on the click probability, and a specified number of the top-ranked search objects are selected as the search results.
[0011] Secondly, a search result ranking device is provided, comprising:
[0012] The request receiving module is used to receive search requests sent by user terminals and determine the search object corresponding to the search request;
[0013] The data acquisition module is used to acquire the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all the search objects;
[0014] The variable transformation module is used to convert the continuous variables in the first initial portrait features and the second initial portrait features into dispersed variables, so as to obtain the first target portrait features and the second target portrait features respectively.
[0015] The click-through rate calculation module is used to calculate the click probability of each search object based on the first target profile features, the behavioral features, the second target profile features, and the current search object features, using a trained search prediction model.
[0016] The result determination module is used to sort the search objects from high to low according to the click probability, and select a specified number of the top-ranked search objects as search results.
[0017] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the search result sorting method described above.
[0018] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the search result sorting method described above.
[0019] In the above-described search result ranking method, apparatus, computer equipment, and storage medium, a user's search request can be received through a user terminal, and the search object corresponding to the search request can be determined. Then, the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects can be obtained. The continuous variables in the first and second initial profile features are converted into dispersed variables to obtain the first target profile features and the second target profile features, respectively. Then, based on the first target profile features, behavioral features, second target profile features, and current search object features, the click probability of each search object is calculated using a trained search prediction model. The search objects are then sorted from high to low according to their click probabilities, and a specified number of the top-ranked search objects are selected as search results. Finally, the search results can be displayed to the user through the user terminal. Thus, after obtaining the first initial profile features of the current user, the behavioral features of the current user clicking on search objects, and the second initial profile features of all search objects, the continuous variables in the first and second initial profile features are converted into dispersed variables. This improves the cross-performance of the features, thereby reducing the difficulty of model learning, avoiding overfitting during model learning, and effectively improving the predictive ability of the search prediction model. This makes the prediction results of the search prediction model more accurate, providing the user terminal with search objects more suitable for the current user, and improving the user experience. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of an application environment for a search result sorting method according to an embodiment of the present invention;
[0022] Figure 2 This is a flowchart illustrating a search result sorting method according to an embodiment of the present invention;
[0023] Figure 3 This is a schematic diagram of the structure of a search prediction model in one embodiment of the present invention;
[0024] Figure 4 This is a schematic diagram of a search result sorting device in one embodiment of the present invention;
[0025] Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;
[0026] Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0027] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] The inventors' research revealed that current mainstream search ranking models fall into three main categories: traditional logistic regression (LR) models based on a small number of features; machine learning tree models or their derivatives based on hundreds of features, such as GBDT (Gradient Boosting Decision Tree), XGBOOST (eXtreme Gradient Boosting), LightGBM (light Gradient Boosting Machine), and CatBoost (Catgorical+Boost); and a deep learning model architecture based on a large number of sparse features using embedding+MLP. However, these three approaches still have the following drawbacks, resulting in unsuitable doctor recommendations that fail to meet user needs.
[0029] 1) Logistic regression (LR) models are easy to develop and deploy, but they have poor feature cross-cutting ability and cannot express high-dimensional features;
[0030] 2) Tree models have strong feature cross-validation capabilities, but poor deployment performance and cannot effectively encode sparse categorical variables.
[0031] 3) The deep learning approach of Embedding+MLP can encode sparse categorical variables, but it is weak in its ability to cross-reference a large number of numerical continuous variables. Relying solely on the fully connected layers of MLP, it is even difficult to surpass the traditional tree model.
[0032] Based on the above findings, embodiments of the present invention provide a search result ranking method, which can be applied to, for example... Figure 1In this application environment, the user terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, which can communicate with the server via a network. The server can be a standalone server, a server cluster consisting of multiple servers, or a cloud service platform. The server can receive user search requests through the user terminal and determine the search object corresponding to the search request; then it obtains the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects; it converts the continuous variables in the first and second initial profile features into dispersed variables, obtaining the first target profile features and the second target profile features respectively; then, based on the first target profile features, behavioral features, second target profile features, and current search object features, it calculates the click probability of each search object using a trained search prediction model; and sorts them according to the click probability from high to low, selecting a specified number of search objects at the top of the sort as search results, finally displaying the search results to the user through the user terminal.
[0033] In this invention, after obtaining the first initial profile features of the current user, the behavioral features of the current user clicking on search objects, and the second initial profile features of all search objects, the continuous variables in both the first and second initial profile features are converted into dispersed variables. This improves the cross-performance of the features, thereby reducing the learning difficulty of the model and avoiding overfitting during the model learning process. Consequently, it effectively enhances the predictive ability of the search prediction model, making the prediction results more accurate and providing the user terminal with search objects more suitable for the current user, thus improving the user experience. The invention will now be described in detail through specific embodiments.
[0034] Before implementing the search result ranking method, this embodiment can first construct and train a search prediction model to obtain a more accurate click probability for each search object. When constructing the model, first consider the samples to be processed (which are also the subsequent training dataset), and then construct a network structure for a prediction model based on discrete data transformation. Then, train the network structure of the prediction model to obtain a search prediction model capable of calculating the click probability of search objects.
[0035] Specifically, the model training process may include the following steps: based on each user's records on the user terminal, all search objects exposed when the user makes a search request are taken as samples corresponding to that user; those that are clicked are positive samples, and those that are not clicked are negative samples; the first initial profile features of each user, the behavioral features of each user clicking search objects, and the second initial profile features of all search objects are obtained to obtain a training dataset; a network structure of a prediction model based on discrete data transformation is constructed; the network structure of the prediction model is trained according to the training dataset to obtain a search prediction model used to calculate the click probability of each search object.
[0036] This embodiment first obtains all search objects exposed when each user initiates a search request (multiple search objects exposed in multiple requests), and treats exposed and clicked search objects as positive samples and exposed but not clicked search objects as negative samples. When acquiring the training dataset, each user corresponds to a set of training data, which includes the user's profile feature data, the profile feature data of the corresponding positive and negative samples, and the user's behavioral features of clicking search objects (features of the most recently clicked search objects). Then, based on all the training data, multiple sets of training data (selected according to a preset ratio) can be selected in each period to train the network structure of the prediction model based on discrete data transformation, and the loss function value is calculated. After each calculation of the loss function value, the network structure of the prediction model based on discrete data transformation can be improved based on the calculated loss function value. This continues until the calculated loss function value converges after a certain training iteration.
[0037] When training the model, all the data from each training set, as well as the features of any search object (i.e., the current search object), are usually input into the network structure of the prediction model. The click-through rate of the current search object is calculated, and then the search results (search objects) are sorted according to the click-through rate.
[0038] After training the search prediction model, the click-through rate of each search result can be calculated using the search result ranking method provided in this embodiment. Please refer to [link / reference]. Figure 2 As shown, Figure 2 A flowchart illustrating the search result sorting method provided in this embodiment of the invention includes the following steps:
[0039] S10: Receive the search request sent by the user terminal and determine the search object corresponding to the search request.
[0040] The search result ranking method provided by this invention can be applied to search engines in various application scenarios. Search engines are typically implemented through a server-side component, which can receive search requests sent by user terminals in real time. For example, in the healthcare field, users often conduct online consultations through various applications, apps, or mini-programs. Before consulting, users can search for corresponding doctors based on their symptoms. The server can then use the search engine to predict the doctors searched by the user, thus showing the user more suitable doctors. Specifically, when a user enters their symptoms on their terminal, it can be understood as sending a search request, requesting a doctor (search target) corresponding to that symptom.
[0041] For example, users can access online medical consultations through the health and medical sub-program of the Ping An Pocket Bank app. Users can enter terms like "cold," "heatiness," or "high blood pressure," or they can enter hospital names, department names, or even doctor names to make a search request. After receiving the search request, the search engine needs to parse the query and recall relevant doctor information to identify multiple candidate doctors. Here, the recall process refers to using a pre-set recall algorithm to retrieve doctors from a pre-set doctor database based on the user's query, thus obtaining multiple candidate doctors.
[0042] S20: Obtain the user's first initial profile features, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects.
[0043] The user's initial profile features, or user profile features, may include, but are not limited to, basic user information (such as age, gender, location, etc.), consumption information (such as spending amount, consumption items, etc.), and preference information (such as physical condition, frequently searched terms, etc.). The search object's second initial profile features, or search object profile features, include, but are not limited to, price parameters, positive review rate, and rating. User behavior features include ID-related features of the search object clicked by the user in the most recent preset number of times (e.g., the last 10 times), such as the search object's ID and the directory (or organization) ID.
[0044] S30: Convert the continuous variables in the first initial portrait features and the second initial portrait features into dispersed variables to obtain the first target portrait features and the second target portrait features respectively.
[0045] S40: Based on the first target profile features, behavioral features, second target profile features, and current search object features, calculate the click probability of each search object using the trained search prediction model.
[0046] As shown above, the first initial profile features include both discrete variables (basic information and preference information) and continuous variables (consumption information, such as spending amount in the last N days). The second initial profile features also include both discrete variables (search object level) and continuous variables (search object price parameter and price parameter positive review rate). In this embodiment, before calculating the click-through rate of each search object, the continuous variables in the first and second initial profile features are first converted into corresponding discrete variables. This facilitates subsequent cross-processing of features, reducing the difficulty of model learning, avoiding overfitting during model learning, and effectively improving the predictive ability of the search prediction model. This makes the prediction results of the search prediction model more accurate, providing users with search objects more suitable for the current user, thus improving the user experience.
[0047] In this embodiment, the network structure of the prediction model may include three modules: the first module is used to process user profile features to obtain the first target profile features; the second module is used to process search object profile features to obtain the second target profile features; and the third module is used to process user behavior features and current search object features, and then calculate the click probability of each search object based on the processed first and second target profile features, as well as the processed user behavior features and current search object features.
[0048] Specifically, search prediction models can be, but are not limited to, Deep Interest Network (DIN) models. The DIN model is a CTR (Click-Through-Rate) prediction model proposed for the e-commerce field, primarily utilizing and mining historical user behavior data to improve CTR prediction metrics.
[0049] like Figure 3 As shown, this embodiment can use the same design for both the first and second modules of the DIN model, both including a discretization layer and an FM layer. The discretization layer is used to discretize continuous variables. The FM (Factorization Machines) layer enables automatic pairwise cross-validation of features; in this embodiment, it is used to perform feature cross-validation to obtain the user's feature vector.
[0050] Accordingly, step S30 may include the following processing: converting continuous variables in the first initial portrait features into first dispersed variables through a discretization layer, and converting continuous variables in the second initial portrait features into second dispersed variables; and performing cross-interaction on the first dispersed variables and the second dispersed variables through an FM layer to obtain the first target portrait features and the second target portrait features.
[0051] Unlike traditional fully connected layer models that directly input continuous variables, this embodiment first transforms continuous variables into discrete variables, then performs embedding encoding (an embedded word encoding method that uses low-dimensional vectors for encoding; this encoding is optimized through neural network training and can express the correlation between words), and then inputs it into the FM layer for feature cross-processing. This transformation of continuous variables into discrete variables facilitates feature cross-processing in the FM layer. Compared to directly inputting continuous variables into a fully connected layer, inputting the transformed discrete variables into the FM layer reduces the model's learning difficulty, lowers overfitting, and thus improves the model's predictive ability.
[0052] In some embodiments, when converting continuous variables in the first initial portrait features into first dispersed variables and continuous variables in the second initial portrait features into second dispersed variables using a discretization layer, the continuous variables in the first initial portrait features can first be binned using a Word of Entity (WOE) layer, and the binned variables can be embeddedly encoded to generate first dispersed variables. Then, the continuous variables in the second initial portrait features can be binned using a WOE layer, and the binned variables can be embeddedly encoded to generate second dispersed variables.
[0053] Here, WOE (Weight of Evidence) refers to the weight of evidence. Binning continuous variables using WOE is equivalent to transforming them into discrete variables. WOE binning effectively handles missing and outlier values, improving the generalization and versatility of the search prediction model, making it more stable. Furthermore, it provides categorical variables for the FM layer to facilitate feature interactions, thereby enhancing the feature interaction capabilities of subsequent FM layers and enabling better non-linear representation.
[0054] Furthermore, the first and second modules may also include a dense layer, also known as a fully connected layer. Each node of this dense layer is connected to a feature node of either the first or second target profile feature, thus forming a dense layer (fully connected layer). The dense layer has a classification function; that is, each feature node has a certain weight to determine which category the input feature belongs to. Ultimately, the weights of all features collectively determine the weight or probability of the input feature's category. In this embodiment, discrete variables from the first and second target profile features that do not require type conversion can be input into this dense layer. A fully connected layer is then applied to all features, generating feature vectors from these discrete variables. Then, the feature vectors output from the dense layer and the feature vectors output from the aforementioned FM layer are input into the third module.
[0055] In other embodiments, the third module of the search prediction model may include an attention layer and a dense layer. Accordingly, step S40 above may include the following processing: processing behavioral features and current search object features through the attention layer to reduce data dimensionality and extract effective feature data; and calculating the click probability of each search object through the dense layer based on the first target profile features, the second target profile features, and the effective feature data.
[0056] Attention layers typically serve two purposes: 1. Reducing the computational burden of processing high-dimensional input data by structurally selecting subsets of the input, thus lowering the data dimensionality. 2. "Removing false information from true information," allowing the task processing system to focus more on finding significant and useful information in the input data that is relevant to the current output, thereby improving the quality of the output. Attention-based models can help encoder-decoder-like frameworks better learn the relationships between multiple content modalities, thereby better representing this information and overcoming the limitations of being difficult to interpret and thus difficult to design. Furthermore, attention-based models do not require supervision signals, making them extremely effective for problems with very little prior knowledge. They are particularly suitable for reasoning about complex, hidden, and difficult-to-interpret mappings between multiple modalities of data.
[0057] This embodiment first uses an attention layer to process user behavior features and current search object features, reducing data dimensionality. From numerous user behavior features and current search object features, it extracts click-through rate-related features for the current search object. Then, the output data from the first module, the second module, and the attention layer are all input into the dense layer of this module to calculate the probability of the user clicking on the current search object, thus obtaining the click probability for each search object.
[0058] In other embodiments, the search prediction model includes a decoupled offline component and an online component. The offline component is used to convert continuous variables in the first and second initial profile features into distributed variables, respectively, to obtain the first target profile feature and the second target profile feature. The online component is used to calculate the click probability of each search object based on the first target profile feature, behavioral features, the second target profile feature, and the current search object feature.
[0059] The offline component may include the first and second modules described above, while the online component may include the third module described above. The first and second modules may also include pre-trained offline model files used to generate specified model files, such as PB model files. A PB model file is a protobuf protocol file that embeds model parameters into a graph file and merges some basic calculations while removing backpropagation-related calculations.
[0060] This embodiment saves the offline trained model file, defines the model's input and output, and generates the PB format file required by Tf-Serving (an online inference service using a C / S architecture, where clients can communicate with the model service via gRPC and RESTful API). Then, each piece of offline data is sent downstream via MQ (Message Queue), and the PB model is called to generate vectors for each user and doctor. These vectors are stored in Redis (Remote Dictionary Server) for remote online access. When a user initiates a real-time query (search) request, Redis is queried to retrieve the user's offline vector (first target profile feature) and user behavior feature data. Then, doctors recalled from upstream are retrieved from Redis with their ID information and the offline vectors of all doctors (second target profile features). By inputting these four data sources (user's offline vector, user behavior feature data, all doctors' offline vectors, and the current doctor's feature data) into the online part of the search prediction model, the click probability can be obtained. In this way, the search prediction model is modularly broken down into offline and online components, which is more conducive to model development and deployment, and greatly improves the model's processing speed and online prediction capabilities.
[0061] The following example illustrates the establishment and training process of the search prediction model, using doctors as the search target.
[0062] When the search target is a doctor, the doctor profile features include, but are not limited to, the doctor's consultation price, connection rate, positive review rate, and doctor level (e.g., attending physician, chief physician, specialist). User behavior features include the sequence features of the DoctorID (doctor ID) of the user's most recent preset number of clicks (e.g., the most recent 10 clicks), the department ID of the clicked doctor, and the hospital ID of the clicked doctor. Current doctor features include the current doctor's ID information, the ID information of the department, and the ID information of the hospital.
[0063] Accordingly, the first module of the aforementioned search prediction model processes user profile features to obtain the first target profile features. The second module processes doctor profile features to obtain the second target profile features. The third module processes user behavior features and current doctor features, and then calculates the click probability of each doctor based on the processed first and second target profile features, as well as the processed user behavior features and current doctor features.
[0064] The corresponding model training process may include the following steps:
[0065] First, for each user, obtain all doctors exposed when they initiate a search request (multiple doctors exposed through multiple requests). Doctors exposed and clicked are considered positive samples, while those exposed but not clicked are considered negative samples. When acquiring the training dataset, each user corresponds to a set of training data. Each set of training data includes the user's profile features, the profile features of the corresponding positive and negative samples, and the user's click behavior features (features of the most recently clicked search objects). Then, based on all the training data, multiple sets of training data (selected according to a preset ratio) can be selected in each cycle to train the network structure of the prediction model based on discrete data transformation, and the loss function value is calculated. After each loss function value calculation, the network structure of the prediction model based on discrete data transformation can be improved based on the calculated loss function value. This continues until the calculated loss function value converges after a certain training iteration.
[0066] When training the model, all the data from each training set, along with any doctor feature (i.e., the current doctor feature), are typically input into the network structure of the prediction model. The click-through rate of the doctor input is then calculated, and the doctors (search objects) are ranked based on this click-through rate.
[0067] S50: Sort by click probability from high to low, and select a specified number of the top-ranked search objects as search results.
[0068] This embodiment, after accurately calculating the probability of each search object being clicked by the user, sorts them from highest to lowest click probability. Then, it selects a specified number of the top-ranked search objects as search results, obtaining an accurate sequence of search results to recommend more suitable search objects to the user. For example, it can provide users seeking online medical consultations with more suitable doctors to better serve them and improve their online consultation experience.
[0069] As can be seen, in the above scheme, after obtaining the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects, the continuous variables in the first and second initial profile features are converted into dispersed variables. This can improve the cross-performance of the features, thereby reducing the difficulty of model learning, avoiding overfitting during the model learning process, and effectively improving the predictive ability of the search prediction model. This makes the prediction results of the search prediction model more accurate, and can provide the user terminal with search objects more suitable for the current user, thus improving the user experience.
[0070] It should be noted that the structure of the search prediction model and the specific click probability calculation process described above are only preferred embodiments of this example. This example is not limited to these. As long as the click probability of each search object can be calculated based on the first target profile features, behavioral features, second target profile features, and current search object features, the trained search prediction model can be used.
[0071] It is understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] In one embodiment, a search result sorting device is provided, which corresponds one-to-one with the search result sorting methods described in the above embodiments. For example... Figure 4 As shown, the search result sorting device includes a request receiving module 101, a data acquisition module 102, a variable conversion module 103, a click-through rate calculation module 104, and a result determination module 105. Detailed descriptions of each functional module are as follows:
[0073] The request receiving module 101 is used to receive the search request sent by the user terminal and determine the search object corresponding to the search request;
[0074] The data acquisition module 102 is used to acquire the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects;
[0075] The variable transformation module 103 is used to convert the continuous variables in the first initial portrait features and the second initial portrait features into dispersed variables, so as to obtain the first target portrait features and the second target portrait features respectively.
[0076] Click rate calculation module 104 is used to calculate the click probability of each search object based on the first target profile features, behavioral features, second target profile features and current search object features, and through a trained search prediction model.
[0077] The result determination module 105 is used to sort the search objects from high to low according to their click probability and select a specified number of the top-ranked search objects as search results.
[0078] In one embodiment, the search prediction model is a deep interest network model, including a discretization layer and an FM layer; the variable transformation module 103 is specifically used for:
[0079] The discretization layer converts continuous variables in the first initial portrait features into first dispersed variables, and converts continuous variables in the second initial portrait features into second dispersed variables.
[0080] The first target profile feature and the second target profile feature are obtained by cross-interacting the first dispersed variable and the second dispersed variable through the FM layer.
[0081] In one embodiment, the variable transformation module 103 is further configured to:
[0082] The continuous variables in the first initial portrait features are binned using a discretization layer using Word of Entity (WOE) and the binned variables are then embeddedly encoded to generate the first dispersed variables.
[0083] The continuous variables in the second initial portrait features are binned using a discretization layer using Word of Entity (WOE) and then embedded encoded to generate the second dispersed variables.
[0084] In one embodiment, the search prediction model further includes an attention layer and a dense layer; the click-through rate calculation module 104 is specifically used for:
[0085] By processing behavioral features and current search object features through an attention layer, the data dimensionality is reduced and effective feature data is extracted;
[0086] Based on the first target profile features, the second target profile features, and effective feature data, the click probability of each search object is calculated through a dense layer.
[0087] In one embodiment, the search target includes doctors; the current search target features include the current doctor's ID information, the ID information of the department to which it belongs, and the ID information of the hospital to which it belongs;
[0088] Data acquisition module 102 is specifically used for:
[0089] Obtain the current user's basic information, consumption information, and preference information;
[0090] Get information on each doctor's consultation price, connection rate, positive review rate, and doctor level;
[0091] Obtain the ID-related features of the doctors who have been clicked by the current user the most recently (a preset number of times).
[0092] In one embodiment, the search result ranking device further includes a model training module; the model training module is used for:
[0093] Based on each user's records on the user terminal, all search objects exposed when the user makes a search request are taken as samples corresponding to that user; those that are clicked are positive samples, and those that are not clicked are negative samples.
[0094] The training dataset is obtained by acquiring the first initial profile features of each user, the behavioral features of each user clicking on the search object, and the second initial profile features of all search objects.
[0095] Construct a network structure for a prediction model based on discrete data transformation;
[0096] Based on the training dataset, the network structure of the prediction model is trained to obtain a search prediction model used to calculate the click probability of each search object.
[0097] In one embodiment, the search prediction model includes a decoupled offline part and an online part. The offline part is used to convert continuous variables in the first initial profile feature and the second initial profile feature into distributed variables to obtain the first target profile feature and the second target profile feature, respectively. The online part is used to calculate the click probability of each search object based on the first target profile feature, behavioral features, second target profile feature and current search object features.
[0098] For specific limitations regarding the search result ranking device, please refer to the limitations on the search result ranking method above, which will not be repeated here. Each module in the aforementioned search result ranking device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0099] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements a search result ranking method on the server side, providing server-side functions or steps.
[0100] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When executed by the processor, the computer program implements client-side functions or steps of a search result ranking method.
[0101] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0102] Receive search requests sent by user terminals and determine the search object corresponding to the search request;
[0103] Obtain the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects;
[0104] The continuous variables in the first initial portrait features and the second initial portrait features are all converted into dispersed variables to obtain the first target portrait features and the second target portrait features, respectively.
[0105] Based on the first target profile features, behavioral features, second target profile features, and current search object features, the click probability of each search object is calculated using a trained search prediction model.
[0106] Sort the results by click probability from highest to lowest, and select a specified number of the top-ranked search objects as the search results.
[0107] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0108] Receive search requests sent by user terminals and determine the search object corresponding to the search request;
[0109] Obtain the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all search objects;
[0110] The continuous variables in the first initial portrait features and the second initial portrait features are all converted into dispersed variables to obtain the first target portrait features and the second target portrait features, respectively.
[0111] Based on the first target profile features, behavioral features, second target profile features, and current search object features, the click probability of each search object is calculated using a trained search prediction model.
[0112] Sort the results by click probability from highest to lowest, and select a specified number of the top-ranked search objects as the search results.
[0113] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0114] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0116] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for ranking search results, characterized in that, include: Receive a search request sent by a user terminal and determine the search object corresponding to the search request; The system acquires the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all the search objects; the behavioral features include the ID-related features of the search objects that the user has clicked the most recently (a preset number of times). The continuous variables in the first initial portrait features and the second initial portrait features are all converted into dispersed variables to obtain the first target portrait features and the second target portrait features, respectively. Based on the first target profile features, the behavioral features, the second target profile features, and the current search object features, the click probability of each search object is calculated using a trained search prediction model; The search results are sorted from highest to lowest according to the click probability, and a specified number of the top-ranked search objects are selected as the search results. The search prediction model comprises a decoupled offline component and an online component. The offline component is used to convert continuous variables in the first initial profile features and the second initial profile features into distributed variables, respectively, to obtain the first target profile features and the second target profile features. Based on the first target profile features, the behavioral features, the second target profile features, and the current search object features, the click probability of each search object is calculated using the trained search prediction model. The online component is used to calculate the click probability of each search object based on the first target profile features, the behavioral features, the second target profile features, and the current search object features. The search prediction model further includes an attention layer and a dense layer; the step of calculating the click probability of each search object based on the first target profile features, the behavioral features, the second target profile features, and the current search object features using the trained search prediction model includes: processing the behavioral features and the current search object features through the attention layer to reduce data dimensionality and extract effective feature data; and calculating the click probability of each search object through the dense layer based on the first target profile features, the second target profile features, and the effective feature data.
2. The search result ranking method as described in claim 1, characterized in that, The search prediction model is a deep interest network model, including a discretization layer and an FM layer; The continuous variables in both the first and second initial portrait features are converted into dispersed variables to obtain the first target portrait feature and the second target portrait feature, respectively, including: The discretization layer converts continuous variables in the first initial portrait features into first dispersed variables and continuous variables in the second initial portrait features into second dispersed variables. The first target profile feature and the second target profile feature are obtained by cross-interacting the first dispersed variable and the second dispersed variable through the FM layer.
3. The search result sorting method as described in claim 2, characterized in that, The discretization layer converts continuous variables in the first initial portrait features into first dispersed variables and continuous variables in the second initial portrait features into second dispersed variables, including: The continuous variables in the first initial portrait features are binned using the discretization layer (WOE), and the binned variables are embeddedly encoded to generate the first dispersed variables. The continuous variables in the second initial portrait features are binned using the discretization layer (WOE), and the binned variables are then embedded and encoded to generate the second dispersed variables.
4. The search result sorting method as described in claim 1, characterized in that, The search targets include doctors; the characteristics of the current search target include the current doctor's ID information, the ID information of the department to which it belongs, and the ID information of the hospital to which it belongs; The process of obtaining the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all the search objects includes: Obtain the current user's basic information, consumption information, and preference information; Get information on each doctor's consultation price, connection rate, positive review rate, and doctor level; Obtain the ID-related features of the doctors who have been clicked by the current user the most recently (a preset number of times).
5. The search result sorting method as described in claim 1, characterized in that, Before calculating the click probability of each search object using the trained search prediction model, the method further includes: Based on each user's records on the user terminal, all search objects exposed when the user makes a search request are taken as the sample corresponding to that user; among them, those that are clicked are positive samples, and those that are not clicked are negative samples; The training dataset is obtained by acquiring the first initial profile features of each user, the behavioral features of each user clicking on the search object, and the second initial profile features of all the search objects. Construct a network structure for a prediction model based on discrete data transformation; Based on the training dataset, the network structure of the prediction model is trained to obtain a search prediction model for calculating the click probability of each search object.
6. A search result sorting device, characterized in that, include: The request receiving module is used to receive search requests sent by user terminals and determine the search object corresponding to the search request; The data acquisition module is used to acquire the first initial profile features of the current user, the behavioral features of the current user clicking on the search object, and the second initial profile features of all the search objects; the behavioral features include the ID-related features of the search objects that the user has clicked the most recently (a preset number of times). The variable transformation module is used to convert the continuous variables in the first initial portrait features and the second initial portrait features into dispersed variables, so as to obtain the first target portrait features and the second target portrait features respectively. The click-through rate calculation module is used to calculate the click probability of each search object based on the first target profile features, the behavioral features, the second target profile features, and the current search object features, using a trained search prediction model. The result determination module is used to sort the search objects from high to low according to the click probability and select a specified number of the top-ranked search objects as search results. The search prediction model comprises a decoupled offline component and an online component. The offline component is used to convert continuous variables in the first initial profile features and the second initial profile features into distributed variables, respectively, to obtain the first target profile features and the second target profile features. Based on the first target profile features, the behavioral features, the second target profile features, and the current search object features, the click probability of each search object is calculated using the trained search prediction model. The online component is used to calculate the click probability of each search object based on the first target profile features, the behavioral features, the second target profile features, and the current search object features. The search prediction model further includes an attention layer and a dense layer; the step of calculating the click probability of each search object based on the first target profile features, the behavioral features, the second target profile features, and the current search object features using the trained search prediction model includes: processing the behavioral features and the current search object features through the attention layer to reduce data dimensionality and extract effective feature data; and calculating the click probability of each search object through the dense layer based on the first target profile features, the second target profile features, and the effective feature data.
7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the search result ranking method as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the search result ranking method as described in any one of claims 1 to 5.