Recommendation model training method, device, electronic device and storage medium

By introducing feature cross-features into the multimedia recommendation model and performing iterative optimization on the basis of the old model, the problem of difficulty in improving the training effect of the multimedia recommendation model is solved, and more efficient model updates and more accurate recommendation results are achieved.

CN113553448BActive Publication Date: 2024-10-29BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110871644.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-30
Publication Date
2024-10-29
Estimated Expiration
2041-07-30

AI Technical Summary

Technical Problem

It is difficult for existing multimedia recommendation models to further improve the recommendation effect during the training process, especially because the nonlinear relationship between features is difficult to reflect, and the lack of historical training data makes it difficult for new models to replace old models.

Method used

By introducing feature cross features, we expand the dimension of feature representation, use cross features to better utilize training data, improve the training effect of multimedia recommendation models, and perform iterative optimization on the basis of old recommendation models to quickly replace them with less training data. Old model.

Benefits of technology

It improves the recommendation effect and accuracy of multimedia recommendation models, reduces model training and iteration time, reduces data storage pressure, and achieves faster model updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113553448B_ABST
    Figure CN113553448B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a recommendation model training method, device, electronic device and storage medium. The method includes: obtaining training data; the training data includes user data and corresponding multimedia resources, and recommendation annotation results; obtaining a recommendation model to be trained; the recommendation model to be trained is used to recommend multimedia resources to users; the recommendation model to be trained includes an embedding layer and a feature input layer; there is a first cascade relationship set between the output of the embedding layer and the input of the feature input layer; any first cascade relationship in the first cascade relationship set contains a feature intersection unit; the input of the feature intersection unit is at least 2 features of the output features of the embedding layer, and the output of the feature intersection unit is the intersection feature of the at least 2 input features; inputting user data and corresponding multimedia resources into the recommendation model to be trained to obtain a predicted recommendation result; determining loss information based on the predicted recommendation result and the recommendation annotation result; and training the recommendation model to be trained based on the loss information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of recommendation technology, and in particular to a recommendation model training method, device, electronic device and storage medium. Background Art

[0002] At present, recommendation models have been widely used in various business platforms, such as short video platforms and social platforms. Recommendation models are mainly used to recommend different content to platform users. For example, short video platforms can recommend short videos of interest to users; social platforms can recommend users with similar interests and hobbies to users.

[0003] Among them, recommendation models for recommending multimedia resources to users, such as recommendation models for recommending videos, texts, images, etc. to users, usually need to obtain user characteristics and multimedia resource characteristics for training during the training process. However, the recommendation effect of current recommendation models is difficult to further improve. Summary of the invention

[0004] The present disclosure provides a recommendation model training method, device, electronic device and storage medium to at least solve the problem that the recommendation effect of the recommendation model in the related art is difficult to improve. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a recommendation model training method is provided, including:

[0006] Acquire training data; the training data includes user data and corresponding multimedia resources, as well as recommended annotation results;

[0007] Acquire a recommendation model to be trained; the recommendation model to be trained is used to recommend multimedia resources to users; the recommendation model to be trained includes an embedding layer and a feature input layer; there is a first cascade relationship set between the output of the embedding layer and the input of the feature input layer; the first cascade relationship set includes one or more first cascade relationships;

[0008] Any first cascade relationship in the first cascade relationship set is used to cascade at least two features output by the embedding layer to the input of a single feature intersection unit, and cascade the output of the feature intersection unit to the input of the feature input layer; the input of the feature intersection unit is at least two features among the output features of the embedding layer, and the output of the feature intersection unit is the intersection feature of the at least two input features;

[0009] Inputting the user data and the corresponding multimedia resources into the recommendation model to be trained to obtain a predicted recommendation result;

[0010] Determining loss information according to the predicted recommendation result and the recommended annotation result;

[0011] The recommendation model to be trained is trained based on the loss information.

[0012] Optionally, obtaining the recommendation model to be trained includes:

[0013] Obtaining a copy of a recommendation model currently deployed by the business platform as an old recommendation model; the old recommendation model includes an embedding layer and a feature input layer;

[0014] In a case where there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, updating the first cascade relationship set of the old recommendation model to obtain a recommendation model to be trained;

[0015] In the case that there is no first cascade relationship set between the output of the embedding layer and the input of the feature input layer of the old recommendation model, a first cascade relationship set is created to obtain the recommendation model to be trained.

[0016] Optionally, the updating of the first cascade relationship set of the old recommendation model includes:

[0017] Adding one or more first cascade relationships to the first cascade relationship set of the old recommendation model;

[0018] and / or

[0019] Modifying one or more first cascade relationships in the first cascade relationship set of the old recommendation model;

[0020] and / or

[0021] One or more first cascade relationships are deleted from the first cascade relationship set of the old recommendation model.

[0022] Optionally, after obtaining the recommendation model to be trained, the method further includes:

[0023] The parameters of the obtained recommendation model to be trained are adjusted so that the old recommendation model and the recommendation model to be trained after the adjustment of the parameters have the same output when the input is the same.

[0024] Optionally, the training data includes historical training data, and the historical training data includes training data used to train the old recommendation model; and training the recommendation model to be trained based on the loss information includes:

[0025] While keeping the embedding layer parameters of the recommendation model to be trained unchanged, the recommendation model to be trained is trained based on the loss information corresponding to the historical training data.

[0026] Optionally, the feature intersection unit comprises a multi-layer perceptron;

[0027] The multilayer perceptron is used to: for at least two features to be crossed, use one of the features as input, use the other features as parameters of the multilayer perceptron, and calculate the crossed features of the at least two features to be crossed.

[0028] Optionally, the feature crossover unit further comprises a dimension expansion layer; the dimension expansion layer outputs features of fixed dimension, and the number of input features of the dimension expansion layer is the same as the number of output features;

[0029] The feature crossing unit is used to: input at least two input features into the dimension expansion layer, and use at least two features output by the dimension expansion layer as at least two features to be crossed, and calculate the crossed features by the multilayer perceptron.

[0030] Optionally, the feature cross unit further includes a buffer layer; the input and output dimensions of the buffer layer are the same, and the input and output of the buffer layer after initialization remain consistent;

[0031] The feature crossover unit is used to: input at least two input features into the buffer layer, and use at least two features output by the buffer layer as two features to be crossed, and calculate the crossover feature by the multilayer perceptron.

[0032] Optionally, there is a second cascade relationship set between the output of the embedding layer and the input of the feature input layer;

[0033] Any second cascade relationship in the second cascade relationship set is used to cascade one output of the embedding layer to the input of the feature input layer.

[0034] Optionally, the recommendation model training method further includes:

[0035] When the recommendation effect of the trained recommendation model to be trained is better than the recommendation model currently deployed by the business platform, the recommendation model currently deployed by the business platform is replaced by the trained recommendation model to be trained.

[0036] According to a second aspect of an embodiment of the present disclosure, a recommendation model training device is provided, including:

[0037] The training data acquisition unit is configured to execute: acquiring training data; the training data includes user data and corresponding multimedia resources, and recommended annotation results;

[0038] The model acquisition unit is configured to execute: acquiring a recommendation model to be trained; the recommendation model to be trained is used to recommend multimedia resources to users; the recommendation model to be trained includes an embedding layer and a feature input layer; there is a first cascade relationship set between the output of the embedding layer and the input of the feature input layer; the first cascade relationship set includes one or more first cascade relationships;

