Click rate prediction method and device, model training method and device and electronic equipment

By using a three-classification network model and feature fusion technology, the accuracy problems of existing click-through rate prediction models in handling sample imbalance and nonlinear relationships are solved, achieving more efficient click-through rate prediction.

CN121921082APending Publication Date: 2026-04-24MICRO DREAM TECHTRONIC NETWORK TECH CHINACO
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MICRO DREAM TECHTRONIC NETWORK TECH CHINACO
Filing Date
2025-12-12
Publication Date
2026-04-24

AI Technical Summary

Technical Problem

Existing click-through rate prediction models have poor accuracy when training samples are imbalanced and when dealing with nonlinear relationships. Furthermore, they rely on manual feature engineering, which is inefficient, resulting in low efficiency and poor accuracy in click probability prediction.

Method used

A three-classification network model is adopted, which generates embedding vectors and interaction vectors of user information and material features through sparse operation perceptual embedding layer and multi-layer perceptron layer. The feature fusion is combined with attention mechanism and residual network to predict the click probability of material category.

Benefits of technology

It improves the accuracy of click-through rate prediction, and can more finely distinguish the likelihood of materials being clicked by recommended users, avoiding the crude processing of simple classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121921082A_ABST
    Figure CN121921082A_ABST
Patent Text Reader

Abstract

The invention provides a click rate prediction method and device, a model training method and device and electronic equipment. The click rate prediction method comprises the steps of obtaining user information and a target material of a recommendation object; based on the user information and the target material, predicting a material category corresponding to the target material through a target model to obtain a click probability prediction result of the target material; the click probability prediction result indicates that the target material is predicted as one of a first type of material, a second type of material and a third type of material, the click probabilities corresponding to the first type of material, the second type of material and the third type of material are different, and the click probabilities represent that the target material is recommended to the recommendation object under the condition that the target material is recommended to the recommendation object. The probability of clicking the target material by the recommendation object is obtained. The click rate prediction method can improve the accuracy of click probability prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and more particularly to a click-through rate prediction method, apparatus, and electronic device. Background Technology

[0002] Click-through rate (CTR) prediction uses model algorithms to estimate the probability of a user clicking on specific content (such as recommended products, advertisements, and news). Its core is to quantify the matching degree between user interests and content features, and it is a key technology for recommendation systems, advertising, search engines, and other businesses. Summary of the Invention

[0003] This application provides a click-through rate prediction method, a model training method, an apparatus, and an electronic device that can improve the accuracy of click probability prediction.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a click-through rate (CTR) prediction method, comprising: obtaining user information of a recommended object and a target material; the target material is a material intended to be recommended to the recommended object; based on the user information and the target material, predicting the material category corresponding to the target material through a target model to obtain a click probability prediction result for the target material; the click probability prediction result indicates that the target material is predicted to be one of a first type of material, a second type of material, and a third type of material, wherein the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different; the click probability represents the probability that the recommended object will click on the target material when it is recommended to the recommended object.

[0006] In some embodiments, the first type of material is equivalent to the first type of sample that the recommended object has clicked; the second type of material is equivalent to the second type of sample whose similarity to the first type of sample is less than a first threshold and which the recommended object has not clicked; the third type of material is equivalent to the third type of sample whose similarity to the first type of sample is greater than a second threshold and which the recommended object has not clicked; the click probability of the first type of material, the third type of material, and the second type of material decreases sequentially; and the second threshold is greater than the first threshold.

[0007] In some embodiments, based on user information and target material, a target model is used to predict the material category corresponding to the target material to obtain a click probability prediction result for the target material. This includes: generating multiple attribute features and semantic feature vectors of the target material based on user information and target material; each attribute feature is used to characterize an attribute of the recommended object or target material; inputting the multiple attribute features and semantic feature vectors into the target model; obtaining the embedding vector of each attribute feature and the interaction vector between every two attribute features through the target model; and predicting the material category corresponding to the target material based on the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector to obtain a click probability prediction result for the target material; the target interaction vector includes a portion of the interaction vectors from all interaction vectors.

[0008] In some embodiments, based on semantic feature vectors, embedding vectors of each attribute feature, and target interaction vectors, the material category corresponding to the target material is predicted to obtain the click probability prediction result of the target material, including: selecting a preset number of interaction vectors as target interaction vectors from all interaction vectors based on the importance of each interaction vector; determining a fused feature vector of semantic feature vectors, embedding vectors of each attribute feature, and target interaction vectors; determining the predicted probabilities of the target material as a first type of material, a second type of material, and a third type of material based on the fused feature vector; and taking the material category with the highest predicted probability as the click probability prediction result of the target material.

[0009] In some embodiments, selecting a preset number of interaction vectors as target interaction vectors from all interaction vectors based on the importance of each interaction vector includes: determining a threshold value for each interaction vector based on a threshold function corresponding to each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector; and selecting a preset number of interaction vectors as target interaction vectors according to the threshold value.

[0010] This application provides a model training method, including: acquiring user information and corresponding sample data of the training object; the sample data includes multiple training samples, which are divided into a first type of sample, a second type of sample, and a third type of sample according to sample category, wherein the click probabilities of the first type of sample, the second type of sample, and the third type of sample are different; generating a training dataset based on the user information and sample data of the training object; training a target model based on the training dataset to obtain a trained target model; and using the trained target model for click probability prediction.

[0011] In some embodiments, the first type of sample indicates samples that the training object has clicked; the second type of sample indicates samples that have a similarity to the first type of sample less than a first threshold and have not been clicked by the training object; the third type of sample indicates samples that have a similarity to the first type of sample greater than a second threshold and have not been clicked by the training object; the click probabilities corresponding to the first type of sample, the third type of sample, and the second type of sample decrease sequentially; the second threshold is greater than the first threshold.

[0012] In some embodiments, the training dataset includes multiple training data sets, each training data set including a semantic feature vector of a training sample, a sample category label, and multiple attribute features, each attribute feature representing an attribute of a training object or training sample; training the target model based on the training dataset to obtain the trained target model includes: obtaining target training data from the training dataset; the target training data being any training data set in the training dataset; inputting the target training data into the target model, and through the target model, obtaining the embedding vector of each attribute feature and the interaction vector between every two attribute features in the target training data, and based on the embedding vector of each attribute feature and the target interaction vector... The semantic feature vectors included in the training data are used to predict the sample category corresponding to the training sample, resulting in a click probability prediction result for the training sample. This click probability prediction result indicates that the training sample is predicted to be one of the first, second, or third class samples. The target interaction vector includes a portion of the interaction vectors from all interaction vectors. Based on a preset loss function, the click probability prediction result, and the sample category labels included in the target training data, a loss value is determined. If the loss value does not meet the target conditions, the model parameters of the target model are optimized based on the loss value, and the step of obtaining the target training data from the training dataset is returned. If the loss value meets the target conditions, the target model training is considered complete.

[0013] In some embodiments, the target model includes a sparse operation-aware embedding layer, a multilayer perceptron layer, and an output layer. The sparse operation-aware embedding layer is used to acquire the embedding vector of each attribute feature and the interaction vector between every two attribute features in the input target training data; select a predetermined number of interaction vectors as target interaction vectors based on the importance of each interaction vector; and output the embedding vector of each attribute feature and the target interaction vector. The multilayer perceptron layer is used to determine a fused feature vector of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector based on the input semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector; and output the fused feature vector. The output layer is used to determine the predicted probabilities of the target training data for first-class, second-class, and third-class samples based on the input fused feature vector, and output the sample class with the highest predicted probability as the click probability prediction result of the training sample. In some embodiments, the sparse operation-aware embedding layer is used to: determine a threshold value for each interaction vector based on a threshold function corresponding to each interaction vector; the threshold value represents the importance of the corresponding interaction vector; and select a predetermined number of interaction vectors as target interaction vectors based on the threshold value.

[0014] In some embodiments, generating a training dataset based on user information and sample data of the training object includes: acquiring each training data based on each training sample in the user information and sample data; the training sample indicates one of a first type of sample, a second type of sample, and a third type of sample; and determining the set of multiple training data as the training dataset.

[0015] This application provides a click-through rate prediction device, comprising: a first acquisition module for acquiring user information of a recommended object and a target material; the target material is a material intended to be recommended to the recommended object; and a prediction module for predicting the material category corresponding to the target material based on the user information and the target material using a target model, thereby obtaining a click probability prediction result for the target material; the click probability prediction result indicates that the target material is predicted to be one of a first type of material, a second type of material, and a third type of material, wherein the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different; the click probability represents the probability that the recommended object will click on the target material when it is recommended to the recommended object.

[0016] In some embodiments, the first type of material is equivalent to the first type of sample that the recommended object has clicked; the second type of material is equivalent to the second type of sample whose similarity to the first type of sample is less than a first threshold and which the recommended object has not clicked; the third type of material is equivalent to the third type of sample whose similarity to the first type of sample is greater than a second threshold and which the recommended object has not clicked; the click probability of the first type of material, the third type of material, and the second type of material decreases in that order; the second threshold is greater than the first threshold.

[0017] In some embodiments, the prediction module is used to generate multiple attribute features and semantic feature vectors of the target material based on user information and target material; each attribute feature is used to characterize an attribute of the recommended object or target material; the multiple attribute features and semantic feature vectors are input into the target model, and the target model obtains the embedding vector of each attribute feature and the interaction vector of every two attribute features; based on the semantic feature vector, the embedding vector of each attribute feature and the target interaction vector, the material category corresponding to the target material is predicted to obtain the click probability prediction result of the target material; the target interaction vector includes a portion of the interaction vectors in all interaction vectors.

[0018] In some embodiments, the prediction module is configured to select a preset number of interaction vectors as target interaction vectors from all interaction vectors based on the importance of each interaction vector; determine the semantic feature vector, the embedding vector of each attribute feature, and the fused feature vector of the target interaction vector; determine the predicted probabilities of the target material as a first type of material, a second type of material, and a third type of material based on the fused feature vector; and take the material category with the highest predicted probability as the click probability prediction result of the target material.

[0019] In some embodiments, the prediction module is used to determine a threshold value for each interaction vector based on a threshold function corresponding to each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector; and a preset number of interaction vectors are selected as target interaction vectors according to the threshold value.

[0020] This application provides a model training apparatus, comprising: a second acquisition module for acquiring user information of the training object and corresponding sample data; the sample data includes multiple training samples, which are divided into a first type of sample, a second type of sample, and a third type of sample according to sample category; wherein the click probabilities of the first type of sample, the second type of sample, and the third type of sample are different; a generation module for generating a training dataset based on the user information of the training object and the sample data; and a training module for training a target model based on the training dataset to obtain a trained target model; the trained target model is used for click probability prediction.

[0021] In some embodiments, the first type of sample indicates samples that the training object has clicked; the second type of sample indicates samples that have a similarity to the first type of sample less than a first threshold and have not been clicked by the training object; the third type of sample indicates samples that have a similarity to the first type of sample greater than a second threshold and have not been clicked by the training object; the click probabilities corresponding to the first type of sample, the third type of sample, and the second type of sample decrease sequentially; the second threshold is greater than the first threshold.

[0022] This application provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the click-through rate prediction method or the model training method provided in this application.

