Model training method and recall method

By using two different user-side models in the recommendation system to process the user's historical social behavior and other behavioral characteristics, and adjust neural network parameters, the problem of insufficient feature learning richness when learning users' diverse interests is solved, and prediction accuracy is improved.

CN116757775BActive Publication Date: 2025-04-11SHANGHAI SOULGATE TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202310708362.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2025-04-11
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

When the existing recommendation system learns the diverse interests of users, the richness of feature learning is low, resulting in insufficient prediction accuracy.

Method used

Two different user-side models are used to process the user characteristics based on historical social behaviors and other behaviors, and by adjusting the network parameters of the neural network, the prediction accuracy of the model for user interests is improved.

Benefits of technology

It improves the accuracy of the model's prediction of users' diverse interests and enhances the richness of feature learning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116757775B_ABST
    Figure CN116757775B_ABST
Patent Text Reader

Abstract

The present disclosure provides a model training method and a recall method, which relate to the field of artificial intelligence technology. The method comprises: inputting a first feature of a first sample user into a first user-side model to obtain a first vector; inputting a feature of a first sample material into a material-side model to obtain a second vector; determining a first loss value according to the first vector and the second vector; inputting a second feature of a second sample user into a second user-side model to obtain a third vector; inputting a feature of a second sample material into a material-side model to obtain a fourth vector; determining a second loss value according to the third vector and the fourth vector; adjusting a network parameter of at least one of the neural networks of the first user-side model, the second user-side model and the material-side model according to the first loss value and the second loss value; the first sample user and the second sample user are of different types, the first feature comprises a feature of a sample material on which historical social behaviors are based, and the second feature comprises a feature of a sample material on which other behaviors are based.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a model training method and a recall method. Background Art

[0002] With the development of artificial intelligence technology, recommendation systems have been widely used in various scenarios to achieve the matching of users and information. For example, in an e-commerce recommendation system, the recommendation system can select some items from a large number of items to show to users, providing users with personalized recommendation services. Summary of the invention

[0003] According to one aspect of an embodiment of the present disclosure, a model training method is provided, comprising: performing a first operation for each group of samples in a first sample group, each group of samples in the first sample group includes a first sample user and a first sample material, the first operation includes: inputting a first user feature of the first sample user into a first user-side model to obtain a first feature vector; inputting a material feature of the first sample material into a material-side model to obtain a second feature vector; determining a first loss function value according to the first feature vector and the second feature vector; performing a second operation for each group of samples in a second sample group, each group of samples in the second sample group includes a second sample user and a second sample material, the second operation includes: inputting a second user feature of the second sample user into a second user-side model to obtain a second feature vector; Obtain a third feature vector; input the material characteristics of the second sample material into the material-side model to obtain a fourth feature vector; determine a second loss function value based on the third feature vector and the fourth feature vector; adjust the network parameters of at least one of the first neural network of the first user-side model, the second neural network of the second user-side model, and the third neural network of the material-side model based on the first loss function value of the first sample group and the second loss function value of the second sample group; wherein the first sample user and the second sample user have different user types, the first user characteristics include material characteristics of sample materials on which historical social behaviors are based, and the second user characteristics include material characteristics of sample materials on which behaviors other than historical social behaviors are based.

[0004] In some embodiments, the number of historical social behaviors of the first sample user is greater than a preset threshold, and the number of historical social behaviors of the second sample user is not greater than the preset threshold; according to the first loss function value of the first sample group and the second loss function value of the second sample group, adjusting the network parameters of the at least one neural network includes: taking a weighted sum of the first loss function value of each first sample user in the first sample group and the second loss function value of each second sample user in the second sample group to obtain a third loss function value; if the third loss function value does not meet a preset convergence condition, adjusting the network parameters of the at least one neural network.

[0005] In some embodiments, the weight of the first loss function value of each first sample user in the first sample group is equal, and the weight of the second loss function value of each second sample user in the second sample group is equal.

[0006] In some embodiments, the number of sample users in one of the first sample group and the second sample group is smaller than the number of sample users in the other sample group, and the weight corresponding to each sample user in the one sample group is greater than the weight corresponding to each sample user in the other sample group.

[0007] In some embodiments, the historical social behavior includes historical private chat behavior between the sample user and the initiator of the sample material, and the material characteristics of the sample material include the material identification of the sample material.

[0008] In some embodiments, the first user feature also includes attribute features of the first sample user, and the second user feature also includes attribute features of the second sample user, and the attribute features include at least one of age, gender, region, and consumption capacity.

[0009] In some embodiments, determining a first loss function value based on the first feature vector and the second feature vector includes: determining a first similarity between the first feature vector and the second feature vector; determining the first loss function value based on the first similarity, a first label of the first sample user for the first sample material, and a first preset loss function; determining a second loss function value based on the third feature vector and the fourth feature vector includes: determining a second similarity between the third feature vector and the fourth feature vector; determining the second loss function value based on the second similarity, a second label of the second sample user for the second sample material, and a second preset loss function.

[0010] According to another aspect of an embodiment of the present disclosure, a model training method is provided, comprising: inputting material features of a sample material into a material-side model to obtain a first feature vector; performing an operation on a sample user, the operation comprising: inputting the first user feature of the sample user into a first user-side model to obtain a second feature vector; determining a first loss function value based on the first feature vector and the second feature vector; inputting the second user feature of the sample user into a second user-side model to obtain a third feature vector; determining a second loss function value based on the first feature vector and the third feature vector; and determining a third loss function value based on at least one of the first loss function value and the second loss function value, and the type of the sample user; adjusting network parameters of at least one of the first neural network of the first user-side model, the second neural network of the second user-side model, and the third neural network of the material-side model according to the third loss function values ​​of a plurality of the sample users; wherein the first user feature includes the material feature of the sample material on which the historical social behavior is based, and the second user feature includes the material feature of the sample material on which other behaviors other than the historical social behavior are based.

[0011] In some embodiments, determining the third loss function value based on at least one of the first loss function value and the second loss function value, and the type of the sample user includes: when the number of historical social behaviors of the sample user is greater than a preset threshold, determining the first loss function value as the third loss function value; when the number of historical social behaviors of the sample user is not greater than the preset threshold, determining the second loss function value as the third loss function value.

[0012] According to another aspect of the embodiments of the present disclosure, a recall method is provided, comprising: inputting material characteristics of a material into a material-side model trained by the model training method described in any one of the above embodiments to obtain a material feature vector of the material; performing an operation on a user, the operation comprising: inputting a first user characteristic of the user into a first user-side model trained by the model training method described in any one of the above embodiments to obtain a first user feature vector of the user; based on a first similarity between the first user feature vector and the material feature vector, recalling a first preset quantity of materials that meet a first preset recommendation condition from a material library; and / or inputting a second user characteristic of the user into a second user-side model trained by the model training method described in any one of the above embodiments to obtain a second user feature vector of the user; based on a second similarity between the second feature vector and the third feature vector, recalling a second preset quantity of materials that meet a second preset recommendation condition from the material library.

[0013] In some embodiments, the historical social behavior includes historical private chat behavior between the user and the initiator of the material, and the material characteristics of the material on which the material is based include the material identification of the material on which the material is based.