[0039] Any first cascade relationship in the first cascade relationship set is used to cascade at least two features output by the embedding layer to the input of a single feature intersection unit, and cascade the output of the feature intersection unit to the input of the feature input layer; the input of the feature intersection unit is at least two features among the output features of the embedding layer, and the output of the feature intersection unit is the intersection feature of the at least two input features;

[0040] The training unit is configured to execute: inputting the user data and the corresponding multimedia resources into the recommendation model to be trained to obtain a predicted recommendation result; determining loss information based on the predicted recommendation result and the recommendation annotation result; and training the recommendation model to be trained based on the loss information.

[0041] Optionally, the model acquisition unit includes:

[0042] The old model acquisition subunit is configured to execute: acquiring a copy of the recommendation model currently deployed by the business platform as an old recommendation model; the old recommendation model includes an embedding layer and a feature input layer;

[0043] The model updating subunit is configured to execute: when there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, updating the first cascade relationship set of the old recommendation model to obtain the recommendation model to be trained; when there is no first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, creating the first cascade relationship set to obtain the recommendation model to be trained.

[0044] Optionally, the model updating subunit includes:

[0045] The collection update subunit is configured to perform:

[0046] In a case where there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, one or more first cascade relationships are added to the first cascade relationship set of the old recommendation model; and / or one or more first cascade relationships are modified in the first cascade relationship set of the old recommendation model; and / or one or more first cascade relationships are deleted in the first cascade relationship set of the old recommendation model.

[0047] Optionally, the model updating subunit further includes:

[0048] The model adjustment subunit is configured to execute: after obtaining the recommendation model to be trained, adjust the parameters of the recommendation model to be trained so that the old recommendation model and the recommendation model to be trained after adjusting the parameters have the same output when the input is the same.

[0049] Optionally, the training data includes historical training data, and the historical training data includes training data used to train the old recommendation model; and the training unit includes:

[0050] The historical training subunit is configured to perform: training the recommendation model to be trained based on the loss information corresponding to the historical training data while keeping the embedding layer parameters of the recommendation model to be trained unchanged.

[0051] Optionally, the feature intersection unit comprises a multi-layer perceptron;

[0052] The multilayer perceptron is used to: for at least two features to be crossed, use one of the features as input, use the other features as parameters of the multilayer perceptron, and calculate the crossed features of the at least two features to be crossed.

[0053] Optionally, the feature crossover unit further comprises a dimension expansion layer; the dimension expansion layer outputs features of fixed dimension, and the number of input features of the dimension expansion layer is the same as the number of output features;

[0054] The feature crossing unit is used to: input at least two input features into the dimension expansion layer, and use at least two features output by the dimension expansion layer as at least two features to be crossed, and the multilayer perceptron calculates the crossed features.

[0055] Optionally, the feature cross unit further includes a buffer layer; the input and output dimensions of the buffer layer are the same, and the input and output of the buffer layer after initialization remain consistent;

[0056] The feature crossover unit is used to: input at least two input features into the buffer layer, and use at least two features output by the buffer layer as two features to be crossed, and calculate the crossover feature by the multilayer perceptron.

[0057] Optionally, there is a second cascade relationship set between the output of the embedding layer and the input of the feature input layer;

[0058] Any second cascade relationship in the second cascade relationship set is used to cascade one output of the embedding layer to the input of the feature input layer.

[0059] Optionally, the recommendation model training device further includes:

[0060] The replacement unit is configured to execute: when the recommendation effect of the trained recommendation model to be trained is better than the recommendation model currently deployed by the business platform, replace the recommendation model currently deployed by the business platform with the trained recommendation model to be trained.

[0061] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including:

[0062] processor;

[0063] a memory for storing instructions executable by the processor;

[0064] Wherein, the processor is configured to execute the instructions to implement a recommendation model training method described in any of the above embodiments.

[0065] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is proposed. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a recommendation model training method described in any of the above embodiments.

[0066] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is proposed, comprising a computer program / instruction, wherein when the computer program / instruction is executed by a processor, a recommendation model training method described in any of the above embodiments is implemented.

[0067] The technical solution provided by the embodiments of the present disclosure can better utilize training data to improve the training effect of the multimedia recommendation model by introducing cross-features between features in the multimedia recommendation model and using the cross-features to expand the dimension of feature representation, thereby improving the recommendation effect of the multimedia recommendation model and improving the user's experience in obtaining recommended multimedia resources.

[0068] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0070] Figure 1 is a flowchart of a recommendation model training method according to an exemplary embodiment;

[0071] Figure 2 is a structural diagram of a recommendation model according to an exemplary embodiment;

[0072] Figure 3 is a schematic diagram of a multilayer perceptron according to an exemplary embodiment;

[0073] Figure 4 is a block diagram of a recommendation model training device according to an exemplary embodiment;

[0074] Figure 5 It is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0075] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0076] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0077] At present, recommendation models have been widely used in various business platforms, such as short video platforms and social platforms. Recommendation models are mainly used to recommend different content to platform users. For example, short video platforms can recommend short videos of interest to users; social platforms can recommend users with similar interests and hobbies to users.

[0078] Among them, recommendation models for recommending multimedia resources to users, such as recommendation models for recommending videos, texts, images, etc. to users, usually need to obtain user characteristics and multimedia resource characteristics for training during the training process. However, the recommendation effect of current recommendation models is difficult to further improve.

[0079] In order to solve the above problems, the present disclosure provides a recommendation model training method.

[0080] The current training process of recommendation models usually directly inputs independent user features and multimedia resource features into the recommendation model, and then uses the corresponding recommendation annotation results for training, which makes it difficult for the trained recommendation model to reflect the nonlinear relationship between features and recommendation annotation results. In addition, some feature combinations may have a stronger relationship with the recommendation annotation results than the independent features themselves.

[0081] For example, when recommending short videos, women aged 25-35 are usually interested in parenting videos because most of them are in the parenting stage. However, women of other age groups are not in the parenting stage, and men aged 25-35 are less involved in the parenting stage, so these users are often not interested in parenting videos. Therefore, the combination of the age feature "25-35 years old" and the gender feature "female" has a stronger relationship with the label "parenting" than the two features alone. It is often necessary to recommend parenting videos only to users who meet the combination of the age feature "25-35 years old" and the gender feature "female".

[0082] However, if only independent age and gender features exist when training the recommendation model, the probability of recommending parenting videos to users who meet the age feature of "25-35 years old" or the gender feature of "female" will be increased because there will be more samples of female users aged 25-35 who are interested in parenting videos. This will increase the probability of recommending parenting videos to users of other age groups who are also "female", or recommend parenting videos to male users who are also "25-35 years old", resulting in poor recommendation effects.

[0083] In order to further improve the recommendation effect of the multimedia recommendation model, in a recommendation model training method provided in the present invention, by introducing the cross-features of multiple independent features, the dimension of feature representation can be further expanded based on the existing user features and the features of multimedia resources, so as to better utilize the training data, simply and efficiently improve the training effect of the multimedia recommendation model, and then improve the recommendation effect of the multimedia recommendation model, so that the multimedia recommendation model can more accurately recommend multimedia resources to users, improve the accuracy of the recommendation, and also improve the user's experience in obtaining recommended multimedia resources.

[0084] For example, when recommending short videos, the cross-features of gender and age can be introduced, so that the linear relationship between the cross-features and the recommendation annotation results can be used to determine based on the training data that women aged 25-35 are usually interested in parenting videos, while other users are often not interested in parenting videos. When making recommendations, the newly trained multimedia recommendation model can determine whether the cross-features represent women aged 25-35 based on the input gender and age features. If so, parenting videos can be recommended; if not, parenting videos are not recommended, thereby improving the recommendation effect of the multimedia recommendation model, improving the accuracy of the recommendation, and improving the user experience of obtaining recommended multimedia resources.