[0023] This application provides a computer-readable storage medium storing a computer program or executable instructions thereon, which, when executed by a processor, implements the click-through rate prediction method or the model training method provided in this application.

[0024] This application provides a computer program product, including a computer program or instructions. When the computer program or instructions are executed by a processor, they implement the click-through rate prediction method or the model training method provided in this application.

[0025] The embodiments of this application have the following beneficial effects:

[0026] In the click-through rate prediction method provided in this application embodiment, by obtaining the user information of the recommended object and the target material, the target model is used to predict the material category corresponding to the target material to obtain the click probability prediction result of the target material. The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material, wherein the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different. The click probability represents the probability that the recommended object will click on the target material when it is recommended to the recommended object. Since the click probabilities corresponding to the three material categories are different, by predicting the material category corresponding to the target material, the probability difference of the target material being clicked by the recommended object can be distinguished more finely, avoiding the coarse processing of material click features by simple classification, thereby improving the accuracy of click probability prediction. Attached Figure Description

[0027] Figure 1 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;

[0028] Figure 2 This is a flowchart illustrating the click-through rate prediction method provided in the embodiments of this application;

[0029] Figure 3This is a schematic flowchart of a model training method provided in an embodiment of this application;

[0030] Figure 4a This is a schematic diagram of the structure of a target model provided in an embodiment of this application;

[0031] Figure 4b This is a flowchart illustrating another model training method provided in an embodiment of this application;

[0032] Figure 5 This is a schematic diagram of the structure of a click-through rate prediction model provided in an embodiment of this application;

[0033] Figure 6 An example diagram of an output matrix provided in an embodiment of this application;

[0034] Figure 7 This is a schematic diagram of another target model provided in an embodiment of this application. Detailed Implementation

[0035] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0036] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0037] If the application documents contain similar descriptions such as "first" or "second", the following explanation shall be added: In the following description, the terms "first", "second", and "third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first", "second", and "third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0039] Click-through rate (CTR) prediction uses model algorithms to estimate the probability of a user clicking on specific content (such as recommended products, advertisements, and news). Its core is to quantify the matching degree between user interests and content features, and it is a key technology for recommendation systems, advertising, search engines, and other businesses.

[0040] In some embodiments, click probability is predicted using a Logistic Regression (LR) model. This model builds upon a linear model by weighting features; specifically, it learns feature weights and inputs the linearly weighted result of multiple features into a sigmoid function to determine the click probability. Essentially, this logistic regression model is a binary classification network. During the training of such a network, the number of positive samples (samples clicked by the user) is far less than the number of negative samples (samples not clicked by the user), resulting in an imbalanced training sample and consequently, poor accuracy in predicting click probability.

[0041] Furthermore, this logistic regression model is a linear model, capable of capturing only linear relationships between features and unable to directly handle complex nonlinear relationships. To address complex nonlinear relationships, the model requires extensive and time-consuming manual feature engineering to indirectly capture these relationships. This reliance on manual intervention not only leads to inefficient feature engineering but also risks overlooking key nonlinear features due to limitations in human experience, further resulting in low efficiency and poor accuracy in click probability prediction.

[0042] Therefore, embodiments of this application provide a click-through rate prediction method, a model training method, an apparatus, a device, and a computer-readable storage medium, which can improve the accuracy of click probability prediction.

[0043] The following describes exemplary applications of the electronic devices provided in the embodiments of this application. These electronic devices can be implemented as servers, or as various types of user terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices). Exemplary applications of the electronic devices as servers will be described below.

[0044] See Figure 1 , Figure 1 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application. Figure 1The illustrated electronic device 100 includes at least one processor 110, a memory 150, at least one network interface 120, and a user interface 130. The various components of the electronic device 100 are coupled together via a bus system 140. It is understood that the bus system 140 is used to implement communication between these components. In addition to a data bus, the bus system 140 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 1 The general labeled all buses as Bus System 140.

[0045] The processor 110 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0046] User interface 130 includes one or more output devices 131 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 130 also includes one or more input devices 132, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.

[0047] The memory 150 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 150 may optionally include one or more storage devices physically located away from the processor 110.

[0048] The memory 150 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 150 described in this application embodiment is intended to include any suitable type of memory.

[0049] In some embodiments, memory 150 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0050] Operating system 151 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0051] The network communication module 152 is used to reach other computing devices via one or more (wired or wireless) network interfaces 120, exemplary network interfaces 120 including: Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.

[0052] Presentation module 153 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 131 associated with user interface 130 (e.g., a display screen, a speaker, etc.).

[0053] The input processing module 154 is used to detect and translate one or more user inputs or interactions from one or more input devices 132.

[0054] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 1 A click-through rate prediction device 155 stored in memory 150 is shown. This device can be software in the form of programs or plugins, and includes the following software modules: a first acquisition module 1551 and a prediction module 1552. These modules are logically linked and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0055] In other embodiments, the apparatus provided in this application can be implemented in hardware. For example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the model training method or click-through rate prediction method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0056] The click-through rate prediction method provided in this application will be described in conjunction with exemplary applications and implementations of the server provided in the embodiments of this application.

[0057] See Figure 2 , Figure 2This is a flowchart illustrating a click-through rate prediction method provided in an embodiment of this application, which will be combined with... Figure 2 The steps shown are explained below. The entity executing this click-through rate prediction method can be the server or terminal shown above.

[0058] In step 21, the user information and target materials of the recommended object are obtained.

[0059] In some embodiments, the recommending object is the user.

[0060] The user information of the recommended user includes at least one of the following: the user identifier (UID), location, gender, and age group. The user identifier is a string, number, or code used to uniquely identify the recommended user; the location is, for example, one of the country, province, or city where the recommended user is located; the gender is, for example, one of male, female, or unknown, where unknown may be due to the user not setting it; the age group is, for example, one of 0-10 years old, 10-20 years old, 20-30 years old, 30-40 years old, or 40 years and older.

[0061] In some embodiments, the target material is the material intended to be recommended to the target audience. The target material may be, for example, one of the following: audio, video, text, or image.

[0062] In step 22, based on user information and target material, the target model is used to predict the material category corresponding to the target material to obtain the click probability prediction result of the target material. The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material, and the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different.

[0063] In some embodiments, the material categories include Class I, Class II, and Class III. That is, the materials include Class I materials, Class II materials, and Class III materials.

[0064] In some embodiments, the target model is a three-class network model used for click probability prediction, which can predict that the target material is one of a first type of material, a second type of material, and a third type of material, with different click probabilities for the first type of material, the second type of material, and the third type of material.

[0065] In some embodiments, the click probability represents the probability that a target material is clicked when it is recommended to the target material.

[0066] In the click-through rate prediction method provided in this application embodiment, by obtaining the user information of the recommended object and the target material, the target model is used to predict the material category corresponding to the target material to obtain the click probability prediction result of the target material. The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material, wherein the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different. The click probability represents the probability that the recommended object will click on the target material when it is recommended to the recommended object. Since the click probabilities corresponding to the three material categories are different, by predicting the material category corresponding to the target material, the probability difference of the target material being clicked by the recommended object can be distinguished more finely, avoiding the coarse processing of material click features by simple classification, thereby improving the accuracy of click probability prediction.

[0067] In some embodiments, the first type of material is equivalent to the first type of sample clicked by the recommended object, meaning the click probability of the first type of material is equivalent to the click probability of the first type of sample; the second type of material is equivalent to the second type of sample whose similarity to the first type of sample is less than a first threshold and which the recommended object has not clicked, meaning the click probability of the second type of material is equivalent to the click probability of the second type of sample; the third type of material is equivalent to the third type of sample whose similarity to the first type of sample is greater than a second threshold and which the recommended object has not clicked, meaning the click probability of the third type of material is equivalent to the click probability of the third type of sample. The click probabilities of the first, third, and second types of materials decrease sequentially; the second threshold is greater than the first threshold. It is understood that "sample" refers to the material used when training the target model.

[0068] In some examples, similarity is represented numerically, ranging from 0 (completely dissimilar) to 1 (completely similar). When similarity is represented by values ​​between 0 and 1, the first threshold can be set to any value less than 0.5, such as 0.1 or 0.2, depending on the application; the second threshold can be set to any value greater than 0.5, such as 0.8 or 0.9, depending on the application.

[0069] Understandably, since the first type of samples are those clicked by the recommended object, samples more similar to the first type of samples are more likely to be clicked by the recommended object, and vice versa. Therefore, the click tendency indicated by the third type of samples is more inclined to click, while the click tendency indicated by the second type of samples is more inclined not to click. Furthermore, the click probability corresponding to the third type of samples can be considered lower than the click probability corresponding to the first type of samples, but higher than the click probability corresponding to the second type of samples. If the first type of samples indicates a positive sample (click probability of 100%), and the second type of samples indicates a negative sample (click probability of 0%), the third type of samples can be considered a weak positive sample (click probability greater than 0, less than 100%, and closer to 100%). Associating the first, second, and third types of materials with the corresponding first, second, and third types of samples, respectively, and predicting the target material as one of these three types using the target model, allows for a more nuanced differentiation of the probability of the target material being clicked by the recommended object, avoiding the coarse processing of the target material's click characteristics by simple classification.

[0070] In this embodiment, by obtaining user information of the recommended object and the target material, the target model is used to predict the material category corresponding to the target material to obtain the click probability prediction result of the target material. The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material. The first type of material is equivalent to the first type of sample that the recommended object has clicked; the second type of material is equivalent to the second type of sample whose similarity to the first type of sample is less than a first threshold and which the recommended object has not clicked; the third type of material is equivalent to the third type of sample whose similarity to the first type of sample is greater than a second threshold and which the recommended object has not clicked. The click probabilities corresponding to the first type of material, the third type of material, and the second type of material decrease in sequence. In this way, the differences in the click probability of the target material can be distinguished more finely, avoiding the coarse processing of the material click features by simple classification, thereby improving the accuracy of the click probability prediction.

[0071] In some embodiments, in a scenario where content is to be recommended to a target user, the electronic device obtains user information about the target user and multiple target materials. For each target material, a target model is used to predict the corresponding material category, resulting in a predicted click probability for that target material. Based on the predicted click probability for each target material, a recommendation strategy for the multiple target materials is determined. Based on this recommendation strategy, content is recommended to the target user.

[0072] In some examples, the recommendation strategy for the above multiple target materials is as follows: priority is given to recommending target materials whose click probability prediction results indicate that they are in the first category; after recommending the target materials whose click probability prediction results indicate that they are in the first category, target materials whose click probability prediction results indicate that they are in the third category are recommended; the target materials whose click probability prediction results indicate that they are in the second category can be recommended after the recommendation of the target materials whose click probability prediction results indicate that they are in the third category is completed, or they can be not recommended at all.

[0073] In some embodiments, based on user information and target material, the target model is used to predict the material category corresponding to the target material to obtain the click probability prediction result corresponding to the target material (step 22 above), including: steps 221 to 222.

[0074] In step 221, based on user information and target material, multiple attribute features and semantic feature vectors of the target material are generated.

[0075] In some embodiments, the attribute features are discrete features. Each attribute feature is used to characterize an attribute of the recommended object or target material.