[0014] In some embodiments, recalling a first preset quantity of materials that meet a first preset recommendation condition from a material library includes: clustering material feature vectors of multiple materials in the material library to determine multiple classes; determining a third similarity between the first user feature vector and the cluster center vector of each of the multiple classes; screening out some classes from the multiple classes whose third similarity is greater than a preset similarity; and recalling materials whose first similarity meets the first preset recommendation condition from the some classes in order of the first similarity from high to low, until the number of recalled materials reaches the first preset number.

[0015] In some embodiments, recalling a second preset number of materials that meet a second preset recommendation condition from the material library includes: clustering material feature vectors of multiple materials in the material library to determine multiple classes; determining a fourth similarity between the second user feature vector and the cluster center vector of each of the multiple classes; screening out some classes from the multiple classes whose fourth similarity is greater than a preset similarity; and recalling materials whose second similarity meets the second preset recommendation condition from the some classes in order of the second similarity from high to low, until the number of recalled materials reaches the second preset number.

[0016] According to another aspect of an embodiment of the present disclosure, a model training device is provided, comprising: a module for executing the model training method described in any one of the above embodiments.

[0017] According to another aspect of the embodiments of the present disclosure, a recall device is provided, comprising: a module for executing the recall method described in any one of the above embodiments.

[0018] According to another aspect of an embodiment of the present disclosure, an electronic device is provided, including: a memory; and a processor coupled to the memory, wherein the processor is configured to execute the method described in any one of the above embodiments based on instructions stored in the memory.

[0019] According to another aspect of the embodiments of the present disclosure, a recommendation system is provided, including: the recall device described in any one of the above embodiments.

[0020] According to another aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, comprising computer program instructions, wherein when the computer program instructions are executed by a processor, the method described in any one of the above embodiments is implemented.

[0021] According to another aspect of the embodiments of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.

[0022] In the embodiment of the present disclosure, for the first sample group, the first user feature of the first sample user is input into the first user side model, and the material feature of the first sample material is input into the material side model. For the second sample group, the second user feature of the second sample user is input into the second user side model different from the first user side model, and the material feature of the second sample material is input into the material side model. Then, according to the loss function value of the first sample group and the loss function value of the second sample group, the network parameters of the neural network of at least one of the first user side model, the second user side model and the material side model are adjusted to realize the training of the model. In this way, since the first user feature includes the material feature of the sample material based on the historical social behavior of the first sample user, and the second user feature includes the material feature of the sample material based on other behaviors of the second sample user other than the historical social behavior, two different user side models are used to learn the social features and content features of two groups of different types of users respectively (that is, the different interest features of the two types of users are learned respectively by two different user side models), which can improve the richness of user feature learning, thereby improving the accuracy of the model's prediction of the user's diverse interests.

[0023] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] Figure 1 is a flowchart of a model training method according to some embodiments of the present disclosure;

[0026] Figure 2 is a flowchart of a model training method according to other embodiments of the present disclosure;

[0027] Figure 3 is a flowchart of a model training method according to some other embodiments of the present disclosure;

[0028] Figure 4 is a flowchart of a recall method according to some embodiments of the present disclosure;

[0029] Figure 5 is a schematic diagram of the structure of a model training device according to some embodiments of the present disclosure;

[0030] Figure 6 is a schematic diagram of the structure of a model training device according to other embodiments of the present disclosure;

[0031] Figure 7 is a schematic diagram of the structure of a recall device according to some embodiments of the present disclosure;

[0032] Figure 8 is a schematic diagram of the structure of an electronic device according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0034] Unless specifically stated otherwise, the relative arrangement of components and steps, the numerical expressions and numerical values ​​set forth in these embodiments do not limit the scope of the present disclosure.

[0035] At the same time, it should be understood that for the convenience of description, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.

[0036] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.

[0037] In all examples shown and discussed herein, any specific values ​​should be interpreted as merely exemplary and not as limiting. Therefore, other examples of the exemplary embodiments may have different values.

[0038] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.

[0039] The recommendation system can include recall, rough sorting, fine sorting and re-sorting. Taking the recommendation of materials as an example, in the recall stage, the materials can be initially screened to initially recall a part of the materials that users may be interested in from the massive materials. This process can be, for example, to screen out materials of the order of ten thousand from materials of the order of one million; in the rough sorting stage, if the number of materials is still large after the recall, a secondary screening can be performed to reduce the number of materials transmitted to the fine sorting stage. This process can be, for example, to screen out materials of the order of one hundred from materials of the order of ten thousand; in the fine sorting stage, the screened materials of the order of one hundred can be further finely screened and the corresponding recommended ranking can be generated. This process can be, for example, to screen out materials of the order of ten from materials of the order of one hundred; in the re-sorting stage, the recommended ranking generated by the fine sorting module can be re-sorted according to user feedback, and the materials can be recommended to the user according to the re-sorted recommended ranking. In this process, the order of magnitude of the materials can remain unchanged.

[0040] The dual-tower model includes the user-side model (also known as the user tower) and the material-side model (also known as the material tower). In the recall or rough sorting stage, the dual-tower model can be used to predict the user's interest in the material and screen it based on the model's prediction results.

[0041] In the related art, all user features of sample users are usually input into the user-side model, and all material features of sample materials are input into the material-side model to perform model training, thereby obtaining a trained dual-tower model.

[0042] However, in this way, since all user features of any sample user are input into the same user-side model, and users' interests are diverse, and even the correlation between different interests is low, it is impossible to fully learn users' diverse interests through only one user-side model, resulting in low richness of user feature learning, and thus low accuracy of the model's prediction of users' diverse interests.

[0043] In order to solve the above problems, the embodiments of the present disclosure propose the following solutions, which can effectively improve the prediction accuracy of the model.

[0044] Figure 1 It is a flowchart of a model training method according to some embodiments of the present disclosure.

[0045] In step 102, a first operation is performed on each group of samples in a first group of samples.

[0046] Here, each group of samples in the first sample group includes a first sample user and a first sample material, and step 102 includes steps 1021 to 1023 .

[0047] In step 1021, the first user feature of the first sample user is input into the first user side model to obtain a first feature vector. The first feature vector may also be called a user feature vector of the first sample user, which can reflect the first user feature of the first sample user input into the first user side model.

[0048] Here, the first user feature includes the material feature of the sample material based on the historical social behavior of the first sample user. The first user feature can also be called the social feature of the first sample user (i.e., social feature). In some embodiments, the first user feature input to the first user side model can also include other features. This will be further described later.

[0049] In some embodiments, the historical social behavior of the first sample user may include historical private chat behaviors between the first sample user and the initiator of the sample material, and the material characteristics of the sample material based thereon may include the material identification of the sample material based thereon (i.e., the sample material ID). For example, if there have been private chat behaviors between the first sample user and the initiators of multiple sample materials over a period of time in the past (e.g., over the past week), the first user characteristics may include the material identifications of all sample materials on which these private chat behaviors of the first sample user are based (i.e., the material identifications of these multiple sample materials).

[0050] In some embodiments, the first user feature input to the first user side model may include multiple user features. In these embodiments, multiple user features may be spliced ​​and input to the first user side model to obtain a first feature vector of the first sample user output by the first user side model. For example, each user feature in the first user feature may be encoded (e.g., one-hot encoding or embedding encoding, etc.), and the encoded multiple user features may be spliced ​​and input to the first user side model.