[0085] In addition, since multimedia recommendation models are usually deployed on business platforms to recommend multimedia resources, the business platforms themselves usually need to iteratively optimize the multimedia recommendation models according to current needs to further improve the recommendation effect.

[0086] When the recommendation model needs to be iterated, for example, the algorithm or structure of the recommendation model needs to be iterated, the business platform often builds a new recommendation model and trains it using the stored historical sample set. If the trained new recommendation model performs better than the old online recommendation model, the trained new recommendation model can replace the old recommendation model.

[0087] However, due to the limitation of data storage capacity, the number of samples in the historical sample set stored by the business platform is limited, and the training data of the new recommendation model is relatively small; while the old recommendation model can use the actual user data online to continuously train and optimize, so that the training data of the old recommendation model continues to increase; therefore, the training data of the new recommendation model is usually far less than the old recommendation model online, resulting in the new recommendation model often being worse than the old recommendation model, making it difficult to replace the old recommendation model.

[0088] For example, an online recommendation model has been deployed for half a year, and the training data includes at least half a year of user data. However, the business platform can only store one month of historical user data as a historical sample set, making it difficult to replace the old recommendation model.

[0089] Optionally, to address this problem, in a recommendation model training method provided by the present invention, a copy or replica of the multimedia recommendation model currently deployed on the business platform can be directly obtained as the old recommendation model, and algorithmic or structural iterative optimization can be performed based on the old recommendation model, and a new recommendation model can be obtained through further training.

[0090] Since the new recommendation model is obtained by iteration and training based on the parameters learned by the old recommendation model, and the old recommendation model itself has tended to converge, the recommendation effects of the old recommendation model before and after iteration are the same or have little difference. The new recommendation model is then trained on the old recommendation model after iteration. Even with less training data, it is easy for the new recommendation model to be better than the old one, thereby replacing the old recommendation model.

[0091] For example, when iterating on the basis of the old recommendation model, some features can be added, and the influence of the newly added features on the output can be eliminated by adjusting the model parameters, so that the output of the old recommendation model before and after the iteration is consistent when the input is the same. At this time, the effect of the old recommendation model before and after the iteration is the same. After that, the old recommendation model after the iteration is trained with less training data to obtain a new recommendation model, and the effect of the new recommendation model can also be better than that of the old recommendation model before the iteration.

[0092] Since the above method provided by the present disclosure does not require training the recommendation model from scratch, nor does it require storing a large amount of historical training data in advance, the speed of recommendation model training and iteration can be increased, and the pressure on data storage can be reduced.

[0093] Feature crossover is further explained below.

[0094] Feature crossover specifically refers to crossover processing of at least two features to obtain a new crossover feature. Feature crossover methods may include: calculating Cartesian products; and methods based on co-action network technical solutions.

[0095] The feature crossing method of the co-action network includes: for two features that need to be crossed, one of the features is used as input, the other feature is used as a parameter of the multilayer perceptron, and the output of the multilayer perceptron is used to represent the crossed feature. Furthermore, for at least two features that need to be crossed, one of the features can be used as input, the other features are used as parameters of the multilayer perceptron, and the output of the multilayer perceptron is used to represent the crossed feature.

[0096] When crossing at least two features, the feature crossing is usually crossing the input features of the embedding layer of the recommendation model, while in the above method provided by the present disclosure, the feature crossing can be crossing the output features of the embedding layer of the recommendation model. A detailed explanation is given below.

[0097] First, let’s explain the recommendation model. Multimedia recommendation models are usually built based on neural network models, which usually include embedding layers and dense layers.

[0098] The input of the embedding layer is usually one-hot encoded sparse features with high dimensions, and the embedding layer is mainly used to learn the representation of features and map the input features into another vector space. It can usually reduce the dimension of the input features, achieve feature dimensionality reduction, and output features with lower dimensions.

[0099] The dense layer is used to transform the input features nonlinearly, extract the associations between these features, and finally map them to the output space. Specifically, the dense layer can include feature input layer, pooling layer, fully connected layer, softmax layer, etc. Among them, the output of the embedding layer can be cascaded to the feature input layer.

[0100] Usually, when features are crossed, they are crossed on the input of the embedding layer, but this method of crossing will result in slower calculation speed of the crossed features and more storage resources will be occupied.

[0101] For example, when calculating the Cartesian product of two features in the input of the embedding layer, since the input of the embedding layer is often of high dimension, more content needs to be occupied when calculating the Cartesian product, and the calculation speed is also slow. Specifically, when calculating the Cartesian product of 32-dimensional features and 100-dimensional features, the 32-dimensional features and 100-dimensional features need to be read into the memory, and additional storage space for storing 3200 calculation results needs to be set up, and the calculation needs to be performed at least 3200 times.

[0102] For another example, when using the technical solution of the co-action network, it is necessary to follow the parameter independence assumption and further expand the dimensions of the two features in the input of the embedding layer. Specifically, the 32-dimensional feature can be expanded to a 100-dimensional feature. Then, for the two features that need to be crossed, one of the features can be used as the input and the other feature can be used as the parameter of the multi-layer perceptron. The output of the multi-layer perceptron can be used to represent the crossed features.

[0103] In addition, the technical solution of using the co-action network requires that the input features of the embedding layer be expanded in dimension in advance and the expanded features be stored, and then the features are queried from the storage to calculate the cross-features. Therefore, it is necessary to store multiple expanded features in additional dimensions. For example, storing multiple features expanded to 100 dimensions in the parameter server takes up more storage resources, and the calculation speed of calculating the output of the multi-layer perceptron for features with higher dimensions is obviously slower.

[0104] Since the present disclosure is aimed at the scenario of multimedia recommendation, the features of multimedia resources usually have many dimensions. For example, video features can usually contain hundreds of dimensions. Therefore, when performing feature cross-talk on multimedia resource features, the problem of storage resource consumption is more serious.

[0105] Optionally, in order to solve the above problem, in the above method provided by the present disclosure, feature intersection can be performed on the output of the embedding layer.

[0106] Since the embedding layer can achieve feature dimensionality reduction, even if the cross method of Cartesian product is used, calculating the Cartesian product for the reduced-dimensional features can obviously increase the calculation speed and reduce memory usage.

[0107] For example, after dimensionality reduction of 32-dimensional features and 100-dimensional features by the embedding layer, 4-dimensional features and 5-dimensional features are obtained. Obviously, compared with calculating the Cartesian product of 32-dimensional features and 100-dimensional features, calculating the Cartesian product of 4-dimensional features and 5-dimensional features has a higher calculation speed and occupies less content.

[0108] In addition, since the cross-features are calculated for the output of the embedding layer, it is not necessary to determine the features by querying. Even if the technical solution of the co-action network is adopted and the dimension of the output of the embedding layer needs to be expanded, it is not necessary to store the features after the expansion and then query them. Instead, the output of the multilayer perceptron can be directly calculated in real time, and the features after the expansion can be released in real time, thereby saving memory usage. In other words, the technical solution of the co-action network is to store the features after the expansion and then query them, while the above method provided by the present disclosure is to expand the dimensions in real time through calculation, thereby avoiding occupying too many storage resources.

[0109] At the same time, since the dimensions are expanded and calculated in real time, there is no need to query features from storage, which further saves the time for obtaining features and improves the calculation speed.