[0076] In some embodiments, based on user information and target material, multiple attribute features and semantic feature vectors of the target material are generated, including: extracting the user identifier, location, gender and age group of the recommended object from the user information, and extracting the media type identifier and main content category from the target material.

[0077] The media type identifier is used to indicate the media type of the material content. The media type identifier is, for example, one of the following: audio identifier, video identifier, text identifier, image identifier, etc. The main content category is used to indicate the theme or field of the material. The main content category is, for example, one of the following: entertainment, history, animation, traditional Chinese style, lyrical, etc.

[0078] Understandably, these multiple attribute features can be added or removed based on actual applications. For example, features such as the device type and network type of the recommended object can be added. The device type can be, for example, one of mobile phones, tablets, or computers, and the network type can be, for example, one of Wi-Fi, 5G, or 4G. Features such as the creator type and content popularity of the target material can also be added. The creator type can be, for example, one of official accounts, personal bloggers, or institutional accounts, and the content popularity can be determined by the number of views, comments, and likes.

[0079] In some embodiments, the semantic feature vector of the target material is a continuous feature. This semantic feature vector of the target material is used to characterize the semantic information contained in the target material, quantifying the position and attributes of the material in the semantic space through continuous numerical form.

[0080] In step 222, multiple attribute features and semantic feature vectors are input into the target model. Through the target model, the embedding vector of each attribute feature and the interaction vector of every two attribute features are obtained. Based on the semantic feature vector, the embedding vector of each attribute feature and the target interaction vector, the material category corresponding to the target material is predicted to obtain the click probability prediction result of the target material. The target interaction vector includes a portion of the interaction vectors in the total interaction vectors.

[0081] In some embodiments, multiple attribute features and semantic feature vectors are input into a target model, and the embedding vector of each attribute feature and the interaction vector of every two attribute features are obtained through the target model. This includes: inputting multiple attribute features and semantic feature vectors into the target model, preprocessing the multiple attribute features through the target model to obtain tensors corresponding to the multiple attribute features, and obtaining the embedding vector of each attribute feature and the interaction vector of every two attribute features from the tensors corresponding to the multiple attribute features.

[0082] In some embodiments, preprocessing includes label encoding. The tensor obtained after label encoding includes indices of multiple attribute features, the range of values ​​for each attribute feature index being determined based on the dimension (total number of categories) of that attribute feature.

[0083] In some examples, multiple attributes are defined as follows: user identifier, location, gender, age group, media type identifier, and main content category of the recommended object. For example, the total number of user identifier categories is 900,000, with each user identifier having a fixed order; the total number of location categories is 34, with each location having a fixed order; the total number of gender categories is 3 (male, female, and unknown), with each gender category having a fixed order; the total number of age group categories is 5, with each age group having a fixed order; the total number of media type identifier categories is 20,000, with each media type identifier having a fixed order; and the total number of main content categories is 50, with each main content category having a fixed order.

[0084] In some examples, the tensor obtained after tag encoding is, for example, tensor([300, 20, 2, 1, 39, 5]), with a size of [1, 6]. Here, 300, 20, 2, 1, 39, and 5 are all indices of attribute features. The indexes of each attribute feature are explained as follows: 300 indicates that the user identifier of the recommended object is the 300th user identifier in the system (counting from 1; if counting from 0, it would be the 301st); 20 indicates that the location of the recommended object is the 20th region in the system; 2 indicates that the age group of the recommended object is the second age group (e.g., 10-20 years old); 1 indicates that the gender of the recommended object is the first gender (e.g., female); 39 indicates that the media type identifier of the material is the 39th media type identifier; and 5 indicates that the main content category of the material is the 6th main content category.

[0085] In this embodiment, by extracting multiple attribute features and semantic feature vectors from user information and target materials, using the target model to generate embedding vectors of each attribute feature and interaction vectors between attributes, and performing click probability prediction based on semantic features, attribute embeddings, and some key interaction vectors (target interaction vectors), the system can comprehensively capture the attribute information, semantic connotations, and relationships between attributes of the materials. At the same time, by filtering target interaction vectors to focus on key information, redundant interaction features are avoided from interfering with the prediction, thereby more accurately distinguishing the differences in click probability among the first, second, and third types of materials and effectively improving the accuracy of click probability prediction.

[0086] In some embodiments, attribute features are represented by their corresponding indices. The embedding vector of each attribute feature and the interaction vector between every two attribute features are obtained using the target model, including steps one and two.

[0087] In step one, based on the embedding sub-layer corresponding to each attribute feature in the target model, the index corresponding to each attribute feature is converted into an embedding vector.

[0088] In some embodiments, the embedding sublayer includes a mapping between indexes of attribute features and embedding vectors.

[0089] In some examples, the size of each embedding vector can be preset, for example, to 16.

[0090] In step two, the interaction vector between each pair of attribute features is determined based on the inner product of the embedding vectors of each pair of attribute features.

[0091] In some embodiments, interaction vectors are used to characterize the degree of association between attribute features.

[0092] In some embodiments, the inner product refers to the dot product operation between two embedding vectors. For example, the embedding vector for attribute feature 1 is [a1, a2, ..., a...]. 16 The embedding vector for attribute feature 2 is [b1, b2, ..., b...]. 16 If the inner product of the two is: a1×b1+a2×b2+...+a 16 ×b 16 .

[0093] In some embodiments, based on the semantic feature vector, the embedding vector of each attribute feature and the target interaction vector, the material category corresponding to the target material is predicted to obtain the click probability prediction result of the target material (step 222 above), including: steps 2221 to 2224.

[0094] In step 2221, based on the importance of each interaction vector, a preset number of interaction vectors are selected from all interaction vectors as target interaction vectors.

[0095] In some embodiments, the importance of an interaction vector is used to characterize the weight of the interaction relationship between two corresponding attribute features on the predicted click probability of the target material. In other words, it represents the contribution of the association information between the attribute features reflected in the interaction vector to determining whether the target material belongs to the first, second, or third category of materials. A higher importance level indicates a stronger correlation between the attribute interaction information it carries and the click behavior of the recommended object.

[0096] In some embodiments, the preset number can be set to any value less than or equal to the total number of interaction vectors, depending on the actual application. For example, if the number of interaction vectors is 15, the preset number can be set to 3 or 4.

[0097] In step 2222, the semantic feature vector, the embedding vector of each attribute feature, and the fused feature vector of the target interaction vector are determined.

[0098] In some embodiments, the fused feature vector is a comprehensive feature representation formed by integrating the semantic feature vector, the embedding vectors of each attribute feature, and the target interaction vector.

[0099] In some examples, determining the fused feature vector of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector includes: unifying the dimensions of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector; combining the dimension-unified semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector in a preset order using a concatenation method; assigning dynamic weights to the semantic feature vector, the embedding vector, and the target interaction vector in the combined vector using an attention mechanism; and performing nonlinear transformation and information aggregation on the weighted combined vector using a fully connected layer or feature fusion network (such as a residual network) in the target model to generate the fused feature vector.

[0100] In step 2223, the predicted probabilities of the target materials being classified as Class I, Class II, and Class III materials are determined based on the fused feature vectors.

[0101] In some embodiments, the prediction probability indicates the probability that the target material's material category is predicted to be the corresponding category. In some examples, the sum of the prediction probabilities that the target material's material category is predicted to be a first category material, a second category material, and a third category material is 1.

[0102] In some examples, the predicted probabilities of target materials being classified as Class I, Class II, and Class III materials are determined based on the fused feature vector. This includes processing the fused feature vector using a multi-class activation function to determine the predicted probabilities of target materials being classified as Class I, Class II, and Class III materials. The multi-class activation function can be, for example, the softmax function or the sigmoid function.

[0103] In step 2224, the material category with the highest predicted probability is taken as the click probability prediction result of the target material.

[0104] In some examples, the predicted probability of a target material being classified as Category 1 is 0.8, Category 2 is 0.15, and Category 3 is 0.05. In this case, the predicted probability of the target material being classified as Category 1 is the highest. That is, the predicted click probability of the target material indicates that the target material is predicted as Category 1, and the click probability of the target material is the same as that of Category 1.

[0105] In this embodiment, by first filtering key target interaction vectors based on their importance, and then fusing semantic feature vectors, attribute feature embedding vectors, and target interaction vectors to form comprehensive features, the probability of the fused feature vectors belonging to three types of materials is determined, and the type corresponding to the highest probability is taken as the result. This approach can accurately focus on interaction information that significantly affects click probability prediction. At the same time, by comprehensively considering the multi-dimensional features of materials and their correlations, it can effectively distinguish the differences in click probability of different types of materials, avoiding interference from irrelevant interaction information and feature loss caused by simple classification. This improves the accuracy and reliability of click probability prediction, as well as its efficiency.

[0106] In some embodiments, a predetermined number of interaction vectors are selected as target interaction vectors from all interaction vectors based on the importance of each interaction vector, including steps three and four.

[0107] In step three, the threshold value of each interaction vector is determined based on the threshold function corresponding to each interaction vector.

[0108] In some embodiments, the first processing layer of the target model sets a learnable threshold function `gate_function()` for each interaction vector. The threshold value is used to represent the importance of the corresponding interaction vector, where a larger threshold value indicates that the interaction vector is more important for predicting the click probability.

[0109] In some embodiments, determining the threshold value of each interaction vector based on the threshold function corresponding to each interaction vector includes: for each interaction vector, inputting the interaction vector into the corresponding threshold function to obtain an original value; and inputting the original value into an activation function to obtain the threshold value of the interaction vector. In some examples, the activation function is, for example, one of the following: sigmoid activation function, tanh activation function, or ReLU activation function.

[0110] In step four, a preset number of interaction vectors are selected as target interaction vectors based on the threshold value.

[0111] In some examples, a preset number of interaction vectors are selected as target interaction vectors based on a threshold value, including: sorting the interaction vectors from largest to smallest based on the threshold value, and selecting the first preset number of interaction vectors from all interaction vectors as target interaction vectors based on the sorting order.

[0112] In this embodiment, a threshold function is used to generate a threshold value representing the importance of each interaction vector. A preset number of interaction vectors are then selected as target interaction vectors based on the threshold values. This threshold function can accurately quantify the contribution of each interaction vector to the click probability prediction, ensuring that the selected target interaction vectors are all core information that is crucial to distinguishing the click probability of the first, second, and third types of materials. This effectively eliminates redundant and low-value interaction vectors, preventing them from interfering with the model's learning of key features and thus improving prediction accuracy. Furthermore, by quickly selecting a preset number of target interaction vectors using only the threshold values, without using all interaction vectors, the amount of data for subsequent feature fusion and model calculation is significantly reduced, lowering the computational load on the model and accelerating the overall process speed of click probability prediction, achieving a dual optimization of prediction accuracy and efficiency.

[0113] The method for predicting click probability using a target model has been described above. This application will further detail the model training method for this target model through the following embodiments.

[0114] See Figure 3 , Figure 3 This is a flowchart illustrating a model training method provided in an embodiment of this application, which will be combined with... Figure 3 The steps shown are explained below. The entity executing this model training method can be the server or terminal shown above.