[0051] In step 1022, the material characteristics of the first sample material are input into the material-side model to obtain a second characteristic vector.

[0052] In some embodiments, the first sample material may include a sample post to be recommended. The sample post may include one or more of a sample product, a sample article, and a sample video.

[0053] In some embodiments, the material feature of the first sample material input to the material-side model may include multiple material features. In these embodiments, the multiple material features may be spliced ​​and input to the material-side model to obtain the second feature vector of the first sample material output by the material-side model. For example, each material feature of the material feature may be encoded (e.g., one-hot encoding or embedding encoding, etc.), and the encoded multiple material features may be spliced ​​and input to the material-side model.

[0054] In step 1023, a first loss function value is determined according to the first eigenvector and the second eigenvector.

[0055] As an implementation method of step 1023, a first similarity between the first feature vector and the second feature vector may be determined, and then a first loss function value may be determined based on the first similarity, a first label of the first sample user for the first sample material, and a first preset loss function.

[0056] It should be understood that the first label can represent the actual social interest of the first sample user in the first sample material. For example, the first label can be represented by 1 or 0, wherein if the first sample user has had social behavior (such as private chat behavior) with the initiator of the first sample material, then the first label of the first sample user for the first sample material is 1, which means that the first sample user has social interest in the first sample material; if the first sample user has not had social behavior with the initiator of the first sample material, then the first label of the first sample user for the first sample material is 0, which means that the first sample user has no social interest in the first sample material.

[0057] In some embodiments, an inner product may be performed on the first eigenvector and the second eigenvector to determine a first similarity between the first eigenvector and the second eigenvector.

[0058] In some other embodiments, the first similarity between the first eigenvector and the second eigenvector may be determined by calculating the distance between the first eigenvector and the second eigenvector. For example, the cosine distance between the first eigenvector and the second eigenvector may be calculated by a cosine function, and the cosine distance may be used as the first similarity between the first eigenvector and the second eigenvector.

[0059] In some embodiments, the first preset loss function may be a cross entropy loss function.

[0060] In some embodiments, after determining the first similarity, the first similarity can be input into an activation function (such as a softmax function or a sigmoid function) to obtain a prediction value of the first sample user for the first sample material. Based on this prediction value, the first label of the first sample user for the first sample material, and the first preset loss function, the first loss function value can be determined.

[0061] At step 104 , a second operation is performed on each group of samples in the second group of samples.

[0062] Here, each group of samples in the second sample group includes a second sample user and a second sample material. The second sample user and the first sample user have different user types. Step 104 includes steps 1041 to 1043 .

[0063] In step 1041, the second user feature of the second sample user is input into the second user side model to obtain a third feature vector. The third feature vector may also be called a user feature vector of the second sample user, which can reflect the second user feature of the second sample user input into the second user side model.

[0064] Here, the second user features include material features of sample materials based on other behaviors of the second sample user other than historical social behaviors, that is, the second sample user has never generated historical social behaviors for the sample materials based on these other behaviors. The second user features can also be referred to as content features of the second sample user (i.e., non-social features). In some embodiments, the second user features input to the second user side model can also include other features. This will be further described later.

[0065] In some embodiments, the historical social behavior of the second sample user may include historical private chat behaviors between the second sample user and the initiator of the sample material, other behaviors of the second sample user may include behaviors other than historical private chat behaviors (such as like, favorite, comment, and share behaviors), and the material characteristics of the sample material based on it may include the material identification of the sample material based on it (i.e., the sample material ID). For example, if the second sample user has only liked and favorited multiple sample materials in the past period of time (such as the past week), but has never had private chat behaviors with the initiators of these multiple sample materials, then the second user characteristics may include the material identifications of all sample materials on which these like and favorite behaviors of the second sample user are based (i.e., the material identifications of these multiple sample materials).

[0066] In some embodiments, the second user features input to the second user side model may include multiple user features. In these embodiments, multiple user features may be spliced ​​and input to the second user side model to obtain a second feature vector of the second sample user output by the second user side model. For example, each user feature in the second user features may be encoded (e.g., one-hot encoding or embedding encoding, etc.), and the encoded multiple user features may be spliced ​​and input to the second user side model.

[0067] In step 1042, the material characteristics of the second sample material are input into the material-side model to obtain a fourth characteristic vector.

[0068] The second sample material may be partially identical to, completely identical to, or different from the first sample material.

[0069] In step 1043, a second loss function value is determined according to the third eigenvector and the fourth eigenvector.

[0070] As an implementation method of step 1043, the second similarity between the third feature vector and the fourth feature vector may be determined, and then the second loss function value may be determined based on the second similarity, the second label of the second sample user for the second sample material, and the second preset loss function.

[0071] It should be understood that the second label can represent the actual interest of the second sample user in the content of the second sample material. For example, the second label can be represented by 1 or 0, where if the second sample user has liked and shared the second sample material, but has never had a social behavior (such as a private chat behavior) with the initiator of the second sample material, then the second label of the second sample user for the second sample material is 1, which means that the second sample user is interested in the content of the second sample material (that is, has an interest in the content); if the second sample user has never liked and shared the second sample material, then the second label of the second sample user for the second sample material is 0, which means that the second sample user is not interested in the content of the second sample material (that is, has no interest in the content).

[0072] The specific implementation methods of steps 1041 to 1043 are similar to those of the aforementioned steps 1021 to 1023. For other specific instructions, please refer to the description in the relevant embodiments of the aforementioned steps 1021 to 1023, which will not be repeated here.

[0073] In step 106, according to the first loss function value of the first sample group and the second loss function value of the second sample group, the network parameters of at least one of the first neural network of the first user side model, the second neural network of the second user side model, and the third neural network of the material side model are adjusted.

[0074] It should be understood that the first loss function value of the first sample group includes the first loss function value of each first sample user in the first sample group, and the second loss function value of the second sample group includes the second loss function value of each second sample user in the second sample group.

[0075] In some embodiments, at least one of the first neural network, the second neural network, and the third neural network may be a deep-learning neural network (DNN).

[0076] In some embodiments, according to the first loss function value of the first sample group and the second loss function value of the second sample group, the network parameters of any one or any two of the first neural network, the second neural network, and the third neural network may be adjusted (for example, the network parameters may include at least one of a weight parameter and a bias parameter), and according to any one or any two neural networks after the parameter adjustment, the step of repeatedly performing Figure 1The model training method shown is performed until the first loss function value and the second loss function value respectively meet the corresponding preset convergence conditions.

[0077] In some other embodiments, the network parameters of the first neural network, the second neural network, and the third neural network may be adjusted according to the first loss function value of the first sample group and the second loss function value of the second sample group, and the first neural network, the second neural network, and the third neural network may be repeatedly executed according to the adjusted parameters of the first neural network, the second neural network, and the third neural network. Figure 1 The model training method shown is performed until the first loss function value and the second loss function value respectively meet the corresponding preset convergence conditions.

[0078] In some other embodiments, a third loss function value may be determined based on the first loss function value of the first sample group and the second loss function value of the second sample group, and a network parameter of at least one of the first neural network, the second neural network, and the third neural network may be adjusted based on the third loss function value. This will be further described below.

