Method and device for training recommendation model
By training the recommendation model, using the label characteristics of single resources and collective resources to adjust parameters, evaluate and recommend resource satisfaction in immersion mode, the problem of user satisfaction evaluation in the existing technology is solved, and resource recommendation is realized Improved accuracy and user experience.
Patent Information
- Application Number
- CN202411303099.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-07
AI Technical Summary
The prior art is difficult to effectively evaluate and improve user satisfaction with multiple resources in the immersion mode, especially when resource types are diversified, it is difficult for the recommendation model to accurately predict user satisfaction, affecting user experience.
By training the recommended model, using the characteristics of single resource labels and set resource labels, the model parameters are adjusted to evaluate the satisfaction of single resource and set resources, and the model is tuned according to the loss value, and the weighted scores of single resource and set resources are calculated to recommend resource.
It realizes accurate evaluation and recommendation of satisfaction with order resources and collective resources in immersive mode, improves user experience, ensures satisfaction with recommended resources, and is suitable for recommendation scenarios of various resource types.
Smart Images

Figure CN119271884A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence, and in particular to the field of intelligent search, and specifically to a method and device for training a recommendation model. Background Art
[0002] Immersive mode is a design technique that improves the user experience by minimizing or hiding interface elements to display application content. This mode ensures that the app has the maximum screen space by displaying content in full screen and hiding the system bars.
[0003] Based on the growing demand for consumer efficiency and the popularization of immersive mode consumption habits, the immersive mode framework has transitioned from a single video genre to a fusion distribution of multiple genres such as video, graphics, dynamic images, and audio, bringing significant growth to the overall scale and population of the immersive mode. The entrance to the immersive mode has also added a dynamic image entrance based on the video entrance. Summary of the invention
[0004] The present disclosure provides a method, apparatus, device, storage medium, and computer program product for training a recommendation model.
[0005] According to a first aspect of the present disclosure, a method for training a recommendation model is provided, comprising: inputting features of a sample single resource with a single resource label and a collection resource label into a recommendation model to be trained, and outputting a single resource score and a collection resource score, wherein the single resource label represents the satisfaction of the single resource, and the collection resource label represents the satisfaction of the collection resource, and the collection resource includes multiple single resources consumed by a target account from entering an immersive mode to exiting the immersive mode; and adjusting parameters of the recommendation model according to a loss value between the single resource label and the single resource score and a loss value between the collection resource label and the collection resource score.
[0006] According to a second aspect of the present disclosure, a method for recommending resources is provided, comprising: inputting features of candidate resources into a recommendation model trained according to the method described in any one of the first aspects to obtain a single resource satisfaction score and a collective resource satisfaction score; calculating a weighted sum of the single resource satisfaction score and the collective resource satisfaction score as the score of the candidate resource; and outputting recommended resources, wherein the recommended resources include candidate resources whose scores meet predetermined conditions.
[0007] According to a third aspect of the present disclosure, a device for training a recommendation model is provided, comprising: an input unit, configured to input features of a sample single resource with a single resource label and a collection resource label into a recommendation model to be trained, and output a single resource score and a collection resource score, wherein the single resource label represents the satisfaction of the single resource, and the collection resource label represents the satisfaction of the collection resource, and the collection resource includes multiple single resources consumed by a target account from entering an immersive mode to exiting the immersive mode; a parameter adjustment unit, configured to adjust parameters of the recommendation model according to a loss value between the single resource label and the single resource score and a loss value between the collection resource label and the collection resource score.
[0008] According to a fourth aspect of the present disclosure, a device for recommending resources is provided, comprising: a prediction unit, configured to input features of candidate resources into a recommendation model trained by the device of any one of the third aspects, to obtain a single resource satisfaction score and a collective resource satisfaction score; a calculation unit, configured to calculate a weighted sum of the single resource satisfaction score and the collective resource satisfaction score as a score of the candidate resource; and an output unit, configured to output recommended resources, wherein the recommended resources include candidate resources whose scores meet predetermined conditions.
[0009] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any one of the methods described in the first aspect or the second aspect.
[0010] According to a sixth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods of the first aspect or the second aspect.
[0011] According to a fifth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements any one of the methods according to the first aspect when executed by a processor.
[0012] The method and device for training a recommendation model provided by the embodiments of the present disclosure can evaluate the satisfactory consumption experience of a single resource and the satisfactory consumption experience of a collection of resources after entering the immersive mode, and can accurately predict the user's satisfaction with the recommended resources, thereby improving the user experience.
[0013] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0015] Figure 1 is an exemplary system architecture diagram in which an embodiment of the present disclosure may be applied;
[0016] Figure 2 is a flowchart of an embodiment of a method for training a recommendation model according to the present disclosure;
[0017] Figure 3 is a schematic diagram of an application scenario of the method for training a recommendation model according to the present disclosure;
[0018] Figure 4 is a flowchart of another embodiment of a method for recommending resources according to the present disclosure;
[0019] Figure 5 is a structural schematic diagram of an embodiment of a device for training a recommendation model according to the present disclosure;
[0020] Figure 6 is a structural schematic diagram of an embodiment of a device for recommending resources according to the present disclosure;
[0021] Figure 7 It is a structural diagram of a computer system of an electronic device suitable for implementing an embodiment of the present disclosure. DETAILED DESCRIPTION
[0022] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0023] Figure 1 An exemplary system architecture 100 is shown to which embodiments of the method and apparatus for training a recommendation model and recommending resources disclosed herein can be applied.
[0024] like Figure 1 As shown, the system architecture 100 may include terminals 101, 102, a network 103, a database server 104, and a server 105. The network 103 is used to provide a medium for communication links between the terminals 101, 102, the database server 104, and the server 105. The network 103 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0025] The user 110 can use the terminals 101 and 102 to interact with the server 105 through the network 103 to receive or send messages, etc. Various client applications can be installed on the terminals 101 and 102, such as model training applications, search recommendation applications, shopping applications, payment applications, web browsers, and instant messaging tools.
[0026] The terminals 101 and 102 here can be hardware or software. When the terminals 101 and 102 are hardware, they can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III, Dynamic Image Experts Compression Standard Audio Layer 3), laptops and desktop computers, etc. When the terminals 101 and 102 are software, they can be installed in the electronic devices listed above. It can be implemented as multiple software or software modules (for example, to provide distributed services), or it can be implemented as a single software or software module. No specific limitation is made here.
[0027] The database server 104 may be a database server that provides various services. For example, the database server may store characteristics of sample sheet resources. Characteristics of sample sheet resources may include user characteristics, resource characteristics, scene characteristics, resource preference characteristics, etc.
[0028] The server 105 may also be a server that provides various services, such as a background server that supports various applications displayed on the terminals 101 and 102. The background server may generate sample single resource features by using the user's actions of clicking, browsing, following, collecting, and commenting on resources such as videos, pictures, and dynamic pictures through the terminal device, train the initial recommendation model, and send the recommendation model generated by the training to the terminals 101 and 102. In this way, the user can apply the generated recommendation model to recommend resources.
[0029] The database server 104 and server 105 here can also be hardware or software. When they are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they can be implemented as multiple software or software modules (for example, used to provide distributed services), or as a single software or software module. No specific limitation is made here. The database server 104 and server 105 can also be servers of a distributed system, or servers combined with blockchain. The database server 104 and server 105 can also be cloud servers, or intelligent cloud computing servers or intelligent cloud hosts with artificial intelligence technology.
[0030] It should be noted that the method for training a recommendation model or the method for recommending resources provided in the embodiments of the present disclosure is generally executed by the server 105. Accordingly, the device for training a recommendation model or the device for recommending resources is generally also disposed in the server 105.
[0031] It should be pointed out that, in the case where the server 105 can implement the related functions of the database server 104 , the database server 104 may not be provided in the system architecture 100 .
[0032] It should be understood that Figure 1 The number of terminals, networks, database servers and servers in the embodiment is only for illustration. Any number of terminals, networks, database servers and servers may be provided according to the implementation requirements.
[0033] Continue to refer Figure 2 , shows a process 200 of an embodiment of a method for training a recommendation model according to the present disclosure. The method for training a recommendation model comprises the following steps:
[0034] Step 201: Input the features of sample single resources with single resource labels and collective resource labels into the recommendation model to be trained, and output the single resource score and the collective resource score.
[0035] In this embodiment, the execution subject of the method for training the recommendation model (for example Figure 1 The server shown in the figure can obtain the characteristics of the sample single resource. The resources in this article may include videos, pictures, dynamic pictures, etc. A single resource refers to a resource. The recommendation system pushes a group of resources each time, which consists of multiple single resources. From the user clicking the entry resource to enter the immersive mode to exiting the immersive mode is a session. In a session, multiple single resources consumed by the user (click, browse, interact, etc.) are called collective resources.
[0036] A resource can be pushed to a user alone (single resource) or together with other resources (collective resource). Therefore, the resource can have two kinds of labels: single resource label and collective resource label. The single resource label indicates the satisfaction of the single resource, and the collective resource label indicates the satisfaction of the collective resource. If the single resource label is 1, it means that the user is satisfied with the single resource, and if the single resource label is 0, it means that the user is dissatisfied with the single resource. If the collective resource label is 1, it means that the user is satisfied with the collective resource, and if the collective resource label is 0, it means that the user is dissatisfied with the collective resource.
[0037] The features of the sample single resource can be extracted from the sample resource related information through the LSTM (Long Short-Term Memory) network. The features of the sample single resource may include at least one of the following: user features, resource features, scenario features, and resource preference features.
[0038] User characteristics may include: gender, age, education level, user activity, etc.
[0039] Resource features may include: resource type (e.g., video, graphics, animated images, etc.), resource category (e.g., news, entertainment, education, etc.), resource title length, resource duration (if the resource is a video, it is the video duration; if it is a picture, it is the number of pictures), etc.
[0040] Scenario features may include: time, weather, promotion and other information related to the recommendation scenario. Scenario features are used to distinguish the user preference scenario to which the current resource belongs.
[0041] Resource preference features may include: point-to-point ratio counted by portal resource type, point-to-point ratio counted by portal resource category, etc., where the point-to-point ratio is the proportion of portal resources that are clicked on the portal list page.
[0042] These features can be used to describe factors such as users, resources, and environments to improve recommendation results.
[0043] The recommendation model adopts a shared underlying modeling architecture, and the shared layer may include components such as DCN (deep cross network) and multi-layer perceptron (MLP). Specifically, Figure 3 As shown, the recommendation model may include two towers, each corresponding to a recommendation goal: collective satisfaction goal and single point satisfaction goal. Each tower has the same underlying network for learning shared cross features and nonlinear features. The upper network and output layer of each tower are independent, used to learn resource-related features and predict satisfaction, and the model-related operations include point-by-point addition, and the gating network is used to control the stratification of the two towers.
[0044] DCN: Deep Cross Network is a deep learning model for recommendation systems. It combines the advantages of shallow models and deep models and can better deal with the sparsity and high-dimensionality problems in recommendation systems. The DCN model uses a cross network to learn the intrinsic correlation between low-order features and a deep network to learn the nonlinear relationship between high-order features.
[0045] Step 202: Adjust the parameters of the recommendation model according to the loss value between the single resource label and the single resource score and the loss value between the collective resource label and the collective resource score.
[0046] In this embodiment, the single resource score and the collective resource score are both between 0 and 1. The loss values of the two towers are calculated respectively, and then the parameters of the recommendation model are adjusted according to the weighted sum of the loss values.
[0047] The method provided by the above-mentioned embodiment of the present disclosure can evaluate the satisfactory consumption experience of a single resource and the satisfactory consumption experience of a collection of resources after entering the immersive mode, and can accurately predict the user's satisfaction with the recommended resources, thereby improving the user experience.
[0048] In some optional implementations of this embodiment, the recommendation model includes a shared layer, a single resource output layer, and a collection resource output layer; and the adjusting of the parameters of the recommendation model includes: adjusting the parameters of the shared layer and the single resource output layer according to the loss value between the single resource label and the single resource score; adjusting the parameters of the shared layer and the collection resource output layer according to the loss value between the collection resource label and the collection resource score. Figure 3 As shown in the figure, the parameters of the two output layers can be adjusted separately, but the parameters of the shared layer can be adjusted at the same time when the parameters of the output layer are adjusted. This can speed up the convergence of the model.
[0049] In some optional implementations of this embodiment, the method also includes: marking a single resource satisfaction label for a single resource that meets at least one of the following single resource satisfaction conditions: the number of images slid in the single resource is greater than the quantity threshold, the single resource is clicked to expand the title, the duration of the single resource consumption is greater than the duration threshold, and the single resource participates in the interaction.
[0050] For example, for a single resource of the dynamic picture genre, if the user slides more than 4 pictures, or the user clicks to expand the title, or the user watches for more than 2 minutes, or the user performs interactive operations such as clicks, favorites, forwards, and comments, then the user is considered to be satisfied with the single resource of the dynamic picture genre.
[0051] For a single resource of a graphic and text genre, if the user clicks to expand the title, or the user watches for more than 2 minutes, or the user performs interactive operations such as clicking, collecting, forwarding, and commenting, the user is considered to be satisfied with the single resource of the graphic and text genre.
[0052] For a single resource of the video genre, if the user watches it for more than 2 minutes, or if the user performs interactive operations such as clicking, collecting, forwarding, and commenting, the user is considered to be satisfied with the single resource of the video genre.
[0053] As long as the sample single resource meets any single resource satisfaction condition, the sample single resource can be labeled as a single resource satisfaction condition.
[0054] In some optional implementations of this embodiment, the method further includes: marking a single resource unsatisfactory label for a single resource that does not meet any of the single resource satisfaction conditions.
[0055] In some optional implementations of this embodiment, the method further includes: marking a set resource satisfaction label for a single resource belonging to the following set resources: the number of single resources included in the set resources is greater than a predetermined value, and the number of single resources with the single resource satisfaction label is also greater than a predetermined value.
[0056] For example, if the number of single resources in the same resource collection is greater than 2, and the number of single resources with the single resource satisfaction label is greater than 2, the user is considered satisfied with the resource collection, and the collection resource satisfaction label is added. Each single resource in the collection resource with the collection resource satisfaction label has the collection resource satisfaction label.
[0057] In some optional implementations of this embodiment, the method further includes: marking a collection resource dissatisfaction label for a single resource belonging to the following collection resources: the number of single resources included in the collection resources is less than or equal to a predetermined value, or the number of single resources with a single resource satisfaction label is less than or equal to a predetermined value. For example, if the number of single resources in the same collection resource is <= 2, or the number of single resources with a single resource satisfaction label is <= 2, it is considered that the user is dissatisfied with the collection resource, and a collection resource dissatisfaction label is marked. Each single resource in the collection resource marked with a collection resource dissatisfaction label has a collection resource dissatisfaction label.
[0058] In some optional implementations of this embodiment, the characteristics of the sample single resource include at least one of the following: user characteristics, resource characteristics, scenario characteristics, and resource preference characteristics.
[0059] User characteristics may include: gender, age, education level, user activity, etc.
[0060] Resource features may include: resource type (e.g., video, graphics, animated images, etc.), resource category (e.g., news, entertainment, education, etc.), resource title length, resource duration (if the resource is a video, it is the video duration; if it is a picture, it is the number of pictures), etc.
[0061] Scenario features may include: time, weather, promotion and other information related to the recommendation scenario. Scenario features are used to distinguish the user preference scenario to which the current resource belongs.
[0062] Resource preference features may include: point-to-point ratio counted by portal resource type, point-to-point ratio counted by portal resource category, etc., where the point-to-point ratio is the proportion of portal resources that are clicked on the portal list page.
[0063] These features can be used to describe factors such as users, resources, and environments to improve recommendation results.
[0064] In some optional implementations of this embodiment, resource features include: entry resource features and recommended resource features. Entry resource features reflect environmental factors before the user enters the immersive mode, such as entry resource type (e.g., video, graphic, dynamic image, etc.), entry category (e.g., news, entertainment, education, etc.), entry title length, entry resource duration (if the resource is a video, it is the video duration, if it is a picture, it is the number of pictures), etc. Recommended resource features reflect the features of resources recommended by the system after the user enters the immersive mode. For example, recommended resource type, recommended resource category, recommended resource title length, recommended resource duration, etc. Entry resource features and recommended resource features can reflect the contextual influence in the recommendation process, thereby improving the accuracy of recommendations.
[0065] In some optional implementations of this embodiment, the entry resource features include at least one of the following: genre of the entry resource, category of the entry resource, title length of the entry resource, and duration of the entry resource. These features can reflect the user's preference for selecting entry resources, thereby making targeted recommendations.
[0066] In some optional implementations of this embodiment, the recommended resource features include at least one of the following: genre of the recommended resource, category of the recommended resource, title length of the recommended resource, duration of the recommended resource, and historical consumption information. The historical consumption information may include operations such as fast scrolling and completion, which can reflect the user's satisfaction with the recommended resource. These features can reflect the a posteriori information of the recommended resource, provide historical data support for subsequent recommendation operations, and thus improve the accuracy of the recommendation.
[0067] In some optional implementations of this embodiment, the collection resource includes at least one of the following single resources: dynamic pictures, graphics, videos, and audio. The solution of this application not only recommends single resources, but also recommends collection resources of multiple genres, thereby improving user experience, making the recommended content more attractive to users and easier to convert into commercial value.
[0068] Further references Figure 4 , which shows a process 400 of another embodiment of a method for training a recommendation model. The process 400 of the method for training a recommendation model includes the following steps:
[0069] Step 401, input the characteristics of the candidate resources into the recommendation model to obtain the single resource satisfaction score and the collective resource satisfaction score.
[0070] In this embodiment, when a user clicks on an entry resource in an application to enter an immersive mode, a set of candidate resources suitable for the user can be obtained based on the user portrait, and then the features of the candidate resources are extracted respectively, and input into a recommendation model trained according to the method described in process 200 to predict a resource satisfaction score and a set resource satisfaction score.
[0071] Step 402: Calculate the weighted sum of the single resource satisfaction score and the collective resource satisfaction score as the score of the candidate resource.
[0072] In this embodiment, the weight of the single resource satisfaction score may be set higher than the collective resource satisfaction score. For example, the weight of the single resource satisfaction score is 0.8, and the weight of the collective resource satisfaction score is 0.2.
[0073] Step 403: Output recommended resources.
[0074] In this embodiment, the recommended resources include candidate resources whose scores meet a predetermined condition. Some candidate resources are filtered out according to the scores of the candidate resources, and the predetermined condition may be greater than a predetermined threshold, for example, candidate resources with scores greater than 0.6 are recommended resources.
[0075] In some optional implementations of this embodiment, the predetermined condition includes: for candidate resources of the same genre, a predetermined proportion of the resources ranked in descending order of scores. For example, the highest-scoring 40% of video resources, the highest-scoring 40% of dynamic picture resources, and the highest-scoring 40% of graphic resources are all used as recommended resources.
[0076] In some optional implementations of this embodiment, the method further includes: weighting the scores of the recommended resources to obtain weighted scores; and selecting a predetermined number of recommended resources from the recommended resources in descending order of the weighted scores and pushing them to the user.
[0077] The scores of the recommended resources may be weighted according to a predetermined weighting formula. The weighting formula may be as follows:
[0078] final q =param1 param2*(q-param_i) ,i∈{video, dynamic picture, picture and text}
[0079] Among them, final q The final score for the resource is given. Param1 and param2 are weighting parameters. The weighting degree is controlled to the expected range. q is the score of the candidate resource. Param_i is the score of the recommended resources in different genres ranked in the top 40% in descending order. In this way, low-scoring resources can be filtered out by genre to reduce the number of recommended resources.
[0080] Further references Figure 5 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for training a recommendation model. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0081] like Figure 5 As shown, the apparatus 500 for training a recommendation model in this embodiment includes: an input unit 501 and a parameter adjustment unit 502. The input unit 501 is configured to input the features of a sample single resource with a single resource label and a collection resource label into the recommendation model to be trained, and output a single resource score and a collection resource score, wherein the single resource label represents the satisfaction of a single resource, and the collection resource label represents the satisfaction of a collection resource, and the collection resource includes multiple single resources consumed by the target account from entering the immersive mode to exiting the immersive mode; the parameter adjustment unit 502 is configured to adjust the parameters of the recommendation model according to the loss value between the single resource label and the single resource score and the loss value between the collection resource label and the collection resource score. .
[0082] In this embodiment, the specific processing of the input unit 501 and the parameter adjustment unit 502 of the device 500 for training the recommendation model can be referred to Figure 2 This corresponds to step 201 and step 202 in the embodiment.
[0083] In some optional implementations of this embodiment, the recommendation model includes a shared layer, a single resource output layer and a collective resource output layer; and the parameter adjustment unit 502 is further configured to: adjust the parameters of the shared layer and the parameters of the single resource output layer according to the loss value between the single resource label and the single resource score; adjust the parameters of the shared layer and the parameters of the collective resource output layer according to the loss value between the collective resource label and the collective resource score.
[0084] In some optional implementations of this embodiment, the device also includes a labeling unit (not shown in the accompanying drawings), which is configured to: label a single resource satisfaction label for a single resource that meets at least one of the following single resource satisfaction conditions: the number of slid pictures in the single resource is greater than the quantity threshold, the single resource is clicked to expand the title, the duration of the single resource consumption is greater than the duration threshold, and the single resource participates in the interaction.
[0085] In some optional implementations of this embodiment, the marking unit is further configured to: mark a single resource unsatisfactory label for a single resource that does not meet any of the single resource satisfaction conditions.
[0086] In some optional implementations of this embodiment, the labeling unit is further configured to: label a single resource belonging to the following set of resources with a set resource satisfaction label: the number of single resources included in the set resources is greater than a predetermined value, and the number of single resources with the single resource satisfaction label is also greater than a predetermined value.
[0087] In some optional implementations of this embodiment, the marking unit is further configured to: mark a single resource belonging to the following set of resources with a set resource unsatisfactory label: the number of single resources included in the set resources is less than or equal to a predetermined value, or the number of single resources with a single resource satisfactory label is less than or equal to a predetermined value.
[0088] In some optional implementations of this embodiment, the characteristics of the sample single resource include at least one of the following: user characteristics, resource characteristics, scenario characteristics, and resource preference characteristics.
[0089] In some optional implementations of this embodiment, the resource features include: entry resource features and recommended resource features.
[0090] In some optional implementations of this embodiment, the entry resource feature includes at least one of the following: the genre of the entry resource, the category of the entry resource, the title length of the entry resource, and the duration of the entry resource.
[0091] In some optional implementations of this embodiment, the recommended resource feature includes at least one of the following: genre of the recommended resource, category of the recommended resource, title length of the recommended resource, duration of the recommended resource, and historical consumption information.
[0092] In some optional implementations of this embodiment, the collective resource includes at least one of the following single resources: dynamic pictures, graphics, videos, and audios.
[0093] Further references Figure 6 As an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of a device for recommending resources. Figure 4 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.
[0094] like Figure 6As shown, the resource recommendation device 600 of this embodiment includes: a prediction unit 601, a calculation unit 602 and an output unit 603. The prediction unit 601 is configured to input the characteristics of the candidate resources into the recommendation model trained by the device 500 to obtain a single resource satisfaction score and a collective resource satisfaction score; the calculation unit 602 is configured to calculate the weighted sum of the single resource satisfaction score and the collective resource satisfaction score as the score of the candidate resource; the output unit 603 is configured to output the recommended resources including the candidate resources whose scores meet the predetermined conditions.
[0095] In this embodiment, the specific processing of the prediction unit 601, the calculation unit 602 and the output unit 603 of the device for recommending resources 600 can refer to Figure 4 This corresponds to step 401 to step 403 in the embodiment.
[0096] In some optional implementations of this embodiment, the predetermined condition includes: for candidate resources of the same genre, a predetermined proportion of the scores that are ranked in the top in descending order.
[0097] In some optional implementations of this embodiment, the device also includes a recommendation unit configured to: weight the scores of the recommended resources to obtain weighted scores; select a predetermined number of recommended resources from the recommended resources in descending order of weighted scores and push them to the user.
[0098] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0099] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0100] An electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method described in process 200 or 400.
[0101] A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause the computer to execute the method described in process 200 or 400.
[0102] A computer program product includes a computer program, wherein the computer program implements the method described in flow 200 or 400 when executed by a processor.
[0103] Figure 7A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0104] like Figure 7 As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0105] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0106] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a method for training a recommendation model. For example, in some embodiments, the method for training a recommendation model may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via the ROM 702 and / or the communication unit 709. When the computer program is loaded into the RAM 703 and executed by the computing unit 701, one or more steps of the method for training a recommendation model described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform a method for training a recommendation model in any other appropriate manner (e.g., by means of firmware).
[0107] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0108] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0109] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0110] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0111] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0112] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0113] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0114] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A method for training a recommendation model, comprising: Input the features of the sample single resource with the single resource label and the collection resource label into the recommendation model to be trained, and output the single resource score and the collection resource score, wherein the single resource label represents the satisfaction of the single resource, and the collection resource label represents the satisfaction of the collection resource, and the collection resource includes multiple single resources consumed by the target account from entering the immersive mode to exiting the immersive mode; The parameters of the recommendation model are adjusted according to the loss value between the single resource label and the single resource score and the loss value between the set resource label and the set resource score.
2. The method according to claim 1, wherein: The recommendation model includes a sharing layer, a single resource output layer and a collection resource output layer; and The adjusting the parameters of the recommendation model includes: Adjusting the parameters of the shared layer and the parameters of the single resource output layer according to the loss value between the single resource label and the single resource score; The parameters of the shared layer and the parameters of the collective resource output layer are adjusted according to the loss value between the collective resource label and the collective resource score.
3. The method according to claim 1, wherein: The method further comprises: The single resource satisfaction label is applied to single resources that meet at least one of the following single resource satisfaction conditions: The number of images slid in a single resource is greater than the quantity threshold, the title of a single resource is clicked to expand, the duration of consumption of a single resource is greater than the duration threshold, and the single resource participates in the interaction.
4. The method according to claim 3, wherein: The method further comprises: A single resource that does not meet any of the single resource satisfaction conditions is marked with a single resource unsatisfactory label.
5. The method according to claim 3, wherein: The method further comprises: Tag the individual resources that belong to the following collections with the collection resource satisfaction tag: The number of single resources included in the resource set is greater than a predetermined value, and the number of single resources having a single resource satisfaction label is also greater than a predetermined value.
6. The method according to claim 5, wherein: The method further comprises: The collection resource unsatisfactory label is set for individual resources that belong to the following collection resources: The number of single resources included in the set of resources is less than or equal to a predetermined value, or the number of single resources having a single resource satisfaction label is less than or equal to a predetermined value.
7. The method according to claim 1, wherein: The characteristics of the sample sheet resource include at least one of the following: User characteristics, resource characteristics, scenario characteristics, and resource preference characteristics.
8. The method according to claim 7, wherein: The resource features include: entry resource features and recommended resource features.
9. The method according to claim 8, wherein: The entry resource characteristics include at least one of the following: The genre of the entry resource, the category of the entry resource, the title length of the entry resource, and the duration of the entry resource.
10. The method according to claim 8, wherein: The recommended resource features include at least one of the following: genre of the recommended resource, category of the recommended resource, length of the title of the recommended resource, duration of the recommended resource, and historical consumption information.
11. The method according to any one of claims 1 to 10, wherein: The collection resource includes at least one of the following single resources: Dynamic pictures, graphics, videos, and audio.
12. A method for recommending resources, comprising: Inputting the characteristics of the candidate resources into the recommendation model trained according to the method described in any one of claims 1 to 11 to obtain a single resource satisfaction score and a collective resource satisfaction score; Calculating a weighted sum of the single resource satisfaction score and the collective resource satisfaction score as the score of the candidate resource; The recommended resources are output, wherein the recommended resources include candidate resources whose scores meet a predetermined condition.
13. The method according to claim 12, wherein: The predetermined conditions include: For candidate resources of the same genre, the scores are ranked in descending order with a predetermined proportion at the top.
14. The method according to claim 12, wherein: The method further comprises: Weighting the scores of the recommended resources to obtain a weighted score; A predetermined number of recommended resources are selected from the recommended resources in descending order of weighted scores and pushed to the user.
15. A device for training a recommendation model, comprising: An input unit is configured to input features of sample single resources with single resource labels and collection resource labels into a recommendation model to be trained, and output single resource scores and collection resource scores, wherein the single resource label represents the satisfaction of the single resource, the collection resource label represents the satisfaction of the collection resource, and the collection resource includes multiple single resources consumed by the target account from entering the immersive mode to exiting the immersive mode; A parameter adjustment unit is configured to adjust the parameters of the recommendation model according to the loss value between the single resource label and the single resource score and the loss value between the set resource label and the set resource score.
16. The device according to claim 15, wherein: The recommendation model includes a sharing layer, a single resource output layer and a collection resource output layer; and The parameter adjustment unit is further configured to: Adjusting the parameters of the shared layer and the parameters of the single resource output layer according to the loss value between the single resource label and the single resource score; The parameters of the shared layer and the parameters of the collective resource output layer are adjusted according to the loss value between the collective resource label and the collective resource score.
17. The device according to claim 15, wherein: The device also includes a marking unit configured to: The single resource satisfaction label is applied to single resources that meet at least one of the following single resource satisfaction conditions: The number of images slid in a single resource is greater than the quantity threshold, the title of a single resource is clicked to expand, the duration of consumption of a single resource is greater than the duration threshold, and the single resource participates in the interaction.
18. The device according to claim 17, wherein: The marking unit is further configured to: A single resource that does not meet any of the single resource satisfaction conditions is marked with a single resource unsatisfactory label.
19. The device according to claim 17, wherein: The marking unit is further configured to: Tag the individual resources that belong to the following collections with the collection resource satisfaction tag: The number of single resources included in the resource set is greater than a predetermined value, and the number of single resources having a single resource satisfaction label is also greater than a predetermined value.
20. The device according to claim 19, wherein The marking unit is further configured to: The collection resource unsatisfactory label is set for individual resources that belong to the following collection resources: The number of single resources included in the set of resources is less than or equal to a predetermined value, or the number of single resources having a single resource satisfaction label is less than or equal to a predetermined value.
21. The device according to claim 15, wherein: The characteristics of the sample sheet resource include at least one of the following: User characteristics, resource characteristics, scenario characteristics, and resource preference characteristics.
22. The device according to claim 21, wherein The resource features include: entry resource features and recommended resource features.
23. The device according to claim 22, wherein: The entry resource characteristics include at least one of the following: The genre of the entry resource, the category of the entry resource, the title length of the entry resource, and the duration of the entry resource.
24. The device according to claim 22, wherein: The recommended resource features include at least one of the following: genre of the recommended resource, category of the recommended resource, length of the title of the recommended resource, duration of the recommended resource, and historical consumption information.
25. The device according to any one of claims 15 to 24, wherein: The collection resource includes at least one of the following single resources: Dynamic pictures, graphics, videos, and audio.
26. A device for recommending resources, comprising: A prediction unit, configured to input the characteristics of the candidate resources into the recommendation model trained by the device according to any one of claims 15 to 25, to obtain a single resource satisfaction score and a collective resource satisfaction score; a calculation unit configured to calculate a weighted sum of the single resource satisfaction score and the set resource satisfaction score as the score of the candidate resource; The output unit is configured to output recommended resources, wherein the recommended resources include candidate resources whose scores meet a predetermined condition.
27. The device according to claim 26, wherein: The predetermined conditions include: For candidate resources of the same genre, the scores are ranked in descending order with a predetermined proportion at the top.
28. The device according to claim 26, wherein The device further comprises a recommendation unit configured to: Weighting the scores of the recommended resources to obtain a weighted score; A predetermined number of recommended resources are selected from the recommended resources in descending order of weighted scores and pushed to the user.
29. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 14.
30. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-14.
31. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 14.