[0115] In step 31, user information and corresponding sample data of the training object are obtained. The sample data includes multiple training samples, which are divided into first-class samples, second-class samples and third-class samples according to the sample category.

[0116] In some embodiments, the training object is indicated as a user. The user information of the training object includes at least one of the following: the user identifier, location, gender, age group, etc. The user identifier is a string, number, or code used to uniquely identify the training object; the location is, for example, one of the country, province, or city where the training object is located; the gender is, for example, one of male, female, or unknown, where unknown may be one not set by the user; the age group is, for example, one of 0-10 years old, 10-20 years old, 20-30 years old, 30-40 years old, or 40 years and older.

[0117] In some embodiments, each sample in the sample data is, for example, one of the following: audio, video, text, or image.

[0118] In some embodiments, the first type of sample indicates the sample that the training object has clicked.

[0119] In some embodiments, the second type of sample refers to samples whose similarity to the first type of sample is less than a first threshold and which have not been clicked by the training object.

[0120] In some examples, similarity is represented numerically, ranging from 0 (completely dissimilar) to 1 (completely similar). When similarity is represented by values ​​between 0 and 1, this first threshold can be set to any value less than 0.5, such as 0.1 or 0.2, depending on the specific application.

[0121] In some embodiments, the third type of sample refers to samples that have a similarity greater than a second threshold to the first type of sample and that have not been clicked by the training object.

[0122] In some examples, where similarity is represented by a value between 0 and 1, the second threshold can be set to any value greater than 0.5, such as 0.8 or 0.9, depending on the specific application.

[0123] In some embodiments, the click probabilities of the first type of sample, the second type of sample, and the third type of sample are different.

[0124] In some embodiments, obtaining user information and corresponding sample data of the training object includes: obtaining first sample data based on the click behavior of the training object; and obtaining second and third sample data from samples that the training object has not clicked based on the first sample data.

[0125] In some examples, third sample data is obtained from samples that the training object has not clicked. This includes: retrieving at least one candidate sample from the samples that the training object has not clicked based on the keywords of the first type of samples; determining the cosine similarity between the first feature vector of each candidate sample and the second feature vector of the first type of samples for each candidate sample; and identifying candidate samples with a cosine similarity value greater than a first threshold as third type samples. Here, the first feature vector is used to represent the core information features of the candidate sample; the second feature vector is used to represent the core information features of the first type of samples; the cosine similarity value ranges from [-1, 1], and the closer the cosine similarity value is to 1, the more similar the keyword vector direction is between the sample and the first type of samples.

[0126] In other examples, third sample data is obtained from samples that have not been clicked by the training object. This includes retrieving the third sample from an open-source vector database based on the second feature vector of the first sample. For example, the search criteria are entered into the open-source database, which include the second feature vector of the first sample and a similarity greater than a second threshold. At least one third sample is retrieved from the open-source database based on these search criteria.

[0127] Understandably, since the first type of samples are those clicked by the training object, samples more similar to the first type of samples are more likely to be clicked by the training object, and vice versa. Therefore, the click tendency indicated by the third type of sample is more inclined to click, while the click tendency indicated by the second type of sample is more inclined not to click. Furthermore, the click probability corresponding to the third type of sample can be considered lower than the click probability corresponding to the first type of sample, but higher than the click probability corresponding to the second type of sample. If the first type of sample indicates a positive sample (click probability of 100%), and the second type of sample indicates a negative sample (click probability of 0%), then the third type of sample can be considered a weak positive sample (click probability greater than 0, less than 100%, and closer to 100%).

[0128] In step 32, a training dataset is generated based on the user information and sample data of the training subjects.

[0129] In some embodiments, user information and corresponding sample data of each training object in a plurality of training objects are obtained, and a training dataset is generated based on the user information and corresponding sample data of each training object in a plurality of training objects.

[0130] In some embodiments, the training dataset can be determined solely based on the first and second types of samples. However, if the training dataset is determined solely based on the first and second types of samples, the interaction relationships (click relationships) presented in the training dataset are absolute (either an interaction occurs or no interaction occurs), failing to reflect the training subjects' preference differences for similar samples. Furthermore, since the number of first-type samples is far less than the number of second-type samples, the training dataset may exhibit an imbalance in the number of first-type and second-type samples, or the amount of training data may be limited by the number of first-type samples, thus reducing the effectiveness of the training dataset.

[0131] In some embodiments, a training dataset is generated based on user information and sample data of the training objects. The sample data includes multiple training samples, which are divided into first-class samples, second-class samples, and third-class samples according to sample categories. This can avoid the limitation on the size of the training dataset caused by the small number of first-class samples. Furthermore, third-class samples can be obtained from a large number of second-class samples through high similarity screening, thereby supplementing the training dataset with intermediate state data between interaction and non-interaction. Since the interaction tendency indicated by the third-class samples is more inclined to interaction, this process can effectively supplement the training dataset with samples that are inclined to interaction, making the distribution of different interaction tendencies in the training dataset more balanced.

[0132] In step 33, the target model is trained based on the training dataset to obtain the trained target model.

[0133] In some embodiments, the trained target model is used for click probability prediction. It is understood that the target model is used to predict the category of a material or sample, and different predicted categories correspond to different click probabilities.

[0134] Understandably, because the sample data in this training dataset is evenly distributed across different interaction probabilities, training the target model on this dataset ensures that the trained model can accurately predict all interaction probabilities, avoiding situations where the prediction accuracy for "no interaction" is high and the prediction accuracy for "interaction" is low. Furthermore, this training dataset covers an interaction probability range from high to low. Training the target model on this dataset allows it to learn the subtle differences in preferences of recommended users for different content, improving the accuracy of the trained target model in predicting click probabilities.

[0135] In the model training method provided in this application embodiment, user information and corresponding sample data of the training object are obtained; the sample data includes multiple training samples, which are divided into a first type of sample, a second type of sample, and a third type of sample according to the sample category; wherein, the first type of sample indicates the sample that the training object has clicked; the second type of sample indicates the sample that has a similarity of less than a first threshold with the first type of sample and has not been clicked by the training object; the third type of sample indicates the sample that has a similarity of greater than a second threshold with the first type of sample and has not been clicked by the training object; the click probabilities corresponding to the first type of sample, the second type of sample, and the third type of sample are different; a training dataset is generated according to the user information and sample data of the training object; based on the training dataset, the target model is trained to obtain the trained target model, which enables the trained target model to accurately predict various interaction tendencies, thereby improving the accuracy of the target model in predicting click probabilities.

[0136] In some embodiments, a training dataset is generated based on the user information and sample data of the training object, including steps 321 to 322.

[0137] In step 321, each training data is obtained based on the user information and each training sample in the sample data, and the training sample indicates one of the first type of sample, the second type of sample, and the third type of sample.

[0138] In some embodiments, when user information and sample data of multiple training objects are obtained, for each training object among the multiple training objects, each training data is obtained based on the user information and each sample in the corresponding sample data.

[0139] In some examples, training data is obtained separately for each training sample in the user information and sample data, including at least one of the following: obtaining first training data based on user information and first type of samples; obtaining second training data based on user information and second type of samples; and obtaining third training data based on user information and third type of samples.

[0140] It is understandable that in the sample data corresponding to the training objects, each sample of the first class can determine one first training data, each sample of the second class can determine one second training data, and each sample of the third class can determine one third training data. The number of samples of the first class, the second class, and the third class in this sample data can be multiple. Therefore, the determined first training data, second training data, and third training data can also be multiple.

[0141] In some embodiments, each training data is obtained based on user information and each training sample in the sample data (step 321 above), including steps 3211 to 3212.

[0142] In step 3211, for each training sample in the sample data, multiple attribute features are extracted from the user information and the training sample, and the semantic feature vector corresponding to the training sample is determined.

[0143] In some embodiments, multiple attribute features are extracted from user information and the training samples, including: extracting the user identifier, location, gender, and age group of the training object from the user information, and extracting the media type identifier and main content category from the training samples.

[0144] For detailed descriptions of multiple attribute features, media type identifiers, and main content categories, please refer to the aforementioned embodiments; they will not be repeated here.

[0145] Understandably, these multiple attribute features can be added or removed based on actual applications. For example, features such as the type of device used by the training object and the network type can be added. The type of device used can be, for example, one of mobile phones, tablets, and computers, and the network type can be, for example, one of Wi-Fi, 5G, and 4G. Features such as the creator type and content popularity of the content included in the training samples can be added. The creator type can be, for example, one of official accounts, personal bloggers, and institutional accounts, and the content popularity can be determined by the number of views, comments, and likes.

[0146] In some embodiments, the semantic feature vector of a training sample is a continuous feature. This semantic feature vector is used to characterize the semantic information contained in the training sample, quantifying the sample's position and attributes in the semantic space through continuous numerical forms. In one example, if the training sample is a first-class sample, the semantic feature vector is a semantic vector characterizing that first-class sample; in another example, if the training sample is a second-class sample, the semantic feature vector is a semantic vector characterizing that second-class sample; and in yet another example, if the training sample is a third-class sample, the semantic feature vector is a semantic vector characterizing that third-class sample.

[0147] In step 3212, the multiple attribute features and the semantic feature vector are used as training data, and a sample category label is added to the training data based on the category of the training sample.

[0148] In some embodiments, the training samples may be categorized into one of the following: a first sample category, a second sample category, or a third sample category.

[0149] It is understandable that when the training sample is a first-class sample, the sample's category is the first-class sample category; when the sample is a second-class sample, the sample's category is the second-class sample category; and when the sample is a third-class sample, the sample's category is the third-class sample category.

[0150] In some embodiments, the first sample category label, the second sample category label, and the third sample category label are distinct discrete values ​​used to distinguish different sample categories.

[0151] In some examples, a sample class label is added to a training data point based on the category of the training sample, including: if the category of the training sample is a first sample class, a first sample class label is added to the training data point. This first sample class label is, for example, 1.

[0152] In other examples, a sample class label is added to a training data point based on the category of the training sample, including adding a second sample class label to the training data point if the category of the training sample is a second sample class. This second sample class label is, for example, 0.

[0153] In some other examples, a sample class label is added to the training data based on the category of the training sample, including: when the category of the training sample is a third sample class, a third sample class label is added to the training data. This third sample class label is, for example, 2.

[0154] In step 322, the set of multiple training data is determined as the training dataset.

[0155] In some embodiments, the training dataset includes multiple training data, each training data including a semantic feature vector of the training sample, a sample category label and multiple attribute features, each attribute feature being used to characterize an attribute of the training object or training sample.

[0156] In the embodiments of this application, when generating the training dataset, attribute features and semantic feature vectors can be introduced simultaneously, so that the training data includes both the category user information of the training object and the deep semantic association information of the training samples, thus achieving effective fusion of multi-dimensional features. Furthermore, training data can be constructed separately for the user information and sample data of each training object, so that the training data is deeply bound to the characteristics of the specific training object, which can better represent the personalized preferences of different training objects and improve the effectiveness of the training dataset.

[0157] In some embodiments, the target model is trained based on the training dataset to obtain the trained target model, including steps 331 to 334.

[0158] In step 331, target training data is obtained from the training dataset.

[0159] The target training data is any training data in the training dataset.