[0079] In the above embodiment, for the first sample group, the first user feature of the first sample user is input into the first user side model, and the material feature of the first sample material is input into the material side model. For the second sample group, the second user feature of the second sample user is input into the second user side model different from the first user side model, and the material feature of the second sample material is input into the material side model. Then, according to the loss function value of the first sample group and the loss function value of the second sample group, the network parameters of the neural network of at least one of the first user side model, the second user side model and the material side model are adjusted to realize model training. In this way, since the first user feature includes the material feature of the sample material based on the historical social behavior of the first sample user, and the second user feature includes the material feature of the sample material based on other behaviors of the second sample user other than the historical social behavior, two different user side models are used to learn the social features and content features of two groups of different types of users respectively (that is, the different interest features of the two types of users are learned respectively by two different user side models), which can improve the richness of user feature learning, thereby improving the accuracy of the model's prediction of the user's diverse interests.

[0080] In some embodiments, the first user feature may further include attribute features of the first sample user, and the second user feature may further include attribute features of the second sample user, wherein the attribute features include at least one of age, gender, region, and spending power. For example, the user's age, gender, and region may be confirmed based on the user's registration information, and the user's spending power may be confirmed based on the model of the user's commonly used login device.

[0081] In this way, when training the first user-side model, not only the social characteristics of the first sample user but also the attribute characteristics of the first sample user are input, and when training the second user-side model, not only the content characteristics of the second sample user but also the attribute characteristics of the second sample user are input, so that the first user-side model and the second user-side model can learn other relevant characteristics of the user more fully while maintaining the learning of the two different interest characteristics of the user, thereby improving the accuracy of user feature learning of the first user-side model and the second user-side model, thereby further improving the model's prediction accuracy of the user's diverse interests.

[0082] In some embodiments, the first sample users in the first sample group are all social users, and the second sample users in the second sample group are all content users. Social users are users whose number of historical social behaviors is greater than a preset threshold, and content users are users whose number of historical social behaviors is not greater than a preset threshold. That is, the number of historical social behaviors of the first sample user is greater than the preset threshold, and the number of historical social behaviors of the second sample user is not greater than the preset threshold. For example, the preset threshold is 0, that is, the first sample user has a historical social behavior based on at least one sample material, and the second sample user has never had a historical social behavior based on any sample material.

[0083] As some implementations of step 106, the network parameters of at least one neural network may be adjusted according to the following steps.

[0084] First, a weighted sum is performed on the first loss function value of each first sample user in the first sample group and the second loss function value of each second sample user in the second sample group to obtain a third loss function value.

[0085] In some embodiments, the weights of the first loss function values ​​of at least some of the first sample users in the first sample group may be different, and the weights of the second loss function values ​​of at least some of the second sample users in the second sample group may be different. For example, corresponding weights may be set for the first loss function value of each first sample user in the first sample group and the second loss function value of each second sample user in the second sample group, respectively, to perform weighted summation, thereby obtaining a third loss function value.

[0086] In other embodiments, the weight of the first loss function value of each first sample user in the first sample group is equal, and the weight of the second loss function value of each second sample user in the second sample group is equal. For example, corresponding weights can be set for the sum of the first loss function values ​​of all first sample users in the first sample group and the sum of the second loss function values ​​of all second sample users in the second sample group, respectively, to perform weighted summation, thereby obtaining a third loss function value. In this way, it is easy to adjust the weight corresponding to each sample user, so as to save the time of model training, thereby improving the efficiency of model training.

[0087] In some embodiments, the weight of the first loss function value of at least some of the first sample users and the weight of the second loss function value of at least some of the second sample users may be the same. For example, the weight of the first loss function value of a first sample user and the weight of the second loss function value of a second sample user may both be 0.5.

[0088] Then, when the third loss function value does not satisfy the preset convergence condition, the network parameters of at least one of the first neural network, the second neural network and the third neural network are adjusted.

[0089] For example, when the third loss function value does not satisfy the preset convergence condition, the network parameters of the first neural network, the second neural network, and the third neural network (for example, at least one of the weight parameter and the bias parameter) can be adjusted, and the first neural network, the second neural network, and the third neural network after the parameter adjustment are repeatedly executed. Figure 1 The model training method shown is performed until the third loss function value meets the preset convergence condition.

[0090] It should be understood that the third loss function value can comprehensively reflect the difference between the sample user's interest in the sample material predicted by the model in terms of social and content and the sample user's actual interest in the sample material. If the third loss function value does not meet the preset convergence condition, the difference between the interest predicted by the model and the actual interest is large, and the execution can be repeated. Figure 1 The model training method shown is used to improve the accuracy of model prediction; if the third loss function value meets the preset convergence condition, the difference between the interest predicted by the model and the actual interest is small, and the model training can be terminated.

[0091] In the above implementation, the first loss function value of each first sample user in the first sample group and the second loss function value of each second sample user in the second sample group can be weighted and summed to obtain a third loss function value, and the network parameters of at least one neural network in the model can be adjusted according to the third loss function value. In this way, since the third loss function value can reflect the comprehensive prediction ability of the model in terms of social interaction and content, the parameters can be adjusted more accurately according to the third loss function value, thereby improving the accuracy of model training, thereby improving the prediction accuracy of the trained model for the diverse interests of users.

[0092] In some embodiments, if the number of sample users in one of the first sample group and the second sample group is less than the number of sample users in the other sample group, then when the weighted sum of the loss function values ​​of the two sample groups is performed, the weight corresponding to each sample user in the one sample group is greater than the weight corresponding to each sample user in the other sample group. For example, if the number of sample users in the first sample group is greater than the number of sample users in the second sample group, then when the weighted sum of the loss function values ​​of the two sample groups is performed, the weight of the first loss function value of each first sample user in the first sample group is greater than the weight of the second loss function value of each second sample user in the second sample group.

[0093] In this way, when performing the weighted summation of the loss function values ​​of the two sample groups, the weight of the loss function value of the sample group with a larger number of sample users can be set to a smaller weight, while the weight of the loss function value of the sample group with a smaller number of sample users can be set to a larger weight, so as to reduce the impact of the imbalance in the number of two types of sample users on model training, further improve the accuracy of model training, and thus further improve the accuracy of the trained model in predicting the diverse interests of users.

[0094] In some embodiments, step 102 may also include: inputting the second user feature of the first sample user into the second user side model to obtain the fifth feature vector of the first sample user, and determining the fourth loss function value according to the fifth feature vector and the second feature vector. Here, the second user feature of the first sample user includes the material features of the sample material based on the first sample user's other behaviors other than historical social behaviors, that is, the content features of the first sample user. In this way, since the second user side model is used to learn the content features of content users, the second user feature of the first sample user as a social user is a negative sample feature for the training of the second user side model, and maintaining a certain amount of negative sample feature learning during the model training process is conducive to improving the accuracy of the model's feature learning, thereby improving the prediction accuracy of the model.

[0095] In some embodiments, step 104 may also include: inputting the first user feature of the second sample user into the first user side model to obtain the sixth feature vector of the second sample user, and determining the fifth loss function value according to the sixth feature vector and the fourth feature vector. Here, the first user feature of the second sample user includes the material feature of the sample material on which the historical social behavior of the second sample user is based, that is, the social feature of the second sample user. In this way, since the first user side model is used to learn the social features of social users, the first user feature of the second sample user as a content user is a negative sample feature for the training of the first user side model, and maintaining a certain amount of negative sample feature learning during the model training process is conducive to improving the accuracy of the model's feature learning, thereby improving the prediction accuracy of the model.