[0110] For example, after dimensionality reduction of the 32-dimensional features and the 100-dimensional features by the embedding layer, 4-dimensional features and 5-dimensional features are obtained, and then the 4-dimensional features and 5-dimensional features are respectively expanded to 100-dimensional features. Further, one 100-dimensional feature is used as the input of the multi-layer perceptron, and the other 100-dimensional feature is used as the parameter of the multi-layer perceptron. Finally, the output of the multi-layer perceptron is obtained as the cross feature. The two expanded 100-dimensional features can be released from the storage in real time after the cross feature is calculated, saving storage resources.

[0111] It should be noted that, since the multimedia recommendation model is deployed online, it is usually necessary to quickly calculate the recommendation results for the user and send the recommended multimedia resources to the user. Therefore, the commonly used method of performing feature cross-talk on the input of the embedding layer often slows down the speed of the recommendation model calculation and takes up more storage resources. However, by using the above method provided by the present invention, performing feature cross-talk on the output of the embedding layer, the speed of the recommendation model calculation can be increased, storage resources can be saved, and the multimedia recommendation model can be used online for business development, and recommendation results can be obtained more quickly.

[0112] The technical solution is described below through specific embodiments and in combination with specific application scenarios.

[0113] like Figure 1 As shown, Figure 1 The present invention is a flowchart of a recommendation model training method according to an exemplary embodiment. The method can be applied to a server or an electronic device related to a business platform. The method can include the following steps.

[0114] S101: Obtain training data.

[0115] The training data may include user data and corresponding multimedia resources, as well as recommended annotation results.

[0116] In an optional embodiment, a piece of training data may include user data for characterizing user characteristics, corresponding multimedia resources, and recommended annotation results.

[0117] Optionally, the recommendation annotation result may be used to indicate whether to recommend the corresponding multimedia resource to the user corresponding to the user data in the training data, and specifically may be the probability of recommending the corresponding multimedia resource to the user corresponding to the user data in the training data.

[0118] Optionally, the user data may include one or more data representing user characteristics, such as data representing content tags that the user likes, data representing content that the user has browsed historically, data representing the user's identity, and data representing the user's occupation.

[0119] Optionally, the multimedia resource may include one or more data representing multimedia features, such as data representing multimedia content tags, data representing multimedia content publishers, data representing multimedia content popularity, and the like.

[0120] S102: Obtain a recommendation model to be trained.

[0121] The recommendation model to be trained can be used to recommend multimedia resources to users. For example, by inputting user data and multimedia resources to the recommendation model to be trained, a recommendation probability can be obtained, and then whether to recommend the input multimedia resource to the user corresponding to the input user data is determined according to whether the recommendation probability is greater than a preset probability threshold.

[0122] When the output recommendation probability is greater than the preset probability threshold, the input multimedia resource can be recommended to the user corresponding to the input user data. Otherwise, it is determined that the input multimedia resource will not be recommended to the user corresponding to the input user data.

[0123] The recommendation model to be trained may include an embedding layer and a feature input layer; a first cascade relationship set may exist between the output of the embedding layer and the input of the feature input layer; and the first cascade relationship set may include one or more first cascade relationships.

[0124] Any first cascade relationship in the first cascade relationship set can be used to cascade at least two features output by the embedding layer to the input of a single feature cross unit, and cascade the output of the feature cross unit to the input of the feature input layer; the input of the feature cross unit can be at least two features among the output features of the embedding layer, and the output of the feature cross unit can be the cross feature of the at least two input features.

[0125] S103: Inputting user data and corresponding multimedia resources into the recommendation model to be trained to obtain predicted recommendation results; determining loss information according to the predicted recommendation results and the recommendation annotation results; and training the recommendation model to be trained based on the loss information.

[0126] With respect to obtaining the recommendation model to be trained in S102, the business platform may optionally construct a new recommendation model as the recommendation model to be trained; or obtain a copy of the recommendation model currently deployed by the business platform for iterative optimization, and use the iterated recommendation model as the recommendation model to be trained.

[0127] Optionally, cross features may be introduced for iterative optimization of the recommendation model copy, or if cross features already exist, the cross features may be updated as required to improve the recommendation effect. Specifically, the cross features may be determined according to the first cascade relationship set.

[0128] In an optional embodiment, obtaining a recommendation model to be trained may include the following steps.

[0129] Specifically, a copy of a recommendation model currently deployed by the business platform may be obtained as an old recommendation model; the old recommendation model may include an embedding layer and a feature input layer.

[0130] When there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, the first cascade relationship set of the old recommendation model can be updated to obtain the recommendation model to be trained.

[0131] In the case that there is no first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, a first cascade relationship set is created to obtain the recommendation model to be trained.

[0132] Among them, in order to avoid affecting the execution of the original business platform recommendation business, the above method process can obtain a copy or replica of the recommendation model currently deployed by the business platform for iteration when iterating the recommendation model, so that the recommendation model currently deployed by the business platform itself can continue to execute the recommendation business.

[0133] In the present embodiment, since the new recommendation model is obtained by iterative optimization and training based on the parameters learned by the old recommendation model, and the old recommendation model itself has tended to converge, the recommendation effects of the old recommendation model before and after the iteration are the same or have a small difference. The new recommendation model is then trained on the old recommendation model after the iteration. Even with less training data, it is easy for the new recommendation model to be better than the old recommendation model, thereby replacing the old recommendation model.

[0134] Therefore, this embodiment performs iterative optimization and training based on the recommendation model currently deployed on the business platform. Even with less training data, it is possible to improve the recommendation effect based on the recommendation model currently deployed on the business platform. In addition, since the currently deployed recommendation model is usually close to convergence, the training speed of the recommendation model can also be accelerated and convergence can be approached faster, thereby improving the speed of recommendation model training and iteration and reducing the pressure on data storage.

[0135] The following is an explanation of the first cascade relationship set.

[0136] Any first cascade relationship in the first cascade relationship set can be used to cascade at least two features output by the embedding layer to the input of a single feature cross unit, and cascade the output of the feature cross unit to the input of the feature input layer; the input of the feature cross unit can be at least two features among the output features of the embedding layer, and the output of the feature cross unit can be the cross feature of the at least two input features.

[0137] Among them, the first cascade relationship can perform feature crossover on at least two features output by the embedding layer through a feature crossover unit, and output the obtained crossover features to the feature input layer as an extended feature representation dimension for subsequent processing.

[0138] The feature intersection unit may be used to cross at least two input features to obtain a cross feature of the at least two input features.

[0139] In an optional embodiment, the feature intersection unit may be specifically used to calculate the Cartesian product of at least two input features.

[0140] In another optional embodiment, a technical solution of a co-action network may be adopted. The feature crossover unit may include a multilayer perceptron. The multilayer perceptron may be used to: for at least two features to be crossovered, use one of the features as input, use the other features as parameters of the multilayer perceptron, and calculate the crossover feature of the at least two features to be crossovered. The crossover feature calculated by the multilayer perceptron may be used as the output of the feature crossover unit.

[0141] Since the features to be crossed in the feature crossing unit are the output features of the embedding layer, the dimension of the features is small, which can save storage resources and computing resources and improve the efficiency of calculating the crossed features.

[0142] For example, when the multimedia recommendation model is used to recommend videos, the features that the feature cross-section unit needs to cross-section may include video features. Video features may originally contain hundreds of dimensions, but after dimensionality reduction by the embedding layer, video features containing dozens of dimensions can be obtained. The feature cross-section unit can perform calculations on video features with dozens of dimensions.