[0160] In step 332, the target training data is input into the target model. Through the target model, the embedding vector of each attribute feature and the interaction vector of each pair of attribute features in the target training data are obtained. Based on the embedding vector of each attribute feature, the target interaction vector, and the semantic feature vector included in the target training data, the sample category corresponding to the training sample is predicted to obtain the click probability prediction result of the training sample.

[0161] In some embodiments, the target interaction vector includes a portion of all interaction vectors.

[0162] In some embodiments, the click probability prediction result of a training sample indicates that the training sample is predicted to be one of a first class, a second class, and a third class. This click probability prediction result is represented by a prediction label, which is similar to the aforementioned sample category label and will not be described again here.

[0163] In step 333, the loss value is determined based on the preset loss function, the click probability prediction result, and the sample category labels included in the target training data.

[0164] In some embodiments, the preset loss function is, for example, one of the following: cross-entropy loss function, focus loss function, or relative entropy loss function.

[0165] In some examples, where the default loss function is the cross-entropy loss function, the loss value is loss=CrossEntropyLoss(output, y), where output is the predicted probability distribution of the output class, and y is the sample class label in the target training data.

[0166] In step 334, if the loss value does not meet the target condition, the model parameters of the target model are optimized based on the loss value, and the process returns to the step of obtaining the target training data from the training dataset (step 331 above).

[0167] In some embodiments, the target condition includes a loss threshold. If the loss value is less than or equal to the loss threshold, the loss value meets the target condition; if the loss value is greater than the loss threshold, the loss value does not meet the target condition.

[0168] In some embodiments, the target condition includes a loss threshold and a preset number of consecutive occurrences. If the loss value exceeds the preset number of consecutive occurrences but is less than or equal to the loss threshold, the loss value meets the target condition; if the loss value is greater than the loss threshold, or if the loss value does not exceed the preset number of consecutive occurrences but is less than or equal to the loss threshold, the loss value does not meet the target condition.

[0169] In some embodiments, optimizing the model parameters of the target model includes: calculating the gradient of the loss value with respect to the parameters of each layer of the model using a backpropagation algorithm, and then using an optimizer to update the parameters based on the gradient to reduce the loss value. Calculating the gradient includes: based on the output value of the loss function, calculating the gradient of all learnable parameters in the target model (such as the weights of the sparse operation perceptron embedding layer, the weights and biases of the multilayer perceptron layer, the parameters of the output layer, etc.) using a backpropagation algorithm; the gradient direction indicates the direction in which the parameters need to be adjusted. Updating the parameters includes: the optimizer adjusting the parameters (e.g., updating along the direction of gradient descent) based on the calculated gradient and a preset learning rate, so that the target model is closer to the true label in the next prediction, thereby reducing the loss value. It is understood that the threshold function in this application is a learnable threshold function. Therefore, as part of the target model, the parameters of the threshold function can be learned and optimized during the model optimization process. For example, when the target model is optimized through backpropagation, the loss value is passed to the parameters of the threshold function layer by layer, and the gradients of these parameters are calculated. The optimizer will adjust the parameters of the threshold function according to the gradients, so that the calculation of the threshold values ​​(scores) is more accurate, thereby allowing important feature interaction pairs to obtain higher scores (closer to 1) and unimportant interaction pairs to obtain lower scores (closer to 0), thereby improving the effectiveness of interaction vector selection.

[0170] In step 335, if the loss value meets the target condition, the training of the target model is considered complete.

[0171] In some embodiments, the number of training epochs can be preset, for example, 50. In some examples, if the number of training epochs has not been reached, the model parameters of the target model are optimized based on the loss value, and the process returns to step 331 described above.

[0172] In other examples, the training of the target model is considered complete when the number of training rounds has been reached.

[0173] In the model training method provided in this application embodiment, the correlation between attribute features is determined by interaction vectors, and a preset number of interaction vectors are selected as target interaction vectors from all interaction vectors based on the importance of the interaction vectors. This not only retains the core correlation information between attribute features, but also eliminates redundant interaction vectors, reducing the computational pressure on the target model, improving the computational efficiency and training speed of the target model, and also reducing the impact of redundant interaction vectors on the result prediction, thereby improving the prediction accuracy of the trained target model.

[0174] In some embodiments, the target training data is input into the target model, and the embedding vector of each attribute feature and the interaction vector of each pair of attribute features in the target training data are obtained through the target model (step 332 above). This includes: inputting the target training data into the target model, preprocessing the target training data to obtain tensors corresponding to the multiple attribute features in the target training data; and determining the embedding vector of each attribute feature and the interaction vector of each pair of attribute features based on the tensors.

[0175] In some embodiments, preprocessing includes label encoding. The tensor obtained after label encoding includes indices of multiple attribute features, the value range of which is determined based on the dimension (total number of categories) of that attribute feature. The detailed description of each attribute feature's index can be found in the foregoing embodiments and will not be repeated here.

[0176] In some embodiments, attribute features are represented by indexes. The above-described process of inputting target training data into the target model and obtaining the embedding vector of each attribute feature and the interaction vector of every two attribute features in the target training data (step 332 above) includes: steps 3321 to 3322.

[0177] In step 3321, the target training data is input into the target model, and based on the embedding sub-layer corresponding to each attribute feature in the target model, the index corresponding to each attribute feature is converted into an embedding vector.

[0178] In some embodiments, the embedding sublayer includes a mapping between indexes of attribute features and embedding vectors.

[0179] In some examples, the size of each embedding vector can be preset, for example, to 16.

[0180] In step 3322, the interaction vector of each pair of attribute features is determined based on the inner product of the embedding vectors of each pair of attribute features.

[0181] In some embodiments, the inner product refers to the dot product operation between two embedding vectors. For example, the embedding vector for attribute feature 1 is [a1, a2, ..., a...]. 16 The embedding vector for attribute feature 2 is [b1, b2, ..., b...]. 16 If the inner product of the two is: a1×b1+a2×b2+...+a 16 ×b 16 .

[0182] In some embodiments, steps 3321 and 3322 described above can be performed through a first processing layer in the target model. The first processing layer in the target model sets up multiple embedding sub-layers for each attribute feature. Based on each of the multiple embedding sub-layers corresponding to the attribute feature, the index representing the attribute feature is converted into an embedding vector. For example, if the target model sets up 6 embedding sub-layers for each attribute feature, then based on the 6 embedding sub-layers corresponding to the attribute feature, the index representing the attribute feature is converted into 6 embedding vectors. Of the multiple embedding vectors of this attribute feature, one embedding vector is reserved for output as the embedding vector of the attribute feature input to the next processing layer in the target model, and the remaining embedding vectors are used to perform inner products with the embedding vectors of other attribute features to determine the interaction vector between each pair of attribute features.

[0183] In some embodiments, attribute feature 1 corresponds to embedding vectors A1-A6, attribute feature 2 corresponds to embedding vectors B1-B6, ..., and attribute feature 6 corresponds to embedding vectors F1-F6. Taking attribute feature 1 as an example, the processing of multiple embedding vectors corresponding to the attribute feature is explained as follows: embedding vector A1 is copied to retain it for output; the interaction vector between attribute feature 1 and attribute feature 2 is determined by the inner product of embedding vectors A2 and B2; the interaction vector between attribute feature 1 and attribute feature 3 is determined by the inner product of embedding vectors A3 and C3; the interaction vector between attribute feature 1 and attribute feature 4 is determined by the inner product of embedding vectors A4 and D4; the interaction vector between attribute feature 1 and attribute feature 5 is determined by the inner product of embedding vectors A5 and E5; and the interaction vector between attribute feature 1 and attribute feature 6 is determined by the inner product of embedding vectors A6 and F6.

[0184] In some examples, with 6 attribute features, the number of interaction vectors obtained by taking the inner product of the embedding vectors of every two attribute features is 15. The size of the attribute feature embedding vector is set to 16, and since the interaction vector is the inner product of two embedding vectors, its size is 1. If the embedding vectors of the 6 attribute features and these 15 interaction vectors (all interaction vectors) are output as input to the next layer, then the size of the output data of the first processing layer is: 6 × 16 + 15 = 111.

[0185] In some embodiments, based on the embedding vector of each attribute feature, the target interaction vector, and the semantic feature vector included in the target training data, the sample category corresponding to the training sample is predicted to obtain the click probability prediction result of the training sample (step 332 above), including steps 3323 to 3326.

[0186] In step 3323, based on the importance of each interaction vector, a preset number of interaction vectors are selected from all interaction vectors as target interaction vectors.

[0187] In some embodiments, selecting a preset number of interaction vectors as target interaction vectors from all interaction vectors based on the importance of each interaction vector includes: determining a threshold value for each interaction vector based on a threshold function corresponding to each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector; and selecting a preset number of interaction vectors as target interaction vectors according to the threshold value.

[0188] In some embodiments, the first processing layer of the target model sets a threshold function `gate_function()` for each interaction vector. The threshold value is used to represent the importance of the corresponding interaction vector, where a larger threshold value indicates that the corresponding interaction vector is more important for predicting the click probability.

[0189] In some embodiments, determining the threshold value of each interaction vector based on the threshold function corresponding to each interaction vector includes: for each interaction vector, inputting the interaction vector into the corresponding threshold function to obtain an original value; and inputting the original value into an activation function to obtain the threshold value of the interaction vector. In some examples, the activation function is, for example, one of the following: sigmoid activation function, tanh activation function, or ReLU activation function.

[0190] In some embodiments, step 3323 can be performed by a first processing layer in the target model, and step 3324 below is performed by a second processing layer in the target model. The output of the first processing layer is: the target interaction vector and the embedding vector of each attribute feature.

[0191] In some examples, with 3 target interaction vectors, 6 attribute features, and an embedding vector size of 16, the size of the output data from the first processing layer is 6 × 16 + 3 = 99. Compared to outputting all interaction vectors, this effectively reduces the size of the output data from the first processing layer.

[0192] In some embodiments, the output data of the first processing layer (target interaction vector, embedding vector of each attribute feature) and the semantic feature vector in the target training data are concatenated as the input data of the second processing layer. In some examples, if the size of the output data of the first processing layer is 99 and the size of the semantic feature vector in the target training data is, for example, 768, then the size of the input data of the second processing layer is 99 + 768 = 867.

[0193] In step 3324, the fused feature vector of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector is determined.

[0194] In some embodiments, step 3324 is performed through a second processing layer in the target model. In some embodiments, the second processing layer includes multiple sub-layers. Each sub-layer consists of a linear layer, a normalization layer, an activation layer, and a dropout layer. The linear layer performs linear transformations on the input data, mapping it to a new dimensional space through matrix multiplication to achieve dimensionality increase or decrease, and also learns linear combination relationships between features. The normalization layer standardizes the output of the linear layer (e.g., Batch Normalization), adjusting the mean and variance of the features to stabilize the input distribution of each layer, accelerating model training convergence and reducing sensitivity to initial parameters. The activation layer learns complex nonlinear relationships between input and output using activation functions (e.g., ReLU, Leaky ReLU). The dropout layer randomly stops a subset of neurons from processing data, preventing the model from over-relying on local features and reducing the risk of overfitting.