[0096] It should be noted that, considering that the loss function value obtained by feature learning for the first sample user who is a social user is to reflect the social prediction ability of the first user-side model, and the loss function value obtained by feature learning for the second sample user who is a content user is to reflect the content prediction ability of the second user-side model, in order to reduce the influence of the fourth loss function value obtained by learning based on the content characteristics of the first sample user on the subsequent parameter adjustment, the fourth loss function value can be set to zero to improve the accuracy of the second user-side model training; in order to reduce the influence of the fifth loss function value obtained by learning based on the social characteristics of the second sample user on the subsequent parameter adjustment, the fifth loss function value can be set to zero to improve the accuracy of the first user-side model training.

[0097] Figure 2 It is a flowchart of a model training method according to other embodiments of the present disclosure.

[0098] In step 202, the material characteristics of the sample material are input into the material-side model to obtain a first characteristic vector.

[0099] In step 204 , operations are performed on the sample user. Here, step 204 includes steps 2041 to 2045 .

[0100] In step 2041, the first user feature of the sample user is input into the first user side model to obtain a second feature vector.

[0101] In step 2042, a first loss function value is determined based on the first eigenvector and the second eigenvector.

[0102] In step 2043, the second user feature of the sample user is input into the second user side model to obtain a third feature vector.

[0103] In step 2044, a second loss function value is determined based on the first eigenvector and the third eigenvector.

[0104] Here, the first user feature of the sample user includes the material feature of the sample material based on the historical social behavior of the sample user, and the second user feature of the sample user includes the material feature of the sample material based on other behaviors of the sample user except the historical social behavior.

[0105] In step 2045, a third loss function value is determined based on at least one of the first loss function value and the second loss function value and the type of the sample user.

[0106] In some embodiments, the weights of the first loss function value and the second loss function value may be determined according to the type of the sample user, so as to perform weighted summation of the first loss function value and the second loss function value to determine the third loss function value. For example, if the sample user is a social user, the weight of the first loss function value (e.g., 1) is greater than the weight of the second loss function value (e.g., 0); if the sample user is a content user, the weight of the first loss function value (e.g., 0) is less than the weight of the second loss function value (e.g., 1).

[0107] By repeating step 204, third loss function values ​​of multiple users can be obtained.

[0108] In step 206, according to the third loss function values ​​of multiple sample users, the network parameters of at least one of the first neural network in the first user side model, the second neural network in the second user side model, and the third neural network in the material side model are adjusted.

[0109] In some embodiments, the third loss function values ​​of multiple sample users may be weighted and summed to determine a fourth loss function value, and when the fourth loss function value does not meet the preset convergence condition, the network parameters of any one, any two or three of the first neural network, the second neural network and the third neural network may be adjusted (for example, the network parameters may include at least one of a weight parameter and a bias parameter). For example, when the fourth loss function value does not meet the preset convergence condition, the network parameters of the first neural network, the second neural network and the third neural network may be adjusted.

[0110] In some embodiments, in the process of determining the fourth loss function, the weights may be set according to the number of different types of sample users in the plurality of sample users. For example, the plurality of sample users may include a first user group and a second user group, and the weight of the third loss function value of each sample user in the first user group and the weight of the third loss function value of each sample user in the second user group may be set according to the relationship between the number of sample users in the first user group and the number of sample users in the second user group. For example, the weight of the third loss function value of the sample user in the user group with a larger number of sample users is smaller.

[0111] Figure 2 Steps 2041 to 2045 and step 206 in the method shown in the figure are the same as those in the above Figure 1 The implementation methods of the relevant steps in the method shown are similar. For specific instructions, please refer to the description in the aforementioned related embodiments, which will not be repeated here.

[0112] In the above embodiment, for each sample user, the first user feature and the second user feature of the sample user are respectively input into the first user side model and the second user side model for training, and the third loss function value is determined according to at least one of the first loss function value and the second loss function value and the type of the sample user, and then the network parameters of at least one neural network are adjusted according to the third loss function values ​​of multiple sample users. In this way, on the one hand, different interest features of users can be learned separately through two different user side models to improve the richness of user feature learning; on the other hand, the third loss function value used for parameter adjustment can be determined according to at least one of the first loss function value and the second loss function value and the type of the sample user to improve the accuracy of parameter adjustment, thereby improving the accuracy of the model's prediction of the user's diverse interests.

[0113] In some embodiments, in step 2045, when the number of historical social behaviors of the sample user is greater than a preset threshold, the first loss function value may be determined as the third loss function value, and when the number of historical social behaviors of the sample user is not greater than the preset threshold, the second loss function value may be determined as the third loss function value. That is, if the sample user belongs to a social user, the first loss function value may be determined as the third loss function value; if the sample user belongs to a content user, the second loss function value may be determined as the third loss function value.

[0114] In this way, for the first user-side model, the influence of the loss function value learned based on the social characteristics of content users on parameter adjustment can be reduced; for the second user-side model, the influence of the loss function value learned based on the content characteristics of social users on parameter adjustment can be reduced, thereby further improving the accuracy of parameter adjustment and further improving the model's prediction accuracy of users' diverse interests.

[0115] Figure 2 For other specific descriptions of the weight setting of the loss function values ​​of different types of sample users, the first user characteristics, the second user characteristics, the first neural network, the second neural network and the third neural network, etc. in the method shown, please refer to the aforementioned Figure 1 The relevant description in the illustrated embodiment will not be repeated here.

[0116] Figure 3 It is a flowchart of a model training method according to some other embodiments of the present disclosure.

[0117] like Figure 3 As shown, the dual-tower model includes a user-side model and a material-side model, wherein the user-side model includes a first user-side model and a second user-side model, the first user-side model includes a first input layer, a first neural network (e.g., DNN1) and a first output layer; the second user-side model includes a second input layer, a second neural network (e.g., DNN2) and a second output layer; the material-side model includes a third input layer, a third neural network (e.g., DNN3) and a third output layer.

[0118] The first input layer is used to encode the first user feature input into the first user side model (for example, embedding encoding) to obtain a vector expression of the first user feature (for example, the vector expression of the first user feature in the embedding encoding mode can be represented by Social Feature Embedding); the second input layer is used to encode the second user feature input into the second user side model (for example, embedding encoding) to obtain a vector expression of the second user feature (for example, the vector expression of the second user feature in the embedding encoding mode can be represented by Content Feature Embedding); the third input layer is used to encode the material feature input into the material side model (for example, embedding encoding) to obtain a vector expression of the material feature (for example, the vector expression of the material feature in the embedding encoding mode can be represented by Item Feature Embedding).

[0119] During the training process, for each group of samples in the first sample group, the first user features of the first sample users are input into the first user-side model, the material features of the first sample materials are input into the material-side model, and the first loss function value is determined according to the first feature vector output by the first user-side model (for example, it can be represented by User Social Embedding, and User Social Embedding can reflect the Social Feature Embedding input into the first user-side model) and the second feature vector output by the material-side model (for example, it can be represented by Item Embedding1); for each group of samples in the second sample group, the second user features of the second sample users are input into the second user-side model, and the material features of the second sample materials are input into the material-side model, so as to determine the second loss function value according to the third feature vector output by the second user-side model (for example, it can be represented by User Content Embedding, and User Content Embedding can reflect the Content Feature Embedding input into the second user-side model) and the fourth feature vector output by the material-side model (for example, it can be represented by Item Embedding2); thereafter, according to the first loss function value of the first sample group and the second loss function value of the second sample group, the network parameters of at least one of the first neural network, the second neural network and the third neural network are adjusted.