[0143] Optionally, the parameters of the multilayer perceptron may include a weight matrix and a bias matrix of each layer of nodes. Specifically, the dimensions of a feature may be combined into a weight matrix and a bias matrix for calculation of the multilayer perceptron.

[0144] For ease of understanding, Figure 2 As shown, Figure 2 is a schematic diagram of a multilayer perceptron according to an exemplary embodiment.

[0145] Figure 2 The two features to be crossed are feature one (i1, i2) and feature two (j1, j2, ..., j6). Feature one can be used as the input of the multilayer perceptron, and feature two can be used as the parameter of the multilayer perceptron.

[0146] Specifically, the dimensions of feature 2 can be recombined into two matrices, namely the weight matrix {j1, j2; j3, j4} and the bias matrix {j5, j6}. The output of the multilayer perceptron can be (i1*j1+i2*j2+j5, i1*j3+i2*j4+j6).

[0147] Optionally, in order to improve the cross effect of the multi-layer perceptron while minimizing the increase in memory usage, the output features of the embedding layer can be expanded in dimension in real time. Specifically, the features after the cross features of the multi-layer perceptron output can be released without storing them in the storage space.

[0148] Among them, the multi-layer perceptron has requirements for feature dimensions. For example, the feature dimensions as parameters need to be sufficient to be combined into a matrix; or based on the requirements of the co-action network technical solution, more dimensions need to be expanded. Therefore, the output dimension of the embedding layer can be expanded according to the requirements of the multi-layer perceptron.

[0149] In an optional embodiment, the feature intersection unit may further include a dimensionality expansion layer; the dimensionality expansion layer may be used to output features with fixed dimensions, and the number of input features of the dimensionality expansion layer is the same as the number of output features.

[0150] The feature crossing unit can be used to: input at least two input features into the dimension expansion layer, and use at least two features output by the dimension expansion layer as at least two features to be crossed, and calculate the crossed features by the multilayer perceptron.

[0151] More specifically, the dimension expansion layer may be a linear layer with a larger output dimension, which may transform input features with a smaller dimension into features with a larger dimension.

[0152] For example, the dimension expansion layer can be a linear layer with an input dimension of 8 and an output dimension of 100. During initialization, the dimension expansion layer can retain 8-dimensional features as input features among the 100-dimensional features output, and the other 92-dimensional features are 0. Of course, the parameters of the dimension expansion layer can be updated during subsequent training of the recommendation model.

[0153] In this embodiment, the feature crossover unit can utilize the dimension expansion layer to meet the demand for feature crossover by expanding the feature dimension. At the same time, since the features after the real-time dimension expansion can be directly used for feature crossover, there is no need to first store the features after the dimension expansion and then query the features after the dimension expansion from the storage space, which improves the efficiency of feature crossover and saves storage resources.

[0154] After obtaining the cross-features, the features of the extended dimensions can be directly released or deleted, which can further save storage resources.

[0155] Optionally, in order to avoid the impact of the introduction of cross-features on the representation learning of independent features of the embedding layer, a buffer for model parameter updates can be set for the first cascade relationship, so that when the recommendation model is subsequently trained, the gradient transferred back from the first cascade relationship can be reduced by the set buffer, thereby reducing the impact of cross-features on the parameters of the embedding layer.

[0156] In an optional embodiment, the feature cross unit may further include a buffer layer. The buffer layer may be used to reduce the gradient of the reverse transfer during model training.

[0157] Optionally, the input and output dimensions of the buffer layer may be the same. The buffer layer may be a linear layer with the same input and output dimensions. During initialization, the input and output of the initialized buffer layer may be kept consistent. Of course, the parameters of the buffer layer may be updated during subsequent training of the recommendation model.

[0158] The feature crossover unit can be used to: input at least two input features into the buffer layer, and use at least two features output by the buffer layer as at least two features to be crossed, and calculate the crossover feature by the multilayer perceptron.

[0159] Optionally, based on the dimensionality expansion layer and the buffer layer explained in the above two embodiments, the feature crossing unit may include a dimensionality expansion layer and a buffer layer at the same time, and may be specifically used to input at least two features of the input into the buffer layer, and input at least two features of the output of the buffer layer into the dimensionality expansion layer, and use the at least two features of the output of the dimensionality expansion layer as at least two features to be crossed, and calculate the crossed features by a multilayer perceptron.

[0160] Alternatively, the feature crossing unit can be used to: input at least 2 input features into the dimension expansion layer, and input at least 2 features output by the dimension expansion layer into the buffer layer, use at least 2 features output by the buffer layer as at least 2 features to be crossed, and calculate the crossed features by a multilayer perceptron.

[0161] When obtaining the recommendation model to be trained based on the old recommendation model, it is necessary to iteratively optimize the old recommendation model, which may be to iteratively optimize the first cascade relationship set in the old recommendation model.

[0162] Optionally, when there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, updating the first cascade relationship set of the old recommendation model may include: adding one or more first cascade relationships to the first cascade relationship set of the old recommendation model; and / or modifying one or more first cascade relationships in the first cascade relationship set of the old recommendation model; and / or deleting one or more first cascade relationships in the first cascade relationship set of the old recommendation model.

[0163] Since the first cascade relationship set reflects the feature combination of cross features, the update of the first cascade relationship set can be regarded as an iteration of the cross feature combination in the recommendation model.

[0164] By adjusting the combination of cross-features according to needs, for example, deleting cross-features that have little relationship with the recommended annotation results, computing resources can be saved. For new feature combinations that appear in the business, if it is believed that this new feature combination has a strong relationship with the recommended annotation results, this new feature combination can be added for feature cross-feature in order to improve the recommendation effect.

[0165] In the scenario of recommending multimedia resources in the present disclosure, the input of the recommendation model usually includes user data and multimedia resources. Different user features in the user data can be cross-featured, different multimedia features in the multimedia resources can be cross-featured, and user features in the user data can also be cross-featured with multimedia features in the multimedia resources.

[0166] For example, the age characteristics and gender characteristics in user data can be cross-featured; the content tag characteristics and publisher characteristics in multimedia resources can be cross-featured; the occupation characteristics in user data and the content tag characteristics in multimedia resources can be cross-featured.

[0167] Therefore, updating the first cascade relationship set can optimize the cross-features in the recommendation model, so as to more accurately determine the feature combination of cross-features that are more closely related to the recommended annotation results, thereby improving the recommendation effect of the recommendation model.

[0168] Optionally, modifying the first cascade relationship may be modifying the embedding layer output features input in the first cascade relationship, specifically by adding, deleting or replacing the input embedding layer output features; or it may be modifying the feature cross unit in the first cascade relationship, specifically by adjusting the parameters in the feature cross unit.

[0169] Optionally, when there is no first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, a first cascade relationship set of the old recommendation model is created. Specifically, one or more first cascade relationships may be added as the created first cascade relationship set according to demand.

[0170] In order to make the iterated old recommendation model converge as quickly as possible during subsequent training, in an optional embodiment, after updating or creating the first cascade relationship set based on the old recommendation model, the parameters of the recommendation model to be trained can also be adjusted so that the old recommendation model and the recommendation model to be trained after the adjusted parameters have the same output when the input is the same.

[0171] Therefore, the old recommendation model before and after the iteration has the same recommendation effect. Furthermore, the old recommendation model after the iteration can be trained based on less training data to obtain a better recommendation effect. In addition, since the old recommendation model before the iteration has converged, the old recommendation model after the iteration is also close to convergence, and convergence can be achieved through fewer training times, which improves the training efficiency of the recommendation model.