[0195] In some embodiments, the input data is processed progressively through multiple sub-layers of the second processing layer, and the size is gradually reduced. In some examples, the second processing layer includes three sub-layers. When the size of the input data of the second processing layer is 867, the linear layer outputs of the three sub-layers are 512, 256, and 128, respectively.

[0196] In step 3325, the predicted probabilities of the training samples as first-class, second-class, and third-class samples are determined based on the fused feature vector.

[0197] In step 3326, the sample category with the highest predicted probability is used as the click probability prediction result of the training sample.

[0198] In some embodiments, steps 3325 to 3326 are performed through the output layer in the target model.

[0199] For a detailed description of steps 3324 to 3326 above, please refer to the foregoing embodiments, which will not be repeated here.

[0200] Figure 4a This is a schematic diagram of the structure of a target model provided in an embodiment of this application. In some embodiments, the target model refers to an improved Operation-aware Neural Network (ONN) model. Figure 4a As shown, the target model 400 includes a sparse operation-aware embedding layer 401, a multilayer perceptron (MLP) layer 402, and an output layer 403.

[0201] The sparse operation-aware embedding layer 401 is used to perform vector representation of the input data, determine the correlation between features, and select the correlation between features that meet the conditions, thereby determining the input data for the next layer. This sparse operation-aware embedding layer can be the first processing layer in the aforementioned target model.

[0202] In some embodiments, the sparse operation-aware embedding layer is used to obtain the embedding vector of each attribute feature and the interaction vector of every two attribute features in the input target training data, select a preset number of interaction vectors as target interaction vectors based on the importance of each interaction vector, and output the embedding vector and target interaction vector of each attribute feature.

[0203] In some embodiments, the target training data input to the sparse operation-aware embedding layer includes: multiple attribute features, sample category labels, and semantic feature vectors of training samples; wherein each attribute feature is used to characterize an attribute of the training object or training sample.

[0204] In some embodiments, the sparse operation-aware embedding layer is used to: determine a threshold value for each interaction vector based on a threshold function corresponding to each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector; and select a preset number of interaction vectors as target interaction vectors according to the threshold value.

[0205] The multilayer perceptron layer 402 serves as a feedforward neural network, used to learn complex nonlinear mappings between features or nonlinear fitting relationships between data distribution and results (such as sample category labels) based on the input data from the previous layer. This multilayer perceptron layer can be the second processing layer in the aforementioned target model.

[0206] In some embodiments, the multilayer perceptron layer is used to determine a fused feature vector of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector, and to output the fused feature vector, based on the input semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector.

[0207] The output layer 403 is used to determine the predicted probabilities of the training samples as first-class, second-class, and third-class samples based on the input fused feature vector, and outputs the sample class with the highest predicted probability as the click probability prediction result of the training sample.

[0208] In this embodiment, the target model includes a sparse operation-aware embedding layer, a multilayer perceptron layer, and an output layer. The sparse operation-aware embedding layer, after representing the input data as vectors and determining the correlation between features, selects the correlation between features that meet the conditions to determine the input data for the next layer. This can filter out the correlation between features that do not meet the conditions, reduce the amount of data input to the next layer, improve the computational efficiency and training speed of the model, and also reduce the impact of redundant data on the prediction results, thereby improving the prediction accuracy of the model.

[0209] Based on this Figure 4a The structure of the target model shown in this application embodiment provides a click-through rate (CTR) prediction method. This CTR prediction method includes:

[0210] Step 1: Obtain user information and target materials for the recommended users.

[0211] Step 2: Based on user information and target materials, generate multiple attribute features and semantic feature vectors of the target materials.

[0212] Step 3: Preprocess multiple attribute features to obtain tensors corresponding to multiple attribute features.

[0213] It should be noted that the step of preprocessing multiple attribute features to obtain tensors corresponding to multiple attribute features may not be performed through the target model; or it may be performed through the target model. For example, multiple attribute features and the semantic feature vector of the target material can be input into the target model, and the target model can be used to preprocess the multiple attribute features to obtain tensors corresponding to multiple attribute features. This application does not impose specific limitations on this aspect in the embodiments.

[0214] Step 4: Input the tensors corresponding to the multiple attribute features and the semantic feature vector of the target material into the target model to obtain the click probability prediction result of the target material output by the target model. The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material.

[0215] In some embodiments, the sparse operation-aware embedding layer of the target model is used to: obtain the embedding vector of each attribute feature and the interaction vector of every two attribute features; select a preset number of interaction vectors as target interaction vectors based on the importance of each interaction vector; output the semantic feature vector, the embedding vector of each attribute feature and the target interaction vector to the multilayer perceptron layer; the multilayer perceptron layer inputs the input semantic feature vector, the embedding vector of each attribute feature and the target interaction vector into the multilayer perceptron layer of the target model to obtain the fused feature vector output by the multilayer perceptron layer; and input the fused feature vector into the output layer, the output layer being used to determine the predicted probability of the material category of the first type of material, the second type of material and the third type of material respectively based on the input fused feature vector, and take the material category with the highest predicted probability as the click probability prediction result of the target material.

[0216] In this application, a three-class classification method is proposed for the target model to predict clicks. This method creates a new intermediate class, helping the target model learn features of positive interactions from a larger, more detailed sample set. This allows the model to enhance its ability to distinguish similar click behaviors by learning from weak positive samples, even when actual positive samples are scarce, thus achieving better results in imbalanced scenarios. The final click probability prediction order becomes: positive samples > weak positive samples > negative samples, thereby optimizing the model's output.

[0217] Figure 4b This document provides a flowchart illustrating another model training method for embodiments of this application. Figure 4a The structure of the target model shown is related to this. Figure 4b The model training method shown is explained below. This model training method includes:

[0218] In step 41, target training data is obtained from the training dataset, and multiple attribute features in the target training data are input into the sparse operation-aware embedding layer to obtain the first output data output by the sparse operation-aware embedding layer.

[0219] In some embodiments, the target training data includes semantic feature vectors of training samples, sample category labels, and multiple attribute features.

[0220] In some examples, the training parameters for the sparse operation-aware embedding layer are set as follows: batch_size=1; top_k=3; embedding_size=16. Here, batch_size=1 indicates that only one training sample is input to the sparse operation-aware embedding layer each time, meaning that multiple attribute features originate from the data of a single training sample. top_k=3 indicates that the sparse operation-aware embedding layer selects three interaction vectors for output; embedding_size=16 indicates that the size of the output embedding vector is 16.

[0221] In some examples, there are 6 attribute features. These multiple attribute features can be input into the sparse operation perceptual embedding layer in the form of a tensor. This tensor is, for example, the tensor ([[300, 20, 2, 1, 39, 5]]) in the previous embodiment, and the size of the tensor is [1, 6].

[0222] In some examples, there are 6 attribute features. In this case, the first output data of the sparse operation-aware embedding layer includes the embedding vectors of the 6 attribute features and 3 interaction vectors selected from 15 interaction vectors. The size of the first output data is [1, 99]. The method of obtaining the 15 interaction vectors based on the embedding vectors of the 6 attribute features is described in the previous embodiment and will not be repeated here.

[0223] In step 42, the semantic feature vectors of the first output data and the training samples are input into the multilayer perceptron layer to obtain the fusion vector output by the multilayer perceptron layer.

[0224] In some examples, the size of the semantic feature vector of the training sample is [1, 768], then the size of the feature after concatenating the semantic feature vector of the first output data and the training sample is [1, 867].

[0225] In some examples, the training parameters for the multilayer perceptron layer are set as follows: batch_size=1, mlp_dims=[512, 256, 128]. Here, batch_size=1 indicates that only one training sample is input to the multilayer perceptron layer each time, and mlp_dims=[512, 256, 128] indicates that the multilayer perceptron layer consists of three sub-layers, with outputs of 512, 256, and 128 dimensions respectively.

[0226] It is understandable that the size of the fusion vector output by the multilayer perceptron is the size of the output of the last sublayer, i.e. [1, 128].

[0227] In step 43, the fusion vector is input into the output layer to obtain the click probability prediction result output by the output layer.

[0228] In some examples, the training parameters for the output layer are set to: batch_size=1, classify_num=3. Here, batch_size=1 means that only one training sample is input to the output layer each time; classify_num=3 indicates that the output layer needs to perform a three-class classification task, and the output layer needs to output three values, i.e., the output size of the output layer is [1, 3]. After activating these three values ​​through an activation function, the predicted probabilities of the three sample classes are obtained.

[0229] In some embodiments, the type with the highest predicted probability among the three categories is determined as the final click probability prediction result for the training sample, which indicates that the training sample is predicted to be one of the first, second, and third categories.

[0230] In some embodiments, the type with the highest predicted probability among the three categories is determined as the final click probability prediction result for the training sample using the following formula:

[0231] , where represents the click probability prediction result, represents the output of the output layer, represents the processing dimension, represents the processing of the horizontal dimension, is a PyTorch function used to perform softmax activation on the tensor in the specified dimension, converting any real number output into a probability distribution between 0 and 1; is used to find the maximum probability.

[0232] In step 44, the loss value is determined based on the preset loss function, the click probability prediction result, and the sample category labels included in the target training data.

[0233] In some examples, where the default loss function is the cross-entropy loss function, the loss value is loss=CrossEntropyLoss(output, y), where output is the predicted probability distribution of the output category, and y is the sample category label in the target training data.

[0234] In step 45, it is determined whether the loss value meets the target condition.

[0235] The target conditions are described in the foregoing embodiments and will not be repeated here.

[0236] In step 46, if the loss value does not meet the target condition, the model parameters of the target model are optimized based on the loss value, and the process returns to step 41 mentioned above.

[0237] In step 47, if the loss value meets the target condition, the training of the target model is considered complete.

[0238] In the model training method provided in this application embodiment, the correlation between attribute features is determined by interaction vectors, and a preset number of interaction vectors are selected as target interaction vectors from all interaction vectors based on the importance of the interaction vectors. This not only retains the core correlation information between attribute features, but also eliminates redundant interaction vectors, reducing the computational pressure on the target model, improving the computational efficiency and training speed of the target model, and also reducing the impact of redundant interaction vectors on the result prediction, thereby improving the prediction accuracy of the trained target model.

[0239] Figure 5 This is a schematic diagram of the structure of a click probability prediction model provided in an embodiment of this application. Figure 5 As shown, the click probability prediction model includes an encoding layer 51, an operation-aware embedding layer 52, a hidden layer 53, and an output layer 54.

[0240] Encoding layer 51 is used to transform discrete features into sparse binary vectors. For example, discrete attribute features 1 to m are transformed into corresponding binary vectors 511. For an attribute feature with n categories, encoding layer 51 generates an n-dimensional binary vector 511, where each position in the binary vector represents a category of the discrete feature. Only one position has a value of 1, indicating that the current value of the discrete feature is the category corresponding to that position; the values ​​of the remaining positions are 0, indicating that the current value of the discrete feature is not the category corresponding to those positions. This attribute feature can be referred to the description in the previous embodiments, and will not be repeated here.

[0241] In some examples, there are six discrete attribute features: the user identifier, location, gender, age group, media type identifier, and main content category of the recommended object, with dimensions of 65308, 34, 2, 5, 29688, and 19, respectively.