[0120] For example, Figure 3 As shown, the sum of the first loss function values ​​of the first sample group (for example, which can be represented by Social Loss) and the sum of the second loss function values ​​of the second sample group (for example, which can be represented by Content Loss) can be weighted summed to obtain a third loss function value (for example, which can be represented by Loss). When the third loss function value does not meet the preset conditions, the network parameters of the first neural network, the second neural network and the third neural network are adjusted until the obtained third loss function value meets the preset convergence conditions.

[0121] According to the above training method, a model including a first user side model, a second user side model and a material side model can be obtained. After obtaining the model, other operations can be performed based on the model.

[0122] Figure 4 It is a flowchart of a recall method according to some embodiments of the present disclosure.

[0123] In step 402, the material characteristics of the material are input into the material-side model to obtain the material characteristic vector of the material.

[0124] In step 404, an operation is performed on the user. Step 404 includes steps 4041 to 4042 and / or steps 4043 to 4044.

[0125] In step 4041, the first user feature of the user is input into the first user-side model to obtain the first user feature vector of the user.

[0126] In step 4042, based on the first similarity between the first user feature vector and the material feature vector, a first preset quantity of materials that meet a first preset recommendation condition are recalled from the material library.

[0127] In step 4043, the second user feature of the user is input into the second user-side model to obtain the second user feature vector of the user.

[0128] In step 4044, based on the second similarity between the second feature vector and the third feature vector, a second preset quantity of materials satisfying a second preset recommendation condition are recalled from the material library.

[0129] Here, the first user feature of the user includes the material feature of the sample material based on the historical social behavior of the user, and the second user feature includes the material feature of the sample material based on other behaviors of the user except the historical social behavior.

[0130] Here, Figure 4 The material side model, the first user side model and the second user side model in the method shown all adopt the model training method of any of the above embodiments (for example Figure 1 or Figure 2 In other words, after training using the model training method of any of the above embodiments, steps 402 to 404 are performed.

[0131] In some embodiments, when recommending social materials for a specific user, the first user feature of the specific user can be input into the first user-side model to obtain the first user feature vector of the specific user; the material features of each material in all or part of the materials in the material library can be input into the material-side model to obtain the material feature vector of each material; and then, based on the first similarity between the first user feature vector and the material feature vector of each material, a first preset number of materials that meet the first preset recommendation condition are recalled from the material library, so that materials recommended to the specific user can be further selected from the recalled materials.

[0132] In some embodiments, when recommending content materials for a specific user, the second user characteristics of the specific user can be input into the second user-side model to obtain the second user feature vector of the specific user; the material characteristics of each material in all or part of the materials in the material library can be input into the material-side model to obtain the material feature vector of each material; and then based on the second similarity between the second user feature vector and the material feature vector of each material, a second preset number of materials that meet the second preset recommendation condition are recalled from the material library, so that materials recommended to the specific user can be further selected from the recalled materials.

[0133] In some embodiments, the first preset number and the second preset number may be the same or different.

[0134] In some embodiments, the first preset recommendation condition and the second preset recommendation condition may be the same or different. As some implementations, the first similarity being higher than a preset similarity threshold may be used as the first preset recommendation condition and / or the second preset recommendation condition. For example, if the preset similarity threshold is 0.6, then the first preset recommendation condition is satisfied if the first similarity is higher than 0.8, and the first preset recommendation condition is not satisfied if the first similarity is lower than or equal to 0.8.

[0135] In the above embodiment, when recommending materials for each user, the social characteristics of the user can be input into the first user-side model to recall social materials based on the first similarity between the social characteristics of the user and the material characteristics, and / or the content characteristics of the user can be input into the second user-side model to recall content materials based on the second similarity between the content characteristics of the user and the material characteristics. In this way, for each user, materials that the user is interested in at least one of the social aspect and the content aspect can be recalled accordingly based on at least one of the user characteristics that reflect the social interest and the user characteristics that reflect the content interest, that is, materials that meet the different interests of the user can be accurately recalled for the user based on the different interest characteristics of the user, thereby improving the richness and accuracy of the materials recalled for the user, thereby improving the richness and accuracy of the subsequent material recommendations.

[0136] In other words, for each user's two different interest characteristics, two user feature vectors reflecting the two different interest characteristics of the user are learned respectively through two different user-side models, which can better capture the user's diverse interests, improve the richness and accuracy of material recall, and thus improve the richness and accuracy of subsequent material recommendations.

[0137] In addition, since it is possible to accurately recall materials of interest to users, the exposure of materials can be effectively increased in a shorter period of time (i.e., materials that users are interested in in different aspects are more accurately recommended in a shorter period of time), so as to increase users' attention to the recommended materials, thereby increasing users' views, interactions and stay time on the recommended materials.

[0138] In some embodiments, the historical social behavior may include the historical private chat behavior between the user and the initiator of the material, and the material characteristics of the based material may include the material identification of the based material.

[0139] As some implementations, the following steps S1 to S4 may be performed to recall a first preset quantity of materials that meet a first preset recommendation condition from a material library.

[0140] S1: Cluster the material feature vectors of multiple materials in the material library to determine multiple classes.

[0141] In some embodiments, the material feature vectors of multiple materials in the material library may be clustered according to the similarities between the material feature vectors of the multiple materials, thereby determining multiple classes.

[0142] In some embodiments, the process of clustering the material feature vectors of multiple materials in the material library to determine multiple classes can be performed in advance when the user-side model and the material-side model are offline, that is, before executing step 402, the material feature vectors of multiple materials in the material library can be clustered in advance to determine multiple classes, thereby improving recall efficiency.

[0143] In some embodiments, the material feature vectors of each material in each class may be indexed. For example, any material in each class may use the cluster center vector of the class as an index, and then the class to which the material belongs may be determined according to the index of each material during recall.

[0144] S2: Determine a second similarity between the first user feature vector and the cluster center vector of each of the multiple classes.

[0145] In some embodiments, the inner product or cosine distance between the user feature vector and the cluster center vector of each class may be calculated to determine the second similarity between the user feature vector and the cluster center vector of each class.

[0146] S3: Filter out some classes whose third similarity is greater than a preset similarity from the multiple classes.

[0147] For example, the first preset number is 100, and the multiple classes may include five classes A, B, C, D, and E arranged in descending order of the third similarity. The first three classes (i.e., classes A, B, and C) may be screened out from the five classes in descending order of the third similarity.

[0148] S4: recalling materials whose first similarity meets the first preset recommendation condition from some categories in the order of the first similarity from high to low, until the number of recalled materials reaches the first preset number.

[0149] For example, the first similarity between the material feature vector and the user feature vector of each material in the three screened categories A, B, and C is calculated, and the first 100 materials from the three categories A, B, and C are recalled in descending order of the first similarity.

[0150] In this implementation mode, materials meeting the first preset recommendation condition can be recalled from the material library more quickly, thereby improving the efficiency of recalling materials.

[0151] As some implementations, the following steps R1 to R4 may be performed to recall a second preset quantity of materials that meet a second preset recommendation condition from the material library.

[0152] R1: Cluster the material feature vectors of multiple materials in the material library to determine multiple classes.

[0153] R2: Determine a fourth similarity between the second user feature vector and the cluster center vector of each of the multiple classes.

[0154] R3: Filter out some classes whose fourth similarity is greater than a preset similarity from multiple classes.

[0155] R4: recall materials whose second similarity meets the second preset recommendation condition from some categories in the order of the second similarity from high to low, until the number of recalled materials reaches the second preset number.

[0156] Steps R1 to R4 can be implemented similarly to the aforementioned steps S1 to S4. For specific instructions, please refer to the relevant embodiments in the aforementioned steps S1 to S4, which will not be repeated here.

[0157] In this implementation mode, materials meeting the second preset recommendation condition can be recalled from the material library more quickly, thereby improving the efficiency of recalling materials.

[0158] Figure 4 For other specific descriptions of the first user feature, the second user feature, the first neural network, the second neural network, and the third neural network in the method shown, please refer to the aforementioned Figure 1 and Figure 2The relevant description in the illustrated embodiment will not be repeated here.

[0159] Some embodiments of the present disclosure further provide a recommendation method, which includes the following steps in addition to the steps in step 402 to step 406:

[0160] At least part of the recalled materials is recommended to the user.

[0161] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it basically corresponds to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0162] Figure 5 It is a structural schematic diagram of a model training device according to some embodiments of the present disclosure.