[0172] Corresponding to the first cascade relationship set in S101, in an optional embodiment, since the recommendation model also needs to be trained using independent features, a second cascade relationship set may also exist between the output of the embedding layer and the input of the feature input layer; any second cascade relationship in the second cascade relationship set can be used to cascade one output of the embedding layer to the input of the feature input layer.

[0173] In this embodiment, the dimension of the feature representation in the recommendation model can be further increased through the second cascade relationship set, thereby improving the recommendation effect of the recommendation model.

[0174] Optionally, a second set of cascade relations can be used to cascade each output of the embedding layer to the input of the feature input layer.

[0175] Optionally, in the explanation of the first cascade relationship, since the cross features may affect the normal representation learning of the independent features, a buffer for the gradient of the reverse transfer is set. However, the gradient of the reverse transfer from the second cascade relationship belongs to the normal representation learning of the independent features, and the buffer for the gradient of the reverse transfer may not be set.

[0176] For ease of understanding, Figure 3 As shown, Figure 3 is a structural diagram of a recommendation model according to an exemplary embodiment, which includes an embedding layer and a dense layer, and the dense layer includes a feature input layer.

[0177] The embedding layer has 4 output features, namely features 1 to 4. There are 2 first cascade relationships and 4 second cascade relationships between the embedding layer and the feature input layer.

[0178] Among them, the two first cascade relationships are respectively used to cross feature 1 and feature 2, and to cross feature 3 and feature 4, and respectively include feature cross unit 1 and feature cross unit 2. The four second cascade relationships are respectively used to cascade features 1-4 to the input of the feature input layer.

[0179] The feature input layer has 6 inputs.

[0180] It should be noted that, optionally, the input dimension of the feature input layer can change with the change of the first cascade relationship set or the second cascade relationship set. For example, when a first cascade relationship is added, the feature input layer can expand the corresponding input dimension so that the newly added first cascade relationship can be cascaded to the expanded input dimension. Specifically, in the newly added first cascade relationship, the feature cross unit outputs a 10-dimensional cross feature, and the feature input layer can expand 10 dimensions to input the cross feature; when a first cascade relationship is deleted, the feature input layer can delete the corresponding input dimension.

[0181] Regarding the training in S103, in an optional embodiment, the training data may include historical training data. The historical training data may include training data used to train an old recommendation model.

[0182] Since the old recommendation model before modification has been trained using the historical training data set, the historical training data set has little effect on the feature representation learning of the embedding layer. In order to prevent the feature representation learned by the embedding layer from being affected by the cross features, the recommendation model to be trained can be trained based on the historical training data while keeping the embedding layer parameters unchanged. Specifically, only the parameters in the dense layer and the feature cross unit can be updated.

[0183] Therefore, optionally, training the recommendation model to be trained based on the loss information may include: training the recommendation model to be trained based on the loss information corresponding to the historical training data while keeping the embedding layer parameters of the recommendation model to be trained unchanged.

[0184] Optionally, the loss information corresponding to the historical training data may be obtained by inputting the user data and corresponding multimedia resources in the historical training data into the recommendation model to be trained to obtain the predicted recommendation results, and then determining the loss information based on the obtained predicted recommendation results and the recommendation annotation results in the historical training data.

[0185] In an optional embodiment, the output of the recommendation model to be trained may be a Boolean value used to represent recommendation or non-recommendation, or may be a recommendation probability, so as to subsequently determine whether to make a recommendation based on a preset probability threshold.

[0186] After the user data and the corresponding multimedia resources in the training data are input into the recommendation model to be trained, the predicted recommendation result can be output, and the predicted recommendation result can be further compared with the recommended annotation result to determine the loss information.

[0187] Optionally, when the output of the recommendation model to be trained is a Boolean value, the determined loss information may characterize whether the predicted recommendation result is the same as or different from the recommended annotation result. When the output of the recommendation model to be trained is a recommendation probability, the determined loss information may be the difference between the predicted recommendation result and the recommended annotation result.

[0188] With respect to the trained recommendation model to be trained, since the trained recommendation model to be trained is needed to carry out recommendation business in business, in an optional embodiment, the trained recommendation model to be trained can be directly deployed on the business platform.

[0189] When a multimedia recommendation model has been deployed on the business platform, it can be determined whether the recommendation model currently deployed on the business platform can be replaced by the trained recommendation model to be trained.

[0190] Specifically, the judgment may be made based on the recommendation effect between the trained recommendation model to be trained and the recommendation model currently deployed by the business platform. This embodiment does not limit the specific method for determining the recommendation effect.

[0191] Optionally, AB testing can be used to direct some real user data and real multimedia resources to the trained recommendation model to be trained, and other real user data and real multimedia resources to the currently deployed recommendation model, so as to compare the recommendation effects of the two recommendation models. If the recommendation effect of the trained recommendation model to be trained is better, the trained recommendation model to be trained can be used to replace the currently deployed recommendation model.

[0192] Optionally, a test data set can be used to test the trained recommendation model to be trained and the recommendation model currently deployed on the business platform, respectively, so as to compare the recommendation effects of the two recommendation models. If the recommendation effect of the trained recommendation model to be trained is better, the trained recommendation model to be trained can be used to replace the currently deployed recommendation model.

[0193] Therefore, in an optional embodiment, when the recommendation effect of the trained recommendation model to be trained is better than the recommendation model currently deployed by the business platform, the trained recommendation model to be trained can be used to replace the recommendation model currently deployed by the business platform, so as to achieve iterative optimization of the recommendation model deployed on the business platform, so as to improve the recommendation effect of the multimedia recommendation service of the business platform and improve the user experience of obtaining recommended multimedia.

[0194] The above method process can better utilize training data to improve the training effect of the multimedia recommendation model by introducing cross-features between features in the multimedia recommendation model and using the cross-features to expand the dimension of feature representation, thereby improving the recommendation effect of the multimedia recommendation model and improving the user's experience in obtaining recommended multimedia resources.

[0195] At the same time, by using the recommendation model copy currently deployed by the business platform for modification and training, the recommendation effect of the currently deployed recommendation model is retained, so that a better recommendation model can be trained with less training data, so that the trained recommendation model to be trained can be used to replace the old recommendation model, speeding up the model training and iteration. At the same time, there is no need to store a lot of historical training data in advance, which reduces the pressure on data storage.

[0196] When improving feature crossover, the output of the embedding layer is used for feature crossover, which improves the calculation speed of feature crossover and saves storage resources.

[0197] The present disclosure also provides corresponding device embodiments as follows.

[0198] Figure 4 is a block diagram of a recommendation model training device according to an exemplary embodiment. Figure 4 The device includes a training data acquisition unit 201, a model acquisition unit 202 and a training unit 203.

[0199] The training data acquisition unit 201 is configured to execute: acquiring training data; the training data includes user data and corresponding multimedia resources, and recommended annotation results.

[0200] The model acquisition unit 202 is configured to perform: acquiring a recommendation model to be trained; the recommendation model to be trained is used to recommend multimedia resources to users; the recommendation model to be trained includes an embedding layer and a feature input layer; there is a first cascade relationship set between the output of the embedding layer and the input of the feature input layer; the first cascade relationship set includes one or more first cascade relationships.

[0201] Any first cascade relationship in the first cascade relationship set is used to cascade at least two features output by the embedding layer to the input of a single feature cross unit, and to cascade the output of the feature cross unit to the input of the feature input layer; the input of the feature cross unit is at least two features among the output features of the embedding layer, and the output of the feature cross unit is the cross feature of the at least two input features.

