Model training method and device, video recommendation method and device, equipment and medium
Through pre-training and fine-tuning models, combined with e-commerce users' product domain and short video domain behavior data, the problem of poor short video recommendation effect in e-commerce scenarios is solved, and more accurate user interest migration and label preference calculation is achieved.
Patent Information
- Application Number
- CN202311397983.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-25
- Publication Date
- 2025-04-25
AI Technical Summary
The existing technology is difficult to effectively recommend short videos in e-commerce scenarios, resulting in sparse user interaction behaviors and difficult to expand the calculation method of short video tag preferences to e-commerce scenarios.
By obtaining the pre-trained data set, including user portrait data of multiple historical users, product domain behavior data and short video domain behavior data, these data are used to pre-train the initial backbone network of the product domain click-through rate estimate model and the short video domain click-through rate estimate model to obtain the pre-trained backbone network. Then, the initial label preference model is fine-tuned and trained using the fine-tuning dataset to obtain the trained label preference model.
It realizes more accurate short video recommendations in e-commerce scenarios, improves user stickiness and interactive behavior density, and reduces the risk of overfitting the label preference model.
Smart Images

Figure CN119884466A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a model training method, a video recommendation method, a device, an electronic device, and a computer storage medium. Background Art
[0002] At present, there are significant differences between short videos in e-commerce scenarios and short videos in entertainment scenarios. The focus of e-commerce scenarios is mainly to direct traffic to products through short videos. The difference in content makes the stickiness of e-commerce users not as significant as the latter, resulting in sparse short video interaction behaviors of users in e-commerce scenarios.
[0003] In the related technologies, in order to improve the recommendation effect of short videos, short videos are mainly recommended based on the user's short video tag preferences. Among them, the short video tag preference calculation method includes statistics based on user tag behavior, deep learning methods, and deep learning methods based on user tag and short video mixed behavior. These methods are widely used in short video recommendations in entertainment scenarios, but it is difficult to expand to e-commerce scenarios. Therefore, it is difficult to ensure the recommendation effect of short videos in e-commerce scenarios. Summary of the invention
[0004] Embodiments of the present application provide a model training method, a video recommendation method, an apparatus, an electronic device, and a computer storage medium.
[0005] The technical solution of this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a model training method, the method comprising:
[0007] Obtain a pre-training data set; the pre-training data set includes user portrait data, product domain behavior data, and short video domain behavior data of multiple historical users;
[0008] Using the pre-training data set, pre-training the initial backbone networks of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network;
[0009] A fine-tuning data set is obtained, and the initial label preference model is fine-tuned and trained using the fine-tuning data set to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
[0010] In some embodiments, the pre-training data set is used to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain the pre-trained backbone network, including:
[0011] Inputting the pre-training data set into the initial backbone network for feature processing to obtain a first feature set of each of the multiple historical users;
[0012] Determining final interest vectors of each of the multiple historical users based on the first feature sets of each of the multiple historical users;
[0013] Determining a first loss function of the product domain click-through rate prediction model and a second loss function of the short video domain click-through rate prediction model based on the determined final interest vectors of each of the multiple historical users;
[0014] Based on the first loss function and the second loss function, parameters of the initial backbone network are adjusted to obtain the pre-trained backbone network.
[0015] In some embodiments, the inputting the pre-training data set into the initial backbone network for feature processing to obtain the first feature set of each of the plurality of historical users includes:
[0016] Determine target short video data and target product data that meet preset conditions from the pre-training data set;
[0017] Inputting the user portrait data, product domain behavior data, short video domain behavior data, target short video data and target product data of the multiple historical users into the initial backbone network for feature extraction, and obtaining user-side features, product domain features, short video domain features, target product features and target short video features of the multiple historical users respectively;
[0018] The user-side features, product domain features, short video domain features, target product features and target short video features of each of the multiple historical users are embedded and represented to obtain a first feature set of each of the multiple historical users; the first feature set includes the represented user-side features, product domain features, short video domain features, target product features and target short video features.
[0019] In some embodiments, determining the final interest vectors of the plurality of historical users based on the first feature sets of the plurality of historical users comprises:
[0020] Determining the long-term interest vectors of the multiple historical users based on the user-side features characterized by the multiple historical users;
[0021] Determine the product domain interest vectors of the multiple historical users based on the respective long-term interest vectors of the multiple historical users, the characterized product domain features, and the characterized target short video features;
[0022] Determining the short video domain interest vectors of the multiple historical users based on the respective long-term interest vectors of the multiple historical users, the characterized short video domain features, and the characterized target short video features;
[0023] The long-term interest vectors, product domain interest vectors, short video domain interest vectors and target short video feature vectors of each of the multiple historical users are feature-fused to obtain a final interest vector of each of the multiple historical users; the target short video feature vector is obtained by feature-fusion of the target short video features after the representation.
[0024] In some embodiments, the feature fusion of the long-term interest vectors, product domain interest vectors, short video domain interest vectors and target short video feature vectors of the plurality of historical users includes:
[0025] Get the introduced cold start vector;
[0026] Using the cold start vector, the short video domain interest vectors of the multiple historical users are updated to obtain updated short video domain interest vectors of the multiple historical users;
[0027] The long-term interest vectors of the multiple historical users, the product domain interest vectors, the updated short video domain interest vectors and the target short video feature vectors are feature fused.
[0028] In some embodiments, fine-tuning the initial label preference model using the fine-tuning dataset to obtain a trained label preference model includes:
[0029] Inputting the fine-tuning data set into the backbone network of the initial label preference model for feature processing to obtain a second feature set of each of the multiple historical users;
[0030] Based on the respective second feature sets of the plurality of historical users, determining again the respective final interest vectors of the plurality of historical users;
[0031] Determining a third loss function of the initial tag preference model based on the final interest vectors of each of the multiple historical users determined again;
[0032] Based on the third loss function, parameters of the backbone network of the initial label preference model are adjusted to obtain the trained label preference model.
[0033] In a second aspect, an embodiment of the present application provides a video recommendation method, the method comprising:
[0034] Obtain a prediction data set; the prediction data set includes user portrait data of target users, product domain behavior data, and short video domain behavior data;
[0035] Inputting the prediction data set into the trained tag preference model to obtain a prediction result; the prediction result includes the target user's preference score for at least one short video tag to be recommended;
[0036] According to the prediction result, short videos are recommended to the target user; wherein the trained label preference model is obtained according to the method provided by one or more of the aforementioned technical solutions.
[0037] In a third aspect, an embodiment of the present application provides a model training device, which includes a first acquisition module, a pre-training module and a fine-tuning training module, wherein:
[0038] A first acquisition module is used to acquire a pre-training data set; the pre-training data set includes user portrait data, product domain behavior data, and short video domain behavior data of multiple historical users;
[0039] A pre-training module, used to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model using the pre-training data set to obtain a pre-trained backbone network;
[0040] The fine-tuning training module is used to obtain a fine-tuning data set, and use the fine-tuning data set to fine-tune the initial label preference model to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
[0041] In a fourth aspect, an embodiment of the present application provides a video recommendation device, the device comprising a second acquisition module, a prediction module and a recommendation module, wherein:
[0042] The second acquisition module is used to acquire a prediction data set; the prediction data set includes user portrait data of the target user, product domain behavior data, and short video domain behavior data;
[0043] A prediction module, used to input the prediction data set into the trained tag preference model to obtain a prediction result; the prediction result includes the target user's preference score for at least one short video tag to be recommended;
[0044] A recommendation module is used to recommend short videos to the target user based on the prediction results; wherein the trained label preference model is obtained according to the method provided by one or more of the aforementioned technical solutions.
[0045] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method described in the first or second aspect when executing the program.
[0046] In a sixth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a computer program; after the computer program is executed, the method described in the first aspect or the second aspect can be implemented.
[0047] The embodiment of the present application proposes a model training method, a video recommendation method, an apparatus, an electronic device and a computer storage medium, the method comprising: obtaining a pre-training data set; the pre-training data set comprises user portrait data of multiple historical users, product domain behavior data and short video domain behavior data; using the pre-training data set to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network; obtaining a fine-tuning data set, using the fine-tuning data set to fine-tune the initial label preference model to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
[0048] It can be seen that in the pre-training process, in addition to using the user portrait data and short video domain behavior data of each historical user, the embodiment of the present application also introduces rich product domain behavior data of each historical user, that is, the user portrait data, rich product domain behavior data and sparse short video domain behavior data of these users are used to jointly pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model. In this way, not only can the backbone network be fully trained, but also the accurate migration of users from product domain interests to short video domain interests can be achieved; further, the initial label preference model constructed by the backbone network is fine-tuned using the fine-tuning data set, so that the label preference can make greater use of the behavior data of each historical user in the product domain and short video domain, improve the accuracy of label preference calculation, and then effectively reduce the risk of overfitting of the backbone network, and ensure the subsequent short video recommendation effect of the label preference model. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 A flowchart of a model training method in an embodiment of the present application;
[0050] Figure 2A A schematic diagram of the structure of a gated residual network GRN in an embodiment of the present application;
[0051] Figure 2B This is a structural diagram of a feature selection network FSN module in an embodiment of the present application;
[0052] Figure 3 A schematic diagram of a video recommendation method according to an embodiment of the present application;
[0053] Figure 4 A schematic diagram of the structure of a short video tag preference model according to an embodiment of the present application;
[0054] Figure 5 A schematic diagram of the structure of a model training device according to an embodiment of the present application;
[0055] Figure 6 A schematic diagram of the structure of a video recommendation device according to an embodiment of the present application;
[0056] Figure 7 A schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0057] The present application will be further described in detail below in conjunction with the accompanying drawings and Examples. It should be understood that the embodiments provided herein are only used to explain the present application and are not intended to limit the present application. In addition, the embodiments provided below are partial embodiments for implementing the present application, rather than providing all embodiments for implementing the present application. In the absence of conflict, the technical solutions recorded in the embodiments of the present application can be implemented in any combination.
[0058] It should be noted that, in the embodiments of the present application, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other related elements (such as steps in a method or units in a device, for example, a unit may be a portion of a circuit, a portion of a processor, a portion of a program or software, etc.) in the method or apparatus including the element.
[0059] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, I and / or J can represent the three situations that I exists alone, I and J exist at the same time, and J exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of I, J, and R can represent including any one or more elements selected from the set consisting of I, J, and R.
[0060] For example, the model training method provided in the embodiment of the present application includes a series of steps, but the model training method provided in the embodiment of the present application is not limited to the recorded steps. Similarly, the model training device provided in the embodiment of the present application includes a series of modules, but the model training device provided in the embodiment of the present application is not limited to including the modules explicitly recorded, and may also include modules required to obtain relevant time series data or perform processing based on time series data.
[0061] Unlike short video recommendation platforms in entertainment scenarios, short video recommendation traffic accounts for a relatively small proportion in e-commerce recommendation scenarios. At the same time, due to factors such as the lack of entertainment and strong product diversion functionality, users' historical short video interaction behaviors are relatively sparse. In addition to the problem of sparse short video behavior, newly produced short videos also have the problem of incomplete labeling, and many short videos are missing labels. The above problems make it difficult for current related technical methods to be expanded to e-commerce scenarios.
[0062] In view of the above technical problems, the following embodiments are proposed.
[0063] In some embodiments of the present application, the model training method can be implemented using a processor in a model training device, and the above-mentioned processor can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a central processing unit (CPU), a controller, a microcontroller, and a microprocessor.
[0064] Figure 1 A flow chart of a model training method in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method comprises the following steps:
[0065] Step 100: Obtain a pre-training dataset.
[0066] In an embodiment of the present application, the model training method can be applied to an e-commerce scenario of short video recommendation; here, short video refers to a video with a playback time of less than a short time (such as 1 minute or 2 minutes, etc.); the purpose of short video recommendation is to divert traffic to related products in the e-commerce scenario to improve the conversion rate of the product.
[0067] Exemplarily, the pre-training data set may include user portrait data of multiple historical users; for each historical user, the user portrait data includes but is not limited to data such as the user's age, gender, region, and type of device used.
[0068] It should be noted that in the technical solution of this application, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0069] Exemplarily, the pre-training data set may also include product domain behavior data and short video domain behavior data; for each historical user, the product domain behavior data includes the behavior data of the user interacting with multiple products within a preset historical time period; the product domain behavior data includes multiple positive samples and multiple negative samples; wherein the positive samples represent product data that has been exposed and clicked in the product domain, and the negative samples represent product data that has been exposed and not clicked in the product domain. Similarly, the short video domain behavior data includes the behavior data of the user interacting with multiple short videos within a preset historical time period; the short video domain behavior data includes multiple positive samples and multiple negative samples; wherein the positive samples represent short video data that has been exposed and clicked in the short video domain, and the negative samples represent short video data that has been exposed and not clicked in the short video domain.
[0070] Exemplarily, the preset historical time period refers to a historical time period of preset length. Here, the length of the preset historical time period can be set according to actual conditions, and the embodiment of the present application does not limit this. For example, it can be the past two weeks, or the past week, etc.
[0071] Exemplarily, in an e-commerce scenario, the above-mentioned product data includes but is not limited to product ID, brand ID, category ID, etc.; the above-mentioned short video data includes but is not limited to short video ID, short video tag ID, short video associated product ID, etc.
[0072] It should be noted that, for the short video domain behavior data of each historical user in the pre-training data set, including the short video data of exposure and click and the short video data of exposure but not click, some short videos have label data, while about half of the short videos have no label data; the label data is used to classify short videos, for example, the label data can be clothing labels, food labels, sports labels, etc.; for this case, it is necessary to set the label ids of these short videos accordingly before model training; for example, the label ids of short videos without label data can be uniformly set to 0, and the label ids of other short videos with label data can be set in sequence and incremented to ensure that each short video has a corresponding label id.
[0073] Here, there is no limitation on the method of obtaining the positive and negative samples included in the product domain behavior data and the short video domain behavior data. For example, it can be through sampling or other methods. In addition, the ratio of positive and negative samples can be set according to actual conditions, and the embodiments of the present application do not limit this. For example, the ratio of positive samples to negative samples can be set to 1:5, or it can be set to other values.
[0074] Step 101: Use the pre-training data set to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network.
[0075] In an embodiment of the present application, the product domain click-through rate prediction model includes an initial backbone network and a product domain click-through rate head network; the short video domain click-through rate prediction model includes an initial backbone network and a short video domain click-through rate head network; it should be noted that the product domain click-through rate prediction model and the short video domain click-through rate prediction model share the same initial backbone network, that is, the backbone networks of these two click-through rate prediction models are shared, and the only difference is that the head networks are different.
[0076] Exemplarily, the initial backbone network includes a feature selection network (FSN) module; wherein the FSN module includes a gated residual network (GRN), and the GRN includes a gated linear unit (GLU); the feature selection network module is used to realize the effective fusion of multi-dimensional features; for example, the multi-dimensional features of the product domain such as product id, brand id and category id can be fused, the multi-dimensional features of the short video domain such as short video id, short video tag id and short video associated product id can be fused, and the multi-dimensional features of the user side such as gender, age, region and type of device used can be fused; this feature fusion method is different from the previous method of simply splicing multi-dimensional features.
[0077] In some embodiments, using a pre-training data set to pre-train the initial backbone networks of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network can include: inputting the pre-training data set into the initial backbone network for feature processing to obtain a first feature set of each of multiple historical users; based on the first feature sets of each of the multiple historical users, determining a final interest vector of each of the multiple historical users; based on the determined final interest vectors of each of the multiple historical users, determining a first loss function of the product domain click-through rate prediction model and a second loss function of the short video domain click-through rate prediction model; based on the first loss function and the second loss function, simultaneously adjusting the parameters of the initial backbone networks of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network.
[0078] Exemplarily, after obtaining the pre-training data set, the pre-training data set is input into the initial backbone network for feature processing to obtain a first feature set of each of multiple historical users, which may include: determining target short video data and target product data that meet preset conditions from the pre-training data set; inputting user portrait data, product domain behavior data, short video domain behavior data, target short video data, and target product data of multiple historical users into the initial backbone network for feature extraction to obtain user-side features, product domain features, short video domain features, target product features, and target short video features of each of the multiple historical users; embedding and representing the user-side features, product domain features, short video domain features, target product features, and target short video features of each of the multiple historical users to obtain a first feature set of each of the multiple historical users; the first feature set includes the represented user-side features, product domain features, short video domain features, target product features, and target short video features.
[0079] Exemplarily, for each historical user, target short video data and target product data that meet preset conditions can be determined from the pre-training data set; specifically, target short video data and target product data that meet preset conditions are obtained from the product domain behavior data and short video domain behavior data of each historical user; here, if the target short video data is the exposed and clicked short video data in the short video domain behavior data, it means that the target short video data meets the preset conditions; if the target product data is the clicked product data that is closest in time distance to the exposed and clicked short video data, it means that the target product data meets the preset conditions.
[0080] Furthermore, user portrait data, product domain behavior data, short video domain behavior data, target short video data and target product data of multiple historical users are input into the initial backbone network for feature extraction, so as to obtain user-side features, product domain features, short video domain features, target product features and target short video features of each of the multiple historical users; illustratively, each of the above features is an id-type feature; for example, user-side features may include gender id, age id, region id and device type id used, etc.; product domain features may include product id, brand id, category id, etc.; short video domain features may include short video id, short video tag id and short video-associated product id, etc.; target product features may include target product id, target brand id, target category id, etc.; target short video features may include target short video id, target short video tag id and target short video-associated product id, etc.
[0081] In an embodiment of the present application, the user-side features, product domain features, short video domain features, target product features and target short video features of each historical user are embedded and represented, and the user-side features, product domain features, short video domain features, target product features and target short video features of each historical user after being represented can be obtained; that is, the first feature set of each historical user is obtained.
[0082] Exemplarily, for each historical user, the product domain features include features of multiple products with which the user interacts, and the represented product domain features include features obtained by embedding features of the multiple interactive products, that is, the represented features include multiple interactive products; similarly, the short video domain features include features of multiple short videos with which the user interacts, and the represented short video domain features include features obtained by embedding features of the multiple interactive short videos, that is, the represented features include multiple interactive short videos.
[0083] For example, each id feature is embedded and represented to obtain the represented features, also called dense representation, such as Figure 2A E shown i ; Characterized feature E i After the Exponential Linear Unit (ELU) activation function and GLU in GRN, the output T corresponding to the id feature can be obtained. i , where T i =GRN(E i ), the process can be expressed by formula (1):
[0084]
[0085] Here, x represents the input of GRN, corresponding to the above E i; η represents the input of GLU, W1, W2 and W3 are model parameter matrices, b0, b1 and b2 are model vectors, σ is the sigmoid function, ⊙ represents the multiplication of corresponding elements, also known as Hamada matrix product. The ELU activation function can avoid the problem of neuron death and can get negative output instead of zero value like the Rectified Linear Unit (ReLU), which allows the network parameters to change in the right direction. The LayerNorm activation function is the same as the layer normalization used in natural language processing. GLU is used to suppress undesired features.
[0086] For example, the mathematical definition of GRN is: for a given d-dimensional input vector x, the output is also a d-dimensional vector GRN(x), and its internal data flow diagram is as follows Figure 2A shown by Figure 2A It can be seen that GRN contains two links, the main link is E i →Dense→ELU→Dense→GLU, this link is for the original input feature E i Perform nonlinear dimensionality reduction transformation to output the intermediate d-dimensional vector η, then apply GLU transformation to η to suppress irrelevant feature signals, and finally output the d-dimensional vector GLU(η); the other link is to transform the original input feature E i Perform linear transformation to align dimensions. The output of the two links is the sum of GLU (η) and f (x), (when the input and output dimensions are the same, f (x) = x can be taken. At this time, it degenerates into a residual structure, also known as a skip connection, and then inputs it to the LayerNorm activation function, and finally outputs a d-dimensional vector representing GRN (x). Here, when the output dimensions are the same, the reason for setting f (x) = x is that GLU introduces the sigmoid function, and the gradient disappearance phenomenon is prone to occur during the backward propagation of deep networks, while the residual structure can support the backward propagation of deeper networks by skipping.
[0087] For example, refer to Figure 2B The FSN module is built based on GRN. Here, we take the product domain features as an example. Assume that the input FSN module has the following features (corresponding to Figure 2B The embedding features include the represented product ID, the represented brand ID, the represented category ID, etc. Their embedding dimensions are the same and are represented as Figure 2B E i ,...,E j , then the output is the fusion feature FSN (E i ,...,E j ), FSN(E i ,...,E j) is d-dimensional, as shown in formula (2).
[0088]
[0089] Among them, W a is the model learning parameter matrix, A is the attention coefficient vector, and each dimension value is a k Represents the importance of the corresponding input feature; for the input representation feature E i ,...,E j On the one hand, they are spliced together and input into the GRN module to obtain the d-dimensional output vector, and then linearly projected to the j-i+1-dimensional vector, and then input into the softmax function to obtain the attention coefficient vector A of each feature; on the other hand, the characterized feature E i ,...,E j Input into GRN to obtain the output vector T i ,...,T j ;Finally, the attention coefficient A and the output vector T i ,...,T j Perform weighted addition of rows and output the final fused feature FSN (E i ,...,E j ).
[0090] It can be seen that the fused features output by the FSN module can self-drive the selection of more effective features and effective dimensions compared to the direct splicing method, instead of treating each feature and each dimension indiscriminately like the splicing method.
[0091] In some embodiments, determining the final interest vectors of multiple historical users based on the first feature sets of each of the multiple historical users may include: determining the long-term interest vectors of the multiple historical users based on the characterized user-side features of the multiple historical users; determining the product domain interest vectors of the multiple historical users based on the long-term interest vectors of the multiple historical users, the characterized product domain features, and the characterized target short video features; determining the short video domain interest vectors of the multiple historical users based on the long-term interest vectors of the multiple historical users, the characterized short video domain features, and the characterized target short video features; and performing feature fusion on the long-term interest vectors, product domain interest vectors, short video domain interest vectors, and target short video feature vectors of the multiple historical users to obtain the final interest vectors of the multiple historical users.
[0092] Exemplarily, the initial backbone network also includes a user long-term interest module, which is used to determine the long-term interest vectors of multiple historical users; since the user portrait data contains the long-term stable interests of the user, after obtaining the user-side features after each historical user is characterized, for example, the gender ID after the characterization (such as Eage ), age id (such as E gender ), the region id (such as E location ) and the device type id used (such as E devicetype ) and other features, the FSN module can be used to fuse the features after characterization, and the fused result is determined as the long-term interest vector p of the historical user. u , as shown in formula (3):
[0093] p u =FSN([E age ,E gender ,E location ,E devicetype ]) (3)
[0094] Exemplarily, the initial backbone network also includes a product domain interest module, whose function is to extract relevant user interests from the user's product domain behavior data in combination with the target short video data; this module is used to determine the product domain interest vectors of multiple historical users.
[0095] For example, after obtaining the product domain features after characterization of each historical user, the FSN module is first used to perform feature fusion on the respective characterized features of multiple interactive products to obtain feature vectors of multiple interactive products, which can be expressed as r si To r sn After obtaining the target short video features after characterization of each historical user, the FSN module is first used to perform feature fusion on the characterized target short video features to obtain the target short video feature vector, which can be expressed as q t ; Then, based on each historical user's respective long-term interest vector p u , the feature vectors of multiple interactive products (r si To r sn ) and the target short video feature vector q t , determine the importance of each interactive product relative to the user β si , as shown in formula (4):
[0096] β si =softmax(h st ·GRN([r si ,q t ,p u ,W st r si ⊙q t ])) (4)
[0097] Among them, W st is the domain migration matrix, h stis the projection vector shared by the feature vectors of all interactive products in the product domain; then, formula (5) is used to perform weighted aggregation on the feature vectors of all interactive products to obtain the product domain interest vector a of each historical user: s :
[0098]
[0099] Exemplarily, the initial backbone network also includes a short video domain interest module, whose function is to extract relevant user interests from the user's short video domain behavior data in combination with the target short video data; this module is used to determine the short video domain interest vectors of multiple historical users.
[0100] For example, after obtaining the short video domain features after characterization of each historical user, the FSN module is first used to perform feature fusion on the respective characterized features of multiple interactive short videos to obtain feature vectors of multiple interactive short videos, which can be expressed as r ti To r tn ; Then, based on each historical user's respective long-term interest vector p u , feature vectors of multiple interactive short videos (r ti To r tn ) and the target short video feature vector q t , determine the importance of each interactive short video to the user γ ti , as shown in formula (6):
[0101] γ ti =softmax(h t ·GRN([r ti ,q t ,p u ,r si ⊙q t ]))(6)
[0102] Among them, h t is the projection vector shared by the feature vectors of all interactive short videos in the product domain; then, formula (7) is used to perform weighted aggregation on the feature vectors of all interactive short videos to obtain the short video domain interest vector a of each historical user: t , as shown in formula (7):
[0103]
[0104] Exemplarily, the initial backbone network also includes a multi-domain interest fusion module, whose function is to fuse the user's interest vectors in each domain to obtain the final user interest vector; specifically, after obtaining the respective long-term interest vectors p of multiple historical users, u , product domain interest vector a s , short video domain interest vector a tAnd the target short video feature vector q t Finally, the multi-domain interest fusion module can be used to perform feature fusion on these vectors to obtain the final interest vectors of multiple historical users.
[0105] Understandably, due to the user cold start problem in the short video domain, that is, the user has interactive behavior in the product domain, but no interactive behavior in the short video domain. This phenomenon is particularly common in e-commerce scenarios. Therefore, before determining the final interest vector of each historical user, it is necessary to calculate the interest vector a in the short video domain. t The updating process may include the following steps: obtaining an introduced cold start vector; using the cold start vector to update the short video domain interest vectors of multiple historical users to obtain the updated short video domain interest vectors of multiple historical users; and fusing the long-term interest vectors, product domain interest vectors, updated short video domain interest vectors and target short video feature vectors of multiple historical users to obtain the final interest vectors of multiple historical users.
[0106] For example, by introducing a cold start vector γ in the video domain t0 , as the implicit behavior of all historical users, using the cold start vector γ t0 For each historical user's short video domain interest vector a t After updating, the updated short video domain interest vector a′ can be obtained t , as shown in formula (8):
[0107]
[0108] It can be understood that if during the model training process, all historical user video domain behavior data is learned through training to the cold start vector γ t0 In this way, in the subsequent model prediction process, for cold start users, the cold start vector γ will be used t0 Make predictions; in this way, the user cold start problem in the short video domain in the e-commerce scenario can be effectively solved.
[0109] Furthermore, after obtaining the updated short video domain interest vector of each historical user, the multi-domain interest fusion module is used to merge the long-term interest vectors p of multiple historical users into a single long-term interest vector. u , product domain interest vector a s , updated short video domain interest vector a′ t and the target short video feature vector q t By performing feature fusion, we can obtain the final interest vector u of multiple historical users. int , as shown in formula (9):
[0110] u int =FSN([pu ,a s ,a′ t ,q t ]) (9)
[0111] It can be seen that the embodiment of the present application adopts GLU-based GRN and GRN-based FSN modules to realize the fusion of features in various domains. The FSN module is applied to each module of the entire solution. Different from the previous mode of simply and directly splicing various features, this module can effectively select different features to suppress invalid features and ensure the effectiveness of model training.
[0112] In an embodiment of the present application, after obtaining the final interest vectors of multiple historical users based on the initial backbone network, the product domain click rate head network and the short video domain click rate head network are used to perform product click rate estimation and short video click rate estimation respectively.
[0113] For example, the structure of the two head networks, the product domain click rate head network and the short video domain click rate head network, can adopt a 2-layer fully connected structure, the last layer is projected into the real number space, and the loss function can choose the cross entropy loss function L * (x,y), as shown in formula (10):
[0114]
[0115] Where x represents the input of the head network, and the head network corresponds to the above-mentioned product domain click-through rate head network or short video domain click-through rate head network u int , represents the output of the head network, and y represents the true value. The negative sign indicates that the loss value of the cross entropy loss function is non-positive. The closer the loss value is to 0, the more accurate the prediction result of the model is. Here, the model can refer to the product domain click-through rate prediction model or the short video domain click-through rate prediction model, or it can refer to the product domain click-through rate head network or the short video domain click-through rate head network.
[0116] For example, in order to fully train the long-term interests of each historical user, for the product click rate prediction task, the user long-term interest vector p u and the target product feature vector q s The concatenated input is fed into the product CTR prediction task head network to perform product CTR prediction. Combining formula (10), the first loss function of the product domain CTR prediction model can be obtained, which can be expressed as L item It should be noted that the target product feature vector q s It is also obtained by using the FSN module to fuse the target product features after characterization.
[0117] For example, for the short video click rate prediction task, the final interest vector u output by the initial backbone network is int Input into the short video click rate estimation task head network to estimate the short video click rate. Combining formula (10), we can get the second loss function of the short video domain click rate estimation model, which can be expressed as L video ; Further, after obtaining the first loss function L item and the second loss function L video Finally, based on these two loss functions, the loss function of the pre-training stage is determined, which can be expressed as L stage-1 , the total loss function L stage-1 The expression of is shown in formula (11):
[0118] L stage-1 =L video +λ·L item (11)
[0119] Where λ is the weight adjustment coefficient. The first loss function L item and the second loss function L video The formula used is the same, the inputs are different.
[0120] In the embodiment of the present application, the total loss function L corresponding to the initial backbone network in the pre-training stage is obtained. stage-1 After that, based on the total loss function L stage-1 The loss value is obtained, the parameters of the initial backbone network are adjusted, and multiple rounds of training are repeated to obtain the trained backbone network.
[0121] For example, assuming that the pre-training data set includes product domain behavior data and short video domain behavior data for the past two weeks, the product domain behavior data and short video domain behavior data from day T-14 to day T can be used to predict the product click-through rate and short video click-through rate on day T+1; here, day T+1 means yesterday, and the negative samples in the training process select the exposure but not clicked data of each domain, and the positive samples select the exposure and clicked data of each domain, and the positive and negative sample ratio can be set to 1:5. Since about half of the short videos have no label data, the label id of this type of short video can be set to 0 for this situation, and the label ids of other short videos with label data are incremented sequentially.
[0122] Step 102: Obtain a fine-tuning dataset, and use the fine-tuning dataset to fine-tune the initial label preference model to obtain a trained label preference model.
[0123] In some embodiments, fine-tuning the initial label preference model using a fine-tuning dataset to obtain a trained label preference model can include: inputting the fine-tuning dataset into the backbone network of the initial label preference model for feature processing to obtain a second feature set of each of the multiple historical users; re-determining a final interest vector of each of the multiple historical users based on the second feature sets of each of the multiple historical users; determining a third loss function of the initial label preference model based on the re-determined final interest vectors of each of the multiple historical users; and adjusting parameters of the backbone network of the initial label preference model based on the third loss function to obtain a trained label preference model.
[0124] Exemplarily, the fine-tuning dataset is a reuse of the pre-training dataset used in the pre-training stage. The only difference is that when the initial label preference model is used to predict the click-through rate of the short video on the t+1 day, the selected short video domain behavior data only includes short videos with label data, but there is no restriction on the short video domain behavior data from the T-14 day to the T day. In addition, the difference between the fine-tuning stage and the pre-training stage is that the target short video feature vector q t Other input features in the FSN module, such as short video ID, short video related product ID, etc., are removed, and only the short video label ID is retained. At this time, the FSN module degenerates into GRN.
[0125] It should be noted that the implementation method of determining the final interest vectors of multiple historical users using the fine-tuning dataset is similar to the implementation method of determining the final interest vectors of multiple historical users using the pre-training dataset, which will not be repeated here.
[0126] In the embodiment of the present application, the initial label preference model is constructed based on the above-mentioned pre-trained backbone network; the initial label preference model includes the pre-trained backbone network and the label preference head network; wherein, the network structure of the label preference head network is still implemented by a 2-layer fully connected layer, and the loss function adopts the cross entropy function; the pre-trained backbone network is used to output the final interest vector u' of each historical user int As the input of the label preference head network, the third loss function of the initial label preference model is obtained, that is, the loss function of the fine-tuning stage, which can be expressed as L stage-2 , the third loss function L stage-2 The expression of is shown in formula (12):
[0127]
[0128] in, represents the predicted preference score of the label output by the model, and y represents the true preference score of the label. Here, the model can refer to the label preference head network or the initial label preference model.
[0129] In the embodiment of the present application, the loss function L corresponding to the backbone network pre-trained in the fine-tuning stage is obtained. stage-2 After that, based on the loss function L stage-2 The loss value is obtained, and the parameters of the pre-trained backbone network are continued to be adjusted. Multiple rounds of training are repeated to obtain a trained backbone network. Based on the trained backbone network and the label preference head network, a trained label preference model is obtained.
[0130] It can be understood that in order to address the problem of low accuracy of short video label preferences and even user cold start caused by sparse short video behavior of users in e-commerce scenarios, the above embodiments propose a solution based on migrating interests from product domain behavior data to the short video domain, and in order to address the problem of incomplete short video label data, a two-stage training solution is proposed. Through the pre-training in the first stage and the fine-tuning training in the second stage, the short video label preference can make greater use of the product domain and short video domain behavior data, thereby improving the accuracy of short video label preference calculation and solving the problem of model overfitting in related technologies.
[0131] An embodiment of the present application proposes a model training method, which includes: obtaining a pre-training data set; the pre-training data set includes user portrait data of multiple historical users, product domain behavior data, and short video domain behavior data; using the pre-training data set to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network; obtaining a fine-tuning data set, and using the fine-tuning data set to fine-tune the initial label preference model to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
[0132] It can be seen that in the pre-training process, in addition to using the user portrait data and short video domain behavior data of each historical user, the embodiment of the present application also introduces rich product domain behavior data of each historical user, that is, the user portrait data, rich product domain behavior data and sparse short video domain behavior data of these users are used to jointly pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model. In this way, not only can the backbone network be fully trained, but also the accurate migration of users from product domain interests to short video domain interests can be achieved; further, the initial label preference model constructed by the backbone network is fine-tuned using the fine-tuning data set, so that the label preference can make greater use of the behavior data of each historical user in the product domain and short video domain, improve the accuracy of label preference calculation, and then effectively reduce the risk of overfitting of the backbone network, and ensure the subsequent short video recommendation effect of the label preference model.
[0133] In order to better reflect the purpose of the present application, further examples are given based on the above embodiments of the present application.
[0134] Figure 3 A flowchart of a video recommendation method according to an embodiment of the present application is shown in FIG. Figure 3 As shown, the method comprises the following steps:
[0135] Step 200: Obtain a prediction data set;
[0136] Step 201: input the prediction data set into the trained label preference model to obtain the prediction result;
[0137] Step 202: Recommend short videos to target users based on the prediction results.
[0138] Exemplarily, the target user represents the user to be predicted; the prediction data set may include user portrait data, product domain behavior data, and short video domain behavior data of the target user within a set time period; on this basis, the prediction data set also includes a short video tag list, which includes at least one short video tag to be recommended.
[0139] Here, the set length can be set according to actual conditions, and the embodiment of the present application does not limit this. For example, it can be nearly a week, or nearly three days, etc.
[0140] It should be noted that if the short video domain behavior data in the prediction data set is empty, it means that the target user has no interactive behavior with short videos within the set time period and is a cold start user; in this case, when predicting short video tag preferences, the user portrait data of the target user within the set time period, the product domain behavior data, the cold start vector obtained in the above model training process, and the tag ID of each short video tag to be recommended can be input into the trained tag preference model to perform probability prediction of short video tag preference and obtain prediction results.
[0141] Exemplarily, if the prediction data set includes user portrait data, product domain behavior data, and short video domain behavior data of the target user within a set time period, in this case, when predicting the short video tag preference, the user portrait data, product domain behavior data, and video behavior data of the target user and the tag ID of each short video tag to be recommended can be simultaneously input into the trained tag preference model to perform probability prediction of short video tag preference to obtain a prediction result.
[0142] In an embodiment of the present application, the trained tag preference model is obtained according to the above steps 100 to 102; the prediction result includes the target user's preference score for at least one short video tag to be recommended; the preference score represents the target user's click probability value for each short video tag to be recommended.
[0143] Furthermore, after obtaining the prediction results, the short video tags to be recommended can be sorted in descending order according to the preference scores to obtain the sorting results, and several short video tags to be recommended that are ranked at the top in the sorting results can be selected, and the short videos associated with the selected short video tags can be recommended to the target users. In this way, personalized recommendation of short videos can be achieved.
[0144] Figure 4 Schematic diagram of the structure of a short video tag preference model according to an embodiment of the present application. Figure 4 As shown in Figure 2, the model includes a backbone network, in which the backbone network is mainly used to provide information migration function from the product domain to the short video domain, and its input is the user portrait data (corresponding to Figure 4 Userprofile in), product domain behavior data (corresponding to Figure 4 clicked items in the short video domain (corresponding to Figure 4 clicked videos in), given target short video data (corresponding to Figure 4 target video) and target product data (corresponding to Figure 4 Based on the above input, the user's long-term interest vector p can be obtained. u , product domain interest vector a s , short video domain interest vector a t , target short video feature vector q t and the target product feature vector q s ; Based on the user's long-term interest vector p u , product domain interest vector a s , short video domain interest vector a t And the target short video feature vector q t , we can get the user's final interest vector (corresponding to Figure 4 Interest attention in the product domain, that is, the click rate head network (corresponding to Figure 4 Itemprediction head in the short video domain and the click rate head network in the short video domain (corresponding to Figure 4 The input of the Video prediction head in the video prediction head is based on the user's long-term interest vector p. u and the target product feature vector q s We can get the label preference head network (corresponding to Figure 4 Based on the above input, the loss function L in the pre-training stage can be obtained. stage-1 (correspond Figure 4Stage-1 Loss in the fine-tuning phase) and the loss function L stage-2 (correspond Figure 4 It should be noted that the specific implementation of the above process has been described in the embodiments of step 100 to step 102, and will not be repeated here.
[0145] For example, Figure 4 The three head networks shown can be implemented in a multi-layer fully connected manner, or can be implemented using a more complex structure or multi-task learning method, such as an MMOE (Multi-gate MoE) model, etc., which is not limited in the embodiments of the present application. In addition, the loss function used by each head network, the above embodiment uses a simpler cross entropy loss function, and other types of loss functions, such as a pairwise loss function or a listwise loss function, can also be used to further improve the model performance.
[0146] Exemplarily, the long-term interest vectors p of multiple historical users are obtained based on the input of the backbone network. u , product domain interest vector a s , short video domain interest vector a t , target short video feature vector q t And the target product feature vector q s The process has been described in the above embodiment and will not be repeated here.
[0147] It can be seen that the embodiment of the present application is based on the proposed backbone network structure and can combine the pre-training stage and the fine-tuning stage to achieve effective information transfer from the product domain to the short video domain and then to the label dimension, so that the label preference prediction can absorb more useful and available information and improve the accuracy of label preference calculation.
[0148] Understandably, the unique advantage of e-commerce is that it has a large number of users who interact with products. For tag-based short video recommendations, short videos can be personalized based on the user's preference for short video tags. The embodiment of the present application inputs the user's rich product interaction behaviors into the backbone network, and through the pre-training stage and the fine-tuning stage, realizes effective information transmission from the product domain to the short video domain and then to the tag dimension, so that the tag preference prediction can absorb more useful and available information, thereby improving the efficiency of short video tag recommendation.
[0149] Figure 5 A schematic diagram of the structure of a model training device according to an embodiment of the present application is shown in FIG. Figure 5 As shown, the device includes: a first acquisition module 300, a pre-training module 301 and a fine-tuning training module 302, wherein:
[0150] The first acquisition module 300 is used to acquire a pre-training data set; the pre-training data set includes user portrait data, product domain behavior data, and short video domain behavior data of multiple historical users;
[0151] A pre-training module 301 is used to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model using the pre-training data set to obtain a pre-trained backbone network;
[0152] The fine-tuning training module 302 is used to obtain a fine-tuning data set, and use the fine-tuning data set to fine-tune the initial label preference model to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
[0153] In some embodiments, the pre-training module 301 is used to:
[0154] Inputting the pre-training data set into the initial backbone network for feature processing to obtain a first feature set of each of the multiple historical users;
[0155] Determining final interest vectors of each of the multiple historical users based on the first feature sets of each of the multiple historical users;
[0156] Determining a first loss function of the product domain click-through rate prediction model and a second loss function of the short video domain click-through rate prediction model based on the determined final interest vectors of each of the multiple historical users;
[0157] Based on the first loss function and the second loss function, parameters of the initial backbone network are adjusted to obtain the pre-trained backbone network.
[0158] In some embodiments, the pre-training module 301 is used to:
[0159] Determine target short video data and target product data that meet preset conditions from the pre-training data set;
[0160] Inputting the user portrait data, product domain behavior data, short video domain behavior data, target short video data and target product data of the multiple historical users into the initial backbone network for feature extraction, and obtaining user-side features, product domain features, short video domain features, target product features and target short video features of the multiple historical users respectively;
[0161] The user-side features, product domain features, short video domain features, target product features and target short video features of each of the multiple historical users are embedded and represented to obtain a first feature set of each of the multiple historical users; the first feature set includes the represented user-side features, product domain features, short video domain features, target product features and target short video features.
[0162] In some embodiments, the pre-training module 301 is used to:
[0163] Determining the long-term interest vectors of the multiple historical users based on the user-side features characterized by the multiple historical users;
[0164] Determine the product domain interest vectors of the multiple historical users based on the respective long-term interest vectors of the multiple historical users, the characterized product domain features, and the characterized target short video features;
[0165] Determining the short video domain interest vectors of the multiple historical users based on the respective long-term interest vectors of the multiple historical users, the characterized short video domain features, and the characterized target short video features;
[0166] The long-term interest vectors, product domain interest vectors, short video domain interest vectors and target short video feature vectors of each of the multiple historical users are feature-fused to obtain a final interest vector of each of the multiple historical users; the target short video feature vector is obtained by feature-fusion of the target short video features after the representation.
[0167] In some embodiments, the pre-training module 301 is used to:
[0168] Get the introduced cold start vector;
[0169] Using the cold start vector, the short video domain interest vectors of the multiple historical users are updated to obtain updated short video domain interest vectors of the multiple historical users;
[0170] The long-term interest vectors of the multiple historical users, the product domain interest vectors, the updated short video domain interest vectors and the target short video feature vectors are feature fused.
[0171] In some embodiments, the fine-tuning training module 302 is used to:
[0172] Inputting the fine-tuning data set into the backbone network of the initial label preference model for feature processing to obtain a second feature set of each of the multiple historical users;
[0173] Based on the respective second feature sets of the plurality of historical users, determining again the respective final interest vectors of the plurality of historical users;
[0174] Determining a third loss function of the initial tag preference model based on the final interest vectors of each of the multiple historical users determined again;
[0175] Based on the third loss function, parameters of the backbone network of the initial label preference model are adjusted to obtain the trained label preference model.
[0176] Figure 6 FIG. 1 is a schematic diagram of the structure of a video recommendation device according to an embodiment of the present application. Figure 6 As shown, the device includes: a second acquisition module 400, a prediction module 401 and a recommendation module 402, wherein:
[0177] The second acquisition module 400 is used to acquire a prediction data set; the prediction data set includes user portrait data of the target user, product domain behavior data, and short video domain behavior data;
[0178] Prediction module 401, used for inputting the prediction data set into the trained tag preference model to obtain a prediction result; the prediction result includes the preference score of the target user for at least one short video tag to be recommended;
[0179] The recommendation module 402 is used to recommend short videos to the target user based on the prediction results; wherein the trained label preference model is obtained according to the method provided by one or more of the aforementioned technical solutions.
[0180] In practical applications, the above-mentioned first acquisition module 300, pre-training module 301 and fine-tuning training module 302, second acquisition module 400, prediction module 401 and recommendation module 402 can all be implemented by a processor located in an electronic device, and the processor can be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor.
[0181] In addition, each functional module in this embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or software functional modules.
[0182] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the relevant technology or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method of this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc. Various media that can store program codes.
[0183] Specifically, the computer program instructions corresponding to a model training method or a video recommendation method in this embodiment can be stored on a storage medium such as a CD, a hard disk, or a USB flash drive. When the computer program instructions corresponding to a model training method or a video recommendation method in the storage medium are read or executed by an electronic device, any model training method or video recommendation method in the aforementioned embodiments is implemented.
[0184] Based on the same technical concept as the above embodiments, see Figure 7 , which shows an electronic device 500 provided by the present application, which may include: a memory 501 and a processor 502; wherein,
[0185] Memory 501, used for storing computer programs and data;
[0186] The processor 502 is used to execute the computer program stored in the memory to implement any one of the model training methods or video recommendation methods in the foregoing embodiments.
[0187] In practical applications, the memory 501 may be a volatile memory, such as RAM; or a non-volatile memory, such as ROM, flash memory, hard disk drive (HDD) or solid-state drive (SSD); or a combination of the above types of memory, and provide instructions and data to the processor 502.
[0188] The processor 502 may be at least one of ASIC, DSP, DSPD, PLD, FPGA, CPU, controller, microcontroller, and microprocessor. It is understandable that the electronic device used to implement the functions of the processor may also be other, which is not specifically limited in the embodiments of the present application.
[0189] In some embodiments, the functions or modules included in the device provided in the embodiments of the present application can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments. For the sake of brevity, it will not be repeated here.
[0190] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0191] The methods disclosed in the various method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0192] The features disclosed in the various product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0193] The features disclosed in the various method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0194] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0195] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable model training device to produce a machine, so that the instructions executed by the processor of the computer or other programmable model training device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0196] These computer program instructions may also be loaded onto a computer or other programmable model training device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0197] The above are only preferred embodiments of the present application and are not intended to limit the protection scope of the present application.
Claims
1. A model training method, characterized in that: The method comprises: Obtain a pre-training data set; the pre-training data set includes user portrait data, product domain behavior data, and short video domain behavior data of multiple historical users; Using the pre-training data set, pre-training the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network; A fine-tuning data set is obtained, and the initial label preference model is fine-tuned and trained using the fine-tuning data set to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
2. The method according to claim 1, characterized in that The pre-training data set is used to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model to obtain a pre-trained backbone network, including: Inputting the pre-training data set into the initial backbone network for feature processing to obtain a first feature set of each of the multiple historical users; Determining final interest vectors of each of the multiple historical users based on the first feature sets of each of the multiple historical users; Determining a first loss function of the product domain click-through rate prediction model and a second loss function of the short video domain click-through rate prediction model based on the determined final interest vectors of each of the multiple historical users; Based on the first loss function and the second loss function, parameters of the initial backbone network are adjusted to obtain the pre-trained backbone network.
3. The method according to claim 2, characterized in that The step of inputting the pre-training data set into the initial backbone network for feature processing to obtain the first feature set of each of the plurality of historical users includes: Determine target short video data and target product data that meet preset conditions from the pre-training data set; Inputting the user portrait data, product domain behavior data, short video domain behavior data, target short video data and target product data of the multiple historical users into the initial backbone network for feature extraction, and obtaining user-side features, product domain features, short video domain features, target product features and target short video features of the multiple historical users respectively; The user-side features, product domain features, short video domain features, target product features and target short video features of each of the multiple historical users are embedded and represented to obtain a first feature set of each of the multiple historical users; the first feature set includes the represented user-side features, product domain features, short video domain features, target product features and target short video features.
4. The method according to claim 3, characterized in that The determining, based on the first feature sets of the plurality of historical users, the final interest vectors of the plurality of historical users respectively, comprises: Determining the long-term interest vectors of the multiple historical users based on the user-side features characterized by the multiple historical users; Determine the product domain interest vectors of the multiple historical users based on the respective long-term interest vectors of the multiple historical users, the characterized product domain features, and the characterized target short video features; Determining the short video domain interest vectors of the multiple historical users based on the respective long-term interest vectors of the multiple historical users, the characterized short video domain features, and the characterized target short video features; The long-term interest vectors, product domain interest vectors, short video domain interest vectors and target short video feature vectors of each of the multiple historical users are feature-fused to obtain a final interest vector of each of the multiple historical users; the target short video feature vector is obtained by feature-fusion of the target short video features after the representation.
5. The method according to claim 4, characterized in that The step of fusing the long-term interest vectors, product domain interest vectors, short video domain interest vectors, and target short video feature vectors of the respective historical users includes: Get the introduced cold start vector; Using the cold start vector, the short video domain interest vectors of the multiple historical users are updated to obtain updated short video domain interest vectors of the multiple historical users; The long-term interest vectors of the multiple historical users, the product domain interest vectors, the updated short video domain interest vectors and the target short video feature vectors are feature fused.
6. The method according to claim 1, characterized in that The fine-tuning training of the initial label preference model using the fine-tuning data set to obtain a trained label preference model includes: Inputting the fine-tuning data set into the backbone network of the initial label preference model for feature processing to obtain a second feature set of each of the multiple historical users; Based on the respective second feature sets of the plurality of historical users, determining again the respective final interest vectors of the plurality of historical users; Determining a third loss function of the initial tag preference model based on the final interest vectors of each of the multiple historical users determined again; Based on the third loss function, parameters of the backbone network of the initial label preference model are adjusted to obtain the trained label preference model.
7. A video recommendation method, characterized in that: The method comprises: Obtain a prediction data set; the prediction data set includes user portrait data of target users, product domain behavior data, and short video domain behavior data; Inputting the prediction data set into the trained tag preference model to obtain a prediction result; the prediction result includes the target user's preference score for at least one short video tag to be recommended; According to the prediction result, short videos are recommended to the target user; wherein the trained label preference model is obtained according to the method according to any one of claims 1 to 6.
8. A model training device, characterized in that: The device comprises: A first acquisition module is used to acquire a pre-training data set; the pre-training data set includes user portrait data, product domain behavior data, and short video domain behavior data of multiple historical users; A pre-training module, used to pre-train the initial backbone network of the product domain click-through rate prediction model and the short video domain click-through rate prediction model using the pre-training data set to obtain a pre-trained backbone network; The fine-tuning training module is used to obtain a fine-tuning data set, and use the fine-tuning data set to fine-tune the initial label preference model to obtain a trained label preference model; the initial label preference model is constructed based on the pre-trained backbone network.
9. A video recommendation device, characterized in that: The device comprises: The second acquisition module is used to acquire a prediction data set; the prediction data set includes user portrait data of the target user, product domain behavior data, and short video domain behavior data; A prediction module, used to input the prediction data set into the trained tag preference model to obtain a prediction result; the prediction result includes the target user's preference score for at least one short video tag to be recommended; A recommendation module is used to recommend short videos to the target user based on the prediction results; wherein the trained label preference model is obtained according to the method provided by one or more of the aforementioned technical solutions.
10. An electronic device, characterized in that: The device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the method according to any one of claims 1 to 7 is implemented when the processor executes the program.
11. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.