[0163] like Figure 5 As shown, the model training device 500 includes an execution module 501 and an adjustment module 502 .

[0164] The execution module 501 may be configured to execute a first operation for each group of samples in the first sample group, and to execute a second operation for each group of samples in the second sample group.

[0165] Each group of samples in the first sample group includes a first sample user and a first sample material, and each group of samples in the second sample group includes a second sample user and a second sample material.

[0166] The first operation includes: inputting the first user feature of the first sample user into the first user-side model to obtain a first feature vector; inputting the material feature of the first sample material into the material-side model to obtain a second feature vector; determining the first loss function value based on the first feature vector and the second feature vector; the second operation includes: inputting the second user feature of the second sample user into the second user-side model to obtain a third feature vector; inputting the material feature of the second sample material into the material-side model to obtain a fourth feature vector; determining the second loss function value based on the third feature vector and the fourth feature vector.

[0167] The adjustment module 502 can be configured to adjust the network parameters of at least one of the first neural network of the first user-side model, the second neural network of the second user-side model, and the third neural network of the material-side model according to the first loss function value of the first sample group and the second loss function value of the second sample group.

[0168] Here, the first sample user and the second sample user have different user types, the first user characteristics include material characteristics of sample materials based on historical social behaviors, and the second user characteristics include material characteristics of sample materials based on behaviors other than historical social behaviors.

[0169] In some embodiments, the model training device 500 may include other modules that perform other operations of any of the above embodiments.

[0170] Figure 6 It is a structural schematic diagram of a model training device according to other embodiments of the present disclosure.

[0171] like Figure 6 As shown, the model training device 600 includes an input module 601, an execution module 602 and an adjustment module 603.

[0172] The input module 601 may be configured to input the material characteristics of the sample material into the material-side model to obtain a first characteristic vector.

[0173] The execution module 602 can be configured to perform operations for the sample user, the operations including: inputting the first user feature of the sample user into the first user-side model to obtain a second feature vector; determining a first loss function value based on the first feature vector and the second feature vector; inputting the second user feature of the sample user into the second user-side model to obtain a third feature vector; determining a second loss function value based on the first feature vector and the third feature vector; and determining the third loss function value based on at least one of the first loss function value and the second loss function value, and the type of the sample user.

[0174] The adjustment module 603 can be configured to adjust the network parameters of at least one of the first neural network of the first user side model, the second neural network of the second user side model, and the third neural network of the material side model according to the third loss function values ​​of multiple sample users.

[0175] In some embodiments, the model training device 600 may include other modules that perform other operations of any of the above embodiments.

[0176] Figure 7 It is a schematic diagram of the structure of a recall device according to some embodiments of the present disclosure.

[0177] like Figure 7 As shown, the recall device 700 includes an input module 701 and an execution module 702 .

[0178] The input module 701 may be configured to input the material characteristics of the material into a material-side model trained by the model training device of any of the above-mentioned embodiments to obtain a material characteristic vector of the material.

[0179] The execution module 702 can be configured to perform operations for the user, and the operations include: inputting the user's first user feature into a first user-side model trained by a model training device using any one of the above-mentioned embodiments to obtain the user's first user feature vector; based on a first similarity between the first user feature vector and the material feature vector, recalling a first preset quantity of materials that meet a first preset recommendation condition from a material library; and / or inputting the user's second user feature into a second user-side model trained by a model training device using any one of the above-mentioned embodiments to obtain the user's second user feature vector; based on a second similarity between the second feature vector and the third feature vector, recalling a second preset quantity of materials that meet a second preset recommendation condition from the material library.

[0180] In some embodiments, the recall device 700 may include other modules that perform other operations of any of the above embodiments. In some embodiments, the recall device 700 includes the model training device of any of the above embodiments.

[0181] Figure 8 is a schematic diagram of the structure of an electronic device according to some embodiments of the present disclosure.

[0182] like Figure 8 As shown, the electronic device 800 includes a memory 801 and a processor 802 coupled to the memory 801 , and the processor 802 is configured to execute the method of any one of the aforementioned embodiments based on the instructions stored in the memory 801 .

[0183] The memory 801 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, and other programs.

[0184] The electronic device 800 may also include an input / output interface 803, a network interface 804, a storage interface 805, etc. These interfaces 803, 804, 805, and the memory 801 and the processor 802 may be connected, for example, via a bus 806. The input / output interface 803 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 804 provides a connection interface for various networked devices. The storage interface 805 provides a connection interface for external storage devices such as an SD card and a USB flash drive.

[0185] In some embodiments, the electronic device 800 may be a model training device that executes the model training method of any of the aforementioned embodiments. In other embodiments, the electronic device 800 may be a recall device that executes the recall method of any of the aforementioned embodiments.

[0186] The present disclosure also provides a recommendation system, including a recall device (e.g., recall device 700) of any of the above embodiments. For example, the recommendation system may include a recall module and a rough sorting module. At least one of the recall module and the rough sorting module includes the recall device 700 (e.g., the recall module and the rough sorting module may both include the recall device 700).

[0187] The embodiments of the present disclosure further provide a computer-readable storage medium, comprising computer program instructions, which implement the method of any one of the above embodiments when executed by a processor.

[0188] The embodiments of the present disclosure further provide a computer program product, including a computer program, wherein when the computer program is executed by a processor, the method of any one of the above embodiments is implemented.

[0189] So far, various embodiments of the present disclosure have been described in detail. In order to avoid obscuring the concept of the present disclosure, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solution disclosed here.

[0190] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0191] The present disclosure is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present disclosure. It should be understood that the functions specified in one or more processes in the flowchart and / or one or more blocks in the 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 data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions specified in the flowchart. 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.

[0192] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0193] These computer program instructions can also be loaded onto a computer or other programmable data processing 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 implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0194] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present disclosure. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present disclosure. The scope of the present disclosure is defined by the appended claims.