[0202] The training unit 203 is configured to execute: inputting the user data and the corresponding multimedia resources into the recommendation model to be trained to obtain a predicted recommendation result; determining loss information based on the predicted recommendation result and the recommendation annotation result; and training the recommendation model to be trained based on the loss information.

[0203] Optionally, the model acquisition unit 202 includes: an old model acquisition subunit 202a, configured to execute: acquiring a copy of a recommendation model currently deployed by the business platform as an old recommendation model; the old recommendation model includes an embedding layer and a feature input layer.

[0204] The model updating subunit 202b is configured to execute: when there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, updating the first cascade relationship set of the old recommendation model to obtain the recommendation model to be trained; when there is no first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, creating the first cascade relationship set to obtain the recommendation model to be trained.

[0205] Optionally, the model updating subunit 202b includes: a set updating subunit 202b1, configured to execute: when there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, adding one or more first cascade relationships to the first cascade relationship set of the old recommendation model; and / or modifying one or more first cascade relationships in the first cascade relationship set of the old recommendation model; and / or deleting one or more first cascade relationships in the first cascade relationship set of the old recommendation model.

[0206] Optionally, the model updating subunit 202b also includes: a model adjusting subunit 202b2, which is configured to execute: after obtaining the recommendation model to be trained, adjusting the parameters of the recommendation model to be trained, so that the old recommendation model and the recommendation model to be trained with the adjusted parameters have the same output when the input is the same.

[0207] Optionally, the training data includes historical training data, and the historical training data includes training data that has been used to train the old recommendation model; the training unit 203 includes: a historical training subunit 203a, configured to execute: training the recommendation model to be trained based on the loss information corresponding to the historical training data while keeping the embedding layer parameters of the recommendation model to be trained unchanged.

[0208] Optionally, the feature crossing unit includes a multilayer perceptron; the multilayer perceptron is used to: for at least two features to be crossed, use one of the features as input, use the other features as parameters of the multilayer perceptron, and calculate the crossing features of the at least two features to be crossed.

[0209] Optionally, the feature crossing unit also includes a dimension expansion layer; the dimension expansion layer outputs features of fixed dimension, and the number of input features of the dimension expansion layer is the same as the number of output features; the feature crossing unit is used to: input at least 2 input features into the dimension expansion layer, and use at least 2 features output by the dimension expansion layer as at least 2 features to be crossed, and the cross features are calculated by the multilayer perceptron.

[0210] Optionally, the feature crossover unit also includes a buffer layer; the input and output dimensions of the buffer layer are the same, and the input and output of the buffer layer after initialization remain consistent; the feature crossover unit is used to: input at least 2 input features into the buffer layer, and use at least 2 features output by the buffer layer as 2 features to be crossed, and the crossover feature is calculated by the multilayer perceptron.

[0211] Optionally, there is a second cascade relationship set between the output of the embedding layer and the input of the feature input layer; any second cascade relationship in the second cascade relationship set is used to cascade one output of the embedding layer to the input of the feature input layer.

[0212] Optionally, the recommendation model training device also includes: a replacement unit 204, which is configured to execute: when the recommendation effect of the trained recommendation model to be trained is better than the recommendation model currently deployed by the business platform, using the trained recommendation model to be trained to replace the recommendation model currently deployed by the business platform.

[0213] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0214] An embodiment of the present disclosure further provides an electronic device, comprising: a processor; and a memory for storing instructions executable by the processor.

[0215] The processor is configured to execute instructions to implement a recommendation model training method as described in any of the above embodiments.

[0216] An embodiment of the present disclosure also proposes a computer-readable storage medium. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a recommendation model training method described in any of the above embodiments.

[0217] An embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which, when executed by a processor, implements a recommendation model training method described in any of the above embodiments.

[0218] Figure 5 is a schematic block diagram of an electronic device according to an embodiment of the present disclosure. Figure 5 , the electronic device 500 may include one or more of the following components: a processing component 502, a memory 504, a power component 506, a multimedia component 508, an audio component 510, an input / output (I / O) interface 512, a sensor component 514, and a communication component 518. The above electronic devices / servers may adopt a similar hardware architecture.

[0219] The processing component 502 generally controls the overall operation of the electronic device 500, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 502 may include one or more processors 520 to execute instructions to complete all or part of the steps of the above-mentioned recommendation model training method. In addition, the processing component 502 may include one or more modules to facilitate the interaction between the processing component 502 and other components. For example, the processing component 502 may include a multimedia module to facilitate the interaction between the multimedia component 508 and the processing component 502.

[0220] The memory 504 is configured to store various types of data to support operations on the electronic device 500. Examples of such data include instructions for any application or method operating on the electronic device 500, contact data, phone book data, messages, pictures, videos, etc. The memory 504 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0221] The power supply component 506 provides power to the various components of the electronic device 500. The power supply component 506 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 500.

[0222] The multimedia component 508 includes a screen that provides an output interface between the electronic device 500 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 508 includes a front camera and / or a rear camera. When the electronic device 500 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed or optical lens system with focal length and optical zoom capability.

[0223] The audio component 510 is configured to output and / or input audio signals. For example, the audio component 510 includes a microphone (MIC), and when the electronic device 500 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 504 or sent via the communication component 518. In some embodiments, the audio component 510 also includes a speaker for outputting audio signals.

[0224] I / O interface 512 provides an interface between processing component 502 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0225] The sensor assembly 514 includes one or more sensors for providing various aspects of status assessment for the electronic device 500. For example, the sensor assembly 514 can detect the open / closed state of the electronic device 500, the relative positioning of components, such as the display and keypad of the electronic device 500, and the sensor assembly 514 can also detect the position change of the electronic device 500 or a component of the electronic device 500, the presence or absence of user contact with the electronic device 500, the orientation or acceleration / deceleration of the electronic device 500, and the temperature change of the electronic device 500. The sensor assembly 514 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 514 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 514 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0226] The communication component 518 is configured to facilitate wired or wireless communication between the electronic device 500 and other devices. The electronic device 500 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 518 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 518 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0227] In one embodiment of the present disclosure, the electronic device 500 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute one of the above-mentioned recommendation model training methods.

[0228] In an embodiment of the present disclosure, a computer-readable storage medium including instructions is also provided, such as a memory 504 including instructions, and the instructions can be executed by a processor 520 of an electronic device 500 to complete the above-mentioned recommendation model training method. For example, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0229] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0230] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

[0231] It should be noted that, in the present disclosure, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprises one..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0232] The method and device provided in the embodiments of the present disclosure are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present disclosure. The description of the above embodiments is only used to help understand the method of the present disclosure and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present disclosure, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present disclosure.

Claims

1. A recommendation model training method, characterized in that: include: Acquire training data; the training data includes user data and corresponding multimedia resources, as well as recommended annotation results; Get the recommendation model to be trained; The recommendation model to be trained is used to recommend multimedia resources to users; the recommendation model to be trained includes an embedding layer and a feature input layer; there is a first cascade relationship set between the output of the embedding layer and the input of the feature input layer; the first cascade relationship set includes one or more first cascade relationships; Any first cascade relationship in the first cascade relationship set is used to cascade at least two features output by the embedding layer to the input of a single feature cross unit, and to cascade the output of the feature cross unit to the input of the feature input layer; the input of the feature cross unit is at least two features among the output features of the embedding layer, and the output of the feature cross unit is a cross feature of the at least two input features; the feature cross unit includes a multilayer perceptron; the multilayer perceptron is used to: for at least two features to be crossed, use one of the features as input, use the other features as parameters of the multilayer perceptron, and calculate the cross feature of the at least two features to be crossed; Inputting the user data and the corresponding multimedia resources into the recommendation model to be trained to obtain a predicted recommendation result; Determining loss information according to the predicted recommendation result and the recommended annotation result; The recommendation model to be trained is trained based on the loss information.