[0242] In one example, the attribute feature is gender, and the gender dimension (category) is 2, namely male gender and female gender. Then, the binary vector corresponding to male gender after encoding can be [1, 0], and the binary vector corresponding to female gender can be [0, 1].

[0243] In some embodiments, the binary vectors corresponding to all attribute features can be encoded into tensors and then input into the operation-aware embedding layer 52, or the binary vectors corresponding to each attribute feature can be directly input into the operation-aware embedding layer 52.

[0244] The operation-aware embedding layer 52 is used to map input features into low-dimensional, dense embedding vectors. Encoded binary vectors are typically high-dimensional and sparse. The embedding layer can compress dimensionality, preserve core feature information, and bring semantically related features closer together in the embedding space.

[0245] In some embodiments, the operation-aware embedding layer 52 is used to generate multiple embedding vector groups 521 based on binary vectors corresponding to multiple attribute features. Each embedding vector group 521 includes embedding vectors of multiple attribute features, wherein each column of each embedding vector group 521 represents an embedding vector of one attribute feature, and each element in each column (circular blocks of different colors and fill styles in the figure) represents a dimension value in the embedding vector. In one example, the dimension of each embedding vector is preset to 16 dimensions (size 16), then each column in each embedding vector group 521 contains 16 data points.

[0246] In some embodiments, the operation-aware embedding layer 52 is further configured to perform copy operations and inner product operations based on a plurality of embedding vector groups 521 to generate output data of the operation-aware embedding layer 52. For example, the embedding vector 522 is an embedding vector generated by the copy operation; every two embedding vectors are subjected to an inner product operation unit to generate an interaction vector.

[0247] In some examples, there are six discrete attribute features. The binary vectors corresponding to these six attribute features are input into the operation-aware embedding layer 52. The operation-aware embedding layer 52 then generates six embedding vector groups based on these binary vectors. Each embedding vector group contains the embedding vectors corresponding to the six attribute features; that is, each embedding vector group contains six embedding vectors. The operation-aware embedding layer 52 also performs a copy operation on one of the six embedding vector groups and an inner product operation on the remaining five embedding vector groups to generate the output data of the operation-aware embedding layer 52.

[0248] Figure 6 This is an example diagram of an output matrix provided in an embodiment of this application. Based on... Figure 6 The output matrix 600 shown is an example of the output data of the operation-aware embedding layer 52.

[0249] In some examples, there are 6 discrete attribute features, such as attribute feature 1 to attribute feature 6; as explained above, the operation-aware embedding layer 52 is used to generate 6 embedding vectors for each attribute feature, for example, attribute feature 1 corresponds to 6 embedding vectors Embedding(1), attribute feature 2 corresponds to 6 embedding vectors Embedding(2), ..., attribute feature 6 corresponds to 6 embedding vectors Embedding(6).

[0250] Attribute feature 1 corresponds to 6 embedding vectors Embedding(1), of which 1 embedding vector Embedding(1) is used for copying, resulting in Figure 6The first f(0,0) in the first row of the output matrix 600 is shown; the remaining 5 embedding vectors Embedding(1) are used to perform inner product operations with the embedding vectors Embedding(2), ..., Embedding(6) corresponding to attribute feature 2, respectively, to obtain Figure 6 The first row of the output matrix 600 shown contains f(0,1), f(0,2), f(0,3), f(0,4), and f(0,5).

[0251] Of the six embedding vectors corresponding to attribute feature 2, one embedding vector (2) is used for copying, and the remaining five embedding vectors (1) are used to perform inner product operations with the one embedding vector corresponding to each of the other five attribute features, respectively. This yields... Figure 6 The output matrix 600 shown contains f(1,0), f(1,1), f(1,2), f(1,3), f(1,4), and f(1,5) in the second row.

[0252] The embedding vectors corresponding to attribute features 3 to 6 are subjected to similar operations as described above, and finally, we can obtain... Figure 6 The output matrix shown is 600.

[0253] It is understandable that since the inner product of the embedding vectors Embedding(i) and Embedding(j) is equivalent to the inner product of the embedding vectors Embedding(j) and Embedding(i), and the values ​​of i and j are both from 1 to 6, in the final output matrix 600, only one of f(i,j) and f(i,j) needs to be output. For example, only one of f(1,0) and f(0,1) needs to be output.

[0254] As shown in the output matrix 600, the output data of the operation-aware embedding layer 52 includes: 6 embedding vectors: f(0,0), f(1,1), f(2,2), f(3,3), f(4,4), f(5,5), and 15 interaction vectors: f(0,1), f(0,2), f(0,3), f(0,4), f(0,5), f(1,2), f(1,3), f(1,4), f(1,5), f(2,3), f(2,4), f(2,5), f(3,4), f(3,5) and f(4,5).

[0255] It is understandable that the total size of the 6 embedding vectors is 6 × 16 = 96, and the total size of the 15 interaction vectors is 15. Therefore, the size of the one-dimensional data after concatenating the 6 embedding vectors and the 15 interaction vectors is 96 + 15 = 111, which means that the size of the output data of the operation-aware embedding layer 52 is 111.

[0256] Hidden layer 53, also known as a multilayer perceptron layer, consists of multiple rectified linear units (ReLU). This hidden layer 53 is used to perform multilayer nonlinear transformations on the input data to obtain a fused feature vector.

[0257] In some embodiments, the input data for the hidden layer 53 is an embedding vector, an interaction vector, and a semantic vector of the target material. The semantic vector of the target material can be found in the description of the foregoing embodiments, and will not be repeated here.

[0258] In some examples, such as the aforementioned discrete attribute features having 6, the input data of hidden layer 53 is the concatenation of 6 embedding vectors, 15 interaction vectors and the semantic vector of the target material. If the semantic vector size of the target material is 768, then the size of the input data of hidden layer 53 is 111+768=879.

[0259] In some embodiments, hidden layer 53 includes three sub-layers, each consisting of a linear layer, a normalization layer, an activation layer, and a dropout layer. The dimensions of the outputs of the linear layers in the three sub-layers are 512, 256, and 128, respectively. It can be understood that the size of the fused feature vector output by hidden layer 53 is the size of the linear layer of the last sub-layer, i.e., 128.

[0260] Output layer 54 includes activation function units used to class-map the fused feature vector output from hidden layer 53 to obtain the probabilities of each class. If the output layer maps the fused feature vector to 3 classes, then the output data of output layer 54 consists of the probabilities of the 3 classes, with a size of 3.

[0261] Figure 7 This is a schematic diagram of another target model provided in an embodiment of this application. For example... Figure 7 As shown, the target model includes an encoding layer 71, a sparse operation-aware embedding layer 72, a hidden layer 73, and an output layer 74.

[0262] For a detailed description of this coding layer 71, please refer to Figure 5 The encoding layer in the click probability prediction model. This will not be elaborated upon here.

[0263] The sparse operation-aware embedding layer 72 includes an operation-aware embedding layer 721 and a gate function layer 722. For a detailed description of the operation-aware embedding layer 721, please refer to... Figure 5The operation-aware embedding layer is shown. The gate function layer 722 includes a gate function set for each interaction vector.

[0264] In some embodiments, the gate function layer 722 is used to determine a threshold value for each interaction vector and select a portion of the interaction vectors based on the threshold value, such that the sparse operation-aware embedding layer 72 does not output all the interaction vectors, but outputs the portion of the interaction vectors selected by the gate function layer 722.

[0265] In some embodiments, the gate function layer 722 is used to pass the gate function of each attribute feature through a sigmoid activation function to obtain a gate value: , where is the gate value, is a sigmoid activation function, is the gate function, and i and j are both attribute features.

[0266] In some examples, the gate function layer 722 is used to determine the threshold values ​​of the 15 interaction vectors f(0,1), f(0,2), f(0,3), f(0,4), f(0,5), f(1,2), f(1,3), f(1,4), f(1,5), f(2,3), f(2,4), f(2,5), f(3,4), f(3,5), and f(4,5) in the aforementioned example, and sorts the threshold values ​​from largest to smallest, selecting the K interaction vectors with the highest threshold values. This K can be set to any value according to the actual situation, for example, 3.

[0267] In some examples, such as Figure 7 As shown, if the interaction vector calculated by the inner product operation unit 723 is not among the first K interaction vectors, then the interaction vector calculated by the inner product operation unit 723 will not be input into the hidden layer.

[0268] If the gate function layer 722 selects 3 interaction vectors, then the output data of the sparse operation-aware embedding layer 72 will be 6 embedding vectors and 3 interaction vectors, that is, the size of the output data of the sparse operation-aware embedding layer 72 will be 96+3=99.

[0269] For detailed descriptions of the hidden layer 73 and the output layer 74, please refer to [link / reference]. Figure 5 The hidden and output layers in the click probability prediction model are described below. Further details will not be provided here.

[0270] In this embodiment, the target model is an improved operation-aware neural network. In this network, the operation-aware embedding layer maintains an independent embedding vector for each feature and feature pair, significantly increasing the network's parameter size and computational complexity. This results in very high memory and GPU memory usage (space complexity) and computational demands (time complexity) during inference, making it unsuitable for online inference. In this embodiment, the operation-aware embedding layer in the target model is sparsified. Specifically, the sparse operation-aware embedding layer maintains a learnable threshold function for each feature pair. Based on the output value of the threshold function, the top k (threshold values ​​ranked in the top K) feature pairs are selected, and only their inner product is calculated, pruning away most unimportant computations. This reduces the number of inactive parameters, thus shrinking the model parameters and lowering the computational load, making network inference more efficient.

[0271] Understandably, the time complexity of the operation-aware embedding layer before sparsification is O(F²D), where F is the number of features and D is the embedding layer dimension. After sparsification, the time complexity of the operation-aware embedding layer is reduced to O(KD), where K equals the top k, meaning the time complexity is reduced by a factor of F / K.

[0272] The following continues to describe the exemplary structure of the click-through rate prediction device 155 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the click-through rate prediction device 155 in the memory 150 may include: a first acquisition module 1551 and a prediction module 1552.

[0273] The first acquisition module 1551 is used to acquire user information and target material of the recommended object, wherein the target material is the material to be recommended to the recommended object.

[0274] The prediction module 1552 is used to predict the click probability prediction result of the target material based on user information and target material through the target model.

[0275] The click probability prediction result indicates that the target material is predicted to be one of three categories: Category 1, Category 2, and Category 3. Specifically, the click probability for Category 1 material is equivalent to the click probability of a Category 1 sample that the recommended user has clicked; the click probability for Category 2 material is equivalent to the click probability of a Category 2 sample whose similarity to a Category 1 sample is less than a first threshold and which the recommended user has not clicked; and the click probability for Category 3 material is equivalent to the click probability of a Category 3 sample whose similarity to a Category 1 sample is greater than a second threshold and which the recommended user has not clicked. The click probabilities for Category 1, Category 2, and Category 3 materials are different.

