Training method of recommendation model, recommendation method and device of content item, and equipment
Patent Information
- Application Number
- CN202310184565.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-22
- Publication Date
- 2026-10-16
- Estimated Expiration
- 2043-02-22
AI Technical Summary
但是,采用上述方式推荐的内容项的准确性较低,因此,亟须一种更加智能且准确的内容项推荐方式
[0040]The technical solution provided in the embodiments of this specification extracts features from sample recommendation information using a recommendation model to obtain at least two recommendation features corresponding to at least two interaction behaviors. This sample recommendation information includes object features of the sample object to be recommended and content features of the sample content item to be recommended. The recommendation model determines adaptive weights for at least two interaction behaviors based on the number of times the sample content item is recommended within a target time period and the number of times the object recommending the sample content item performs at least two interaction behaviors on that sample content item. Based on these adaptive weights, the recommendation model processes at least two labeled tags to obtain at least two target tags. The recommendation model is trained based on these at least two recommendation features and at least two target tags. When recommending content items to a target object, the recommendation model determines the predicted result of the target object performing at least two interaction behaviors on the recommended content item. This predicted result reflects the target object's preference for the content item. Recommending content items based on this predicted result makes the recommendation more intelligent and accurate.
Smart Images

Figure CN116257687B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method for training a recommendation model, a method for recommending content items, an apparatus, and a device. Background Technology
[0002] With the development of computer technology, mini-programs offer an increasing number of content items, including pop-ups, softboxes, and rich text. To provide users with richer information, recommended content items will pop up within the mini-program.
[0003] In related technologies, when determining content items to recommend to users, user characteristics and content item characteristics are usually matched to identify the recommended items. However, the accuracy of content items recommended using this method is relatively low. Therefore, there is an urgent need for a more intelligent and accurate content item recommendation method. Summary of the Invention
[0004] This specification provides a method for training a recommendation model, a method for recommending content items, an apparatus, and a device. It can train a recommendation model to achieve more intelligent and accurate content item recommendations. The technical solution is as follows:
[0005] On the one hand, a method for training a recommendation model is provided, the method comprising:
[0006] The recommendation model extracts features from the sample recommendation information to obtain at least two recommendation features. The sample recommendation information includes the object features of the sample object to be recommended and the content features of the sample content item to be recommended. The at least two recommendation features are used to determine the probability that the sample object performs at least two interactive behaviors on the sample content item.
[0007] The recommendation model determines the adaptive weights of the at least two interactive behaviors based on the number of times the sample content item is recommended within the target time period and the number of times the at least two interactive behaviors are performed on the sample content item.
[0008] The recommendation model processes at least two labels based on the adaptive weights of the at least two interaction behaviors to obtain at least two target labels. The labels are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item.
[0009] The recommendation model is trained based on the at least two recommendation features and the at least two target labels.
[0010] On the one hand, a method for recommending content items is provided, the method comprising:
[0011] Input the target recommendation information into the recommendation model. The target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended.
[0012] The recommendation model is used to extract features from the target recommendation information to obtain at least two recommendation features;
[0013] Based on the at least two recommendation features, the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item is determined by the recommendation model.
[0014] Based on the probabilities of the at least two interaction behaviors, the target content item is recommended to the target object;
[0015] The recommendation model is trained using the aforementioned recommendation model training method.
[0016] On the one hand, a training device for a recommendation model is provided, the device comprising:
[0017] The first feature extraction module is used to extract features from the sample recommendation information through a recommendation model to obtain at least two recommendation features. The sample recommendation information includes the object features of the sample object to be recommended and the content features of the sample content item to be recommended. The at least two recommendation features are used to determine the probability that the sample object performs at least two interactive behaviors on the sample content item.
[0018] An adaptive weight determination module is used to determine the adaptive weights of the at least two interactive behaviors based on the number of times the sample content item is recommended within a target time period and the number of times the at least two interactive behaviors are performed on the sample content item through the recommendation model.
[0019] The label processing module is used to process at least two labeled tags based on the adaptive weights of the at least two interaction behaviors through the recommendation model to obtain at least two target labels. The labeled tags are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item.
[0020] The training module is used to train the recommendation model based on the at least two recommendation features and the at least two target labels.
[0021] In one possible implementation, the first feature extraction module is used to progressively extract features from the sample recommendation information through multiple feature extraction units and multiple feature fusion units of the recommendation model to obtain the at least two recommendation features. The multiple feature extraction units include shared feature extraction units and exclusive feature extraction units. The shared feature extraction units are shared by the at least two interaction behaviors, and the exclusive feature extraction units are exclusively used by the corresponding interaction behaviors.
[0022] In one possible implementation, the first feature extraction module is configured to extract features from the sample recommendation information using at least two first unique feature extraction units of the recommendation model, respectively, to obtain at least two first unique recommendation features; extract features from the sample recommendation information using a first shared feature extraction unit of the recommendation model, to obtain first shared recommendation features; and process the at least two first unique recommendation features and the first shared recommendation features using the feature fusion unit of the recommendation model and other feature extraction units, to obtain the at least two recommendation features.
[0023] In one possible implementation, the first feature extraction module is configured to, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, fuse the first unique recommendation feature and the first shared recommendation feature of the first interactive behavior through the first feature fusion unit of the recommendation model to obtain a first fused recommendation feature, wherein the first interactive behavior and the second interactive behavior are unrelated; fuse the first unique recommendation feature and the first shared recommendation feature of the second interactive behavior through the second feature fusion unit of the recommendation model to obtain a second fused recommendation feature; fuse the first unique recommendation feature of the first interactive behavior, the first unique recommendation feature of the second interactive behavior, and the first shared recommendation feature through the third feature fusion unit of the recommendation model to obtain a third fused recommendation feature; and process the first fused recommendation feature, the second fused recommendation feature, and the third fused recommendation feature through other feature extraction units and other feature fusion units of the recommendation model to obtain recommendation features corresponding to the first interactive behavior and recommendation features corresponding to the second interactive behavior.
[0024] In one possible implementation, the first feature extraction module is configured to: extract features from the first fused feature using the second unique feature extraction unit corresponding to the first interactive behavior to obtain a second unique recommendation feature corresponding to the first interactive behavior; extract features from the second fused feature using the second unique feature extraction unit corresponding to the second interactive behavior to obtain a second unique recommendation feature corresponding to the second interactive behavior; extract features from the third fused recommendation feature using the second shared feature extraction unit of the recommendation model to obtain a second shared recommendation feature; fuse the second unique recommendation feature and the second shared recommendation feature of the first interactive behavior using the fourth feature fusion unit of the recommendation model to obtain a recommendation feature corresponding to the first interactive behavior; and fuse the second unique recommendation feature and the second shared recommendation feature of the second interactive behavior using the fifth feature fusion unit of the recommendation model to obtain a recommendation feature corresponding to the second interactive behavior.
[0025] In one possible implementation, the first feature extraction module is used to input the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior into the first feature fusion unit; the first feature fusion unit performs full connection and normalization on the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior respectively to obtain a first fusion weight and a second fusion weight; the first feature fusion unit uses the first fusion weight and the second fusion weight to perform weighted fusion on the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior to obtain the first fused recommendation feature.
[0026] In one possible implementation, the adaptive weight determination module is used to accumulate the interaction parameters of the at least two interactive behaviors in multiple sub-time periods of the target time period through the adaptive weight determination unit of the recommendation model to obtain the adaptive weight of the at least two interactive behaviors. The interaction parameter of any interactive behavior in any sub-time period is the ratio of the number of times the interactive behavior is performed on the sample content item in the sub-time period to the number of times the sample content item is recommended in the sub-time period.
[0027] In one possible implementation, the tag processing module is used to multiply the adaptive weights of the at least two interaction behaviors with the corresponding at least two labeled tags through the recommendation model to obtain the at least two target tags.
[0028] In one possible implementation, the training module is configured to determine at least two predicted labels based on the at least two recommendation features, the predicted labels being used to indicate whether the sample object will perform the interaction behavior corresponding to the recommendation feature on the sample content item; and to train the recommendation model based on the difference information between the at least two predicted labels and the at least two target labels.
[0029] In one possible implementation, the training module is configured to, when the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, perform a fully connected and normalized connection on the recommendation features corresponding to the first interaction behavior to obtain a first probability, wherein the first probability is the probability that the sample object performs the first interaction behavior on the sample content item; perform a fully connected and normalized connection on the recommendation features corresponding to the second interaction behavior to obtain a second probability, wherein the second probability is the probability that the sample object performs the second interaction behavior on the sample content item; and determine the predicted label of the first interaction behavior and the predicted label of the second interaction behavior based on the first probability and the second probability.
[0030] In one possible implementation, the training module is configured to: construct a first loss function corresponding to the first interaction based on first difference information between the predicted label and the target label of the first interaction; construct a second loss function corresponding to the second interaction based on second difference information between the predicted label and the target label of the second interaction; weight and fuse the first loss function and the second loss function using first behavior weights and second behavior weights to obtain a target loss function, wherein the first behavior weights are the behavior weights corresponding to the first interaction and the second behavior weights are the behavior weights corresponding to the second interaction; and train the recommendation model using the target loss function.
[0031] On the one hand, a content item recommendation device is provided, the device comprising:
[0032] The input module is used to input target recommendation information into the recommendation model. The target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended.
[0033] The second feature extraction module is used to extract features from the target recommendation information using the recommendation model to obtain at least two recommendation features;
[0034] The probability determination module is used to determine, through the recommendation model and based on the at least two recommendation features, the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item;
[0035] The recommendation module is used to recommend the target content item to the target object based on the probability of the at least two interaction behaviors;
[0036] The recommendation model is trained using the training device described above.
[0037] On one hand, a computer device is provided, the computer device including one or more processors and one or more memories, the one or more memories storing at least one computer program, the computer program being loaded and executed by the one or more processors to implement a training method for the recommendation model or a recommendation method for the content items.
[0038] On one hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer storage medium, the computer program being loaded and executed by a processor to implement a training method for the recommendation model or a recommendation method for the content items.
[0039] On one hand, a computer program product or computer program is provided, which includes program code stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium and executes the program code, causing the computer device to perform the training method of the aforementioned recommendation model or the recommendation method of the aforementioned content items.
[0040] The technical solution provided in the embodiments of this specification extracts features from sample recommendation information using a recommendation model to obtain at least two recommendation features corresponding to at least two interaction behaviors. This sample recommendation information includes object features of the sample object to be recommended and content features of the sample content item to be recommended. The recommendation model determines adaptive weights for at least two interaction behaviors based on the number of times the sample content item is recommended within a target time period and the number of times the object recommending the sample content item performs at least two interaction behaviors on that sample content item. Based on these adaptive weights, the recommendation model processes at least two labeled tags to obtain at least two target tags. The recommendation model is trained based on these at least two recommendation features and at least two target tags. When recommending content items to a target object, the recommendation model determines the predicted result of the target object performing at least two interaction behaviors on the recommended content item. This predicted result reflects the target object's preference for the content item. Recommending content items based on this predicted result makes the recommendation more intelligent and accurate. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this specification, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This is a schematic diagram of the implementation environment of a training method for a recommendation model provided in the embodiments of this specification;
[0043] Figure 2 This is a flowchart of a training method for a recommendation model provided in the embodiments of this specification;
[0044] Figure 3 This is a flowchart illustrating a method for recommending content items provided in the embodiments of this specification;
[0045] Figure 4 This is a flowchart of another training method for a recommendation model provided in the embodiments of this specification;
[0046] Figure 5 This is a schematic diagram of the structure of a recommendation model provided in the embodiments of this specification;
[0047] Figure 6 This is a flowchart of another recommended method for content items provided in the embodiments of this specification;
[0048] Figure 7 This is a schematic diagram of the structure of a training device for a recommendation model provided in the embodiments of this specification;
[0049] Figure 8 This is a schematic diagram of the structure of a content item recommendation device provided in the embodiments of this specification;
[0050] Figure 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of this specification;
[0051] Figure 10 This is a schematic diagram of the structure of a server provided in the embodiments of this specification. Detailed Implementation
[0052] To make the objectives, technical solutions, and advantages of this specification clearer, the embodiments of this specification will be further described in detail below with reference to the accompanying drawings.
[0053] In this manual, the terms "first," "second," etc., are used to distinguish identical or similar items with essentially the same function. It should be understood that there is no logical or temporal dependency between "first," "second," and "nth," nor are there any restrictions on quantity or execution order.
[0054] Artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain better results.
[0055] Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence. Its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and learning by demonstration.
[0056] User segmentation: user groups are divided based on the transaction matrix.
[0057] Misaligned: This means that multiple objectives are unrelated and mutually exclusive.
[0058] Multi-objective learning: Network learning with multiple tasks as its objectives.
[0059] Mini Programs: Mini Programs are applications that can be used without downloading or installing them. They realize the dream of "applications at your fingertips," allowing users to open the application simply by scanning a QR code or searching for it. They also embody the "use and go" concept, freeing users from the worry of installing too many applications.
[0060] Private domain: A private domain is a carrier for accumulating private data (assets) on the internet. The data rights of this carrier are private, and it possesses the right to formulate user rules, subject to social laws and regulations; simultaneously, a private domain has the ability and mechanism to freely and extensively connect with public domains and other domains. In the embodiments described in this specification, mini-programs belong to the private domain.
[0061] Normalization: Mapping sequences of values with different ranges to the interval (0, 1) to facilitate data processing. In some cases, normalized values can be directly expressed as probabilities.
[0062] Dropout is a method for optimizing deep artificial neural networks. During the learning process, it reduces the interdependence between nodes by randomly setting some weights or outputs of the hidden layers to zero, thereby regularizing the neural network and reducing its structural risks. For example, in model training, given a vector (1, 2, 3, 4), after inputting this vector into a dropout layer, the dropout layer can randomly convert one of the numbers in the vector (1, 2, 3, 4) to 0. For example, converting 2 to 0 would change the vector to (1, 0, 3, 4).
[0063] Learning rate: Used to control the learning progress of the model. The learning rate guides the model in adjusting network weights using the gradient of the loss function during gradient descent. If the learning rate is too large, the loss function may directly skip the global optimum, resulting in excessive loss. If the learning rate is too small, the loss function changes very slowly, greatly increasing the convergence complexity of the network and making it easy to get trapped in local minima or saddle points.
[0064] Embedded coding, mathematically speaking, represents a correspondence, that is, mapping data in space X to space Y using a function F. This function F is injective, and the mapping result preserves the structure. An injective function means that the mapped data uniquely corresponds to the original data, and preserving the structure means that the order of the original data remains the same. For example, if there are data X1 and X2 before mapping, after mapping we get Y1 corresponding to X1 and Y2 corresponding to X2. If the original data X1 > X2, then correspondingly, the mapped data Y1 > Y2. For words, this means mapping words to another space to facilitate subsequent machine learning and processing.
[0065] Attention weights represent the importance of a piece of data during training or prediction. Importance indicates the magnitude of the influence of input data on output data. Data with high importance corresponds to higher attention weights, while data with low importance corresponds to lower attention weights. The importance of data varies in different scenarios, and training the model to assign attention weights is essentially the process of determining data importance.
[0066] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this manual are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, object information, object characteristics, and interactive behaviors involved in this manual were obtained with full authorization.
[0067] Figure 1 This is a schematic diagram illustrating the implementation environment of a training method for a recommendation model provided in the embodiments of this specification. See also... Figure 1 The implementation environment may include terminal 110 and server 140.
[0068] Terminal 110 is connected to server 140 via a wireless or wired network. Optionally, terminal 110 may be a smartphone, tablet, laptop, desktop computer, smartwatch, etc., but is not limited to these. Terminal 110 has applications installed and running that support recommendation model training and applications that support content item recommendation.
[0069] Server 140 is a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. Server 140 provides background services for applications running on terminal 110.
[0070] Those skilled in the art will understand that the number of terminals described above can be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or even more, in which case other terminals may also be included in the above implementation environment. This specification does not limit the number of terminals or the type of devices in the embodiments.
[0071] After introducing the implementation environment of the embodiments of this specification, the application scenarios of the embodiments of this specification will be described below in conjunction with the above implementation environment. In the following description, the terminal is also the terminal 110 in the above implementation environment, and the server is also the server 140 in the above implementation environment. The technical solutions provided by the embodiments of this specification can be applied in scenarios such as recommendation bubbles, pop-ups, or rich text in mini-programs, or in scenarios of recommending videos to users, or in scenarios of recommending audio to users.
[0072] Taking the technical solution provided in the embodiments of this specification as an example in the scenario of recommending bubble, pop-up, or rich text in a mini-program, the recommendation model extracts features from the sample recommendation information to obtain at least two recommendation features. The sample recommendation information includes the object features of the sample object to be recommended (bubble, pop-up, or rich text) and the content features of the bubble, pop-up, or rich text to be recommended. The object features reflect the behavioral characteristics of the sample object in the mini-program; the content features reflect the formal and content characteristics of the bubble, pop-up, or rich text. Using the recommendation model, based on the number of times the bubble, pop-up, or rich text is recommended within a target time period and the number of times at least two interactive behaviors corresponding to the at least two recommendation features are executed on the bubble, pop-up, or rich text, the adaptive weights of the at least two interactive behaviors are determined. The at least two interactive behaviors refer to the interactive behaviors that the object can perform with the bubble, pop-up, or rich text, such as adding to favorites, zooming in, closing, and forwarding. This recommendation model processes at least two labeled elements based on adaptive weights of at least two interactive behaviors to obtain at least two target labels. These labels describe whether the sample object has performed the interactive behavior corresponding to the recommendation feature in response to the pop-up, suggestion, or rich text. Based on these at least two recommendation features and at least two target labels, the recommendation model is trained so that it can recommend pop-ups, suggestion windows, or rich text to the target object based on the recommendation information.
[0073] In the process of recommending speech bubbles, pop-ups, or rich text to a target object using the trained recommendation model, target recommendation information is input into the model. This target recommendation information includes the object features of the target object to be recommended (speech bubble, pop-up, or rich text) and the content item features of the speech bubble, pop-up, or rich text to be recommended. The recommendation model extracts features from this target recommendation information, obtaining at least two recommendation features. Based on these at least two recommendation features, the model determines the probability that the target object will perform at least two interactive behaviors corresponding to each of the at least two recommendation features. Based on the probabilities of these at least two interactive behaviors, speech bubbles, pop-ups, or rich text are recommended to the target object.
[0074] It should be noted that the above description is based on the application of the technical solutions provided in the embodiments of this specification to the scenarios of recommendation bubbles, pop-ups, or rich text in mini programs. When the technical solutions provided in the embodiments of this specification are applied to the scenarios of recommending other types of content items, the implementation process belongs to the same inventive concept as described above, and will not be repeated here.
[0075] After introducing the implementation environment and application scenarios of the embodiments in this specification, the training method of the recommendation model provided in the embodiments of this specification will be described below. See [link to documentation]. Figure 2 Taking the server as the executing entity as an example, the method includes the following steps.
[0076] 202. The server extracts features from the sample recommendation information using a recommendation model to obtain at least two recommendation features. The sample recommendation information includes the object features of the sample object to be recommended and the content features of the sample content item to be recommended. The at least two recommendation features are used to determine the probability that the sample object will perform at least two interactive behaviors on the sample content item.
[0077] In this system, the recommendation model is used to recommend content items to objects. Sample recommendation information refers to the training samples used to train the model. Correspondingly, the sample object is the object to be recommended during model training, and the sample content item is the content item to be recommended during model training. The object features of the sample object reflect its behavioral characteristics, while the content item features reflect its formal and content characteristics. Recommendation features are abstract representations of the sample recommendation information. The number of recommendation features is determined based on the number of interaction behaviors; in some embodiments, the number of recommendation features is the same as the number of interaction behaviors. Interaction behaviors refer to the interactions between objects and content items. For example, when a content item is a pop-up in a mini-program, interaction behaviors include saving the content indicated by the pop-up, closing the pop-up, and not closing the pop-up.
[0078] 204. The server uses the recommendation model to determine the adaptive weights of the at least two interactive behaviors based on the number of times the sample content item is recommended within the target time period and the number of times the at least two interactive behaviors are performed on the sample content item.
[0079] The target time period is set by technical personnel according to the actual situation, such as any one of 1-7 days; this specification does not limit this. In some embodiments, the target time period is also referred to as a time window. The number of times the sample content item is recommended refers to the total number of times the sample content item is recommended to other objects within the target time period, also known as the number of times the sample content item is exposed within the target time period; the number of times the at least two interactive behaviors are performed on the sample content item refers to the total number of times other objects perform the at least two interactive behaviors on the sample content item within the target time period. When there are two types of at least two interactive behaviors, it includes the total number of times other objects perform the first interactive behavior on the sample content item within the target time period and the total number of times other objects perform the second interactive behavior on the sample content item within the target time period. Adaptive weight is used to represent the importance of interactive behaviors in content item recommendation; "adaptive" means that it can be determined based on the number of recommendations and the number of times the interactive behavior is performed.
[0080] 206. The server uses the recommendation model to process at least two labeled tags based on the adaptive weights of at least two interaction behaviors to obtain at least two target labels. These labeled tags are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item.
[0081] The annotations used during the training of the recommendation model reflect the actual situation where the sample object performs at least two interactive behaviors with the sample content item. When the at least two interactive behaviors are mutually exclusive or unrelated, the at least two annotations constitute misaligned labels. Mutually exclusive or unrelated means that the at least two interactive behaviors cannot be performed simultaneously or are not related. For example, if the content item is a favorites bubble in a mini-program, and there are two interactive behaviors, these could be clicking "favorite" and not clicking "close," or clicking "favorite" and "revisit the next day," etc.
[0082] 208. The server trains the recommendation model based on the at least two recommendation features and the at least two target labels.
[0083] The recommendation feature is used to determine the probability that a sample object will perform a corresponding interactive action on a sample content item. Based on the recommendation feature, it is possible to predict whether a sample object will perform a corresponding interactive action on a sample content item. The target label is obtained by processing the annotation label with adaptive weights, which can reflect the true situation of the sample object performing a corresponding interactive action on a sample content item. The recommendation model can be trained based on at least two recommendation features and at least two target labels. The purpose of training is to make the prediction result of the recommendation model based on at least two recommendation features close to the result indicated by at least two labels.
[0084] The technical solution provided in the embodiments of this specification extracts features from sample recommendation information using a recommendation model to obtain at least two recommendation features corresponding to at least two interaction behaviors. This sample recommendation information includes object features of the sample object to be recommended and content features of the sample content item to be recommended. The recommendation model determines adaptive weights for at least two interaction behaviors based on the number of times the sample content item is recommended within a target time period and the number of times the object recommending the sample content item performs at least two interaction behaviors on that sample content item. Based on these adaptive weights, the recommendation model processes at least two labeled tags to obtain at least two target tags. The recommendation model is trained based on these at least two recommendation features and at least two target tags. When recommending content items to a target object, the recommendation model determines the predicted result of the target object performing at least two interaction behaviors on the recommended content item. This predicted result reflects the target object's preference for the content item. Recommending content items based on this predicted result makes the recommendation more intelligent and accurate.
[0085] After introducing the training method of the recommendation model provided in the embodiments of this specification, the following describes the content item recommendation method provided in the embodiments of this specification. See [link to documentation]. Figure 3 Taking the server as the executing entity as an example, the method includes the following steps.
[0086] 302. The server inputs the target recommendation information into the recommendation model. This target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended.
[0087] The recommendation model is trained using the training method provided in steps 202-208 above. The target object is the target of content item recommendation, and the target content item is the content item to be recommended to the target object. The target recommendation information is the information input to the recommendation model when recommending content items. Similar to the sample objects mentioned above, the object features of the target object reflect its behavioral characteristics, especially those related to content items. Correspondingly, the content item features of the target content item reflect its formal and content characteristics.
[0088] 304. The server uses the recommendation model to extract features from the target recommendation information and obtains at least two recommendation features.
[0089] In this process, feature extraction of the target recommendation information is performed to abstract and represent the target recommendation information, making it easier for the recommendation model to make subsequent content item recommendations.
[0090] 306. The server uses the recommendation model to determine the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item, based on the at least two recommendation features.
[0091] Among them, the number of interaction behaviors is the same as the number of recommendation features. The recommendation model can determine the probability that the target object will perform an interaction behavior on the target content item based on a recommendation feature.
[0092] 308. The server recommends the target content item to the target object based on the probability of the at least two interaction behaviors.
[0093] The technical solution provided in the embodiments of this specification inputs target recommendation information into a recommendation model, which then extracts features from the target recommendation information to obtain at least two recommendation features. Based on these at least two recommendation features, the recommendation model determines the probability that a target object will perform at least two interactive behaviors on a target content item. Based on the probabilities of these at least two interactive behaviors, the target content item is recommended to the target object, making the content item recommendation process more intelligent and the recommendation results more accurate.
[0094] Steps 202-208 above are a brief introduction to the training method of the recommendation model provided in the embodiments of this specification. The following will describe the training method of the recommendation model provided in the embodiments of this specification more clearly with some examples. See [link to documentation]. Figure 4 Taking the server as the executing entity as an example, the method includes the following steps.
[0095] It should be noted that training the recommendation model provided in the embodiments of this specification requires multiple rounds of iterative training. Each round of iterative training belongs to the same inventive concept. For ease of explanation, the following description uses one round of iterative training of the recommendation model as an example.
[0096] 402. The server obtains sample recommendation information, which includes the object features of the sample objects to be recommended and the content features of the sample content items to be recommended.
[0097] In this system, the sample recommendation information consists of training samples used to train the recommendation model. Correspondingly, the sample object is the object to be recommended during model training, and the sample content item is the content item to be recommended during model training. The object features of the sample object reflect its behavioral characteristics, while the content item features reflect its formal and content characteristics. In some embodiments, the object features and content item features in the recommendation information are concatenated.
[0098] In one possible implementation, the server obtains the sample recommendation information from a sample dataset, which stores multiple sample recommendation information.
[0099] The sample dataset is generated based on the object features of multiple sample objects and the content features of multiple sample content items, representing the interaction behaviors between these sample objects and the sample content. In some embodiments, the object features of a sample object are obtained by feature extraction of the object information of the sample object, which includes the interaction behaviors performed by the sample object on different content items; the content features of a sample content item are obtained by feature extraction of the content information of the sample content item, which includes the display format and content of the sample content item.
[0100] In this implementation, the server can obtain the sample recommendation information from the sample dataset, and the efficiency of obtaining the sample recommendation information is relatively high.
[0101] 404. The server inputs the recommendation information of this sample into the recommendation model.
[0102] This recommendation model is used to recommend content items to an object. It can predict whether an object will perform at least two interactive behaviors on a content item, and recommends content items based on the predicted execution results of these at least two interactive behaviors. In other words, the recommendation model recommends content items based on predicted interactive behaviors, which can accurately reflect the object's preferences for content items, resulting in high accuracy in content item recommendations. Furthermore, since the recommendation model can predict whether an object will perform at least two interactive behaviors on a content item, training this model is a multi-objective (multi-task) learning process. In the embodiments of this specification, one objective (task) refers to one interactive behavior.
[0103] 406. The server extracts features from the sample recommendation information using a recommendation model to obtain at least two recommendation features. These at least two recommendation features are used to determine the probability that the sample object will perform at least two interactive behaviors on the sample content item.
[0104] The recommendation feature is used to determine the probability that a sample object will perform a corresponding interactive action on a sample content item. Based on this recommendation feature, it is possible to predict whether a sample object will perform the corresponding interactive action on a sample content item. The recommendation feature is an abstract expression of sample recommendation information. The number of recommendation features is determined based on the number of interactive actions; in some embodiments, the number of recommendation features is the same as the number of interactive actions. An interactive action refers to the interaction between an object and a content item. For example, when the content item is a pop-up in a mini-program, the interactive actions include saving the content indicated by the pop-up, closing the pop-up, and not closing the pop-up.
[0105] In one possible implementation, the server performs progressive feature extraction on the sample recommendation information through multiple feature extraction units and multiple feature fusion units of the recommendation model to obtain at least two recommendation features. The multiple feature extraction units include shared feature extraction units and exclusive feature extraction units. The shared feature extraction units are shared by the at least two interaction behaviors, and the exclusive feature extraction units are exclusively used by the corresponding interaction behaviors.
[0106] The system comprises two main components: a feature extraction unit for feature extraction and a feature fusion unit for feature fusion. Progressive feature extraction employs a hierarchical approach, allowing for the extraction of deeper features with stronger expressive power. In some embodiments, the feature extraction unit is also referred to as an expert unit, and the feature fusion unit, by determining weights, is also called a gate unit. A shared feature extraction unit is shared by at least two interaction behaviors; that is, when predicting at least two interaction behaviors, at least two recommended features corresponding to those behaviors can pass through this shared feature extraction unit, hence it is also called a shared expert unit. A unique feature extraction unit is exclusive to the corresponding interaction behavior; that is, a recommended feature can only pass through the unique feature extraction unit corresponding to that interaction behavior. Since the interaction behavior corresponds to a target (task), the unique feature extraction unit is exclusive to the corresponding target (task), hence it is also called a task-specific expert unit.
[0107] In this implementation, progressive feature extraction of sample recommendation information is performed through multiple feature extraction units and multiple feature fusion units of the recommendation model to obtain at least two recommendation features, and subsequent model training is carried out based on at least two recommendation features.
[0108] For example, the server extracts features from the sample recommendation information using at least two first unique feature extraction units of the recommendation model, obtaining at least two first unique recommendation features. The server also extracts features from the sample recommendation information using the first shared feature extraction unit of the recommendation model, obtaining first shared recommendation features. Finally, the server processes the at least two first unique recommendation features and the first shared recommendation features using the feature fusion unit and other feature extraction units of the recommendation model, obtaining the at least two recommendation features.
[0109] Specifically, the at least two first exclusive feature extraction units and the first shared feature extraction unit are feature extraction units located in the first layer when using progressive feature extraction. The number of the first exclusive feature extraction units is the same as the number of interactive behaviors, that is, the same as the number of targets (tasks). Correspondingly, the other feature extraction units are feature extraction units located in other layers when using progressive feature extraction.
[0110] To provide a clearer explanation of the embodiments described in the examples above, the embodiments described in the examples above will be explained in three parts below.
[0111] The first part involves the server extracting features from the sample recommendation information using at least two unique feature extraction units of the recommendation model, thereby obtaining at least two unique recommendation features.
[0112] In one possible implementation, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server extracts features from the sample recommendation information using the first unique feature extraction unit corresponding to the first interactive behavior to obtain the first unique recommendation feature corresponding to the first interactive behavior. Similarly, the server extracts features from the sample recommendation information using the first unique feature extraction unit corresponding to the second interactive behavior to obtain the first unique recommendation feature corresponding to the second interactive behavior.
[0113] The first unique feature extraction unit corresponding to the first interaction behavior and the first unique feature extraction unit corresponding to the second interaction behavior do not share parameters during training.
[0114] In this implementation, independent feature extraction can be achieved through the first dedicated feature extraction unit, thereby realizing separation based on interaction behavior in the feature extraction process. This helps to improve the accuracy of predicting different interaction behaviors, thereby improving the accuracy of content item recommendation.
[0115] For example, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server uses the first unique feature extraction unit corresponding to the first interactive behavior to perform at least one full connection on the sample recommendation information to obtain the first unique recommendation feature corresponding to the first interactive behavior. Similarly, the server uses the first unique feature extraction unit corresponding to the second interactive behavior to perform at least one full connection on the sample recommendation information to obtain the first unique recommendation feature corresponding to the second interactive behavior. In this case, the first unique feature extraction unit is a Multilayer Perceptron (MLP).
[0116] In some embodiments, the first unique feature extraction unit includes multiple unique feature extraction sub-units. These sub-units independently extract features from the input recommendation information, and the feature extraction results from each sub-unit are then fused to obtain the recommendation features extracted by the first unique feature extraction unit. For example, when the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, the server uses the multiple unique feature extraction sub-units in the first unique feature extraction unit corresponding to the first interaction behavior to perform multiple full connections on the sample recommendation information, obtaining multiple reference unique recommendation features. Each reference unique recommendation feature corresponds to one unique feature extraction sub-unit. The server then uses the first unique feature extraction unit corresponding to the first interaction behavior to perform a weighted fusion of these multiple reference unique recommendation features to obtain the first unique recommendation feature corresponding to the first interaction behavior. Similarly, the server uses the multiple unique feature extraction sub-units in the first unique feature extraction unit corresponding to the second interaction behavior to perform multiple full connections on the sample recommendation information, obtaining multiple reference unique recommendation features. Each reference unique recommendation feature corresponds to one unique feature extraction sub-unit. The server uses the first exclusive feature extraction unit corresponding to the second interaction behavior to perform weighted fusion of multiple reference exclusive recommendation features to obtain the first exclusive recommendation feature corresponding to the second interaction behavior.
[0117] In this context, the exclusive feature extraction subunit can be called an Expert, and the first exclusive feature extraction unit can be called an Expert.
[0118] The second part involves the server extracting features from the sample recommendation information using the first shared feature extraction unit of the recommendation model, thereby obtaining the first shared recommendation features.
[0119] In one possible implementation, the server uses the first shared feature extraction unit to perform at least one full connection on the sample recommendation information to obtain the first shared recommendation feature.
[0120] The first shared feature extraction unit is independent of the interaction behavior; regardless of the number of interaction behaviors, it can extract the first shared recommendation features from the sample recommendation information in a single step. This first shared feature extraction unit updates its parameters independently during the training of the recommendation model.
[0121] In this implementation, the first shared recommendation features can be obtained by performing a full connection on the sample objects through the first shared feature extraction unit, which is highly efficient.
[0122] In some embodiments, the first shared feature extraction unit includes multiple shared feature extraction subunits. These subunits independently extract features from the input recommendation information, and the feature extraction results from each subunit are then fused to obtain the recommendation features extracted by the first shared feature extraction unit. For example, the server uses the multiple shared feature extraction subunits within this first shared feature extraction unit to perform multiple fully connected operations on the sample recommendation information, obtaining multiple reference shared recommendation features. Each reference shared recommendation feature corresponds to one shared feature extraction subunit. The server then uses the first shared feature extraction unit to perform a weighted fusion of these multiple reference shared recommendation features to obtain the first shared recommendation feature.
[0123] Part Three: The server processes the at least two first unique recommendation features and the first shared recommendation features through the feature fusion unit and other feature extraction units of the recommendation model to obtain the at least two recommendation features.
[0124] In one possible implementation, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server uses the first feature fusion unit of the recommendation model to fuse the first unique recommendation feature and the first shared recommendation feature of the first interactive behavior to obtain a first fused recommendation feature, wherein the first interactive behavior and the second interactive behavior are unrelated. The server uses the second feature fusion unit of the recommendation model to fuse the first unique recommendation feature and the first shared recommendation feature of the second interactive behavior to obtain a second fused recommendation feature. The server uses the third feature fusion unit of the recommendation model to fuse the first unique recommendation feature of the first interactive behavior, the first unique recommendation feature of the second interactive behavior, and the first shared recommendation feature to obtain a third fused recommendation feature. The server uses other feature extraction units and other feature fusion units of the recommendation model to process the first fused recommendation feature, the second fused recommendation feature, and the third fused recommendation feature to obtain the recommendation features corresponding to the first interactive behavior and the recommendation features corresponding to the second interactive behavior.
[0125] Among them, the first feature fusion unit, the second feature fusion unit, and the third feature fusion unit are all feature fusion units located in the first layer when using progressive feature extraction.
[0126] In this implementation, the first unique recommendation feature and the first shared recommendation feature are processed by the feature fusion unit and other feature extraction units to obtain recommendation features for recommendation, and the recommendation features have strong expressive power.
[0127] To provide a clearer explanation of the above embodiments, the following description will be divided into several parts.
[0128] A. When the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server uses the first feature fusion unit of the recommendation model to fuse the first unique recommendation feature of the first interactive behavior and the first shared recommendation feature to obtain a first fused recommendation feature.
[0129] In one possible implementation, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server inputs the first unique recommendation feature and the first shared recommendation feature of the first interactive behavior into the first feature fusion unit. The server uses the first feature fusion unit to perform full connection and normalization on the first unique recommendation feature and the first shared recommendation feature of the first interactive behavior, respectively, to obtain a first fusion weight and a second fusion weight. The server then uses the first feature fusion unit to perform a weighted fusion of the first unique recommendation feature and the first shared recommendation feature of the first interactive behavior using the first fusion weight and the second fusion weight to obtain the first fused recommendation feature.
[0130] Normalization refers to using the SoftMax function as the activation function for processing.
[0131] In this implementation, the fusion weight can be determined by the feature fusion unit, and the exclusive recommendation features and shared recommendation features can be fused based on the fusion weight to obtain the first fused recommendation feature. The first fused recommendation feature carries the information extracted by the exclusive feature extraction unit and the shared feature extraction unit, and the first fused recommendation feature has strong expressive power.
[0132] B. The server uses the second feature fusion unit of the recommendation model to fuse the first unique recommendation feature and the first shared recommendation feature of the second interaction behavior to obtain the second fused recommendation feature.
[0133] In one possible implementation, the server inputs the first unique recommendation feature and the first shared recommendation feature of the second interaction behavior into the second feature fusion unit. The server uses the second feature fusion unit to perform full connection and normalization on the first unique recommendation feature and the first shared recommendation feature of the second interaction behavior, respectively, to obtain a first fusion weight and a second fusion weight. The server then uses the second feature fusion unit to perform a weighted fusion of the first unique recommendation feature and the first shared recommendation feature of the second interaction behavior using the first fusion weight and the second fusion weight, to obtain the second fused recommendation feature.
[0134] C. The server uses the third feature fusion unit of the recommendation model to fuse the first unique recommendation feature of the first interaction behavior, the first unique recommendation feature of the second interaction behavior, and the first shared recommendation feature to obtain the third fused recommendation feature.
[0135] In one possible implementation, the server inputs the first unique recommendation feature of the first interaction behavior, the first unique recommendation feature of the second interaction behavior, and the first shared recommendation feature into the third feature fusion unit. The server uses the third feature fusion unit to perform full connection and normalization on the first unique recommendation feature of the first interaction behavior, the first unique recommendation feature of the second interaction behavior, and the first shared recommendation feature, respectively, to obtain a first fusion weight, a second fusion weight, and a third fusion weight. The server then uses the third feature fusion unit to perform a weighted fusion of the first unique recommendation feature of the first interaction behavior, the first unique recommendation feature of the second interaction behavior, and the first shared recommendation feature using the first fusion weight, the second fusion weight, and the third fusion weight, to obtain the third fused recommendation feature.
[0136] D. The server processes the first fused recommendation feature, the second fused recommendation feature, and the third fused recommendation feature through other feature extraction units and other feature fusion units of the recommendation model to obtain the recommendation features corresponding to the first interaction behavior and the recommendation features corresponding to the second interaction behavior.
[0137] Among them, other feature extraction units and other feature fusion units are feature extraction units and feature fusion units located in other layers when progressive feature extraction is used.
[0138] In one possible implementation, the server extracts features from the first fused feature using the second unique feature extraction unit corresponding to the first interaction behavior, obtaining a second unique recommendation feature corresponding to the first interaction behavior. The server then extracts features from the second fused feature using the second unique feature extraction unit corresponding to the second interaction behavior, obtaining a second unique recommendation feature corresponding to the second interaction behavior. The server then extracts features from the third fused recommendation feature using the second shared feature extraction unit of the recommendation model, obtaining a second shared recommendation feature. The server then fuses the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior using the fourth feature fusion unit of the recommendation model, obtaining a recommendation feature corresponding to the first interaction behavior. Finally, the server fuses the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior using the fifth feature fusion unit of the recommendation model, obtaining a recommendation feature corresponding to the second interaction behavior.
[0139] For example, the server uses the second unique feature extraction unit corresponding to the first interaction behavior to perform at least one full connection on the first fused feature to obtain the second unique recommendation feature corresponding to the first interaction behavior. The server uses the second unique feature extraction unit corresponding to the second interaction behavior to perform at least one full connection on the second fused feature to obtain the second unique recommendation feature corresponding to the second interaction behavior. The server uses the second shared feature extraction unit of the recommendation model to perform at least one full connection on the third fused recommendation feature to obtain the second shared recommendation feature. The server inputs the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior into the fourth feature fusion unit. The fourth feature fusion unit performs full connections and normalization on the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior, respectively, to obtain the first fusion weight and the second fusion weight. The server uses the fourth feature fusion unit to perform a weighted fusion of the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior using the first fusion weight and the second fusion weight to obtain the recommendation feature corresponding to the first interaction behavior. The server inputs the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior into the fifth feature fusion unit. The fifth feature fusion unit performs full connection and normalization on the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior, respectively, to obtain a first fusion weight and a second fusion weight. The server then uses the fifth feature fusion unit to perform a weighted fusion of the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior using the first fusion weight and the second fusion weight, to obtain the recommendation feature corresponding to the second interaction behavior.
[0140] It should be noted that the above description uses a two-layer progressive feature extraction as an example. In other possible implementations, a multi-layer progressive feature extraction method can also be used for feature extraction. This specification does not limit the embodiments in this way.
[0141] 408. The server uses the recommendation model to determine the adaptive weights of the at least two interactive behaviors based on the number of times the sample content item is recommended within the target time period and the number of times the at least two interactive behaviors are performed on the sample content item.
[0142] The target time period is set by technical personnel according to the actual situation, such as any one of 1-7 days; this specification does not limit this. In some embodiments, the target time period is also referred to as a time window. The number of times the sample content item is recommended refers to the total number of times the sample content item is recommended to other objects within the target time period, also known as the number of times the sample content item is exposed within the target time period; the number of times the at least two interactive behaviors are performed on the sample content item refers to the total number of times other objects perform the at least two interactive behaviors on the sample content item within the target time period. When there are two types of at least two interactive behaviors, it includes the total number of times other objects perform the first interactive behavior on the sample content item within the target time period and the total number of times other objects perform the second interactive behavior on the sample content item within the target time period. Adaptive weight is used to represent the importance of interactive behaviors in content item recommendation; "adaptive" means that it can be determined based on the number of recommendations and the number of times the interactive behavior is performed.
[0143] In one possible implementation, the server uses the adaptive weight determination unit of the recommendation model to accumulate the interaction parameters of the at least two interaction behaviors in multiple sub-time periods of the target time period to obtain the adaptive weight of the at least two interaction behaviors. The interaction parameter of any interaction behavior in any sub-time period is the ratio of the number of times the interaction behavior is performed on the sample content item in the sub-time period to the number of times the sample content item is recommended in the sub-time period.
[0144] In this implementation, the server can determine adaptive weights through an adaptive weight determination unit, thereby improving the training effect of the recommendation model based on the adaptive weights.
[0145] For example, the server determines the adaptive weights using the adaptive weight determination unit of the recommendation model using the following formula (1).
[0146]
[0147] Where, m t For adaptive weights, which are also the identifiers of the target (task), N is the target time period, which is also the time window, TIP is the number of interaction behaviors, which is also the number of targets (tasks), n is the sub-time period, tip is the identifier of the interaction behavior, and col n,tip The number of times the interactive action tip is executed within the nth sub-time period, expo n,tip This represents the number of times an interactive tip is recommended within the nth sub-time period.
[0148] 410. The server uses the recommendation model to process at least two labeled tags based on the adaptive weights of at least two interaction behaviors to obtain at least two target tags. These labeled tags are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item.
[0149] The annotations used during the training of the recommendation model reflect the actual situation of the sample object performing at least two interactive behaviors on the sample content item. When the at least two interactive behaviors are mutually exclusive or unrelated, the at least two annotations constitute misaligned labels. Mutually exclusive or unrelated means that the at least two interactive behaviors cannot be performed simultaneously or are not related. For example, in a mini-program's "favorite" bubble, if there are two interactive behaviors—clicking "favorite" and not clicking "close"—or clicking "favorite" and "revisit the next day," etc.—the target label is obtained by processing the annotations with adaptive weights and reflects the actual situation of the sample object performing the corresponding interactive behavior on the sample content item.
[0150] In one possible implementation, the server uses the recommendation model to multiply the adaptive weights of the at least two interaction behaviors by the corresponding at least two labeled tags to obtain the at least two target tags.
[0151] For example, the server uses the following formula (2) to obtain the target label through the recommendation model.
[0152] MAB(label t ) = m t y t (2)
[0153] Among them, MAB(label) t ) is the target label, y t For labeling.
[0154] 412. Based on the at least two recommendation features, the server determines at least two prediction labels, which are used to indicate whether the sample object will perform the interactive behavior corresponding to the recommendation feature on the sample content item.
[0155] In one possible implementation, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server performs a fully connected and normalized operation on the recommendation features corresponding to the first interactive behavior to obtain a first probability, which is the probability that the sample object will perform the first interactive behavior on the sample content item. The server performs a fully connected and normalized operation on the recommendation features corresponding to the second interactive behavior to obtain a second probability, which is the probability that the sample object will perform the second interactive behavior on the sample content item. Based on the first probability and the second probability, the server determines the predicted label for the first interactive behavior and the predicted label for the second interactive behavior.
[0156] In this implementation, the server can determine the predicted label through recommendation features. The predicted label is the prediction by the recommendation model of whether the sample object will perform the interaction behavior corresponding to the recommendation feature for the sample content item.
[0157] For example, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server performs a full connection and normalization on the recommendation features corresponding to the first interactive behavior to obtain a first probability, which is the probability that the sample object will perform the first interactive behavior on the sample content item. The server performs a full connection and normalization on the recommendation features corresponding to the second interactive behavior to obtain a second probability, which is the probability that the sample object will perform the second interactive behavior on the sample content item. If the first probability is greater than or equal to a first probability threshold, the server determines that the predicted label for the first interactive behavior is to perform the first interactive behavior; if the first probability is less than the first probability threshold, the server determines that the predicted label for the first interactive behavior is not to perform the first interactive behavior. If the second probability is greater than or equal to a second probability threshold, the server determines that the predicted label for the second interactive behavior is to perform the second interactive behavior; if the second probability is less than the second probability threshold, the server determines that the predicted label for the second interactive behavior is not to perform the second interactive behavior. The first probability threshold and the second probability threshold are set by those skilled in the art according to actual conditions, and this embodiment does not limit their settings. In some embodiments, performing an interactive action can be marked as 1, and not performing an interactive action can be marked as 0.
[0158] 414. The server trains the recommendation model based on the difference information between the at least two predicted labels and the at least two target labels.
[0159] The purpose of training is to make the predicted labels obtained by the recommendation model based on at least two recommendation features close to at least two labels.
[0160] In one possible implementation, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server constructs a first loss function corresponding to the first interactive behavior based on a first difference information between the predicted label and the target label of the first interactive behavior. The server constructs a second loss function corresponding to the second interactive behavior based on a second difference information between the predicted label and the target label of the second interactive behavior. The server uses first behavior weights and second behavior weights to weightedly fuse the first loss function and the second loss function to obtain a target loss function, where the first behavior weights are the behavior weights corresponding to the first interactive behavior, and the second behavior weights are the behavior weights corresponding to the second interactive behavior. The server uses this target loss function to train the recommendation model.
[0161] The server uses the objective loss function to train the recommendation model, which means using the objective loss function and gradient descent to update the model parameters of the recommendation model.
[0162] The following example uses the at least two interactive behaviors, including the first interactive behavior and the second interactive behavior, to illustrate the target loss function provided in the embodiments of this specification through formula (3).
[0163]
[0164] in, Let c1 be the target loss function, and c1 be the weights in the first row. c1 represents the first loss function, and c2 represents the second row of weights. The second loss function is used, and both the first and second loss functions are cross-entropy loss functions. k =c k,0 ·γ k c k and γ k These are all hyperparameters and can be updated dynamically.
[0165] The following will combine Figure 5 The above steps 404-414 will be explained. Figure 5 This is a schematic diagram of the recommendation model provided in the embodiments of this specification. Taking the number of interactive behaviors as the first interactive behavior and the second interactive behavior as an example, see [link to documentation]. Figure 5The server inputs sample recommendation information into the recommendation model. The first unique feature extraction unit (ExpertsA1), the second unique feature extraction unit (ExpertsB1), and the first shared feature extraction unit (ExpertsShared1) of the recommendation model extract features from the sample recommendation information, obtaining the first unique recommendation feature corresponding to the first interaction behavior, the first unique recommendation feature corresponding to the second interaction behavior, and the shared recommendation feature. The server then uses the first feature fusion unit 501 of the recommendation model to fuse the first unique recommendation feature and the shared recommendation feature corresponding to the first interaction behavior, obtaining the first fused recommendation feature. The server then uses the second feature fusion unit 502 of the recommendation model to fuse the first unique recommendation feature and the shared recommendation feature corresponding to the second interaction behavior, obtaining the second fused recommendation feature. Finally, the server uses the third feature fusion unit 503 of the recommendation model to fuse the first unique recommendation feature of the first interaction behavior, the first unique recommendation feature of the second interaction behavior, and the first shared recommendation feature, obtaining the third fused recommendation feature. The server extracts features from the first fused feature using the second unique feature extraction unit (Experts A2) corresponding to the first interaction behavior, obtaining the second unique recommendation feature corresponding to the first interaction behavior. The server then extracts features from the second fused feature using the second unique feature extraction unit (Experts B2) corresponding to the second interaction behavior, obtaining the second unique recommendation feature corresponding to the second interaction behavior. The server extracts features from the third fused recommendation feature using the second shared feature extraction unit (Experts Shared2) of the recommendation model, obtaining the second shared recommendation feature. The server then fuses the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior using the fourth feature fusion unit 504 of the recommendation model, obtaining the recommendation feature corresponding to the first interaction behavior. Finally, the server fuses the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior using the fifth feature fusion unit 505 of the recommendation model, obtaining the recommendation feature corresponding to the second interaction behavior. The server uses the adaptive weight determination unit (Adaptive-label) of the recommendation model to accumulate the interaction parameters of the first and second interactions across multiple sub-time periods within the target time period, obtaining adaptive weights for the first and second interactions. The server then uses the recommendation model to multiply these adaptive weights with their corresponding two labeled tags to obtain the two target labels. Finally, the server uses the first classifier (Tower A) of the recommendation model to process the recommendation features corresponding to the first interaction, obtaining the predicted label for that first interaction.The server processes the recommendation features corresponding to the second interaction behavior using the second classifier (Tower B) of the recommendation model to obtain the predicted label for the second interaction behavior. The server then trains the recommendation model based on the first difference information between the predicted label of the first interaction behavior and the target label, and the second difference information between the predicted label of the second interaction behavior and the target label.
[0166] It should be noted that the above description is based on the example of the server as the execution subject. In other possible implementations, the terminal can also be used as the execution subject to execute the training method of the above-mentioned recommendation model. This specification does not limit this embodiment.
[0167] All the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this specification, and will not be described in detail here.
[0168] The technical solution provided in the embodiments of this specification extracts features from sample recommendation information using a recommendation model to obtain at least two recommendation features corresponding to at least two interaction behaviors. This sample recommendation information includes object features of the sample object to be recommended and content features of the sample content item to be recommended. The recommendation model determines adaptive weights for at least two interaction behaviors based on the number of times the sample content item is recommended within a target time period and the number of times the object recommending the sample content item performs at least two interaction behaviors on that sample content item. Based on these adaptive weights, the recommendation model processes at least two labeled tags to obtain at least two target tags. The recommendation model is trained based on these at least two recommendation features and at least two target tags. When recommending content items to a target object, the recommendation model determines the predicted result of the target object performing at least two interaction behaviors on the recommended content item. This predicted result reflects the target object's preference for the content item. Recommending content items based on this predicted result makes the recommendation more intelligent and accurate.
[0169] Steps 302-308 above are a brief introduction to the method for recommending content items provided in the embodiments of this specification. The following will illustrate the method for recommending content items provided in the embodiments of this specification more clearly with some examples. See [link to documentation]. Figure 6 The method includes the following steps.
[0170] 602. The server inputs the target recommendation information into the recommendation model. This target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended.
[0171] The recommendation model is trained using the training method provided in steps 402-414 above. The target object is the target of content item recommendation, and the target content item is the content item to be recommended to the target object. The target recommendation information is the information input to the recommendation model when recommending content items. Similar to the sample objects mentioned above, the object features of the target object reflect its behavioral characteristics, especially those related to content items. Correspondingly, the content item features of the target content item reflect its formal and content characteristics.
[0172] In some embodiments, the target object is an object at a certain level based on a transaction matrix. This specification does not limit the transaction matrix or the division method.
[0173] 604. The server uses this recommendation model to extract features from the target recommendation information, obtaining at least two recommendation features.
[0174] The feature extraction of the target recommendation information is for the purpose of abstracting and representing the target recommendation information, which facilitates the subsequent content item recommendation by the recommendation model. The process of feature extraction of the target recommendation information by the recommendation model belongs to the same inventive concept as step 406 above, and the implementation process is described in the relevant description of step 406 above, and will not be repeated here.
[0175] 606. The server uses the recommendation model to determine the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item, based on the at least two recommendation features.
[0176] The number of interaction behaviors is the same as the number of recommendation features. Based on a single recommendation feature, the recommendation model can determine the probability that a target object will perform an interaction behavior with a target content item. These at least two interaction behaviors are unrelated or mutually exclusive. The process of determining the probability of these at least two interaction behaviors through the recommendation model belongs to the same inventive concept as step 412 above, and the implementation process is described in the relevant section of step 412 above, and will not be repeated here.
[0177] 608. The server recommends the target content item to the target object based on the probability of the at least two interaction behaviors.
[0178] In one possible implementation, the server determines at least two behavior tags based on the probabilities of the at least two interaction behaviors. These behavior tags indicate whether the target object will perform the interaction behavior corresponding to the recommended feature for the target content item. The server then recommends the target content item to the target object based on these at least two behavior tags.
[0179] In this implementation, the server recommends the target content item to the target object based on whether the target object will perform interactive behavior based on the recommendation feature, resulting in high recommendation accuracy.
[0180] For example, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, the server performs a full connection and normalization on the recommendation features corresponding to the first interactive behavior to obtain a first probability, which is the probability that the target object will perform the first interactive behavior on the target content item. The server performs a full connection and normalization on the recommendation features corresponding to the second interactive behavior to obtain a second probability, which is the probability that the target object will perform the second interactive behavior on the target content item. Based on the first probability and the second probability, the server determines the behavior label for the first interactive behavior and the behavior label for the second interactive behavior. If the execution of the interactive behavior indicated by the behavior labels for the first and second interactive behaviors meets the target execution conditions, the server recommends the target content item to the target object; if the execution of the interactive behavior indicated by the behavior labels for the first and second interactive behaviors does not meet the target execution conditions, the server does not recommend the target content item to the target object. The target execution conditions are set by technical personnel according to actual conditions, such as setting the first behavior to be executed and the second interactive behavior not to be executed, etc., and this embodiment does not limit this.
[0181] It should be noted that the above description is based on the example of the server as the executing entity. In other possible implementations, the recommended method for executing the above content items can also be performed by the terminal as the executing entity. This specification does not limit this embodiment.
[0182] All the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this specification, and will not be described in detail here.
[0183] The technical solution provided in the embodiments of this specification inputs target recommendation information into a recommendation model, which then extracts features from the target recommendation information to obtain at least two recommendation features. Based on these at least two recommendation features, the recommendation model determines the probability that a target object will perform at least two interactive behaviors on a target content item. Based on the probabilities of these at least two interactive behaviors, the target content item is recommended to the target object, making the content item recommendation process more intelligent and the recommendation results more accurate.
[0184] Figure 7 This is a schematic diagram of the structure of a training device for a recommendation model provided in an embodiment of this specification. See also... Figure 7 The device includes: a first feature extraction module 701, an adaptive weight determination module 702, a label processing module 703, and a training module 704.
[0185] The first feature extraction module 701 is used to extract features from the sample recommendation information through a recommendation model to obtain at least two recommendation features. The sample recommendation information includes the object features of the sample object to be recommended and the content features of the sample content item to be recommended. The at least two recommendation features are used to determine the probability that the sample object will perform at least two interactive behaviors on the sample content item.
[0186] The adaptive weight determination module 702 is used to determine the adaptive weights of the at least two interactive behaviors based on the number of times the sample content item is recommended within the target time period and the number of times the at least two interactive behaviors are performed on the sample content item through the recommendation model.
[0187] The label processing module 703 is used to process at least two labeled tags based on the adaptive weights of the at least two interaction behaviors through the recommendation model to obtain at least two target labels. The labeled tags are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item.
[0188] Training module 704 is used to train the recommendation model based on the at least two recommendation features and the at least two target labels.
[0189] In one possible implementation, the first feature extraction module 701 is used to progressively extract features from the sample recommendation information through multiple feature extraction units and multiple feature fusion units of the recommendation model to obtain at least two recommendation features. The multiple feature extraction units include a shared feature extraction unit and a unique feature extraction unit. The shared feature extraction unit is shared by the at least two interaction behaviors, and the unique feature extraction unit is uniquely used by the corresponding interaction behavior.
[0190] In one possible implementation, the first feature extraction module 701 is used to extract features from the sample recommendation information using at least two first unique feature extraction units of the recommendation model, respectively, to obtain at least two first unique recommendation features. It also extracts features from the sample recommendation information using the first shared feature extraction unit of the recommendation model, to obtain first shared recommendation features. Finally, it processes the at least two first unique recommendation features and the first shared recommendation features using the feature fusion unit of the recommendation model and other feature extraction units, to obtain the at least two recommendation features.
[0191] In one possible implementation, the first feature extraction module 701 is used to, when the at least two interactive behaviors include a first interactive behavior and a second interactive behavior, fuse the first unique recommendation feature and the first shared recommendation feature of the first interactive behavior through the first feature fusion unit of the recommendation model to obtain a first fused recommendation feature, wherein the first interactive behavior and the second interactive behavior are unrelated. Then, the first unique recommendation feature and the first shared recommendation feature of the second interactive behavior are fused through the second feature fusion unit of the recommendation model to obtain a second fused recommendation feature. Finally, the first unique recommendation feature, the first unique recommendation feature of the second interactive behavior, and the first shared recommendation feature are fused through the third feature fusion unit of the recommendation model to obtain a third fused recommendation feature. The first fused recommendation feature, the second fused recommendation feature, and the third fused recommendation feature are then processed by other feature extraction units and other feature fusion units of the recommendation model to obtain recommendation features corresponding to the first interactive behavior and recommendation features corresponding to the second interactive behavior.
[0192] In one possible implementation, the first feature extraction module 701 is used to extract features from the first fused feature through the second unique feature extraction unit corresponding to the first interaction behavior to obtain the second unique recommendation feature corresponding to the first interaction behavior. Then, through the second unique feature extraction unit corresponding to the second interaction behavior, it extracts features from the second fused feature to obtain the second unique recommendation feature corresponding to the second interaction behavior. Next, through the second shared feature extraction unit of the recommendation model, it extracts features from the third fused recommendation feature to obtain the second shared recommendation feature. Finally, through the fourth feature fusion unit of the recommendation model, it fuses the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior to obtain the recommendation feature corresponding to the first interaction behavior. Finally, through the fifth feature fusion unit of the recommendation model, it fuses the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior to obtain the recommendation feature corresponding to the second interaction behavior.
[0193] In one possible implementation, the first feature extraction module 701 is used to input the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior into the first feature fusion unit. The first feature fusion unit performs fully connected operations and normalization on the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior, respectively, to obtain a first fusion weight and a second fusion weight. The first feature fusion unit then uses the first fusion weight and the second fusion weight to perform a weighted fusion of the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior to obtain the first fused recommendation feature.
[0194] In one possible implementation, the adaptive weight determination module 702 is used to accumulate the interaction parameters of the at least two interaction behaviors in multiple sub-time periods of the target time period through the adaptive weight determination unit of the recommendation model to obtain the adaptive weight of the at least two interaction behaviors. The interaction parameter of any interaction behavior in any sub-time period is the ratio of the number of times the interaction behavior is performed on the sample content item in the sub-time period to the number of times the sample content item is recommended in the sub-time period.
[0195] In one possible implementation, the label processing module 703 is used to multiply the adaptive weights of the at least two interaction behaviors with the corresponding at least two labeled labels through the recommendation model to obtain the at least two target labels.
[0196] In one possible implementation, the training module 704 is used to determine at least two predicted labels based on the at least two recommendation features. These predicted labels indicate whether the sample object will perform the interaction behavior corresponding to the recommendation feature on the sample content item. The recommendation model is then trained based on the difference information between the at least two predicted labels and the at least two target labels.
[0197] In one possible implementation, the training module 704 is configured to, when the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, perform a fully connected and normalized connection on the recommendation features corresponding to the first interaction behavior to obtain a first probability, which is the probability that the sample object performs the first interaction behavior on the sample content item. It then performs a fully connected and normalized connection on the recommendation features corresponding to the second interaction behavior to obtain a second probability, which is the probability that the sample object performs the second interaction behavior on the sample content item. Based on the first and second probabilities, it determines the predicted label for the first interaction behavior and the predicted label for the second interaction behavior.
[0198] In one possible implementation, the training module 704 is configured to, when the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, construct a first loss function corresponding to the first interaction behavior based on first difference information between the predicted label and the target label of the first interaction behavior. Based on second difference information between the predicted label and the target label of the second interaction behavior, a second loss function corresponding to the second interaction behavior is constructed. The first loss function and the second loss function are weighted and fused using first behavior weights and second behavior weights to obtain a target loss function, where the first behavior weights are the behavior weights corresponding to the first interaction behavior, and the second behavior weights are the behavior weights corresponding to the second interaction behavior. The recommendation model is then trained using this target loss function.
[0199] It should be noted that the training device for the recommendation model provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the training device for the recommendation model and the training method embodiment of the recommendation model provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiment, which will not be repeated here.
[0200] The technical solution provided in the embodiments of this specification extracts features from sample recommendation information using a recommendation model to obtain at least two recommendation features corresponding to at least two interaction behaviors. This sample recommendation information includes object features of the sample object to be recommended and content features of the sample content item to be recommended. The recommendation model determines adaptive weights for at least two interaction behaviors based on the number of times the sample content item is recommended within a target time period and the number of times the object recommending the sample content item performs at least two interaction behaviors on that sample content item. Based on these adaptive weights, the recommendation model processes at least two labeled tags to obtain at least two target tags. The recommendation model is trained based on these at least two recommendation features and at least two target tags. When recommending content items to a target object, the recommendation model determines the predicted result of the target object performing at least two interaction behaviors on the recommended content item. This predicted result reflects the target object's preference for the content item. Recommending content items based on this predicted result makes the recommendation more intelligent and accurate.
[0201] Figure 8 This is a schematic diagram of the structure of a content item recommendation device provided in the embodiments of this specification. See also: Figure 8 The device includes: an input module 801, a second feature extraction module 802, a probability determination module 803, and a recommendation module 804.
[0202] The input module 801 is used to input the target recommendation information into the recommendation model. The target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended.
[0203] The second feature extraction module 802 is used to extract features from the target recommendation information through the recommendation model to obtain at least two recommendation features.
[0204] The probability determination module 803 is used to determine, based on the at least two recommendation features, the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item.
[0205] Recommendation module 804 is used to recommend the target content item to the target object based on the probability of the at least two interaction behaviors.
[0206] The recommendation model is trained using the training device described above.
[0207] It should be noted that the content item recommendation device provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the computer device can be divided into different functional modules to complete all or part of the functions described above. In addition, the recommendation model training device and the recommendation model training method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0208] The technical solution provided in the embodiments of this specification inputs target recommendation information into a recommendation model, which then extracts features from the target recommendation information to obtain at least two recommendation features. Based on these at least two recommendation features, the recommendation model determines the probability that a target object will perform at least two interactive behaviors on a target content item. Based on the probabilities of these at least two interactive behaviors, the target content item is recommended to the target object, making the content item recommendation process more intelligent and the recommendation results more accurate.
[0209] This specification provides a computer device for performing the above-described method. This computer device can be implemented as a terminal or a server. The structure of a terminal will be described below:
[0210] Figure 9 This is a schematic diagram of the structure of a terminal provided in an embodiment of this specification. The terminal 900 can be a smartphone, tablet computer, laptop computer, or desktop computer. The terminal 900 may also be referred to as user equipment, portable terminal, laptop terminal, desktop terminal, or other names.
[0211] Typically, terminal 900 includes one or more processors 901 and one or more memories 902.
[0212] Processor 901 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 901 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 901 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 901 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 901 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0213] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 902 are used to store at least one computer program, which is executed by the processor 901 to implement the training method of the recommended model or the recommendation method of the content items provided in the method embodiments of this specification.
[0214] In some embodiments, the terminal 900 may also optionally include a peripheral device interface 903 and at least one peripheral device. The processor 901, memory 902, and peripheral device interface 903 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 903 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 904, a display screen 905, a camera assembly 906, an audio circuit 907, and a power supply 908.
[0215] Peripheral device interface 903 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 901 and memory 902. In some embodiments, processor 901, memory 902 and peripheral device interface 903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 901, memory 902 and peripheral device interface 903 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0216] The radio frequency (RF) circuit 904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 904 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 904 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc.
[0217] Display screen 905 is used to display a user interface (UI). This UI may include graphics, text, icons, video, and any combination thereof. When display screen 905 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 901 for processing. In this case, display screen 905 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard.
[0218] The camera assembly 906 is used to capture images or videos. Optionally, the camera assembly 906 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the terminal, and the rear-facing camera is located on the back of the terminal.
[0219] The audio circuit 907 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals that are input to the processor 901 for processing, or input to the radio frequency circuit 904 to realize voice communication.
[0220] The power supply 908 is used to supply power to the various components in the terminal 900. The power supply 908 can be AC power, DC power, a disposable battery, or a rechargeable battery.
[0221] In some embodiments, the terminal 900 further includes one or more sensors 909. The one or more sensors 909 include, but are not limited to, an accelerometer 910, a gyroscope 911, a pressure sensor 912, an optical sensor 913, and a proximity sensor 914.
[0222] Accelerometer 910 can detect the magnitude of acceleration on the three coordinate axes of a coordinate system established with terminal 900.
[0223] The gyroscope sensor 911 can detect the orientation and rotation angle of the terminal 900. The gyroscope sensor 911 can work in conjunction with the accelerometer sensor 910 to collect the user's 3D movements on the terminal 900.
[0224] The pressure sensor 912 can be installed on the side bezel of the terminal 900 and / or on the lower layer of the display screen 905. When the pressure sensor 912 is installed on the side bezel of the terminal 900, it can detect the user's grip signal on the terminal 900, and the processor 901 can perform left / right hand recognition or quick operation based on the grip signal collected by the pressure sensor 912. When the pressure sensor 912 is installed on the lower layer of the display screen 905, the processor 901 can control the operable controls on the UI interface based on the user's pressure operation on the display screen 905.
[0225] An optical sensor 913 is used to collect ambient light intensity. In one embodiment, a processor 901 can control the display brightness of a display screen 905 based on the ambient light intensity collected by the optical sensor 913.
[0226] The proximity sensor 914 is used to detect the distance between the user and the front of the terminal 900.
[0227] Those skilled in the art will understand that Figure 9 The structure shown does not constitute a limitation on terminal 900, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0228] The aforementioned computer equipment can also be implemented as a server. The structure of a server is described below:
[0229] Figure 10This is a schematic diagram of a server structure provided in an embodiment of this specification. The server 1000 can vary significantly due to differences in configuration or performance. It may include one or more Central Processing Units (CPUs) 1001 and one or more memories 1002. The one or more memories 1002 store at least one computer program, which is loaded and executed by the one or more processors 1001 to implement the methods provided in the various method embodiments described above. Of course, the server 1000 may also have wired or wireless network interfaces, a keyboard, and input / output interfaces for input and output. The server 1000 may also include other components for implementing device functions, which will not be elaborated upon here.
[0230] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a computer program that can be executed by a processor to perform the training method for the recommendation model or the recommendation method for content items in the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0231] In an exemplary embodiment, a computer program product or computer program is also provided, which includes program code stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium and executes the program code, causing the computer device to perform the training method of the recommendation model or the recommendation of content items described above.
[0232] In some embodiments, the computer program described in this specification may be deployed and executed on a single computer device, or on multiple computer devices located in one location, or on multiple computer devices distributed across multiple locations and interconnected via a communication network. These multiple computer devices distributed across multiple locations and interconnected via a communication network may constitute a blockchain system.
[0233] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0234] The above are merely optional embodiments of this specification and are not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification shall be included within the protection scope of this specification.
Claims
1. A method for training a recommendation model, the method comprising: Through multiple feature extraction units and multiple feature fusion units of the recommendation model, progressive feature extraction is performed on the sample recommendation information to obtain at least two recommendation features. The multiple feature extraction units include a shared feature extraction unit and a unique feature extraction unit. The shared feature extraction unit is shared by the at least two interaction behaviors, and the unique feature extraction unit is unique to the corresponding interaction behavior. The progressive feature extraction is performed in a hierarchical manner. The sample recommendation information includes the object features of the sample object to be recommended and the content features of the sample content item to be recommended. The at least two recommendation features are used to determine the probability that the sample object performs at least two interaction behaviors on the sample content item. The adaptive weight determination unit of the recommendation model accumulates the interaction parameters of the at least two interaction behaviors in multiple sub-time periods of the target time period to obtain the adaptive weights of the at least two interaction behaviors; wherein, the interaction parameter of any interaction behavior in any sub-time period is the ratio of the number of times the interaction behavior is performed on the sample content item in the sub-time period to the number of times the sample content item is recommended in the sub-time period. The recommendation model processes at least two labels based on the adaptive weights of the at least two interaction behaviors to obtain at least two target labels. The labels are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item. The recommendation model is trained based on the at least two recommendation features and the at least two target labels.
2. The method according to claim 1, wherein the progressive feature extraction of the sample recommendation information through multiple feature extraction units and feature fusion units of the recommendation model to obtain the at least two recommendation features includes: The recommendation model extracts features from the sample recommendation information using at least two first unique feature extraction units to obtain at least two first unique recommendation features. The first shared feature extraction unit of the recommendation model extracts features from the sample recommendation information to obtain the first shared recommendation features; The feature fusion unit and other feature extraction units of the recommendation model process the at least two first exclusive recommendation features and the first shared recommendation features to obtain the at least two recommendation features.
3. The method according to claim 2, wherein processing the at least two first unique recommendation features and the first shared recommendation features through the feature fusion unit and other feature extraction units of the recommendation model to obtain the at least two recommendation features includes: When the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, the first feature fusion unit of the recommendation model fuses the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior to obtain a first fused recommendation feature, wherein the first interaction behavior and the second interaction behavior are unrelated. The second feature fusion unit of the recommendation model fuses the first unique recommendation feature and the first shared recommendation feature of the second interaction behavior to obtain the second fused recommendation feature. The third feature fusion unit of the recommendation model fuses the first unique recommendation feature of the first interaction behavior, the first unique recommendation feature of the second interaction behavior, and the first shared recommendation feature to obtain the third fused recommendation feature. The first fused recommendation feature, the second fused recommendation feature, and the third fused recommendation feature are processed by other feature extraction units and other feature fusion units of the recommendation model to obtain the recommendation features corresponding to the first interaction behavior and the recommendation features corresponding to the second interaction behavior.
4. The method according to claim 3, wherein processing the first fused recommendation feature, the second fused recommendation feature, and the third fused recommendation feature through other feature extraction units and other feature fusion units of the recommendation model to obtain the recommendation feature corresponding to the first interaction behavior and the recommendation feature corresponding to the second interaction behavior includes: The second unique feature extraction unit corresponding to the first interaction behavior extracts features from the first fused features to obtain the second unique recommendation features corresponding to the first interaction behavior. The second unique feature extraction unit corresponding to the second interaction behavior extracts features from the second fused features to obtain the second unique recommendation features corresponding to the second interaction behavior. The second shared feature extraction unit of the recommendation model extracts features from the third fused recommendation features to obtain the second shared recommendation features; The fourth feature fusion unit of the recommendation model fuses the second unique recommendation feature and the second shared recommendation feature of the first interaction behavior to obtain the recommendation feature corresponding to the first interaction behavior. The recommendation model's fifth feature fusion unit fuses the second unique recommendation feature and the second shared recommendation feature of the second interaction behavior to obtain the recommendation feature corresponding to the second interaction behavior.
5. The method according to claim 3, wherein the first feature fusion unit of the recommendation model fuses the first unique recommendation feature of the first interaction behavior and the first shared recommendation feature to obtain the first fused recommendation feature includes: The first unique recommendation feature and the first shared recommendation feature of the first interaction behavior are input into the first feature fusion unit; The first feature fusion unit performs full connection and normalization on the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior to obtain the first fusion weight and the second fusion weight. The first feature fusion unit uses the first fusion weight and the second fusion weight to perform weighted fusion on the first unique recommendation feature and the first shared recommendation feature of the first interaction behavior to obtain the first fused recommendation feature.
6. The method according to claim 1, wherein processing at least two labeled tags based on the adaptive weights of the at least two interaction behaviors using the recommendation model to obtain at least two target tags includes: The recommendation model multiplies the adaptive weights of the at least two interaction behaviors by the corresponding at least two labeled tags to obtain the at least two target tags.
7. The method according to any one of claims 1-6, wherein training the recommendation model based on the at least two recommendation features and the at least two target labels comprises: Based on the at least two recommendation features, at least two prediction labels are determined, wherein the prediction labels are used to indicate whether the sample object will perform the interactive behavior corresponding to the recommendation feature on the sample content item; The recommendation model is trained based on the difference information between the at least two predicted labels and the at least two target labels.
8. The method according to claim 7, wherein determining at least two predicted labels based on the at least two recommendation features comprises: When the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, the recommendation features corresponding to the first interaction behavior are fully connected and normalized to obtain a first probability, whereby the first probability is the probability that the sample object performs the first interaction behavior on the sample content item. The recommendation features corresponding to the second interaction behavior are fully connected and normalized to obtain a second probability, which is the probability that the sample object performs the second interaction behavior on the sample content item. Based on the first probability and the second probability, the predicted label of the first interaction behavior and the predicted label of the second interaction behavior are determined.
9. The method according to claim 7, wherein training the recommendation model based on the difference information between the at least two predicted labels and the at least two target labels comprises: When the at least two interaction behaviors include a first interaction behavior and a second interaction behavior, a first loss function corresponding to the first interaction behavior is constructed based on the first difference information between the predicted label and the target label of the first interaction behavior. Based on the second difference information between the predicted label and the target label of the second interaction behavior, a second loss function corresponding to the second interaction behavior is constructed. The first loss function and the second loss function are weighted and fused using the first behavior weight and the second behavior weight to obtain the target loss function. The first behavior weight is the behavior weight corresponding to the first interaction behavior, and the second behavior weight is the behavior weight corresponding to the second interaction behavior. The recommendation model is trained using the target loss function.
10. A method for recommending content items, the method comprising: Input the target recommendation information into the recommendation model. The target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended. The recommendation model is used to extract features from the target recommendation information to obtain at least two recommendation features; Based on the at least two recommendation features, the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item is determined by the recommendation model. Based on the probabilities of the at least two interaction behaviors, the target content item is recommended to the target object; The recommendation model is trained using the recommendation model training method provided in any one of claims 1-9.
11. A training apparatus for a recommendation model, the apparatus comprising: The first feature extraction module is used to progressively extract features from sample recommendation information through multiple feature extraction units and multiple feature fusion units of the recommendation model to obtain at least two recommendation features. The multiple feature extraction units include a shared feature extraction unit and a unique feature extraction unit. The shared feature extraction unit is shared by the at least two interaction behaviors, and the unique feature extraction unit is unique to the corresponding interaction behavior. The progressive feature extraction is performed in a hierarchical manner. The sample recommendation information includes object features of the sample object to be recommended and content features of the sample content item to be recommended. The at least two recommendation features are used to determine the probability that the sample object performs at least two interaction behaviors on the sample content item. An adaptive weight determination module is used to accumulate the interaction parameters of the at least two interaction behaviors in multiple sub-time periods of the target time period through the adaptive weight determination unit of the recommendation model to obtain the adaptive weights of the at least two interaction behaviors; wherein, the interaction parameter of any interaction behavior in any sub-time period is the ratio of the number of times the interaction behavior is performed on the sample content item in the sub-time period to the number of times the sample content item is recommended in the sub-time period. The label processing module is used to process at least two labeled tags based on the adaptive weights of the at least two interaction behaviors through the recommendation model to obtain at least two target labels. The labeled tags are used to indicate whether the sample object has performed the interaction behavior corresponding to the recommendation feature on the sample content item. The training module is used to train the recommendation model based on the at least two recommendation features and the at least two target labels.
12. A content item recommendation device, the device comprising: The input module is used to input target recommendation information into the recommendation model. The target recommendation information includes the object features of the target object to be recommended and the content features of the target content item to be recommended. The second feature extraction module is used to extract features from the target recommendation information using the recommendation model to obtain at least two recommendation features; The probability determination module is used to determine, through the recommendation model and based on the at least two recommendation features, the probability that the target object will perform at least two interactive behaviors corresponding to the at least two recommendation features on the target content item; The recommendation module is used to recommend the target content item to the target object based on the probability of the at least two interaction behaviors; The recommendation model is trained using the training device for the recommendation model provided in claim 11.
13. A computer device comprising one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, the computer program being loaded and executed by the one or more processors to implement the training method of the recommendation model as described in any one of claims 1 to 9.
14. A computer-readable storage medium storing at least one computer program, the computer program being loaded and executed by a processor to implement a training method for a recommendation model as described in any one of claims 1 to 9.
15. A computer program product comprising a computer program that, when executed by a processor, implements the training method of the recommendation model according to any one of claims 1 to 9.
Citation Information
Patent Citations
Content item recommendation method and device, server and storage medium
CN111008332A