Content recommendation method and device, computer device, readable storage medium and program product
By constructing a fixed-length embedding vector and transforming the vector length using the feature coefficient vector, a variable-length embedding vector is generated. This solves the problem of decreased recommendation accuracy caused by the fixed embedding vector length in existing models, and improves the accuracy of content recommendation and the efficiency of computational resource utilization.
Patent Information
- Application Number
- CN202510687299.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-26
- Publication Date
- 2026-11-27
AI Technical Summary
Existing content recommendation models cannot effectively adjust the length of the embedding vector when dealing with sparse features, resulting in decreased recommendation accuracy, low computational efficiency, high storage overhead, and inability to fully express complex data relationships.
By constructing fixed-length embedding vectors and concatenating them into concatenated embedding feature vectors, and then using feature coefficient vectors to transform the vector length, variable-length embedding vectors are generated, dynamically adjusting feature importance and breaking through the constraint of fixed-length embedding features.
It improves the accuracy of content recommendation, reduces the consumption of computing resources, enhances the utilization efficiency of computing resources, and strengthens the model's generalization ability and recommendation accuracy.
Smart Images

Figure CN123178671A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a content recommendation method, apparatus, computer device, computer-readable storage medium, and computer program product. Background Technology
[0002] With the development of computer technology, content recommendation technology based on machine learning has emerged. This involves training a recommendation model using machine learning, and then using the trained model to recommend relevant content to users, thereby improving the success rate of recommendations. User and content feature information serves as the basic input data for the recommendation model. These features are generally discrete numerical values, which are typically transformed into embedding vectors for further processing. After the feature information is transformed into embedding vectors, all embedding vectors have the same length. However, due to the varying sparsity of different features and their varying importance to the model, theoretically, the lengths of their embedding vectors should also differ. Therefore, this feature transformation method may affect the accuracy of recommendation processing.
[0003] Currently, the Adaptive Twin Mask Learning Model (ATML) can be used to process embedded features and adaptively learn the optimal length of the embedded features. However, this model can only optimize the length of the embedded features based on the feature frequency, which will affect the accuracy of content recommendation processing based on these features. Summary of the Invention
[0004] Therefore, it is necessary to provide a content recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product that can improve the accuracy of content recommendation in order to address the above-mentioned technical problems.
[0005] Firstly, this application provides a content recommendation method, including:
[0006] Upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request;
[0007] Each of the sparse features is embedded to obtain a fixed-length embedding vector corresponding to each sparse feature.
[0008] The fixed-length embedding vectors corresponding to each sparse feature are concatenated to obtain the concatenated embedding feature vector.
[0009] Determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector;
[0010] The target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed based on the target recommended content.
[0011] Secondly, this application also provides a content recommendation device, comprising:
[0012] The feature lookup module is used to look up the sparse features associated with the content recommendation request when a content recommendation request is received.
[0013] An embedding processing module is used to perform embedding processing on each of the sparse features to obtain a fixed-length embedding vector corresponding to each of the sparse features.
[0014] The vector concatenation module is used to concatenate the fixed-length embedding vectors corresponding to each of the sparse features to obtain a concatenated embedded feature vector.
[0015] The feature transformation module is used to determine the feature coefficient vector corresponding to the spliced embedded feature vector, and to perform vector length transformation on the spliced embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector;
[0016] The content recommendation module is used to determine the target recommended content of the content recommendation request based on the variable-length embedding vector, and to perform content recommendation processing based on the target recommended content.
[0017] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0018] Upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request;
[0019] Each of the sparse features is embedded to obtain a fixed-length embedding vector corresponding to each sparse feature.
[0020] The fixed-length embedding vectors corresponding to each sparse feature are concatenated to obtain the concatenated embedding feature vector.
[0021] Determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector;
[0022] The target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed based on the target recommended content.
[0023] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following steps:
[0024] Upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request;
[0025] Each of the sparse features is embedded to obtain a fixed-length embedding vector corresponding to each sparse feature.
[0026] The fixed-length embedding vectors corresponding to each sparse feature are concatenated to obtain the concatenated embedding feature vector.
[0027] Determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector;
[0028] The target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed based on the target recommended content.
[0029] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, performs the following steps:
[0030] Upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request;
[0031] Each of the sparse features is embedded to obtain a fixed-length embedding vector corresponding to each sparse feature.
[0032] The fixed-length embedding vectors corresponding to each sparse feature are concatenated to obtain the concatenated embedding feature vector.
[0033] Determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector;
[0034] The target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed based on the target recommended content.
[0035] The aforementioned content recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product, upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request to obtain the basic data for the content recommendation process. Each sparse feature is then embedded to obtain a fixed-length embedding vector. These fixed-length embedding vectors are then concatenated to obtain a concatenated embedding feature vector, thus transforming the original features into a dense, learnable embedding vector representation. Next, the feature coefficient vector corresponding to the concatenated embedding feature vector is determined, and its length is transformed based on the feature coefficient vector to obtain a variable-length embedding vector. By learning the feature coefficient vector corresponding to the concatenated embedding feature vector and then transforming its length using the feature coefficient vector, differentiated length transformations and dynamic adjustments to the importance of different features in the concatenated embedding feature vector are achieved. Finally, the target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed according to the target recommended content, thereby improving the accuracy of content recommendation. This application addresses content recommendation requests by constructing fixed-length embedding vectors from relevance sparse features and concatenating them into a concatenated embedding feature vector. Then, by using the feature coefficient vectors corresponding to the concatenated embedding feature vector, the vector length is transformed. Specifically, based on the feature coefficient vectors determined by the information within the concatenated embedding feature vector itself, the importance of each feature in the concatenated embedding feature vector is adjusted, resulting in a variable-length embedding vector. This means that for different content recommendation requests, the vector length corresponding to the same embedding feature is not fixed, breaking the constraint of fixed-length embedding features and thus improving the accuracy of content recommendation. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0037] Figure 1 This is a diagram illustrating the application environment of a content recommendation method in one embodiment.
[0038] Figure 2 This is a flowchart illustrating a content recommendation method in one embodiment;
[0039] Figure 3 This is a schematic diagram of the system architecture of an advertising recommendation system in one embodiment;
[0040] Figure 4This is a schematic diagram of a linear rectification function in one embodiment;
[0041] Figure 5 This is a schematic diagram of the structure of a variable-length embedded module in one embodiment;
[0042] Figure 6 This is a schematic diagram of the content recommendation model in one embodiment;
[0043] Figure 7 This is a schematic diagram illustrating the effect of displaying advertisements as recommended content in one embodiment;
[0044] Figure 8 This is a schematic diagram illustrating the model ranking capabilities of an existing model and the content recommendation model of this application in one embodiment;
[0045] Figure 9 This is a structural block diagram of a content recommendation device in one embodiment;
[0046] Figure 10 This is an internal structural diagram of a computer device in one embodiment;
[0047] Figure 11 This is a diagram of the internal structure of a computer device in another embodiment. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0049] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0050] The content recommendation method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with content recommendation server 104 via a network, and content recommendation server 104 communicates with model training server 106. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated into content recommendation server 104 or placed in the cloud or on other network servers. First, content recommendation server 104 can collect historical content recommendation data to form training samples. Then, it trains the content recommendation model through model training server 106. After the model training is complete, it is deployed to content recommendation server 104. When a user of terminal 102 triggers a content recommendation request, the request is submitted to content recommendation server 104 through terminal 102. Content recommendation server 104 then performs content recommendation processing based on the content recommendation model. Upon receiving a content recommendation request, the content recommendation server 104 searches for the sparse features associated with the request; performs embedding processing on each sparse feature to obtain a fixed-length embedding vector; concatenates these fixed-length embedding vectors to obtain a concatenated embedding feature vector; determines the feature coefficient vector corresponding to the concatenated embedding feature vector; performs a vector length transformation on the concatenated embedding feature vector based on the feature coefficient vector to obtain a variable-length embedding vector; determines the target recommendation content based on the variable-length embedding vector, and performs content recommendation processing according to the target recommendation content. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, projection devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Head-mounted devices can include virtual reality (VR) devices, augmented reality (AR) devices, smart glasses, etc. The recommendation server 104 and the model training server 106 can be independent physical servers, or a server cluster or distributed system consisting of multiple physical servers, or cloud servers that provide cloud computing services.
[0051] In one exemplary embodiment, such as Figure 2 As shown, a content recommendation method is provided, which is then applied to... Figure 1 Taking content recommendation server 104 as an example, the explanation includes the following steps 201 to 209. Among them:
[0052] Step 201: Upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request.
[0053] A content recommendation request refers to a request submitted by an object through terminal 102 to the content recommendation server 104, requesting the server to recommend relevant content. By processing the content recommendation request, the selected recommended content can be pushed to the corresponding position on the terminal 102's display screen for processing and display, thereby helping the object on terminal 102 obtain the recommended information. The content recommendation request includes object-related information and contextual information from terminal 102. The sparse features associated with the content recommendation request refer to the large-scale discrete sparse features applied to the recommendation system. These features are records of the current content recommendation request information, including object features of the object on terminal 102, content features of the content to be recommended (content ID, content category, content tags, etc.), and contextual features (request time, terminal model, recommendation bar information, etc.). Different features have different values and formats, and the content recommendation system will uniformly convert them into discrete IDs for processing. Generally, the number of discrete features in a content recommendation system is in the hundreds of millions. Sparse features are features where most elements in the feature vector are zero or close to zero, with only a few elements being non-zero. Sparse features are typically used to describe high-dimensional data where only a few features in the feature vector of each sample are meaningful, while others contribute nothing. In practical recommender systems, usually only a few features significantly contribute to the model's predictions during the content recommendation process. Therefore, many features are zero or close to zero in the feature vector, resulting in a sparse feature vector.
[0054] For example, when an object browses various content through terminal 102, it may need the system to recommend some new content. At this time, the object can trigger a request generation process by operating terminal 102, and the generated content recommendation request will be submitted to server 104 through terminal 102. Server 104 then determines the content to be recommended to terminal 102 based on the content recommendation request. First, upon receiving the content recommendation request, server 104 extracts various information contained in the request, including object-related information such as object identifier and object category, as well as contextual information such as request time, device model, and recommendation position information. Then, based on this information, it searches for potential recommended content in the system—this process is called the recall process. It selects a set of recommended content that the current user is likely to be interested in from the full content library and passes the results to the downstream coarse-ranking stage. Generally, the set of recommended content selected during recall is on the order of thousands. After recall, the recommended content can be obtained through coarse-ranking. Then, based on the information carried by the content recommendation request and the recommended content, the sparse features associated with the content recommendation request are obtained. Here, for each piece of content to be recommended, it can be combined with the information contained in the content recommendation request. A set of sparse features is then constructed for each combination. Content recommendation processing is then performed based on the sparse features of each piece of content to be recommended, and target recommended content is selected through processes such as coarse ranking and fine ranking. In one embodiment, referring to... Figure 3 As shown, this application applies to the recommendation processing of advertising content. When client 301 displays an advertisement to a user, the event tracking system 303 of the advertising system platform 302 records various advertising behaviors of the user, including exposure, clicks, conversions, etc., and reports them to the log platform 304 for aggregation. After aggregation, the log platform 304 associates features with the feature platform 305, constructs training samples, and sends them to the model for training. During model training, model parameters are exported periodically, and the online inference system loads the exported model parameters. When a user sends a new advertising request, the ranking system 306 scores and ranks the advertisements in the advertising library, and finally returns the appropriate advertisement to the client for display to the user. This application can perform content recommendation processing through a trained content recommendation model. Upon receiving a content recommendation request, the feature platform can be used to find the sparse features associated with the content recommendation request. Then, these feature data are processed based on the trained content recommendation model.
[0055] Step 203: Perform embedding processing on each sparse feature to obtain a fixed-length embedding vector corresponding to each sparse feature.
[0056] Feature embedding is the process of mapping high-dimensional, sparse, or discrete features to a low-dimensional, dense, continuous vector space, enabling generalization. The mainstream modeling paradigm in industry recommendation models involves converting large-scale sparse, discrete features into embedded features, concatenating them, and then stacking them into complex deep learning network structures. Feature embedding can significantly improve model performance. Specifically, feature embedding can be implemented through embedding layers, where sparse features are transformed into corresponding fixed-length embedding vectors after processing.
[0057] For example, directly processing the sparse features associated with content recommendation requests can lead to low computational efficiency, high storage overhead, and the curse of dimensionality, and it also fails to fully express the complex relationships within the data. Therefore, feature embedding can be used to optimize the original sparse features. By performing feature embedding on the sparse features separately, high-dimensional sparse features can be mapped to low-dimensional dense vectors, significantly reducing feature dimensionality while retaining important information, reducing model complexity, lowering the risk of overfitting, and improving the model's generalization ability. Mapping different features to a unified vector space facilitates the fusion and processing of multimodal data. Therefore, in the content recommendation process, the sparse features are first input into a trained embedding layer for embedding, resulting in fixed-length embedding vectors for each sparse feature. In one embodiment, this application is applied to advertising content recommendation processing. In this case, a corresponding advertising recommendation model can be trained for advertising content recommendation, and the embedding layer included in the advertising recommendation model can also be used for embedding the sparse features after the model training is completed.
[0058] Step 205: Concatenate the fixed-length embedding vectors corresponding to each sparse feature to obtain the concatenated embedding feature vector.
[0059] For example, after obtaining the fixed-length embedding vectors corresponding to each sparse feature, these fixed-length embedding vectors can be concatenated together. For instance, for N fixed-length embedding vectors of length d, concatenation yields a concatenated embedding feature vector of length N * d. Subsequent content recommendation processing can then be performed based on this concatenated embedding feature vector.
[0060] Step 207: Determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector.
[0061] The feature coefficient vector is a coefficient vector used in this application to optimize the feature length of different features in the concatenated embedded feature vector. The feature coefficient vector is obtained based on the input concatenated embedded feature vector. The feature coefficient vector has the same length as the concatenated embedded feature vector and contains some zero-based elements. Therefore, the vector length of the concatenated embedded feature vector can be transformed based on this feature coefficient vector to obtain the concatenated embedded feature vector with a changed vector length, i.e., a variable-length embedded vector.
[0062] For example, the applicant found that in recommender systems, due to the varying sparsity of different features and their varying importance to the model, the lengths of their embedding vectors should theoretically differ. However, current feature length optimization methods can only optimize the embedding feature length based on feature frequency. Regardless of the sample, the feature length of the same feature remains constant, ignoring the fact that even the same feature has different importance in different samples. For instance, in a content recommendation process, sample 1 contains object category feature a and object age feature b, while sample 2 contains object category feature c and object age feature d. Most samples contain features a and d. Therefore, for sample 1, object age feature b is more important than feature d in sample 2 and should have a longer length to reflect its importance. For sample 2, object category feature c is more important than feature a in sample 1 and should also have a longer length to reflect its importance. However, in existing solutions, features a and c of the same category have the same length, as do b and d. Therefore, this application constructs a feature coefficient vector corresponding to the concatenated embedded feature vector to perform vector length transformation on the concatenated embedded feature vector, thereby adjusting the length of each embedded vector to obtain a variable-length embedded vector. In one embodiment, the feature coefficient vector can be obtained by training a variable-length embedding module. For example, in the advertising recommendation domain, training samples can be constructed based on historical advertising recommendation information, and the variable-length embedding module can be added as a model sub-module to the advertising recommendation model for training. The variable-length embedding module specifically includes multiple fully connected layers. During training, these fully connected layers can model the vector length adjustment strategy in the advertising recommendation domain, using the supervision signal of the samples to guide the learning of the optimal length of the embedded features, breaking through the fixed-length constraint of the embedded features. After training is completed, the corresponding fixed-length embedding vector can be input into the variable-length embedding module to perform the corresponding vector length transformation processing.
[0063] Step 209: Determine the target recommended content for the content recommendation request based on the variable-length embedding vector, and perform content recommendation processing based on the target recommended content.
[0064] For example, after obtaining the variable-length embedding vector, this vector can be used as the basic data for the content recommendation process to determine the target recommended content from among the various content to be recommended, and then perform content recommendation processing based on the target recommended content. Recommendation systems generally include processes such as recall, coarse ranking, and fine ranking. This application can specifically be applied to the fine ranking process to process the content to be recommended selected after recall and coarse ranking. Here, for each content to be recommended obtained from coarse ranking, the above processing can be used to obtain the corresponding variable-length embedding vector. Then, based on the variable-length embedding vector, a recommendation score for each content to be recommended is determined. Specifically, this can be based on predicting the click-through rate and conversion rate of the content to be recommended, obtaining a score, and then selecting the target recommended content based on the score, and performing content recommendation processing based on the target recommended content.
[0065] The aforementioned content recommendation method, apparatus, computer equipment, computer-readable storage medium, and computer program product, upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request to obtain the basic data for the content recommendation process. Each sparse feature is then embedded to obtain a fixed-length embedding vector. These fixed-length embedding vectors are then concatenated to obtain a concatenated embedding feature vector, thus transforming the original features into a dense, learnable embedding vector representation. Next, the feature coefficient vector corresponding to the concatenated embedding feature vector is determined, and its length is transformed based on the feature coefficient vector to obtain a variable-length embedding vector. By learning the feature coefficient vector corresponding to the concatenated embedding feature vector and then transforming its length using the feature coefficient vector, differentiated length transformations and dynamic adjustments to the importance of different features in the concatenated embedding feature vector are achieved. Finally, the target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed according to the target recommended content, thereby improving the accuracy of content recommendation. This application addresses content recommendation requests by constructing fixed-length embedding vectors from relevance sparse features and concatenating them into a concatenated embedding feature vector. Then, by using the feature coefficient vectors corresponding to the concatenated embedding feature vector, the vector length is transformed. Specifically, based on the feature coefficient vectors determined by the information within the concatenated embedding feature vector itself, the importance of each feature in the concatenated embedding feature vector is adjusted, resulting in a variable-length embedding vector. This means that for different content recommendation requests, the vector length corresponding to the same embedding feature is not fixed, breaking through the constraint of fixed-length embedding features to further improve model performance and thus increase the accuracy of model-based content recommendation. Simultaneously, it overcomes the problem of low recommendation success rates leading to continuous user requests for recommendations, consuming significant computing resources and thus impacting computational resource utilization efficiency, thereby improving computational resource utilization efficiency.
[0066] In an exemplary embodiment, determining the feature coefficient vector corresponding to the spliced embedding feature vector in step 207 includes: inputting the spliced embedding feature vector into a fully connected layer for fully connected processing to obtain a fully connected feature vector with the same length as the spliced embedding feature vector; and performing zero-activation processing on the fully connected feature vector to set some elements in the fully connected feature vector to zero to obtain the feature coefficient vector.
[0067] The fully connected layer used for concatenating and embedding feature vectors comprises a multi-layer fully connected layer structure. This structure performs fully connected processing on the concatenated and embedded feature vectors. A fully connected layer (FC layer) is a common structure in neural networks, its main function being to perform linear or non-linear transformations on input features to extract higher-level feature representations. In this application, feature interaction between embedded vectors is achieved through fully connected layers. Feature interaction is a crucial function of fully connected layers, capable of capturing complex relationships between features and enhancing the model's expressive power. In one embodiment, the fully connected layer can be implemented using a multilayer perceptron (MLP). In other embodiments, the fully connected layer can also be implemented using other network structures. The zero-set activation process is used to set some elements of the feature coefficient vector to zero, thus allowing the resulting feature coefficient vector to be used to adjust the lengths of different embedded features in the concatenated and embedded feature vectors.
[0068] For example, this application specifically learns the relationship between different embedding features of fixed-length embedding vectors through fully connected layers. Feature cross-processing within the fully connected layers allows for sufficient feature interaction between the fixed-length embedding vectors. In the fully connected processing, the length of the output vector of the intermediate fully connected layers can differ from the length of the input fixed-length embedding vector, but the length of the output vector of the last layer must be consistent with the length of the input fixed-length embedding vector. This allows the feature coefficient vector to perform vector length transformation on the fixed-length embedding vector. The fully connected feature vector output from the last fully connected layer undergoes a zero-activation process to set some elements in the fully connected feature vector to zero, resulting in the final feature coefficient vector. In one embodiment, the solution of this application is applied to advertising recommendation processing. A variable-length embedding module containing multiple MLP layers is pre-constructed, while the final output of the variable-length embedding module is restricted to have the same length as the input. Sample data from the advertising recommendation domain is then collected, and the advertising recommendation model including the variable-length embedding module is trained to optimize the model parameter structure, ultimately obtaining a variable-length embedding module that can be used to generate feature coefficient vectors.
[0069] In this embodiment, a feature coefficient vector is generated based on the concatenation of the embedded feature vector through fully connected layer processing and zero-setting activation processing. This feature coefficient vector guides the learning of the optimal length of the embedded features, breaking through the constraint of fixed length of embedded features and effectively improving the recommendation accuracy of the recommendation model.
[0070] Furthermore, the fully connected feature vector is subjected to zero-activation processing to set some elements in the fully connected feature vector to zero, thereby obtaining the feature coefficient vector. This process involves using a linear rectifier function to perform zero-activation processing on the fully connected feature vector to set some elements in the fully connected feature vector to zero, thereby obtaining the feature coefficient vector.
[0071] For example, the Rectified Linear Unit (ReLU), also known as the Modified Linear Unit, is a commonly used activation function in artificial neural networks. It typically refers to nonlinear functions, such as the ramp function and its variants, that can perform nonlinear transformations. For more details on ReLU, please refer to [link to ReLU documentation]. Figure 4 As shown, the linear rectified function is R(z) = max(0, z), which means that when the input z is greater than or equal to 0, the output is z, and when z is less than 0, the output is 0, thus suppressing negative values and retaining positive values. This application mainly utilizes the properties of the ReLU activation function itself to set some elements of the feature coefficient vector to 0. After obtaining the fully connected feature vector, a layer of linear rectified ReLU activation function is applied to set some elements of the fully connected feature vector to 0, resulting in a feature coefficient vector. This feature coefficient vector can then set some elements of the embedded features in the concatenated embedded feature vector to zero, achieving vector length transformation. In this embodiment, the zero-setting activation process is performed using a linear rectified function, generating a feature coefficient vector based on the concatenated embedded feature vector. This feature coefficient vector guides the learning of the optimal length of the embedded features, breaking through the constraint of fixed embedded feature length and effectively improving the recommendation accuracy of the recommendation model.
[0072] In an exemplary embodiment, step 207, which involves transforming the length of the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector, includes: determining the element-wise product of the feature coefficient vector and the concatenated embedded feature vector; and transforming the length of the concatenated embedded feature vector based on the element-wise product to obtain a variable-length embedded vector.
[0073] The element-wise product, also known as the Hadamard product, is the product of two vectors of the same dimension, multiplied element-wise at corresponding positions to obtain a new vector. Given two vectors of the same dimension... and Then the element-wise product of vectors a and b can be defined as c = ⊙ c= , where ⊙ is the operator for the element-wise product of vectors.
[0074] For example, this application can perform vector length transformation using element-wise multiplication. Since some elements in the feature coefficient vector are already set to zero, the element-wise multiplication of two vectors of the same dimension can multiply the elements at corresponding positions, thus reflecting the zeroed elements in the resulting variable-length embedding vector. Assume that the concatenated embedding feature vector is obtained by concatenating n embedding features of length d. Its corresponding eigenvalue vector is Then, the feature coefficient vector can be multiplied element-wise with the original concatenated embedding feature vector to output a variable-length embedding vector. This allows setting some elements of the concatenated embedded feature vector to 0, thereby achieving a variable-length embedding effect. In one embodiment, the solution of this application is applied to advertising recommendation processing. In this case, a variable-length embedding module containing multiple MLP layers is pre-constructed. The specific structure of the variable-length embedding module can be found in [reference needed]. Figure 5 As shown, the module's input is an n*d concatenated embedding feature vector, where each element is non-zero (represented by black circles). The module also includes k MLP layers for fully connected processing. After these fully connected layers, the input is activated by a ReLU function to obtain a feature coefficient vector. This vector is then multiplied element-wise with the original concatenated embedding feature vector to perform variable-length processing. In the resulting variable-length embedding vector, some elements are set to zero (represented by white circles), thus achieving feature variable length. In this application's scheme, the length is determined by the parameters of the variable-length embedding module. These parameters are automatically learned during training, so the embedding feature length for the same feature is different in different samples. The optimal embedding feature length is learned by the supervision signal of the samples, thereby breaking through the constraint of fixed embedding feature length and further improving model performance.
[0075] In this embodiment, by determining the element-wise product of the feature coefficient vector and the concatenated embedded feature vector, the optimal length of the embedded feature is learned based on the feature coefficient vector, thus breaking through the constraint of the fixed length of the embedded feature and effectively improving the recommendation accuracy of the recommendation model.
[0076] In an exemplary embodiment, step 201 includes: upon receiving a content recommendation request, obtaining object information, recommended content information, and context information associated with the content recommendation request; searching for various object features corresponding to the object information, various recommended content features corresponding to the recommended content information, and various context features corresponding to the context information; and summarizing the object features, recommended content features, and context features to obtain various sparse features associated with the content recommendation request.
[0077] Among these, object information refers to various information associated with the object, including the object's age, interests, and object category. Recommended content information refers to the various attribute information of the content to be recommended, including content ID, content category, and content tags. Contextual information comprises various information related to the recommendation request, including request time, requested device model, and the device's recommendation placement information.
[0078] For example, upon receiving a content recommendation request, content recommendation processing can begin, and the foundational data for this process consists of various types of information related to the request. This application specifically records this request using three types of information: object information associated with the content recommendation request, recommended content information, and contextual information. At this point, a feature platform can be used to determine the features corresponding to each of these pieces of information, including object features corresponding to the object information, recommended content features corresponding to the recommended content information, and contextual features corresponding to the contextual information. Here, the feature values and formats differ for each feature, but the feature platform will uniformly convert them into discrete numbered features for processing. Finally, by summarizing the object features, recommended content features, and contextual features, a large-scale discrete sparse feature set can be obtained, i.e., the sparse features associated with the content recommendation request.
[0079] In this embodiment, sparse features are constructed based on the object information, recommended content information, and context information associated with the content recommendation request. This allows the sparse features to effectively record request information and improve the accuracy of content recommendation based on these sparse features.
[0080] In an exemplary embodiment, step 209 includes: performing feature cross processing on the variable-length embedding vector to obtain a feature cross vector; inputting the feature cross vector into the upper-level towers corresponding to different content recommendation tasks to obtain the upper-level tower output features of each upper-level tower; performing activation processing on the upper-level tower output features to determine the analysis results of different content recommendation tasks; determining the target recommendation content of the content recommendation request based on the analysis results, and performing content recommendation processing based on the target recommendation content.
[0081] Feature cross processing refers to the process of combining two or more features in a certain way to generate new synthetic features. The aim is to capture the potential interaction relationships between features, thereby enhancing the model's expressive and predictive capabilities. Feature cross processing captures the correlation between features by concatenating two or more categorical features. In this way, non-linear relationships can be encoded into the model, providing predictive capabilities that cannot be provided by using any single feature alone. Feature cross processing can accelerate model training, reduce model complexity, and enhance the model's non-linear expressive capabilities. Network structures for feature cross processing can include DCN (Deformable Convolutional Network) v2 and IPNN (Inner Product-based Neural Network) to achieve high-order combinations of features. As for the upper-level tower, it is mainly used for extracting and recognizing input features. Generally, content recommendation processes involve multiple prediction tasks, each with its own unique tower parameters. The upper-level tower is typically a multi-layer MLP structure.
[0082] For example, after obtaining the variable-length embedding vector, the optimal target recommendation content can be determined based on the variable-length embedding vector, and content recommendation processing can be performed based on the target recommendation content. The processing of the variable-length embedding vector can specifically include feature cross-layer processing, upper-level tower processing, and output layer processing. First, in the feature cross-layer, feature cross-processing is performed on the variable-length embedding vector to obtain a feature cross-vector, which is then input into the upper-level tower. The upper-level tower contains upper-level towers for various content recommendation tasks. By inputting the feature cross-vector into the upper-level towers corresponding to different content recommendation tasks, the upper-level tower output features of each upper-level tower are obtained. Finally, the output features of each upper-level tower are activated by the sigmoid activation function in the output layer to obtain the analysis results of the content recommendation task. Finally, after determining the analysis results for different content to be recommended, the target recommendation content for the content recommendation request can be determined based on the analysis results, and content recommendation processing can be performed based on the target recommendation content. Specifically, each content to be recommended can be scored based on the analysis results, and finally, a score ranking result can be output, and content recommendation can be performed based on the score ranking result.
[0083] In this embodiment, the variable-length embedded vector is subjected to relevant feature analysis processing for the content recommendation task through feature cross-layer, upper tower layer and output layer, etc., and the final analysis result is output. Based on the analysis result, content recommendation processing is performed, which can effectively improve the accuracy of content recommendation processing.
[0084] In one exemplary embodiment, the analysis results include a click-through rate (CTR) estimate and a conversion rate estimate. Determining the target recommended content for the content recommendation request based on the analysis results, and performing content recommendation processing based on the target recommended content, includes: determining the CTR estimate and conversion rate estimate for each different content to be recommended based on the analysis results; determining the recommendation performance parameters for each different content to be recommended based on the CTR estimate and conversion rate estimate; determining the target recommended content from the content to be recommended based on the recommendation performance parameters; and performing content recommendation processing based on the target recommended content.
[0085] Click-through rate (CTR) and conversion rate (CVR) are two crucial metrics in content recommendation, used to measure the effectiveness of content recommendations. CTR refers to the percentage of users who actually click on recommended content after seeing it. Conversion rate refers to the percentage of users who complete a specific action after clicking on recommended content. CTR and conversion rate estimates are prediction parameters derived from variable-length embedding vectors, and can be used to assess the success rate of recommending content.
[0086] For example, the content recommendation task of the upper-level tower specifically includes a click-through rate (CTR) prediction task and a conversion rate (CVR) prediction task. After processing by the upper-level tower, the corresponding upper-level tower output features for each task can be obtained. Activating these two features yields the predicted CTR (pCTR) and the predicted CVR (pCVR). These predictions are used to calculate the recommendation effect parameters for different content to be recommended. In a specific embodiment, eCPM (effective cost per mille) can be used as the recommendation effect parameter, representing the recommendation revenue obtained per thousand impressions, such as the advertising revenue obtained from displaying one thousand ads. Based on the recommendation effect parameters, all content to be recommended is sorted. The target recommendation content is determined from the list of content to be recommended based on the sorting results, and content recommendation is performed based on the target recommendation content. In one embodiment, this application is applied to online advertising content recommendation, implemented based on an advertising recommendation model. When a user request is sent online, the feature and sample modules of the advertising recommendation model extract features and generate samples. These samples are then processed through recall and coarse-ranking modules, scored, and filtered to obtain a fine-ranked ad queue. For each ad in the fine-ranked ad queue, the fine-ranking model uses the above structure to calculate pCTR and pCVR, calculates eCPM using these estimates, sorts the candidate queue ads, and obtains the ad with the final exposure.
[0087] In this embodiment, by determining the estimated click-through rate and conversion rate, and then determining the recommendation effect parameters to screen the content to be recommended, the target recommended content can be determined, which can effectively ensure the accuracy and efficiency of the target recommended content screening.
[0088] In an exemplary embodiment, step 203 includes: inputting each sparse feature into a preset content recommendation model, embedding each sparse feature through the content recommendation model to obtain a fixed-length embedding vector corresponding to each sparse feature, and the preset content recommendation model is trained through historical recommendation result data.
[0089] For example, this application can specifically train a content recommendation model using historical recommendation result data. During content recommendation, the trained model can be used for content recommendation processing. This content recommendation model can include an embedding layer structure to embed the sparse features of the input, transforming sparse vectors into dense embedding features. This preset content recommendation model is specifically trained based on historical recommendation result data. For specific recommendation scenarios, historical recommendation result data can be collected to construct sample data for model training. Then, the preset content recommendation model is trained based on this sample data. For example, in an advertising recommendation scenario, when a client displays an advertisement to a user, the advertising system's tracking system records various user advertising behaviors, including exposure, clicks, and conversions, and reports this data to a log platform for aggregation. The log platform then associates features with a feature platform, constructs training samples, and feeds them into the model for training, resulting in the preset content recommendation model. After training, this preset content recommendation model can be used for real-time content recommendation processing.
[0090] In this embodiment, a preset content recommendation model is trained based on historical recommendation result data, and then the preset content recommendation model is used to filter recommended content, thereby effectively ensuring the efficiency and accuracy of recommended content filtering.
[0091] Further, determining the feature coefficient vector corresponding to the concatenated embedded feature vector, and then performing variable-length processing on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector includes: determining the feature coefficient vector corresponding to the concatenated embedded feature vector through the variable-length embedding module of the content recommendation model, and performing vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector. That is, in the scheme of this application, the vector length transformation process for the concatenated embedded feature vector can be specifically implemented through the variable-length embedding module. After obtaining the concatenated embedded feature vector, it can be input into the variable-length embedding module, which determines its corresponding feature coefficient vector, and then performs vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector.
[0092] In an exemplary embodiment, the method further includes: obtaining the trained original content recommendation model and the initial variable-length embedding module; incorporating the initial variable-length embedding module into the original content recommendation model to obtain the module training model; obtaining historical recommendation result data of the application scenarios of the original content recommendation model; constructing model training samples based on the historical recommendation result data; and performing model training processing on the module training model based on the model training samples to obtain the content recommendation model.
[0093] The original content recommendation model, which has been trained, refers to a model that can be used for content recommendation based on sample data. However, this model is already online and does not include a variable-length embedding module, so it cannot perform feature variable-length processing during the content recommendation process. The initial variable-length embedding module, on the other hand, refers to a variable-length embedding module that has not been trained with scenario data and whose module parameters have not been updated.
[0094] For example, this application can also load a variable-length embedding module onto an existing content recommendation model to achieve a warm-start effect without training the content recommendation model from scratch. By incorporating the initial variable-length embedding module into the original content recommendation model, a new module to be trained is obtained. After constructing model training samples based on historical recommendation result data, this model can be trained based on these training samples to obtain the content recommendation model. Since the original content recommendation model that has already been trained is used, this training process mainly focuses on training and updating the parameters of the initial variable-length embedding module, which can effectively ensure the efficiency of model training. The content recommendation model obtained after training can then be applied to content recommendation processing in real-world scenarios.
[0095] In this embodiment, by adding an initial variable-length embedding module to the original content recommendation model, a hot start process for the feature variable-length process is achieved, which can be seamlessly integrated with the online service model to achieve plug-and-play functionality.
[0096] In one embodiment, this application is used for recommending advertising content, and the structure of the complete advertising content model can be referred to Figure 6 As shown, the system includes an embedding layer 601, a variable-length embedding module 602, a feature cross-layer 603, an upper-level tower layer 604, and an output layer 605. Each sparse feature is input into the embedding layer 601 for embedding processing, resulting in a fixed-length embedding vector. This vector is then concatenated and input into the variable-length embedding module 602 for vector length transformation, resulting in a variable-length embedding vector. This variable-length embedding vector is then input into the feature cross-layer 603 for feature cross-processing, resulting in a feature cross-vector input into the upper-level tower layer 604. The upper-level tower extracts and identifies the feature cross-vector, obtaining the upper-level tower output features, which are then input into the output layer for activation processing, thus yielding the various analysis results of the advertising recommendation process.
[0097] This application also provides an application scenario, which is illustrated by applying the above-mentioned content recommendation method to this application scenario. The content recommendation method specifically includes:
[0098] In advertising recommendation systems, the vast majority of features are discrete, numbered values, typically in the hundreds of millions. A common practice in advertising recommendation systems is to convert these discrete features into embedding vectors, with all feature embedding vectors having the same length. However, due to varying sparsity and importance of different features to the model, theoretically, the lengths of their embedding vectors should also differ. Therefore, this application addresses this by applying variable-length processing to these embedding feature vectors based on their importance in the samples, thereby optimizing content recommendation in advertising recommendation scenarios.
[0099] This application enables personalized ad recommendation services. Advertisers place ads in various traffic slots, and the ad system accurately predicts ad performance, selecting the most suitable ads for display to maximize conversion rates. Taking a blog as an example, when a user opens a blog, a request is triggered to the ad system. Through a series of complex sorting and bidding steps, the most suitable ad is selected from the ad library and displayed in a fixed position on the blog. The specific ad display effect can be seen in [reference needed]. Figure 7 As shown, the displayed content includes advertising images and advertising text. Users can click on the advertising content to jump to the corresponding advertising page.
[0100] For a complete advertising content system architecture and recommendation process, please refer to Figure 3 As shown, this application primarily optimizes the online inference process, focusing on the embedded features used in the inference process. Before implementation, training of the ad recommendation model and the variable-length embedding model is required. The ad system's tracking system records various user ad behaviors, including impressions, clicks, and conversions, and reports them to a log platform for aggregation. After aggregation, the log platform associates features with the feature platform, constructs training samples, and feeds them into the ad recommendation model for training. This model includes a variable-length embedding module to handle the variable-length processing of the embedded feature vectors. During model training, model parameters are periodically exported and loaded into the online ad recommendation model for ad recommendation. Then, when a user sends a new ad request, the ads in the ad library are scored and sorted, and finally, suitable ads are returned to the terminal for display to the user.
[0101] When a server equipped with an ad recommendation model receives an ad recommendation request, its feature and sample modules extract features and generate samples. These samples are then processed by recall and coarse-ranking modules, scored, and filtered to obtain a finely ranked ad queue. The content recommendation model then filters this finely ranked ad queue. It determines pCTR and pCVR, calculates eCPM using these predicted values, and ranks the candidate ads to obtain the final ad exposure. In the specific recommendation process, the content recommendation model first finds the sparse features associated with the ad recommendation request. This process involves obtaining the user information, ad information, and context information associated with the ad recommendation request. Next, it finds the object features corresponding to the user information, the ad features corresponding to the ad information, and the context features corresponding to the context information. By summarizing the object features, ad features, and context features, it obtains the sparse features associated with the ad recommendation request. The ad recommendation model then performs embedding processing on each sparse feature, obtaining a fixed-length embedding vector for each sparse feature. Finally, it concatenates these fixed-length embedding vectors to obtain a concatenated embedding feature vector. The resulting concatenated embedding feature vector is input into the variable-length embedding module of the advertising recommendation model for feature length transformation. The variable-length embedding module is essentially a gating structure. By inputting the concatenated embedding feature vector into the fully connected layer of the variable-length embedding module for fully connected processing, a fully connected feature vector with the same length as the concatenated embedding feature vector is obtained. Then, in the variable-length embedding module, the ReLU linear rectified function is used to perform zero-setting activation on the fully connected feature vector. This process sets some elements of the fully connected feature vector to zero, resulting in a feature coefficient vector. The element-wise product of the feature coefficient vector and the concatenated embedding feature vector is then determined. Based on this element-wise product, the concatenated embedding feature vector is transformed to obtain a variable-length embedding vector. The obtained variable-length embedding vectors can be processed through the feature cross layer, upper-level tower layer, and output layer of the advertising recommendation model. Feature cross processing is performed on the variable-length embedding vectors to obtain feature cross vectors. The feature cross vectors are then input into the upper-level towers corresponding to different content recommendation tasks to obtain the upper-level tower output features of each upper-level tower. Activation processing is performed on the upper-level tower output features to determine the analysis results for different content recommendation tasks, including the estimated click-through rate and conversion rate of the ads to be recommended. Then, based on the analysis results, the target ads are determined from the ads to be recommended, and the ad content recommendation process is performed based on the target ads.
[0102] To verify the effectiveness improvement of the proposed solution, offline performance validation was performed on the training platform. The model type is a pCTR (click-through rate) prediction model for video account advertising scenarios, and its offline improvement can be found in [reference needed]. Figure 8As shown, 1000205 is the control group and 1524141 is the experimental group (the scheme in this application). This scheme improved the absolute value of the AUC (a measure of the model's ranking ability) by 0.11%. The improvement in the model's ranking ability can improve the accuracy of recommendations.
[0103] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0104] Based on the same inventive concept, this application also provides a content recommendation apparatus for implementing the content recommendation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more content recommendation apparatus embodiments provided below can be found in the limitations of the content recommendation method described above, and will not be repeated here.
[0105] In one exemplary embodiment, such as Figure 9 As shown, a content recommendation device is provided, including:
[0106] The feature lookup module 902 is used to look up the sparse features associated with the content recommendation request when a content recommendation request is received.
[0107] The embedding processing module 904 is used to perform embedding processing on each sparse feature to obtain a fixed-length embedding vector corresponding to each sparse feature.
[0108] The vector concatenation module 906 is used to concatenate fixed-length embedding vectors corresponding to each sparse feature to obtain a concatenated embedded feature vector.
[0109] The feature transformation module 908 is used to determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and to perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector.
[0110] The content recommendation module 910 is used to determine the target recommended content of the content recommendation request based on the variable-length embedding vector, and to perform content recommendation processing based on the target recommended content.
[0111] In one embodiment, the feature transformation module 908 is specifically used to: input the concatenated embedded feature vector into the fully connected layer for fully connected processing to obtain a fully connected feature vector with the same length as the concatenated embedded feature vector; and perform zero-activation processing on the fully connected feature vector to set some elements in the fully connected feature vector to zero to obtain a feature coefficient vector.
[0112] In one embodiment, the feature transformation module 908 is specifically used to: perform zero-activation processing on the fully connected feature vector through a linear rectifier function, so as to set some elements in the fully connected feature vector to zero, thereby obtaining the feature coefficient vector.
[0113] In one embodiment, the feature transformation module 908 is specifically used to: determine the vector element product of the feature coefficient vector and the concatenated embedded feature vector; and perform vector length transformation on the concatenated embedded feature vector based on the vector element product to obtain a variable-length embedded vector.
[0114] In one embodiment, the feature lookup module 902 is specifically used to: upon receiving a content recommendation request, obtain the object information, recommended content information, and context information associated with the content recommendation request; look up the object features corresponding to the object information, the recommended content features corresponding to the recommended content information, and the context features corresponding to the context information; and summarize the object features, recommended content features, and context features to obtain the sparse features associated with the content recommendation request.
[0115] In one embodiment, the content recommendation module 910 is specifically used to: perform feature cross processing on the variable-length embedding vector to obtain a feature cross vector; input the feature cross vector into the upper-level tower corresponding to different content recommendation tasks to obtain the upper-level tower output features of each upper-level tower; perform activation processing on the upper-level tower output features to determine the analysis results of different content recommendation tasks; determine the target recommendation content of the content recommendation request based on the analysis results, and perform content recommendation processing based on the target recommendation content.
[0116] In one embodiment, the analysis results include a click-through rate (CTR) estimate and a conversion rate estimate; the content recommendation module 910 is specifically used to: determine the CTR estimate and conversion rate estimate corresponding to different content to be recommended based on the analysis results; determine the recommendation effect parameters corresponding to different content to be recommended based on the CTR estimate and conversion rate estimate; determine the target recommended content from the content to be recommended based on the recommendation effect parameters, and perform content recommendation processing based on the target recommended content.
[0117] In one embodiment, the embedding processing module 904 is specifically used to: input each sparse feature into a preset content recommendation model, perform embedding processing on each sparse feature through the content recommendation model, and obtain a fixed-length embedding vector corresponding to each sparse feature. The preset content recommendation model is trained using historical recommendation result data.
[0118] In one embodiment, the feature transformation module 908 is specifically used to: determine the feature coefficient vector corresponding to the concatenated embedded feature vector through the variable-length embedding module of the content recommendation model, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedding vector.
[0119] In one embodiment, a module hot-start module is further included, which is used to: obtain the trained original content recommendation model and the initial variable-length embedding module; merge the initial variable-length embedding module into the original content recommendation model to obtain the module training model; obtain historical recommendation result data of the application scenario of the original content recommendation model; construct model training samples based on the historical recommendation result data; and perform model training processing on the module training model based on the model training samples to obtain the content recommendation model.
[0120] The modules in the aforementioned recommended device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0121] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 10 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to content recommendation. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When the computer program is executed by the processor, it implements a content recommendation method.
[0122] In one exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 11 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, Near Field Communication (NFC), or other technologies. When executed by the processor, the computer program implements a content recommendation method. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0123] Those skilled in the art will understand that Figure 10 and Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0124] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0125] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0126] In one embodiment, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and executes the computer instructions, causing the computer device to perform the steps in the above method embodiments.
[0127] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0129] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A content recommendation method, characterized in that, The method includes: Upon receiving a content recommendation request, search for the sparse features associated with the content recommendation request; Each of the sparse features is embedded to obtain a fixed-length embedding vector corresponding to each sparse feature. The fixed-length embedding vectors corresponding to each sparse feature are concatenated to obtain the concatenated embedding feature vector. Determine the feature coefficient vector corresponding to the concatenated embedded feature vector, and perform vector length transformation on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector; The target recommended content for the content recommendation request is determined based on the variable-length embedding vector, and content recommendation processing is performed based on the target recommended content.
2. The method according to claim 1, characterized in that, Determining the feature coefficient vector corresponding to the concatenated embedded feature vector includes: The concatenated and embedded feature vector is input into a fully connected layer for fully connected processing to obtain a fully connected feature vector with the same length as the concatenated and embedded feature vector. The fully connected feature vector is activated by setting some elements to zero, thus obtaining the feature coefficient vector.
3. The method according to claim 2, characterized in that, The step of performing zero-activation processing on the fully connected feature vector to set some elements of the fully connected feature vector to zero, resulting in a feature coefficient vector, includes: The fully connected feature vector is activated by performing a zero-setting process using a linear rectifier function, thereby setting some elements of the fully connected feature vector to zero and obtaining the feature coefficient vector.
4. The method according to claim 1, characterized in that, The step of transforming the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector includes: Determine the element-wise product of the feature coefficient vector and the concatenated embedded feature vector; The concatenated embedded feature vector is transformed by the element-wise product of the vectors to obtain a variable-length embedded vector.
5. The method according to claim 1, characterized in that, Upon receiving a content recommendation request, the step of searching for the sparse features associated with the content recommendation request includes: Upon receiving a content recommendation request, obtain the object information, recommended content information, and context information associated with the content recommendation request; Find the object features corresponding to the object information, the recommended content features corresponding to the recommended content information, and the context features corresponding to the context information; By summarizing the object features, the recommended content features, and the context features, the sparse features associated with the content recommendation request are obtained.
6. The method according to claim 1, characterized in that, The step of determining the target recommended content for the content recommendation request based on the variable-length embedding vector, and performing content recommendation processing based on the target recommended content, includes: The variable-length embedding vector is subjected to feature crossing processing to obtain a feature crossing vector; The feature cross vector is input into the upper-level tower corresponding to different content recommendation tasks to obtain the upper-level tower output features of each upper-level tower. The output features of the upper-level tower are activated to determine the analysis results of different content recommendation tasks; Based on the analysis results, the target recommended content for the content recommendation request is determined, and content recommendation processing is performed based on the target recommended content.
7. The method according to claim 6, characterized in that, The analysis results include estimated click-through rate and estimated conversion rate; The step of determining the target recommended content for the content recommendation request based on the analysis results, and performing content recommendation processing based on the target recommended content, includes: Based on the analysis results, the estimated click-through rate and conversion rate for different recommended content are determined. Based on the predicted click-through rate and the predicted conversion rate, the corresponding recommendation effect parameters for different content to be recommended are determined. Based on the recommendation effect parameters, target recommended content is determined from the content to be recommended, and content recommendation processing is performed based on the target recommended content.
8. The method according to any one of claims 1 to 7, characterized in that, The step of embedding each of the sparse features to obtain a fixed-length embedding vector corresponding to each sparse feature includes: Each of the sparse features is input into a preset content recommendation model, and the content recommendation model is used to embed each of the sparse features to obtain a fixed-length embedding vector corresponding to each of the sparse features. The preset content recommendation model is trained using historical recommendation result data.
9. The method according to claim 8, characterized in that, The step of determining the feature coefficient vector corresponding to the concatenated embedded feature vector, and performing variable-length processing on the concatenated embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector includes: The variable-length embedding module of the content recommendation model determines the feature coefficient vector corresponding to the spliced embedding feature vector, and performs vector length transformation on the spliced embedding feature vector based on the feature coefficient vector to obtain a variable-length embedding vector.
10. The method according to claim 9, characterized in that, The method further includes: Obtain the trained original content recommendation model and initial variable-length embedding module; The initial variable-length embedding module is incorporated into the original content recommendation model to obtain the module training model; Obtain historical recommendation result data for the application scenarios of the original content recommendation model; Model training samples are constructed based on the historical recommendation results data; The module's training model is trained based on the training samples to obtain a content recommendation model.
11. A content recommendation device, characterized in that, The device includes: The feature lookup module is used to look up the sparse features associated with the content recommendation request when a content recommendation request is received. An embedding processing module is used to perform embedding processing on each of the sparse features to obtain a fixed-length embedding vector corresponding to each of the sparse features. The vector concatenation module is used to concatenate the fixed-length embedding vectors corresponding to each of the sparse features to obtain a concatenated embedded feature vector. The feature transformation module is used to determine the feature coefficient vector corresponding to the spliced embedded feature vector, and to perform vector length transformation on the spliced embedded feature vector based on the feature coefficient vector to obtain a variable-length embedded vector; The content recommendation module is used to determine the target recommended content of the content recommendation request based on the variable-length embedding vector, and to perform content recommendation processing based on the target recommended content.
12. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 10.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 10.
