Fragment-based Content Recommendation Method, Device, and Medium
Through the combination of the sharding method and XGB-FM and DNN models, the problem of category imbalance in content recommendation and poor prediction effect of single model is solved, achieving higher recommendation accuracy and less manual workload.
Patent Information
- Application Number
- CN202210480880.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-05
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-05-05
AI Technical Summary
In the prior art, the content recommendation model has problems such as category imbalance and poor prediction effect of a single model, resulting in low recommendation accuracy and a lot of manual work is required to extract effective features.
Using the shard-based content recommendation method, by dividing the sample data into two mutually exclusive data sets, the features are trained and extracted in the shallow learning network and the deep learning network respectively, the low-order and high-order cross-features are extracted using the XGB-FM model and the DNN model, and the final prediction is performed in combination with the softmax function.
It improves the accuracy of content recommendation, reduces manual workload, fully explores effective features in the data, and improves the recommendation effect.
Smart Images

Figure CN114969511B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of recommendation methods, and more specifically, to a fragmentation-based content recommendation method, device, and medium. Background Art
[0002] Content recommendation can be approached as a classification problem, playing a crucial role in the precise delivery of samples. Samples support a variety of data types, including newspaper materials, online advertisements, and advantageous locations in large supermarkets. For example, with the advent of the internet, a massive amount of news material is generated online daily. This material varies greatly in content and emphasis, making it difficult for users to find the content they are looking for through simple searches.
[0003] To address these issues, content delivery models must shift to targeted delivery. Currently, the mainstream strategy in internet delivery systems is targeted content delivery, and the core of targeted delivery lies in content recommendation algorithms. Predicting user preferences based on historical data helps accurately target corresponding user groups and match them with the optimal content delivery mix. With the rapid development of information technology, the demand for accurate sample delivery across various industries continues to increase. To further promote their products, many companies are striving to precisely target users. The vast amount of material data in the internet era also provides a scenario for targeted delivery, and the emergence of various machine learning and deep learning algorithms provides the technical means to achieve this goal.
[0004] Content recommendation models rely on massive amounts of sample data for prediction. However, raw data collected directly by the system or obtained through simple manual processing often contains noise and is of poor quality. Therefore, various data preprocessing methods, such as data cleaning, are necessary to remove dirty data from the dataset. Feature extraction methods can also help us extract nonlinear features hidden in the data that are difficult to detect manually, thereby uncovering information that can be helpful for content recommendations. Therefore, employing appropriate dataset preprocessing techniques and performing preliminary feature extraction and selection can lay a solid foundation for content recommendations.
[0005] There are problems such as a large amount of data and imbalance between positive and negative categories in historical data. What users are often concerned about are only a small part of the material records, and most samples are rarely opened. The unbalanced sample data and massive redundant data have seriously affected the recommendation effect of the model. In addition, currently, the content recommendation prediction algorithm based on a single model is more commonly used in the industrial field. Although a single model is simple and has a short running time, its recommendation effect is poor, and a large amount of manual work is required to extract effective features, which places high requirements on the business capabilities of technical personnel. Currently, there are various recommendation algorithms, each with its own advantages and disadvantages. Therefore, it is necessary to study a content recommendation method that uses model fusion to better utilize the advantages of each algorithm to make them complementary and further improve the accuracy of the algorithm. Summary of the Invention
[0006] The purpose of the present invention is to overcome the deficiencies of the prior art and provide a shard-based content recommendation method, device, and medium. By slicing the sample data for separate training and feature extraction, it solves the problems of class imbalance in historical records and poor prediction effect of a single model, realizes the processing of unbalanced data in historical materials, and improves the accuracy of content recommendation.
[0007] The purpose of the present invention is achieved through the following solutions:
[0008] A shard-based content recommendation method includes the following steps:
[0009] When preprocessing the sample data, use sharding to divide the sample data into two mutually exclusive data sets, then use sharding to divide the data sets into continuous features and categorical features, then train and extract features separately, and then splice the trained and extracted features to output the result of content recommendation.
[0010] Further, after the data preprocessing operation, it includes the following sub-steps:
[0011] S1. Perform feature learning on the original data set: Build a shallow learning integration algorithm model based on a single model, input the output of the decision tree leaf node and the original features into the shallow learning network of the shallow learning integration algorithm model. In the shallow learning network, continuous value data is input into the decision tree model for feature encoding to output cross features; then splice the preprocessed categorical features onto the cross features as the input of ridge regression, and then output low-order cross features;
[0012] S2. Normalize the continuous features in the material data through a deep learning network, convert the continuous features into embedding vectors, splice the two and input them into the hidden layer of the deep learning network to output high-order cross features;
[0013] S3. Concatenate the low-order cross features reflecting the second-order non-linear relationship with the high-order cross features output by the deep learning network, and output the content recommendation result.
[0014] Further, in step S1, it includes sub-steps: Use sharding to build a shallow learning integrated XGB-FM model. XGB-FM has two sub-networks: the FM sub-network and the TREE sub-network. In the FM sub-network, the input data includes the output of the leaf nodes after being transformed by the XGBOOST model and the original data features. In the TREE sub-network, the continuous features are input into XGBOOST for feature encoding, and the cross features representing the non-linear relationship of the data are output. Then, the categorical features after One-Hot processing are concatenated onto the cross features as the input of ridge regression. Finally, the output of ridge regression is the low-order cross features.
[0015] Further, in step S2, it includes sub-steps:
[0016] Normalize the continuous features in the material data using a deep learning network and input them into the DNN hidden layer. Perform Embedding processing on the discrete features to convert the discrete features into corresponding N-dimensional vectors proportional to the value space of the vector. Concatenate the two and input them into multiple hidden layers with the ReLU activation function, and output to obtain the high-order cross features.
[0017] Further, in step S3, it includes sub-steps:
[0018] Concatenate the low-order cross features reflecting the second-order non-linear relationship output by the XGB-FM network with the high-order cross features output by the deep learning network, input them into the last fully connected layer, and output the final content recommendation result.
[0019] Further, during the feature learning process of the shallow learning integrated XGB-FM model, the Stochastic Gradient Descent (SGD) algorithm is used to update the model parameters.
[0020] Further, after concatenation, the softmax function is used to normalize the concatenated output feature vector to obtain a probability distribution feature vector.
[0021] Further, it includes the step of combining the prediction value results of two mutually exclusive data sets:
[0022] Suppose the sample data is divided into two mutually exclusive data sets train a and train b during the data preprocessing stage, and they are respectively input into the shallow learning network and the deep learning network. After iterative training, a training model 1 is obtained, as well as the corresponding prediction value result prediction1;
[0023] Then swap traina and train b Input them into the shallow learning network and the deep learning network to obtain another set of training models 2 and the corresponding predicted value results prediction2;
[0024] Finally, obtain the final predicted result prediction through the following formula with prediction1 and prediction2:
[0025] prediction = prediction1 * α + prediction2 * (1 - α)
[0026] Among them, the parameter α can be adjusted according to the amount of training data and the prediction effect.
[0027] A computer device includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the program, it implements the method described in any one of the above.
[0028] A readable storage medium stores a computer program, and when the program is executed by a processor, it implements the method described in any one of the above.
[0029] The beneficial effects of the present invention include:
[0030] The present invention adopts the sharding idea in data processing. The first - layer sharding divides the original data into two mutually exclusive data sets and inputs them into the shallow learning network and the deep learning network respectively. The second - layer sharding divides each data set into continuous feature slices and categorical feature slices. In the shallow learning network, the continuous feature slices are trained by XGBoost to obtain cross - features, and the categorical feature slices are encoded by ONE - HOT to obtain high - dimensional sparse features. After the two parts of features are concatenated, they are input into the FM model; in the deep learning network, the categorical features are transformed into embedding vectors after Embedding and then input into the DNN hidden layer together with the continuous features. After training and prediction are completed, the mutually exclusive data sets are swapped and input into the shallow learning network and the deep learning network, and the above process is repeated, which can more fully mine the effective features in different types of data.
[0031] The present invention constructs an XGB - FM shallow learning network to extract low - order cross - features, uses XGBOOT to discover effective feature combinations, and adds the sample division path in the model training process to the feature learning process, increasing the richness of features and initially generating low - order cross - features. The leaf nodes of the decision - tree structure output feature combinations to the FM model, and then utilize the advantages of the FM model, such as simplicity and less time - consuming, to quickly perform secondary processing on a large number of features, thereby more effectively extracting low - order features, reducing the time for manually searching for cross - features, and greatly improving the performance of the content recommendation method.
[0032] The present invention divides the feature learning of content into low-order cross-feature learning and high-order cross-feature learning, and uses the FMNN model as the content recommendation feature extraction and training model. The FMNN algorithm innovatively integrates traditional machine learning models and deep learning models. It uses XGB-FM to extract shallow features, and the leaf nodes of the decision tree structure output feature combinations, which are then input into the FM model for secondary processing of features to obtain effective low-order cross-features. In the deep learning network, the DNN model is used to process continuous numerical features and sparse and high-dimensional categorical features in the data respectively, converting them into real number vectors. Finally, the feature vectors obtained by splicing low-order cross and high-order cross can represent the data more fully, improving the recommendation accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0034] Figure 1 It is a structural schematic diagram of the XGBOOST continuous feature conversion model according to an embodiment of the present invention;
[0035] Figure 2 It is a structural schematic diagram of the shallow learning integrated XGB-FM model according to an embodiment of the present invention;
[0036] Figure 3 It is a structural schematic diagram of the deep learning model according to an embodiment of the present invention;
[0037] Figure 4 It is a flowchart of the content recommendation method based on the integration of shallow learning and deep learning according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0038] All the features disclosed in all the embodiments in this specification, or all the steps in the methods or processes implicitly disclosed, except for mutually exclusive features and / or steps, can be combined and / or extended and replaced in any way.
[0039] TERMINOLOGY EXPLANATION
[0040] XGB-FM: It is a shallow integrated learning network built with the XGBoost and FastFM models as the core, and the final low-order cross-features are output by this network.
[0041] FMNN: The core algorithm of the present invention. It consists of a shallow learning network (XGB-FM) and a deep learning network (DNN).
[0042] Embedding: Vectorization. For text data, it means mapping words to vectors in a vector space.
[0043] RELU: An activation function of a neural network.
[0044] ONE-HOT: One-hot encoding technology. Using ONE-HOT technology to transform categorical features into 0, 1 sequences.
[0045] Common preprocessing techniques include data descriptive statistics, handling missing values and outliers, data standardization, normalization, handling imbalanced data, etc. In the original data analysis stage, descriptive statistics are used to describe the basic situation of the data, check the data quality, etc., to determine how to process the data subsequently. The analysis results of the original data are presented through descriptive statistics to prepare for the subsequent handling of outliers and missing values, feature extraction, etc. During the analysis of the original data, it can be described from multiple aspects such as the central position, dispersion degree, and correlation degree of the sample data. The specific selection depends on the actual situation of the data. In terms of outliers, in the embodiments of the present invention, boxplots are used to remove outliers in the sample data. A boxplot includes five parts: the maximum value, the median, the minimum value, the lower quartile, and the upper quartile. In solving the problem of data imbalance, the method of oversampling the data is adopted to increase the classification accuracy of the minority class. Sample content recommendation prediction is a binary classification problem. Common evaluation indicators for binary classification problems include precision, recall, F1-score, AUC, etc. In the prediction of the present invention, the main evaluation indicator adopted is the AUC value, and the precision, recall, and F1-score are used as references. This is because non-user preference records in the dataset account for the majority. If indicators such as precision are used, even if the test set is predicted as user preference, there will be a very high precision, which will seriously weaken the evaluation accuracy of the algorithm model.
[0046] After completing the preprocessing work on the original data, a suitable content recommendation model needs to be selected. A good model should be able to save computational costs and improve the accuracy of recommendations. Many algorithms have been proposed in the research on shallow prediction algorithms for content recommendation, including traditional single-model algorithms such as logistic regression and Factorization Machines algorithm; and classic learning networks based on various single-model integrations such as the LS-PLM algorithm based on the sharding idea and XGBOOST-LR. The embodiments of the present invention propose a new learning algorithm XGB-FM by improving and optimizing the above algorithms to improve the content recommendation prediction effect.
[0047] The various features in the original sample data are correlated. However, it is difficult for previous content recommendation models to fully extract the non-linear relationships between single features, or they can only extract simple linear relationships, resulting in the recommended content of the model being difficult to satisfy users. Different from traditional machine learning algorithms, Deep Learning has shown good performance in multiple industries. Especially importantly, the deep learning algorithm with a multi-layer hidden layer network structure can theoretically fit all functions. Compared with traditional linear models and decision tree models, it is easier to learn the hidden high-order cross features in the data. Therefore, a deep learning model deformed by DNN is introduced into the content recommendation algorithm of the embodiments of the present invention.
[0048] According to the embodiments of the present invention, first, after the data preprocessing operation is completed, feature learning is performed on the original data set. Since each single model has its own advantages and disadvantages and cannot comprehensively extract the features that can represent the data set, the embodiments of the present invention adopt an integrated method to extract low-order cross features and high-order cross features through two networks respectively. First, a shallow learning integration algorithm XGB-FM based on a traditional single model is built. The input data in the FM network includes the output of the XGBOOST leaf nodes and the original features. In the TREE network, the continuous value data is input into XGBOOST for feature encoding, and the cross features trained by the tree model are output. Then, the categorical features after ONE-HOT are concatenated to the cross features as the input of RidgeRegression. Finally, the output of RidgeRegression is the low-order cross features. Secondly, deep learning is introduced into the material recommendation. After normalizing the continuous features in the material data, they are input into the DNN hidden layer. The discrete features are Embedded, and the discrete features are converted into corresponding N-dimensional vectors proportional to the value space of the vector. After the two are concatenated, they are input into 4 hidden layers with the activation function RELU, and the high-order cross features are output. Finally, the low-order cross features that can reflect the second-order non-linear relationship output by the XGB-FM network and the high-order cross features output by the deep learning network are concatenated and input into the last fully connected layer to output the final content recommendation result.
[0049] As Figure 1 shown, in the embodiment, the process of converting continuous features by XGBOOST into feature encoding is as follows:
[0050] First, the continuous feature I = [i1, i2, i3,..., i pInput into XGBoost, and use the XGBoost algorithm to transform the continuous feature I in the input data. XGBoost is an ensemble algorithm of decision trees that adopts the boosting idea and is improved based on the GBDT algorithm. Compared with GBDT, XGBoost can discover more effective cross features and has a faster iteration speed. The process of XGBoost transforming continuous features into feature encoding is as Figure 1 shown. On the left side of the figure is a decision tree with 3 leaf nodes, and on the right side is a decision tree with 2 leaf nodes. The 01 sequence generated by the transformation of continuous features is the 5-dimensional vector composed of the outputs of all leaf nodes in the figure. Suppose an input sample x is given. Then the feature encoding output by the left decision tree is [1, 0, 0], and the feature encoding output by the right decision tree is [0, 1]. Therefore, the feature encoding generated after XGBoost transforms continuous features is [1, 0, 0, 0, 1]. The output encoding can be used as a feature input to linear classification models such as FM for training to assist in classification. The objective function of the model is as follows:
[0051]
[0052] Through this function, the output of each leaf node of the decision tree is fed back for continuous iterative learning, and the continuous feature I is transformed into a 01 sequence of J dimensions, denoted as I J = [i1*J, i2*J, i3*J, …, i p *J]. l represents the loss function of the model, y i represents the output corresponding to the i-th input sample after training, represents the output of the model in the (t - 1)-th round of iteration, f t represents the output of a decision tree after the input sample is mapped to a leaf node, represents the complexity of the tree, and constant represents a constant.
[0053] As Figure 2 shown, the feature learning process of the shallow learning integrated XGB-FM model is as follows:
[0054] For content recommendation, the shallow feature learning extraction adopts the XGB-FM model. The model extracts low-order cross features through training on the input continuous features and categorical features to achieve an effective representation of the original data. First, perform One-Hot encoding on the categorical features to obtain the One-Hot feature vector of the categorical features, denoted as C K = [c1, c2, c3, …, c q , where the dimension of c q is 1*K. Then combine it with I J = [i1*J, i2*J, i3*J, …, i p*J] is used as the input to the FM model for concatenation. The objective function of the two-way FM (binary cross FM) is as follows:
[0055]
[0056] where w is the parameter of the input feature, <v i ,v j > is the cross parameter between input features i and j, and v is a k-dimensional vector. The difference between the binary cross FM model and the traditional linear model is that the former is a linear model in the front and a cross-combined feature in the back, and the whole is composed of these two parts. The feature vector X N =(C K ,I J ) generated by concatenation is input into the binary cross FM model. The update of the model parameters w and v is achieved through the stochastic gradient descent (SGD) algorithm. The specific gradient calculation formula is:
[0057]
[0058] If the given material sample set X N =(C K ,I J )={x1, x2, x3, …, x n}, then the content recommendation result of the final XGB-FM model can be expressed as:
[0059]
[0060]
[0061]
[0062] where p represents the output of the weighted average of the deep learning network and the XGB-FM network, σ1 represents the proportion of the output of the deep learning network, σ2 represents the proportion of the XGB-FM network, represents the output after the model undergoes ridge regression, represents the output result of the XGB-FM network, X represents the input sample, and b represents the constant part of the linear model.
[0063] The shallow learning network XGB-FM makes full use of the advantages of various algorithms such as the decision tree-based XGBoost model, logistic regression model, and FastFM. With a simple algorithm structure, it fully excavates the low-order cross features in the original features that can represent shallow non-linear relationships. After testing, the improved shallow learning network XGB-FM has the advantages of short running time and high accuracy, and its prediction effect is better than that of the single models that compose it. All components in the network structure are of polynomial order O(n k)'s algorithm, there is no exponential - order algorithm, so the time consumption of this algorithm is not large. The time complexity of the TREE sub - network is: O(n·logn·k·m), where n is the number of samples, d is the number of features, and m is the depth of the tree. The time complexity of the FM network is O(n), so the time complexity of XGB - FM is:
[0064] T(n) = O(nlogn·k·m)+O(n)=O(nlogn)
[0065] As Figure 3 shown, in the embodiment, the feature learning process of the deep - learning model is as follows:
[0066] The deep - learning model of the present invention uses a common DNN. Assume that the original features of all training data are RF, and RF is the collection of continuous features I = [i1, i2, i3,…, i p and categorical features C = [c1, c2, c3…, c q . The original feature RF is embedded to convert it into the corresponding W - dimensional vector. The length of the vector is proportional to the value space of the vector, denoted as RF p+q = [i1, i2, i3,…, i p , c1, c2, c3…, c q , where i p , and c q are both W - dimensional. Concatenate RF p+q and the continuous feature I in the original features and input them into the top - layer node of the neural network, that is, the input layer. Additionally, define the weight matrix between the input layer and the hidden layer as V∈R k×m , the bias vector μ∈R k ; the weight matrix between the hidden layer and the output layer is W∈R n×k , the bias vector b∈R n ; g(.) and f(.) are activation functions. The present invention uses the ReLU function. The input vector is x∈R m , and the output vector is y. Then the output of each hidden layer is shown as follows:
[0067] y = f(W T g(Vx + μ)+b)
[0068] After being extracted by the three - layer hidden - layer nodes, the final output y nn is the high - order cross - feature of this model.
[0069] As Figure 4 shown, in the embodiment, the training process of the improved integrated algorithm FMNN based on the XGB - FM network and the deep - learning model is as follows:
[0070] The FMNN algorithm includes a shallow learning network (i.e., the XGB-FM network) and a deep learning network (i.e., the DNN network). In the XGB-FM network model, the continuous feature I = [i1, i2, i3, …, i p is input into XGBOOST. The depth parameter max_depth of a single decision tree in the model is set to 4, the number of maximum leaf nodes parameter num_leaf is set to 10, and the number of decision trees parameter num_boost_round is set to 55. Finally, an 870-dimensional feature encoding is generated. The input continuous feature I is transformed using this XGBOOST model, and the continuous feature I is transformed into a sequence I J = [i1*J, i2*J, i3*J, …, i p *J] of dimension J. The categorical feature is One-Hot encoded to obtain the One-Hot feature vector C K = [c1, c2, c3…, c q . The features I J and C K are concatenated and then input into an FM model with a vector dimension set to 20 to obtain the final output y fm of the shallow learning network. Finally, simple linear regression is adopted and obtained through cross transformation. As shown below:
[0071]
[0072] The DNN network will transform the sample data into a 64-dimensional embedding vector. The activation function adopted in the DNN network of the present invention is the ReLU function, and its advantage is that it can prevent gradient disappearance during the training process. The number of hidden layers of the DNN is set to 4 layers, and the number of experimental nodes in each hidden layer is adjusted according to the actual data situation. The specific process of the deep learning network running is as follows: The categorical feature C K = [c1, c2, c3…, c q in the sample data is input into the Embedding layer to be transformed into a real number vector, which is transformed into a 32-dimensional real number vector. In this way, the training data represented by the vector has a total of 32*q-dimensional features. The continuous feature I = [i1, i2, i3, …, i pAfter concatenating with the real - valued vector, a 32*q + p - dimensional feature is obtained, and then the generated feature is input into a neural network with 4 hidden layers. The ReLU function is selected as the activation function. Finally, the deep - learning network (DNN network) outputs 64 - dimensional high - order cross - features. In the iterative optimization method, XGB - FM uses the L1 norm and FTRL, while the deep - learning network uses the ADAGRAD method. In the ADAGRAD algorithm, the learning rate η of each parameter decreases continuously with the increase of the number of iterations. The advantage of using ADAGRAD is that it provides a learning rate suitable for each parameter itself for different variables, enabling each parameter to adapt to the model under the current data set. Generally, parameters with larger partial derivatives will have a larger learning rate η. At the beginning of the iteration, the model will use a relatively large η for training, and then gradually reduce the learning rate to prevent the learned parameters from oscillating and crossing the ideal value. The output y of the (t - 1) - th DNN iteration nn is input into ADAGRAD to adjust η and find the ideal values of each parameter for the t - th iteration, as shown below.
[0073]
[0074]
[0075] Finally, the output y of the XGB - FM part fm and the output y of the DNN network part nn are concatenated. The function softmax is used to normalize the output feature vector y = y fm + y nn =[y1, y2, y3, …, y 20+64 to obtain a probability - distribution feature vector.
[0076]
[0077] In the embodiment, the merging process of the results of two mutually - exclusive data sets is as follows:
[0078] Since the embodiment of the present invention adopts the sharding idea in data processing, the training data is divided into two mutually - exclusive data sets train a and train b in the data pre - processing stage, and are respectively input into the shallow - learning network and the deep - learning network. After iterative training, a training model 1 and the corresponding prediction value result prediction1 are obtained. Then, train a and train bInput into the shallow learning network and the deep learning network to obtain another set of training models 2 and the corresponding prediction value results prediction2. Finally, the final prediction result prediction is obtained by the following formula from prediction1 and prediction2. The parameter α can be adjusted according to the amount of training data and the prediction effect.
[0079] prediction = prediction1 * α + prediction2 * (1 - α)
[0080] Example 1
[0081] A content recommendation method based on sharding, comprising the following steps:
[0082] When preprocessing the sample data, use sharding to divide the sample data into two mutually exclusive data sets, then use sharding to divide the data sets into continuous features and categorical features, then train and extract features respectively, and then splice the trained and extracted features to output the content recommendation result.
[0083] Example 2
[0084] Based on Example 1, after the data preprocessing operation, it includes the following sub-steps:
[0085] S1. Perform feature learning on the original data set: Build a shallow learning integration algorithm model based on a single model, input the output of the decision tree leaf node and the original features into the shallow learning network of the shallow learning integration algorithm model. In the shallow learning network, the continuous value data is input into the decision tree model for feature encoding to output cross features; then splice the preprocessed categorical features to the cross features as the input of ridge regression, and then output low-order cross features;
[0086] S2. Normalize the continuous features in the material data through the deep learning network, convert the continuous features into embedding vectors, splice the two and input them into the hidden layer of the deep learning network to output high-order cross features;
[0087] S3. Splice the low-order cross features reflecting the second-order non-linear relationship with the high-order cross features output by the deep learning network to output the content recommendation result.
[0088] Example 3
[0089] Based on Embodiment 2, in step S1, it includes sub-steps: using sharding to build a shallow learning integrated XGB-FM model. XGB-FM has two sub-networks: an FM sub-network and a TREE sub-network. In the FM sub-network, the input data includes the output of the leaf nodes after being transformed by the XGBOOST model and the original data features. In the TREE sub-network, continuous features are input into XGBOOST for feature encoding, and the output cross-features representing the non-linear relationship of the data are obtained. Then, the categorical features after One-Hot processing are concatenated onto the cross-features as the input of ridge regression. Finally, the output of ridge regression is the low-order cross-features.
[0090] Embodiment 4
[0091] Based on Embodiment 2, in step S2, it includes sub-steps:
[0092] Using a deep learning network to normalize the continuous features in the material data and then input them into the DNN hidden layer, perform Embedding processing on the discrete features, convert the discrete features into corresponding N-dimensional vectors proportional to the value space of the vectors, concatenate the two, and then input them into multiple hidden layers with the ReLU activation function, and the output is the high-order cross-features.
[0093] Embodiment 5
[0094] Based on Embodiment 3, in step S3, it includes sub-steps:
[0095] Concatenate the low-order cross-features reflecting the second-order non-linear relationship output by the XGB-FM network and the high-order cross-features output by the deep learning network, input them into the last fully connected layer, and output the final content recommendation result.
[0096] Embodiment 6
[0097] Based on Embodiment 3, during the feature learning process of the shallow learning integrated XGB-FM model, the Stochastic Gradient Descent (SGD) algorithm is used to update the parameters of the model.
[0098] Embodiment 7
[0099] Based on Embodiment 3, after concatenation, the softmax function is used to normalize the concatenated output feature vector to obtain a probability distribution feature vector.
[0100] Embodiment 8
[0101] Based on Embodiment 2, it includes the step of combining the prediction value results of two mutually exclusive data sets:
[0102] Suppose the sample data is divided into two mutually exclusive data sets train a and trainb They are respectively input into a shallow learning network and a deep learning network, and after iterative training, a training model 1 and the corresponding predicted value result prediction1 are obtained;
[0103] Then swap train a and train b Input them into the shallow learning network and the deep learning network to obtain another set of training model 2 and the corresponding predicted value result prediction2;
[0104] Finally, the final predicted result prediction is obtained by the following formula from prediction1 and prediction2:
[0105] prediction = prediction1 * α + prediction2 * (1 - α)
[0106] Among them, the parameter α can be adjusted according to the amount of training data and the prediction effect.
[0107] Embodiment 9
[0108] A computer device, characterized in that it includes a memory, a processor, and a computer program stored on the memory and capable of running on the processor. When the processor executes the program, it implements the method according to any one of Embodiments 1 to 8.
[0109] Embodiment 10
[0110] A readable storage medium stores a computer program. When the program is executed by a processor, it implements the method according to any one of Embodiments 1 to 8.
[0111] The units involved in the embodiments described in the present invention can be implemented in software or in hardware, and the described units can also be provided in the processor. Among them, the names of these units do not constitute a limitation to the unit itself in some cases.
[0112] According to one aspect of the present application, there is provided a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementation manners.
[0113] As another aspect, the present application also provides a computer-readable medium, which may be included in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiments.
[0114] Parts not involved in the present invention are the same as the prior art or can be implemented by the prior art.
[0115] In addition to the above examples, those skilled in the art can obtain inspiration according to the above disclosure or make modifications using the knowledge or technology in related fields to obtain other embodiments. The features of each embodiment can be interchanged or replaced. As long as the modifications and changes made by those skilled in the art do not depart from the spirit and scope of the present invention, they should all be within the protection scope of the appended claims of the present invention.
Claims
1. A shard-based content recommendation method, characterized in that It includes the following steps: When preprocessing the sample data, the sample data is divided into two mutually exclusive data sets by sharding, and then the data set is divided into continuous features and categorical features by sharding. Then, the features are trained and extracted respectively, and then the trained and extracted features are concatenated to output the result of content recommendation. It includes the following sub-steps: S1. Perform feature learning on the original data set: Build a shallow learning integration algorithm model based on a single model. Input the output of the decision tree leaf node and the original features into the shallow learning network of the shallow learning integration algorithm model. In the shallow learning network, the continuous value data is input into the decision tree model for feature encoding, and the cross features are output; Then, the preprocessed categorical features are concatenated to the cross features as the input of ridge regression, and then the low-order cross features are output; S2. Normalize the continuous features in the material data through the deep learning network. The continuous features are transformed into embedding vectors. After concatenating the two, they are input into the hidden layer of the deep learning network, and the high-order cross features are output; S3. Concatenate the low-order cross features reflecting the second-order non-linear relationship with the high-order cross features output by the deep learning network, and output the content recommendation result.
2. The content recommendation method based on sharding according to claim 1, characterized in that In step S1, it includes sub-steps: Build a shallow learning integration XGB-FM model by sharding. XGB-FM has two sub-networks: the FM sub-network and the TREE sub-network. The input data in the FM sub-network includes the output of the leaf node after being transformed by the XGBOOST model and the original data features. In the TREE sub-network, the continuous features are input into XGBOOST for feature encoding, and the cross features representing the non-linear relationship of the data are output. Then, the categorical features after One-Hot processing are concatenated to the cross features as the input of ridge regression. Finally, the output of ridge regression is the low-order cross features.
3. The content recommendation method based on sharding according to claim 1, wherein In step S2, it includes sub-steps: Normalize the continuous features in the material data through the deep learning network and input them into the DNN hidden layer. Perform Embedding processing on the discrete features, convert the discrete features into corresponding N-dimensional vectors proportional to the value space of the vector. After concatenating the two, they are input into multiple hidden layers with the activation function ReLU, and the high-order cross features are output.
4. The content recommendation method based on sharding according to claim 2, wherein In step S3, it includes sub-steps: Concatenate the low-order cross features reflecting the second-order non-linear relationship output by the XGB-FM network with the high-order cross features output by the deep learning network, input them into the last fully connected layer, and output the final content recommendation result.
5. The content recommendation method based on sharding according to claim 2, wherein During the feature learning process of the shallow learning integration XGB-FM model, the Stochastic Gradient Descent (SGD) algorithm is used to update the parameters of the model.
6. The content recommendation method based on sharding according to claim 2, wherein After concatenation, the softmax function is used to normalize the concatenated output feature vector to obtain the probability distribution feature vector.
7. The content recommendation method based on sharding according to claim 1, characterized in that It includes the step of merging the prediction value results of the two mutually exclusive data sets: Assume that in the data preprocessing stage, the sample data is divided into two mutually exclusive data sets train a and train b , respectively input into the shallow learning network and the deep learning network, and after iterative training, the training model 1 and the corresponding prediction value result prediction1 are obtained; Then swap train a and train b Input them into the shallow learning network and the deep learning network to obtain another set of training models 2 and the corresponding predicted value results prediction2; Finally, the final prediction result prediction is obtained from prediction1 and prediction2 through the following formula: Among them, the parameter can be adjusted according to the size of the training data volume and the prediction effect.
8. A computer device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor. When the processor executes the program, it implements the method according to any one of claims 1 to 7.
9. A readable storage medium, characterized in that, There is a computer program stored, and when the program is executed by the processor, it implements the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Advertisement recommendation method based on feature cross joint deep neural network
CN108629630A
Recommendation system click rate prediction method based on deep neural network
CN109960759A