[0276] In some embodiments, the prediction module is used to generate multiple attribute features and semantic feature vectors of the target material based on user information and target material; each attribute feature is used to characterize an attribute of the recommended object or target material; the multiple attribute features and semantic feature vectors are input into the target model, and the target model obtains the embedding vector of each attribute feature and the interaction vector of every two attribute features; based on the semantic feature vector, the embedding vector of each attribute feature and the target interaction vector, the material category corresponding to the target material is predicted to obtain the click probability prediction result of the target material; the target interaction vector includes a portion of the interaction vectors in all interaction vectors.

[0277] In some embodiments, the prediction module is configured to select a preset number of interaction vectors as target interaction vectors from all interaction vectors based on the importance of each interaction vector; determine the semantic feature vector, the embedding vector of each attribute feature, and the fused feature vector of the target interaction vector; determine the predicted probabilities of the target material as a first type of material, a second type of material, and a third type of material based on the fused feature vector; and take the material category with the highest predicted probability as the click probability prediction result of the target material.

[0278] In some embodiments, the prediction module is used to determine a threshold value for each interaction vector based on a threshold function corresponding to each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector; and a preset number of interaction vectors are selected as target interaction vectors according to the threshold value.

[0279] This application also provides a model training device, which includes a second acquisition module, a generation module, and a training module.

[0280] The second acquisition module is used to acquire user information and corresponding sample data of the training object; the sample data includes multiple training samples, which are divided into first-class samples, second-class samples and third-class samples according to the sample category; among them, the click probabilities of the first-class samples, second-class samples and third-class samples are different.

[0281] The generation module is used to generate a training dataset based on the user information and sample data of the training subjects;

[0282] The training module is used to train the target model based on the training dataset to obtain the trained target model; the trained target model is used for click probability prediction.

[0283] In some embodiments, the first type of sample indicates samples that the training object has clicked; the second type of sample indicates samples that have a similarity to the first type of sample less than a first threshold and have not been clicked by the training object; the third type of sample indicates samples that have a similarity to the first type of sample greater than a second threshold and have not been clicked by the training object; the click probability corresponding to the first type of sample, the third type of sample, and the second type of sample decreases sequentially; the second threshold is greater than the first threshold.

[0284] In some embodiments, the training dataset includes multiple training data, each training data including a semantic feature vector of the training sample, a sample category label and multiple attribute features, each attribute feature being used to characterize an attribute of the training object or training sample. The training module described above is used for: obtaining target training data from the training dataset; the target training data can be any training data in the training dataset; inputting the target training data into the target model, and through the target model, obtaining the embedding vector of each attribute feature and the interaction vector of every two attribute features in the target training data, and predicting the sample category corresponding to the training sample based on the embedding vector of each attribute feature, the target interaction vector, and the semantic feature vector included in the target training data, to obtain the click probability prediction result of the training sample; the click probability prediction result indicates that the training sample is predicted to be one of the first, second, and third categories of samples; the target interaction vector includes a portion of the interaction vectors in all interaction vectors; determining the loss value based on a preset loss function, the click probability prediction result, and the sample category labels included in the target training data; if the loss value does not meet the target conditions, optimizing the model parameters of the target model based on the loss value, and returning to the step of obtaining the target training data from the training dataset; if the loss value meets the target conditions, determining that the target model training is complete.

[0285] In some embodiments, the target model includes a sparse operation-aware embedding layer, a multilayer perceptron layer, and an output layer. The sparse operation-aware embedding layer is used to acquire the embedding vector of each attribute feature and the interaction vector between every two attribute features in the input target training data, select a preset number of interaction vectors as target interaction vectors based on the importance of each interaction vector, and output the embedding vector of each attribute feature and the target interaction vector. The multilayer perceptron layer is used to determine a fused feature vector of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector based on the input semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector, and output the fused feature vector. The output layer is used to determine the predicted probabilities of the training samples as first-class, second-class, and third-class samples based on the input fused feature vector, and output the sample class with the highest predicted probability as the click probability prediction result of the training sample.

[0286] In some embodiments, the sparse operation-aware embedding layer is configured to: acquire individual training data based on user information and each training sample in the sample data; the training sample indicates one of a first class of samples, a second class of samples, and a third class of samples; and determine a set of multiple training data as a training dataset.

[0287] In some embodiments, the above-described generation module is used to obtain each training data based on user information and each training sample in the sample data; the training sample indicates one of the first type of sample, the second type of sample, and the third type of sample; and the set of multiple training data is determined as the training dataset.

[0288] This application provides a computer program product comprising a computer program or executable instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer program or executable instructions from the computer-readable storage medium and executes the computer program or executable instructions, causing the computer device to perform the model training method or click-through rate prediction method described in this application.

[0289] This application provides a computer-readable storage medium storing a computer program or executable instructions. When the computer program or executable instructions are executed by a processor, the processor will execute the model training method provided in this application. For example... Figure 2 The click-through rate prediction method shown, or the click-through rate prediction method provided in the embodiments of this application, for example, Figure 3 The model training method is shown.

[0290] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0291] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0292] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0293] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0294] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A click-through rate prediction method, characterized in that, include: Obtain user information and target materials for the recommended object; the target materials are materials intended to be recommended to the recommended object. Based on the user information and the target material, the target model is used to predict the material category corresponding to the target material to obtain the click probability prediction result of the target material; The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material, wherein the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different; the click probability represents the probability that the recommended object clicks on the target material when the target material is recommended to the recommended object.

2. The click-through rate prediction method according to claim 1, characterized in that, The first type of material is equivalent to the first type of sample that the recommended object has clicked; the second type of material is equivalent to the second type of sample whose similarity to the first type of sample is less than a first threshold and which the recommended object has not clicked; the third type of material is equivalent to the third type of sample whose similarity to the first type of sample is greater than a second threshold and which the recommended object has not clicked; the click probability of the first type of material, the third type of material, and the second type of material decreases in that order; the second threshold is greater than the first threshold.

3. The click-through rate prediction method according to claim 1, characterized in that, The step of predicting the click probability prediction result of the target material based on the user information and the target material using a target model includes: Based on the user information and the target material, multiple attribute features and a semantic feature vector of the target material are generated; each attribute feature is used to characterize an attribute of the recommended object or the target material. The multiple attribute features and the semantic feature vector are input into the target model. Through the target model, the embedding vector of each attribute feature and the interaction vector of every two attribute features are obtained. Based on the semantic feature vector, the embedding vector of each attribute feature and the target interaction vector, the material category corresponding to the target material is predicted to obtain the click probability prediction result of the target material. The target interaction vector includes a portion of the interaction vectors in the total interaction vectors.

4. The click-through rate prediction method according to claim 3, characterized in that, The step of predicting the material category corresponding to the target material based on the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector, to obtain the click probability prediction result of the target material, includes: Based on the importance of each interaction vector, a predetermined number of interaction vectors are selected from all interaction vectors as the target interaction vectors; Determine the fusion feature vector of the semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector; Based on the fused feature vector, the predicted probabilities of the target material being the first type of material, the second type of material, and the third type of material are determined. The material category with the highest predicted probability is used as the predicted click probability result for the target material.

5. The click-through rate prediction method according to claim 4, characterized in that, The step of selecting a predetermined number of interaction vectors as the target interaction vectors from all interaction vectors based on the importance of each interaction vector includes: Based on the threshold function corresponding to each interaction vector, a threshold value is determined for each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector. A preset number of interaction vectors are selected as the target interaction vectors based on the threshold value.

6. A model training method, characterized in that, include: Obtain user information and corresponding sample data of the training object; the sample data includes multiple training samples, which are divided into a first type of sample, a second type of sample, and a third type of sample according to the sample category, wherein the click probabilities of the first type of sample, the second type of sample, and the third type of sample are different; A training dataset is generated based on the user information of the training object and the sample data; Based on the training dataset, the target model is trained to obtain the trained target model; the trained target model is used for click probability prediction.

7. The model training method according to claim 6, characterized in that, The first type of sample indicates samples that the training object has clicked; the second type of sample indicates samples that have a similarity of less than a first threshold with the first type of sample and that the training object has not clicked; the third type of sample indicates samples that have a similarity of greater than a second threshold with the first type of sample and that the training object has not clicked. The click probabilities of the first type of sample, the third type of sample, and the second type of sample decrease sequentially; the second threshold is greater than the first threshold.

8. The model training method according to claim 6, characterized in that, The training dataset includes multiple training data sets, each of which includes a semantic feature vector of a training sample, a sample category label, and multiple attribute features. Each attribute feature is used to characterize an attribute of the training object or the training sample. The step of training the target model based on the training dataset to obtain the trained target model includes: Obtain target training data from the training dataset; the target training data is any one of the training data in the training dataset. The target training data is input into the target model. The target model then obtains the embedding vector of each attribute feature and the interaction vector between every two attribute features from the multiple attribute features included in the target training data. Based on the embedding vector of each attribute feature, the target interaction vector, and the semantic feature vectors included in the target training data, the sample category corresponding to the training sample is predicted, resulting in a click probability prediction result for the training sample. The target interaction vector includes a portion of all interaction vectors. The click probability prediction result indicates that the training sample is predicted to be one of three categories: a first-class sample, a second-class sample, or a third-class sample. The loss value is determined based on the preset loss function, the click probability prediction result, and the sample category labels included in the target training data; If the loss value does not meet the target condition, optimize the model parameters of the target model based on the loss value, and return to the step of obtaining the target training data from the training dataset; If the loss value meets the target condition, the training of the target model is considered complete.

9. The model training method according to claim 8, characterized in that, The target model includes a sparse operation perceptual embedding layer, a multilayer perceptron layer, and an output layer. The sparse operation-aware embedding layer is used to obtain the embedding vector of each attribute feature and the interaction vector of every two attribute features in the input target training data, select a preset number of interaction vectors as target interaction vectors based on the importance of each interaction vector, and output the embedding vector of each attribute feature and the target interaction vector. The multilayer perceptron layer is used to determine, based on the input semantic feature vector, the embedding vector of each attribute feature, and the target interaction vector, a fused feature vector of the semantic feature vector, and output the fused feature vector. The output layer is used to determine the predicted probabilities of the training samples as the first type of sample, the second type of sample, and the third type of sample based on the input fused feature vector, and outputs the sample category with the highest predicted probability as the click probability prediction result of the training sample.

10. The model training method according to claim 9, characterized in that, The sparse operation-aware embedding layer is used for: Based on the threshold function corresponding to each interaction vector, a threshold value is determined for each interaction vector; the threshold value is used to represent the importance of the corresponding interaction vector. A preset number of interaction vectors are selected as the target interaction vectors based on the threshold value.

11. A click-through rate prediction device, characterized in that, The device includes: The first acquisition module is used to acquire user information and target materials of the recommended object; the target materials are materials that are intended to be recommended to the recommended object. The prediction module is used to predict the material category corresponding to the target material based on the user information and the target material through the target model, so as to obtain the click probability prediction result of the target material; The click probability prediction result indicates that the target material is predicted to be one of the first type of material, the second type of material, and the third type of material, wherein the click probabilities corresponding to the first type of material, the second type of material, and the third type of material are different; the click probability represents the probability that the recommended object clicks on the target material when the target material is recommended to the recommended object.

12. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs; The processor, when executing executable instructions or computer programs stored in the memory, implements the click-through rate prediction method according to any one of claims 1 to 5, or implements the model training method according to any one of claims 6 to 10.