Claims

1. A model training method, comprising: A first operation is performed for each group of samples in a first sample group, wherein each group of samples in the first sample group includes a first sample user and a first sample material, and the first operation includes: Inputting the first user feature of the first sample user into the first user-side model to obtain a first feature vector; Inputting the material characteristics of the first sample material into the material side model to obtain a second characteristic vector; Determine a first loss function value according to the first eigenvector and the second eigenvector; A second operation is performed for each group of samples in the second sample group, each group of samples in the second sample group includes a second sample user and a second sample material, and the second operation includes: Inputting the second user feature of the second sample user into the second user-side model to obtain a third feature vector; Inputting the material characteristics of the second sample material into the material-side model to obtain a fourth characteristic vector; Determine a second loss function value according to the third eigenvector and the fourth eigenvector; According to the first loss function value of the first sample group and the second loss function value of the second sample group, adjusting the network parameters of at least one of the first neural network of the first user-side model, the second neural network of the second user-side model, and the third neural network of the material-side model; The first sample user and the second sample user have different user types, the number of historical social behaviors of the first sample user is greater than a preset threshold, and the number of historical social behaviors of the second sample user is not greater than the preset threshold, The first user characteristics include material characteristics of sample materials on which historical social behaviors are based, and the second user characteristics include material characteristics of sample materials on which other behaviors other than historical social behaviors are based, wherein the historical social behaviors include historical private chat behaviors between sample users and initiators of sample materials, and the other behaviors include one or more of likes, favorites, comments, and sharing behaviors.

2. The method according to claim 1, wherein: According to the first loss function value of the first sample group and the second loss function value of the second sample group, adjusting the network parameters of the at least one neural network includes: Performing a weighted summation of a first loss function value of each first sample user in the first sample group and a second loss function value of each second sample user in the second sample group to obtain a third loss function value; When the third loss function value does not satisfy a preset convergence condition, a network parameter of the at least one neural network is adjusted.

3. The method according to claim 2, wherein: The weight of the first loss function value of each first sample user in the first sample group is equal, and the weight of the second loss function value of each second sample user in the second sample group is equal.

4. The method according to claim 2 or 3, wherein: The number of sample users in one of the first sample group and the second sample group is smaller than the number of sample users in the other sample group, and the weight corresponding to each sample user in the one sample group is larger than the weight corresponding to each sample user in the other sample group.

5. The method according to claim 1, wherein: The material characteristics of the sample material on which the material is based include the material identification of the sample material on which the material is based.

6. The method according to claim 1, wherein: The first user feature also includes attribute features of the first sample user, and the second user feature also includes attribute features of the second sample user, and the attribute features include at least one of age, gender, region, and consumption capacity.

7. The method according to claim 1, wherein: Determining a first loss function value according to the first eigenvector and the second eigenvector includes: determining a first similarity between the first feature vector and the second feature vector; Determining the first loss function value according to the first similarity, the first label of the first sample user for the first sample material, and a first preset loss function; Determining the second loss function value according to the third eigenvector and the fourth eigenvector comprises: determining a second similarity between the third eigenvector and the fourth eigenvector; The second loss function value is determined according to the second similarity, the second label of the second sample user for the second sample material, and the second preset loss function.

8. A model training method, comprising: Inputting material characteristics of the sample material into the material side model to obtain a first characteristic vector; Perform operations on the sample user, including: Inputting the first user feature of the sample user into the first user side model to obtain a second feature vector; Determine a first loss function value according to the first eigenvector and the second eigenvector; Inputting the second user feature of the sample user into the second user side model to obtain a third feature vector; Determine a second loss function value according to the first eigenvector and the third eigenvector; and A third loss function value is determined according to at least one of the first loss function value and the second loss function value and the type of the sample user, wherein: When the number of historical social behaviors of the sample user is greater than a preset threshold, the first loss function value is determined as the third loss function value. When the number of historical social behaviors of the sample user is not greater than the preset threshold, determining the second loss function value as the third loss function value; According to the third loss function values ​​of the plurality of sample users, adjusting the network parameters of at least one of the first neural network of the first user-side model, the second neural network of the second user-side model, and the third neural network of the material-side model; Among them, the first user characteristics include material characteristics of sample materials based on historical social behaviors, and the second user characteristics include material characteristics of sample materials based on other behaviors other than historical social behaviors, wherein the historical social behaviors include historical private chat behaviors between sample users and initiators of sample materials, and the other behaviors include one or more of likes, collections, comments, and sharing behaviors.

9. A recall method comprising: Inputting the material characteristics of the material into the material-side model trained by the method described in any one of claims 1 to 8 to obtain a material characteristic vector of the material; Performing operations on the user, the operations including: Inputting the first user feature of the user into a first user-side model trained by the method according to any one of claims 1 to 8 to obtain a first user feature vector of the user; Recalling a first preset quantity of materials that meet a first preset recommendation condition from a material library according to a first similarity between the first user feature vector and the material feature vector; and / or Inputting the second user feature of the user into a second user-side model trained by the method according to any one of claims 1 to 8 to obtain a second user feature vector of the user; According to a second similarity between the second feature vector and the third feature vector, a second preset quantity of materials satisfying a second preset recommendation condition are recalled from the material library.

10. The method according to claim 9, wherein: The material characteristics of the material on which the material is based include the material identification of the material on which the material is based.

11. The method according to claim 9 or 10, wherein: Recalling a first preset quantity of materials that meet a first preset recommendation condition from the material library includes: Clustering material feature vectors of multiple materials in the material library to determine multiple classes; Determining a third similarity between the first user feature vector and the cluster center vector of each of the plurality of classes; Filter out some classes whose third similarity is greater than a preset similarity from the multiple classes; In order of the first similarities from high to low, materials whose first similarities meet the first preset recommendation condition are recalled from the partial categories until the number of recalled materials reaches the first preset number.

12. The method according to claim 9 or 10, wherein: Recalling a second preset quantity of materials satisfying a second preset recommendation condition from the material library includes: Clustering material feature vectors of multiple materials in the material library to determine multiple classes; determining a fourth similarity between the second user feature vector and the cluster center vector of each of the plurality of classes; Filter out some classes whose fourth similarity is greater than a preset similarity from the multiple classes; In order of the second similarity from high to low, materials whose second similarity meets the second preset recommendation condition are recalled from the partial categories until the number of recalled materials reaches the second preset number.

13. A model training device, comprising: A module configured to execute the method according to any one of claims 1 to 8.

14. A recall device, comprising: A module configured to execute the method according to any one of claims 9 to 12.

15. An electronic device, comprising: Memory; as well as A processor coupled to the memory, configured to execute the method according to any one of claims 1 to 12 based on instructions stored in the memory.

16. A recommendation system comprising: The recall device according to claim 14.

17. A computer-readable storage medium comprising computer program instructions, wherein: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 12 is implemented.

18. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

Citation Information

Patent Citations

  • Video recommendation method and apparatus, and computer readable storage medium

    CN109543066A

  • Video recommendation method and apparatus, and computer readable storage medium

    CN109543069A

  • Video recommendation method and device and computer readable storage medium

    CN109670077A

  • Target recommendation model training method, recommendation method and device, and electronic equipment

    CN113901327A

  • Target recommendation model training method and device and content recommendation method and device

    CN116071117A