2. The method according to claim 1, characterized in that: The obtaining of the recommendation model to be trained includes: Obtaining a copy of a recommendation model currently deployed by the business platform as an old recommendation model; the old recommendation model includes an embedding layer and a feature input layer; In a case where there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, updating the first cascade relationship set of the old recommendation model to obtain a recommendation model to be trained; In the case that there is no first cascade relationship set between the output of the embedding layer and the input of the feature input layer of the old recommendation model, a first cascade relationship set is created to obtain the recommendation model to be trained.

3. The method according to claim 2, characterized in that The updating of the first cascade relationship set of the old recommendation model includes: Adding one or more first cascade relationships to the first cascade relationship set of the old recommendation model; and / or Modifying one or more first cascade relationships in the first cascade relationship set of the old recommendation model; and / or One or more first cascade relationships are deleted from the first cascade relationship set of the old recommendation model.

4. The method according to claim 2, characterized in that: After obtaining the recommendation model to be trained, the method further includes: The parameters of the obtained recommendation model to be trained are adjusted so that the old recommendation model and the recommendation model to be trained after the adjustment of the parameters have the same output when the input is the same.

5. The method according to claim 2, characterized in that: The training data includes historical training data, and the historical training data includes training data used to train the old recommendation model; The training of the recommendation model to be trained based on the loss information includes: While keeping the embedding layer parameters of the recommendation model to be trained unchanged, the recommendation model to be trained is trained based on the loss information corresponding to the historical training data.

6. The method according to claim 1, characterized in that The feature crossover unit further includes a dimension expansion layer; the dimension expansion layer outputs features of fixed dimension, and the number of input features of the dimension expansion layer is the same as the number of output features; The feature crossing unit is used to: input at least two input features into the dimension expansion layer, and use at least two features output by the dimension expansion layer as at least two features to be crossed, and calculate the crossed features by the multilayer perceptron.

7. The method according to claim 1, characterized in that The feature cross unit further includes a buffer layer; the input and output dimensions of the buffer layer are the same, and the input and output of the buffer layer after initialization remain consistent; The feature crossover unit is used to: input at least two input features into the buffer layer, and use at least two features output by the buffer layer as two features to be crossed, and calculate the crossover feature by the multilayer perceptron.

8. The method according to claim 1, characterized in that There is also a second cascade relationship set between the output of the embedding layer and the input of the feature input layer; Any second cascade relationship in the second cascade relationship set is used to cascade one output of the embedding layer to the input of the feature input layer.

9. The method according to claim 1, characterized in that: Also includes: When the recommendation effect of the trained recommendation model to be trained is better than the recommendation model currently deployed by the business platform, the recommendation model currently deployed by the business platform is replaced by the trained recommendation model to be trained.

10. A recommendation model training device, characterized in that: include: The training data acquisition unit is configured to execute: acquiring training data; The training data includes user data and corresponding multimedia resources, as well as recommended annotation results; The model acquisition unit is configured to execute: acquiring a recommendation model to be trained; the recommendation model to be trained is used to recommend multimedia resources to users; the recommendation model to be trained includes an embedding layer and a feature input layer; there is a first cascade relationship set between the output of the embedding layer and the input of the feature input layer; the first cascade relationship set includes one or more first cascade relationships; Any first cascade relationship in the first cascade relationship set is used to cascade at least two features output by the embedding layer to the input of a single feature cross unit, and to cascade the output of the feature cross unit to the input of the feature input layer; the input of the feature cross unit is at least two features among the output features of the embedding layer, and the output of the feature cross unit is a cross feature of the at least two input features; the feature cross unit includes a multilayer perceptron; the multilayer perceptron is used to: for at least two features to be crossed, use one of the features as input, use the other features as parameters of the multilayer perceptron, and calculate the cross feature of the at least two features to be crossed; The training unit is configured to execute: inputting the user data and the corresponding multimedia resources into the recommendation model to be trained to obtain a predicted recommendation result; and determining loss information according to the predicted recommendation result and the recommendation annotation result; The recommendation model to be trained is trained based on the loss information.

11. The device according to claim 10, characterized in that The model acquisition unit includes: The old model acquisition subunit is configured to execute: acquiring a copy of the recommendation model currently deployed by the business platform as an old recommendation model; the old recommendation model includes an embedding layer and a feature input layer; The model updating subunit is configured to execute: when there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, updating the first cascade relationship set of the old recommendation model to obtain the recommendation model to be trained; when there is no first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, creating the first cascade relationship set to obtain the recommendation model to be trained.

12. The device according to claim 11, characterized in that The model updating subunit includes: The collection update subunit is configured to perform: In a case where there is a first cascade relationship set between the output of the embedding layer of the old recommendation model and the input of the feature input layer, one or more first cascade relationships are added to the first cascade relationship set of the old recommendation model; and / or one or more first cascade relationships are modified in the first cascade relationship set of the old recommendation model; and / or one or more first cascade relationships are deleted in the first cascade relationship set of the old recommendation model.

13. The device according to claim 11, characterized in that The model updating subunit further includes: The model adjustment subunit is configured to execute: after obtaining the recommendation model to be trained, adjust the parameters of the recommendation model to be trained so that the old recommendation model and the recommendation model to be trained after adjusting the parameters have the same output when the input is the same.

14. The device according to claim 11, characterized in that The training data includes historical training data, and the historical training data includes training data used to train the old recommendation model; The training unit comprises: The historical training subunit is configured to execute: while keeping the embedding layer parameters of the recommendation model to be trained unchanged, training the recommendation model to be trained based on the loss information corresponding to the historical training data.

15. The device according to claim 11, characterized in that The feature crossover unit further includes a dimension expansion layer; the dimension expansion layer outputs features of fixed dimension, and the number of input features of the dimension expansion layer is the same as the number of output features; The feature crossing unit is used to: input at least two input features into the dimension expansion layer, and use at least two features output by the dimension expansion layer as at least two features to be crossed, and calculate the crossed features by the multilayer perceptron.

16. The device according to claim 11, characterized in that The feature cross unit further includes a buffer layer; the input and output dimensions of the buffer layer are the same, and the input and output of the buffer layer after initialization remain consistent; The feature crossover unit is used to: input at least two input features into the buffer layer, and use at least two features output by the buffer layer as two features to be crossed, and calculate the crossover feature by the multilayer perceptron.

17. The device according to claim 10, characterized in that There is also a second cascade relationship set between the output of the embedding layer and the input of the feature input layer; Any second cascade relationship in the second cascade relationship set is used to cascade one output of the embedding layer to the input of the feature input layer.

18. The device according to claim 10, characterized in that Also includes: The replacement unit is configured to execute: when the recommendation effect of the trained recommendation model to be trained is better than the recommendation model currently deployed by the business platform, replace the recommendation model currently deployed by the business platform with the trained recommendation model to be trained.

19. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement a recommendation model training method as described in any one of claims 1 to 9.

20. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute a recommendation model training method as described in any one of claims 1 to 9.

21. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, a recommendation model training method as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Object feature prediction and recommendation method and system, equipment and storage medium

    CN110019163A