Recommendation model training method, music recommendation method and device, product and equipment
Through the feature extraction of public and private domain networks combined with multi-task network training a general recommendation model, the high cost and low accuracy problems caused by independent construction of models in different recommendation scenarios are solved, and more efficient and accurate recommendation effects are achieved.
Patent Information
- Application Number
- CN202411537330.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-07-29
AI Technical Summary
Different recommendation scenarios require the construction of separate models, resulting in high operation and maintenance costs and low recommendation accuracy.
Public features are extracted through the public domain network, private domain network extracts private features, and uses multi-task network to perform feature fitting, determine the loss and adjust the model parameters, and train a general recommendation model.
It reduces the operation and maintenance, computing and storage costs during model training, improves the efficiency and accuracy of model training, solves the problem of user behavior transfer learning between different recommended scenarios, and enhances the universality and application scope of the model.
Smart Images

Figure CN120386918A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and more specifically, to a method for training a recommendation model, a music recommendation method and apparatus, a computer program product, and an electronic device. Background Art
[0002] This section aims to provide background or context for the embodiments of the present disclosure recited in the claims. The description herein is not admitted to be prior art by including it in this section.
[0003] With the development of big data, more and more recommendation scenarios are provided in the application platform to meet the growing diverse needs of users.
[0004] In the related art, for different recommendation scenarios, independent algorithm modeling needs to be performed. Summary of the Invention
[0005] In some embodiments, since separate models need to be constructed for different recommendation scenarios, the operation and maintenance costs are relatively high, and the recommendation can only be made based on the content of the recommendation scenario itself, resulting in relatively low recommendation accuracy and poor effects.
[0006] Therefore, there is a great need for an improved method for training a recommendation model to solve the problems of relatively high operation and maintenance costs, relatively low recommendation accuracy, and poor effects caused by the need to separately construct models for different recommendation scenarios.
[0007] In this context, embodiments of the present disclosure are expected to provide a method for training a recommendation model, a training apparatus for a recommendation model, a music recommendation method, a music recommendation apparatus, a computer program product, and an electronic device.
[0008] According to one aspect of the present disclosure, there is provided a method for training a recommendation model, including: obtaining user data, sample music data, and scenario data of multiple recommendation scenarios corresponding to a target user in an application platform; extracting public features from the user data and the sample music data through a public domain network; extracting private features related to each recommendation scenario based on a private domain network for the scenario data of each recommendation scenario; fitting the public features and the private features according to a multi-task network to obtain task results of at least one task, and determining a loss according to the task results; and adjusting model parameters of a recommendation model to be trained according to the loss to obtain the recommendation model.
[0009] In an exemplary embodiment of the present disclosure, the sample music data includes historical music features and historical music; the extraction of public features from the user data and the sample music data through the public network includes: extracting first features according to the user portrait features in the user data and the historical music features; fusing the historical music and the user behavior features in the user data to determine second features; and fusing the first features and the second features to obtain the public features.
[0010] In an exemplary embodiment of the present disclosure, the extraction of the first features according to the user portrait features in the user data and the historical music features includes: performing feature mapping on the user portrait features and the historical music features to determine the mapped user portrait features and the mapped historical music features; and performing fully connected processing on the mapped user portrait features and the mapped historical music features respectively to obtain the first features.
[0011] In an exemplary embodiment of the present disclosure, the fusion of the historical music and the user behavior features in the user data to determine the second features includes: performing feature mapping on the user behavior features and the historical music to determine the mapped user behavior features and the mapped evaluation music features; and performing correlation calculation on the mapped user behavior features and the mapped evaluation music features through a self-attention layer for weighted fusion to determine the second features.
[0012] In an exemplary embodiment of the present disclosure, the extraction of private features related to each recommendation scenario from the scenario data of each recommendation scenario based on the private network includes: performing feature mapping on the scenario data of each recommendation scenario to determine the mapped scenario features;
[0013] performing feature learning on the mapped scenario features through the specific scenario network corresponding to each recommendation scenario in the private network to extract high-order features of each recommendation scenario; and connecting the high-order features of each recommendation scenario in parallel to determine the private features related to each recommendation scenario.
[0014] In an exemplary embodiment of the present disclosure, the specific scenario network includes a feature mask layer, two fully connected layers, a normalization layer, a dropout layer, and a residual connection layer connecting the two fully connected layers; the feature learning of the mapped scenario features through the specific scenario network corresponding to each recommendation scenario in the private domain network to extract high-order features of each recommendation scenario includes: screening the mapped scenario features through the feature mask layer to obtain aligned features; performing a fully connected process on the aligned features through a fully connected layer and normalizing through a normalization layer to obtain normalized features; performing a fully connected process on the normalized features to determine fully connected features; performing a residual connection between the aligned features and the fully connected features based on the residual connection layer to determine a residual output; adding the fully connected output and the residual output, and regularizing the added result based on the dropout layer to determine the high-order features of each recommendation scenario.
[0015] In an exemplary embodiment of the present disclosure, the feature fitting of the public feature and the private feature according to the multi-task network to obtain the task results of at least one task includes: fusing the public feature and the private feature to determine a fused feature; performing feature fitting on the fused feature through the multi-task network to obtain the task results of at least one task.
[0016] In an exemplary embodiment of the present disclosure, the multi-task network includes a gating network, a shared expert network, and a private expert network; the performing feature fitting on the fused feature through the multi-task network to obtain the task results of at least one task includes: inputting the fused feature into the gating network, the shared expert network, and the private expert network to obtain the output result of the gating network, the output result of the shared expert network, and the result of the private expert network; performing a combination process on the output result of the gating network, the output result of the shared expert network, and the result of the private expert network to obtain a combined processing result, and fusing the combined processing result with the output result of the scenario indicator to determine the task result of each task.
[0017] In an exemplary embodiment of the present disclosure, the performing a combination process on the output result of the gating network, the output result of the shared expert network, and the result of the private expert network to obtain a combined processing result includes: adding the product of the output result of the gating network and the output result of the shared expert network to the product of the output result of the gating network and the result of the private expert network to determine the combined processing result.
[0018] In an exemplary embodiment of the present disclosure, the number of the private expert networks is the same as the number of tasks, and the number of the shared expert networks is less than the number of the private expert networks; the gating network is used to determine the weights of the private expert networks and the shared expert networks for each task.
[0019] In an exemplary embodiment of the present disclosure, the determining the loss according to the task result includes: determining an intermediate loss corresponding to each task according to the difference between the task result of each task and the true label corresponding to each task; and performing a weighted sum of the intermediate losses corresponding to each task to determine the loss.
[0020] In an exemplary embodiment of the present disclosure, the adjusting the model parameters of the to-be-trained recommendation model according to the loss to obtain the recommendation model includes: determining the sample data of each recommendation scenario; determining a target loss related to the sample data of the recommendation scenario from the loss, and adjusting the model parameters of the to-be-trained recommendation model based on the target loss to generate the recommendation model.
[0021] In an exemplary embodiment of the present disclosure, the determining the target loss related to the sample data of the recommendation scenario from the loss includes: determining the task of the recommendation scenario according to the sample data, and configuring the weights of the intermediate losses unrelated to the task of the recommendation scenario in the loss as fixed values to determine the target loss.
[0022] According to one aspect of the present disclosure, there is provided a music recommendation method, including: obtaining user data, music data, and scenario data of a plurality of recommendation scenarios corresponding to a target user in an application platform;
[0023] inputting the user data, the music data, and the scenario data into a recommendation model to obtain music recommendation results for each recommendation scenario; wherein, the recommendation model is trained according to the training method of the recommendation model described in any one of the above.
[0024] According to one aspect of the present disclosure, there is provided a training device for a recommendation model, including: a data acquisition module configured to acquire user data, sample music data, and scenario data of multiple recommendation scenarios corresponding to a target user in an application platform; a public feature extraction module configured to extract public features from the user data and the sample music data through a public domain network; a private feature extraction module configured to extract features of the scenario data of each recommendation scenario based on a private domain network to determine private features related to each recommendation scenario; a loss determination module configured to perform feature fitting on the public features and the private features according to a multi-task network to obtain task results of at least one task, and determine a loss according to the task results; and a model training module configured to adjust model parameters of a recommendation model to be trained according to the loss to obtain the recommendation model.
[0025] According to one aspect of the present disclosure, there is provided a music recommendation device, including: a data acquisition module configured to acquire user data, music data, and scenario data of multiple recommendation scenarios corresponding to a target user in an application platform; a recommendation result determination module configured to input the user data, the music data, and the scenario data into a recommendation model to obtain music recommendation results for each recommendation scenario; wherein, the recommendation model is trained according to the training method of the recommendation model described in any one of the above.
[0026] According to one aspect of the present disclosure, there is provided a computer program product, including a computer program which, when executed by a processor, implements the training method of the recommendation model or the music recommendation method described in any one of the above.
[0027] According to one aspect of the present disclosure, there is provided an electronic device, including: a processor; and a memory configured to store executable instructions; wherein, the processor is configured to execute the training method of the recommendation model or the music recommendation method described in any one of the above by executing the executable instructions.
[0028] In the technical solutions of the embodiments of the present disclosure, on the one hand, for different recommendation scenarios, only one general model, i.e., the recommendation model, needs to be trained to implement model training for multiple recommendation scenarios, reducing the operation and maintenance costs, computing costs, and storage costs during the model training process, and improving the model training efficiency and the reliability of the model. On the other hand, it can solve the limitation that different models need to be used for different data distributions in different recommendation scenarios, learn the commonalities and differences between different scenarios, solve the problem of transfer learning of user behaviors between different recommendation scenarios, improve the accuracy and generality of the recommendation model, and increase the application scope of the recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features, and advantages of the exemplary embodiments of the present disclosure will become readily understood. In the drawings, several embodiments of the present disclosure are shown by way of example and not limitation, wherein:
[0030] Figure 1 A schematic diagram of the system architecture of the application scenario of the embodiment of the present disclosure is shown.
[0031] Figure 2 A schematic flowchart of the training method of the recommendation model in the embodiment of the present disclosure is shown.
[0032] Figure 3 A schematic flowchart of extracting public features in the embodiment of the present disclosure is shown.
[0033] Figure 4 A schematic diagram of extracting public features according to the recommendation model in the embodiment of the present disclosure is shown.
[0034] Figure 5 A flowchart of obtaining private features in the embodiment of the present disclosure is shown.
[0035] Figure 6 A flowchart of determining the loss in the embodiment of the present disclosure is shown.
[0036] Figure 7 A schematic overall flowchart of the recommendation model determining the loss in the embodiment of the present disclosure is shown.
[0037] Figure 8 A schematic diagram of the system architecture of the recommendation model in the embodiment of the present disclosure is shown.
[0038] Figure 9 A schematic flowchart of a music recommendation method in the embodiment of the present disclosure is shown.
[0039] Figure 10 A schematic block diagram of the training device of the recommendation model in the embodiment of the present disclosure is shown.
[0040] Figure 11 A schematic block diagram of the music recommendation device in the embodiment of the present disclosure is shown.
[0041] Figure 12 A schematic block diagram of an electronic device in the embodiment of the present disclosure is shown.
[0042] In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Embodiments
[0043] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and then implement the present disclosure, rather than limiting the scope of the present disclosure in any way. On the contrary, these embodiments are provided to make the present disclosure more thorough and complete, and to be able to fully convey the scope of the present disclosure to those skilled in the art.
[0044] Those skilled in the art know that the embodiments of the present disclosure can be implemented as a system, a device, an apparatus, a method, or a computer program product. Therefore, the present disclosure can be specifically implemented in the following forms, namely: all hardware, all software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0045] According to the embodiments of the present disclosure, a method for training a recommendation model, an apparatus for training a recommendation model, a music recommendation method, a music recommendation apparatus, a computer program product, and an electronic device are provided.
[0046] In addition, the number of any elements in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.
[0047] The principles and spirit of the present disclosure will be elaborated in detail below with reference to several representative embodiments of the present disclosure.
[0048] The inventor of the present disclosure has found that for different recommendation scenarios, it is generally necessary to construct different recommendation models for prediction.
[0049] Based on the above, the basic idea of the present disclosure is: obtaining user data, sample music data, and scenario data of multiple recommendation scenarios corresponding to a target user in an application platform; extracting public features from the user data and the sample music data through a public domain network; based on a private domain network, extracting features from the scenario data of each recommendation scenario to determine private features related to each recommendation scenario; according to a multi-task network, fitting the public features and the private features to obtain task results of at least one task, and determining a loss according to the task results; adjusting the model parameters of the recommendation model to be trained according to the loss to obtain a recommendation model; and then determining music recommendation results for each recommendation scenario according to the recommendation model.
[0050] More specifically, in the present disclosure, for different recommendation scenarios, only one general model, the recommendation model, needs to be trained, which reduces the operation and maintenance costs, computing costs, and storage costs, and improves the model training efficiency and the reliability of the model. It can solve the limitation that different models need to be used for different data distributions in different recommendation scenarios, learn the commonalities and differences between different scenarios, solve the problem of transfer learning of user behavior between different recommendation scenarios, improve the accuracy and generality of the recommendation model, and increase the application scope of the recommendation model.
[0051] After introducing the basic principles of the present disclosure, various non-limiting embodiments of the present disclosure will be specifically introduced below.
[0052] It should be noted that the following application scenarios are only shown for the convenience of understanding the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0053] First, refer to Figure 1 , Figure 1 which shows a schematic diagram of the system architecture of an exemplary application scenario of the embodiments of the present disclosure. The training method of the recommendation model can be used for the recommendation function in various application platforms. For example, it can recommend music or playlists for users, or recommend other types of information such as goods, news, novels, and videos for users.
[0054] As Figure 1 shown, the system architecture 100 includes a terminal 101, a network 102, and a server 103. The server 103 processes the user data, sample music data, and scenario data of multiple recommendation scenarios corresponding to the target user in the application platform obtained from the terminal 101; extracts public features from the user data and sample music data through the public network; extracts private features related to each recommendation scenario based on the private network for the scenario data of each recommendation scenario; performs feature fitting on the public features and private features according to the multi-task network to obtain a determined loss; and trains the recommendation model according to the loss. Further, the server can deploy the recommendation model to the client, and the client predicts the music recommendation results for each recommendation scenario. Or the server predicts the music recommendation results for each recommendation scenario and sends them to the terminal for display.
[0055] Those skilled in the art should understand that Figure 1 the shown schematic framework is only an example in which the embodiments of the present disclosure can be implemented. The scope of application of the embodiments of the present disclosure is not limited by any aspect of this framework.
[0056] It should be noted that the terminal 101 can be an intelligent device with data processing and display functions, such as a smart phone, computer, tablet, in-vehicle device, smart speaker, wearable device and other intelligent devices. The terminal device can also be referred to as a mobile terminal, terminal, mobile device, etc. The present disclosure does not limit the type of the terminal device.
[0057] The server 103 can be a local server or a remote server. In addition, the server 103 can also be other products capable of providing storage functions or processing functions, such as a cloud server. The embodiments of the present disclosure do not make special limitations here. The server can also be composed of a terminal device with fast computing capabilities or an in-vehicle device, etc., which is not limited here.
[0058] It should be understood that the technical solutions provided in the embodiments of the present disclosure can be executed by the terminal or the server. Correspondingly, in this manner executed by the server, the server can start to execute the steps in the technical solutions of the embodiments of the present disclosure in response to a trigger instruction, where the trigger instruction can be sent by the terminal used by the user, or can be locally triggered by the server in response to some automated events. The server can be a background system providing relevant services in the embodiments of the present disclosure, and can include a cluster formed by one or more electronic devices with computing functions, such as a portable computer, a desktop computer, a smart phone, etc.
[0059] In addition, the technical solutions of the embodiments of the present disclosure can also be executed jointly by the terminal and the server. It should be noted that, in this manner of joint execution by the terminal and the server, the steps respectively executed by the terminal and the server can be dynamically adjusted according to the actual situation, and the embodiments of the present disclosure do not make special limitations on this.
[0060] Next, in combination with Figure 1 the application scenario of Figure 2 reference
[0061] to describe the training method of the recommendation model according to the exemplary embodiments of the present disclosure. It should be noted that the above application scenario is only shown for the convenience of understanding the spirit and principle of the present disclosure, and the embodiments of the present disclosure are not limited in this regard. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario.
[0062] Figure 2 Figure 2 Figure 2As shown in the figure, the training method of the recommendation model may include the following steps:
[0063] In step S210, obtain the user data corresponding to the target user, the sample music data, and the scenario data of multiple recommendation scenarios in the application platform;
[0064] In step S220, extract features from the user data and the sample music data through the public domain network to obtain public features;
[0065] In step S230, based on the private domain network, extract features from the scenario data of each recommendation scenario to determine the private features related to each recommendation scenario;
[0066] In step S240, perform feature fitting on the public features and the private features according to the multi-task network to obtain the task results of at least one task, and determine the loss according to the task results;
[0067] In step S250, adjust the model parameters of the recommendation model to be trained according to the loss to obtain the recommendation model.
[0068] In the embodiments of the present disclosure, on the one hand, since only one general model, namely the recommendation model, needs to be trained for different recommendation scenarios, the operation and maintenance costs, computing costs, and storage costs during the model training process are reduced, and the model training efficiency and the reliability of the model are improved. On the other hand, it can solve the limitation that different models need to be used for different data distributions in different recommendation scenarios, learn the commonalities and differences between different scenarios, solve the transfer learning problem of user behavior between different recommendation scenarios, improve the accuracy and generality of the recommendation model, and increase the application scope of the recommendation model.
[0069] Next, the training method of the recommendation model in the embodiments of the present disclosure will be explained in detail with reference to the accompanying drawings.
[0070] In step S210, obtain the user data corresponding to the target user, the sample music data, and the scenario data of multiple recommendation scenarios in the application platform.
[0071] In the embodiments of the present disclosure, the application platform can be any type of application platform. For example, it can be a music application platform, a shopping application platform, a reading application platform, a video application platform, etc. Here, the music application platform is taken as an example for illustration. The target users can be each user who logs in to the application platform. For the target users, their user data on the application platform can be obtained. The user data can include user portraits and user behavior characteristics. The user portrait is used to describe the specific characteristics of the user. The user behavior characteristics can be determined according to the user behavior information. The user behavior information can be, for example, the play records, search records, favorite records, comment records, etc. of the target users on the music application platform. Among them, the play record includes, for example, the music list, music name, artist, album, etc. that the target user has recently played; the favorite record includes, for example, the favorite music, album or playlist list, etc.; the search record includes, for example, the music, artist, album or playlist keyword list that has been searched; the comment record includes, for example, the music that has been commented on.
[0072] The sample music data refers to the music data used to train the recommendation model. The sample music data can include historical music and historical music characteristics. Among them, the historical music can be the music data corresponding to the historical user behavior of the target user, such as the music corresponding to historical user behaviors such as play, favorite, like, etc. The historical music characteristics can be music portrait characteristics, which are used to represent the general portrait characteristics of music. The scenario data refers to the data corresponding to each recommendation scenario, which can be used to represent the private characteristics unique to each recommendation scenario, and includes the music characteristics of each recommendation scenario.
[0073] Multiple recommendation scenarios can be, for example, daily recommendation, private roaming, heart mode, private radar, home page private customization scenario. In addition, it can also include other recommendation scenarios, which are specifically determined according to the update and requirements of the application platform. Since the behavior data of the same target user in different recommendation scenarios may have a high degree of correlation, the data in these recommendation scenarios has strong coupling. In order to effectively process this coupling, the above user data, sample music data and scenario data can be feature-split into public features and private features.
[0074] In step S220, public features are obtained by extracting features from the user data and the sample music data through the public domain network.
[0075] In the embodiments of the present disclosure, due to the large coupling between multiple scenarios and multiple tasks, if processed simultaneously, it will increase the difficulty of parallel optimization. Therefore, when dealing with the structure of multiple recommendation scenarios, a public domain and private domain separation modeling method can be adopted for processing. It can not only retain the private features of the business, but also integrate the public features to the greatest extent, bringing the maximization of the overall benefit.
[0076] Based on this, the above-obtained data can be processed through a multi-scenario network. First, the public domain network can be used to extract public features from the user data and the sample music data. Exemplarily, the public domain network can include a shared embedding layer, a fully connected network layer, and an attention layer. Among them, the input of the shared embedding layer includes user portrait features, historical music features, historical music, and user behavior features. The shared embedding layer is used to perform feature mapping on the input data to map it into a unified vector space, so that different types of features can interact and learn in the same vector space. The mapped data can pass through two paths to obtain the first feature corresponding to the first path and the second feature corresponding to the second path. Furthermore, the first feature and the second feature can be fused to determine the public feature. The first path can be a fully connected path, and the second path can be a path associated through the attention layer.
[0077] Figure 3 The flowchart for extracting public features is schematically shown in Figure 3 As shown in
[0078] In step S310, the first feature is extracted according to the user portrait features and historical music features in the user data.
[0079] In this step, the user portrait features and historical music features are extracted through the first path. The user portrait features and historical music features in the user data can be subjected to feature mapping through the shared embedding layer to determine the mapped user portrait features and the mapped historical music features. Further, the mapped user portrait features and the mapped historical music features can be respectively subjected to fully connected processing to obtain the first feature. The fully connected layer can learn the non-linear relationship between features, thereby extracting more complex and high-order feature representations. Exemplarily, convolution operations can be respectively performed on the mapped user portrait features and the mapped historical music features through the fully connected layer, and normalization is performed. The mapped user portrait features and the normalization result are input into the fully connected layer for fully connected processing, and the mapped historical music features and the normalization result are input into the fully connected layer for fully connected processing to respectively obtain the fully connected result corresponding to the user portrait features and the fully connected result corresponding to the historical music features, and the two are used as the first feature.
[0080] In step S320, the historical music and the user behavior features in the user data are fused to determine the second feature.
[0081] In this step, feature extraction is performed on historical music and user behavior characteristics in user data through the second path. Exemplarily, the user behavior characteristics and historical music are subjected to feature mapping to determine the mapped user behavior characteristics and the mapped evaluation music characteristics. The mapped user behavior characteristics are processed through a Transformer layer and a normalization layer to obtain normalized behavior characteristics. Among them, the Transformer layer includes an encoding layer and a decoding layer. The encoding layer encodes each input into a new output feature. The decoding layer jointly predicts the output feature based on the output feature of each encoding layer and all the predicted values output by the previous decoding layer. Further, the output feature can be normalized to determine the normalized behavior characteristics.
[0082] For historical music, feature mapping can be performed through a shared embedding layer to determine the mapped evaluation music characteristics. Further, in the attention layer, the normalized behavior characteristics corresponding to the mapped user behavior characteristics and the mapped evaluation music characteristics can be associated to determine the second feature. The second feature refers to the feature obtained through the second path. Exemplarily, in the attention layer, the normalized behavior characteristics and the mapped evaluation music characteristics can be weighted and fused to perform feature association to determine the second feature.
[0083] In step S330, the first feature and the second feature are fused to obtain a common feature.
[0084] In this step, after obtaining the first feature corresponding to the first path and the second feature determined by the second path, the first feature and the second feature can be fused to determine the common feature output by the public domain network. Among them, the first feature and the second feature can be added, multiplied, or concatenated to achieve feature fusion. The common feature integrates multi-dimensional information such as user profiles, music characteristics, and user behavior characteristics, increasing the comprehensiveness of the features and providing strong support for subsequent recommendation decisions.
[0085] Reference Figure 4 As shown in , feature mapping is performed on user portrait characteristics, historical music characteristics, user behavior characteristics, and historical music through a shared embedding layer. The mapped features will be further processed through two paths, specifically including: the mapped user portrait characteristics and the mapped historical music characteristics will be processed through a fully connected layer. The fully connected layer can learn the non-linear relationship between features, thereby extracting more complex and high-order feature representations. The mapped user behavior characteristics and the mapped evaluation music characteristics are associated and calculated through the attention layer. The attention layer can calculate weights for the mapped user behavior characteristics and the mapped evaluation music characteristics and perform weighted fusion to extract the user interest of the fusion target. Finally, the outputs of the above two paths will be fused to form a common feature.
[0086] In step S230, feature extraction is performed on the scenario data of each recommendation scenario based on the private network to determine the private features related to each recommendation scenario.
[0087] In the embodiments of the present disclosure, in the construction of a cross-domain recommendation system, the private tower has the ability to protect and extract task-specific information and accelerate scenario switching, enabling more scenarios to be iteratively accessed. Based on this, the private features of the recommendation scenario can be extracted through a scenario-specific network. The scenario-specific network can be a SEN (Scenario-specific Network). The scenario-specific network module is an advanced feature learning unit that has the ability to learn the non-linear relationship between features, so it can extract higher-order feature representations. It has the ability to capture more refined and discriminative feature information within a specific private domain.
[0088] For each recommendation scenario, the network parameters of its corresponding scenario-specific network can be different, which are specifically obtained by training according to the training data of each recommendation scenario. Exemplarily, the scenario-specific network of each recommendation scenario includes a feature mask layer, two fully connected layers, a normalization layer, a dropout layer, and a residual connection layer connecting the two fully connected layers.
[0089] Figure 5 The schematic diagram for determining the private features is schematically shown in Figure 5 As shown in
[0090] In step S510, feature mapping is performed on the scenario data of each recommendation scenario to determine the mapped scenario features;
[0091] In step S520, feature learning is performed on the mapped scenario features through the scenario-specific network corresponding to each recommendation scenario in the private network to extract the higher-order features of each recommendation scenario;
[0092] In step S530, the higher-order features of each recommendation scenario are connected in parallel to determine the private features related to each recommendation scenario.
[0093] In the embodiments of the present disclosure, first, the scenario data of each recommendation scenario can be feature-mapped through a shared embedding layer to determine the mapped scenario features of each recommendation scenario.
[0094] Further, the mapped scenario features of each recommendation scenario can be input into the specific scenario network corresponding to each recommendation to extract the high-order features of each recommendation scenario. Among them, the feature mask layer enhances scenario alignment by filtering features. The residual connection layer is used to allow the input signal to directly bypass some layers and add it to the output of these layers. Based on this, the network no longer needs to learn the complete function of mapping the input to the output, but learns a residual function, that is, the difference between the input and the expected output. The fully connected layer and the residual connection layer between them can improve the expressive power of the deep network. The normalization layer solves the problem of feature distribution drift and improves the model stability, while the dropout layer effectively prevents overfitting and improves the model robustness. The dropout layer traverses the nodes of each layer of the neural network, and then sets a node retention probability for the neural network of this layer to determine the probability that the nodes of this layer are retained. By setting the retention probability of the nodes of this layer of the neural network, the neural network will not be biased towards a certain node, so that the weight of each node will not be too large, thereby reducing the overfitting of the neural network.
[0095] Based on this, for each recommendation scenario, the mapped scenario features can be filtered by the feature mask layer to obtain aligned features; the aligned features are fully connected by the fully connected layer to determine the fully connected result, and the fully connected result is normalized by the normalization layer to obtain the normalized features; the normalized features are fully connected to determine the fully connected features; the residual connection between the aligned features and the fully connected features is performed based on the residual connection layer to determine the residual output; the fully connected output and the residual output are added, and the added result is regularized based on the dropout layer to determine the nodes to be retained, so as to determine the high-order features of each recommendation scenario.
[0096] The specific scenario network SEN can provide rich private domain feature expressions for the cross-domain recommendation system and improve the accuracy and personalization of recommendations.
[0097] In the embodiments of the present disclosure, after determining the high-order features corresponding to the scenario data of each recommendation scenario through the specific scenario network of each recommendation scenario, the high-order features of each recommendation scenario can be connected in parallel. Here, the parallel connection can be to splice the high-order features of each recommendation scenario, so as to determine the private features related to each recommendation scenario. The private features can include the features of each recommendation scenario.
[0098] In step S240, the public features and the private features are feature-fitted according to the multi-task network to obtain the task results of at least one task, and the loss is determined according to the task results.
[0099] In the embodiments of the present disclosure, the goal of the multi-task network layer is to achieve collaborative learning between tasks and autonomous dynamic optimization of the model. The multi-task network is used to determine the task results corresponding to different tasks. Exemplarily, first, the public features and the features can be fused to determine the fused features; the fused features are subjected to feature fitting through the multi-task network to obtain the task results of at least one task. The tasks can be predicting click-through rate, predicting heart rate, predicting completion rate, etc., which are specifically determined according to the parameters that have a greater impact on the recommendation scenario. For example, when the recommendation scenarios are daily recommendation and style recommendation, the tasks can be predicting click-through rate, predicting heart rate, predicting completion rate; when the recommendation scenarios are heartbeat mode, private radar, and private roaming, the tasks can be predicting heart rate and predicting completion rate. Among them, the heart rate refers to the probability of liking and collecting music. The completion rate refers to the probability of playing to the end. Feature fitting refers to making predictions based on the fused features to determine the task results of each task corresponding to each recommendation scenario.
[0100] In some embodiments, the multi-task network includes a gating network, a shared expert network, and a private expert network. The number of private expert networks is the same as the number of tasks, and the number of shared expert networks is less than the number of private expert networks; the gating network is used to determine the weights of the private expert network and the shared expert network for each task. Among them, the multi-task network can be modeled by the CGC structure. In addition, it can also be modeled by multi-task network structures such as MMoE and hard share.
[0101] Specifically, the multi-task network in the embodiments of the present disclosure may include a single-layer CGC (Cross-Gating Coordination) module, three special private expert networks, and two shared expert networks. These networks are integrated in the way of MMoE (Multi-gate Mixture-of-Experts) to handle the complexity of multi-task learning. Among them, the private expert network is only used in specific tasks. For example, each task can correspond to a private expert network, while the shared expert network is shared among all tasks. The private expert network and the shared expert network are responsible for extracting the features of the input data. The gating network determines the contribution degree of each private expert network and shared expert network to each task according to the requirements of each task to determine the corresponding weights, and selectively uses the features extracted by the private expert network and the shared expert network, so as to achieve selective utilization of features. In this way, the MMoE model can explicitly learn the relationships between each subtask and optimize the learning effect of each task.
[0102] In the embodiments of the present disclosure, in the process of performing feature fitting on the fused features through a multi-task network to obtain the task results of at least one task, first, the fused features can be input into a gating network, a shared expert network, and a private expert network to obtain the output result of the gating network, the output result of the shared expert network, and the result of the private expert network, that is, the fused features are respectively input into each network in the multi-task network. Further, for each task, the output result of the gating network and the output result of the shared expert network can be combined, and the output result of the gating network and the result of the private expert network can be combined to obtain a combined processing result. On this basis, the combined processing result can be fused with the output result of the scene indicator. The fusion can be, for example, multiplication, to determine the task result of each task. The output result of the scene indicator is a feature used to describe scene differentiation. The information of the expert network for different tasks is different, and there are also differences in the task combination recommendation scenarios. Therefore, a scene indicator is introduced to fuse the differentiation of the recommendation scenario into different tasks and at the same time introduce the differentiation between tasks and recommendation scenarios.
[0103] The multi-task network in the embodiments of the present disclosure allows automatically adjusting the weights of different expert networks according to the characteristics of each task. Suppose there are N tasks and K expert networks, where 2 are shared expert networks and K - 2 are task-related private expert networks, and a task-related private expert network is set for each task, so K - 2 = N. For the nth task, its output y n can be calculated by formula (1):
[0104]
[0105] where f n is the specific output function of the nth task, h k (x) is the output of the expert network, g nk is the output of the gating network for the kth expert network of the nth task, and s i represents the scene indicator. k ∈ [1, N + 1] because there are N experts who are shared expert networks.
[0106] Reference Figure 6As shown, each task corresponds to a gating network, which is used to determine, for each task, the weights of the private expert network and the shared expert network, that is, to determine the output result of the gating network. For the private expert network and the shared expert network of the same task, the corresponding output result of the gating network and the output result of the shared expert network can be different. Based on this, for each task, the product of the output result of the gating network and the output result of the shared expert network can be added to the product of the output result of the gating network and the result of the private expert network to determine the combined processing result of each task, and then the task result of each task can be determined according to the combined processing result of each task. Among them, the task result of each task can be any one of predicting the heart rate, predicting the click-through rate, and predicting the complete playback rate.
[0107] After determining the task results of at least one task, the loss can be determined based on the task results of all tasks. The loss here can be the total loss, which is used to train the recommendation model. Exemplarily, in the task management layer, the task result of each task can be compared with the true label of each task, and the intermediate loss of each task can be determined according to the difference between the task result and the true label. The true label can be used to indicate whether to click, whether to complete playback, and whether to click the heart, and can be specifically represented by 0 or 1. Further, the intermediate losses of each task can be weighted and summed to determine the loss for training the recommendation model.
[0108] Continue to refer to Figure 2 As shown in, in step S250, the model parameters of the recommendation model to be trained are adjusted according to the loss to obtain the recommendation model.
[0109] In the embodiments of the present disclosure, it is assumed that the goals of daily recommendation and style recommendation in the recommendation scenario are to predict the click-through rate (CTR), predict the heart rate, and predict the complete playback rate; the main tasks in recommendation scenarios such as the heart mode, private radar, and private roaming are to predict the heart rate and predict the complete playback rate. Therefore, for the above-mentioned recommendation scenarios, they can be divided into two types of recommendation scenarios, specifically including the training sample space of daily recommendation and style recommendation based on the exposure space, and the training sample space of the heart mode, private radar, and private roaming based on the playback space. It should be noted that the training sample spaces of the two types of recommendation scenarios are in an intersection relationship. Based on this, the play_sample and click_sample methods can be used to achieve differential modeling of the scenarios.
[0110] Differentiated modeling refers to using different training sample spaces for modeling in different recommendation scenarios. For example, for daily recommendations and style recommendations based on the exposure space, the training sample space can be the sample spaces corresponding to click-through rate, favorite rate (heart rate), and completion rate. For heart mode, private radar, and private roaming based on the play space, the training sample space can be the sample spaces corresponding to favorite rate and completion rate. Moreover, there is an intersection between the sample space of the exposure space and the sample space of the play space.
[0111] Based on this, since the recommendation model to be trained is a general model that integrates multiple tasks and multiple scenarios, for some tasks in some recommendation scenarios, a part of the loss can be used while making another part of the loss ineffective. Therefore, after determining the loss, the target loss to be used in the differentiated modeling process can be determined from the loss. The target loss can be all or a part of the loss, specifically determined according to the weight of the target loss.
[0112] For example, if the sample data for training is data related to the click-through rate of daily recommendations, it cannot affect the task of the completion rate of the heart mode. Based on this, the target loss related to the sample data can be determined from the loss according to the sample data of the recommendation scenario. Exemplarily, the task of the recommendation scenario can be determined according to the sample data, and the weights of the intermediate losses unrelated to the task of the recommendation scenario in the loss can be configured as fixed values to determine the target loss. The fixed value can be 0, for example. In some embodiments, if the task of the recommendation scenario determined according to the sample data is A, the weights of all intermediate losses unrelated to task A in the loss are configured as 0, and only the target loss related to task A is retained. On this basis, the model parameters of the recommendation model to be trained can be adjusted according to the target loss until the target loss function is minimized to obtain the recommendation model.
[0113] In the embodiments of the present disclosure, by selecting the target loss related to the recommendation scenario, the accuracy of model training can be improved. Since only the target loss related to the recommendation scenario is required to implement model training, the efficiency of model training can be improved.
[0114] Figure 7 The schematic diagram of the recommendation model is schematically shown in reference to Figure 7As shown, the input data can be user data, historical music features, historical music, and scenario data for multiple recommendation scenarios. The shared embedding layer is used to perform feature mapping on the input data to map it into a unified vector space. The mapped user portrait features and the mapped historical music features are respectively subjected to fully connected processing to generate the first features of the first path. The user behavior features are processed through a Transformer layer and a normalization layer to obtain normalized behavior features. In the attention layer, the normalized behavior features corresponding to the mapped user behavior features are associated with the mapped evaluation music features corresponding to the historical music to determine the second features of the second path. The first features and the second features are fused to determine the public features of the public domain network.
[0115] For the scenario data of each recommendation scenario, high-order features of each recommendation scenario are extracted based on the specific scenario network in the private domain network, and further the high-order features of each recommendation scenario are connected in parallel to determine the private features related to each recommendation scenario.
[0116] Based on this, the public features and the private features are fused and input into the gating network, the private expert network, and the shared expert network of the multi-task network. For each task, the product of the output result of the gating network and the output result of the shared expert network can be added to the product of the output result of the gating network and the result of the private expert network to determine the combined processing result of each task. On this basis, the combined processing result can be fused with the output result of the scenario indicator to determine the task result of each task. The loss is determined according to the task result of each task and the true label.
[0117] Furthermore, the model parameters of the recommendation model to be trained can be adjusted according to the loss, so as to obtain the recommendation model.
[0118] In the embodiments of the present disclosure, by separately modeling the public domain network and the private domain network, the commonalities and the differences between scenarios are respectively captured. Through the shared expert network and the private expert network of the CGC structure, the sharing and differences between tasks are learned. The public features are extracted through the public domain network, and the private features are extracted through the private domain network. The recommendation model is trained according to the loss determined by the task results determined by the public features and the private features, which can perform unified modeling of multiple scenarios simultaneously and solve the problem of behavioral transfer learning between scenarios. The lightweight design of the model ensures the implementation of the unified model in the cloud music recommendation system and improves the user experience.
[0119] Figure 8 Schematically shows the architecture diagram of the cross-domain recommendation system, refer to Figure 8 as shown in, which includes a data layer, a scenario layer, and a task layer.
[0120] For the data layer, the business data of the application platform covers a variety of different recommendation scenarios, such as daily recommendation, private roaming, heart mode, private radar, home page private customization scenario, etc. Since the behavioral data of the same user in different scenarios may have a high degree of correlation, the data in these business scenarios has strong coupling. To effectively handle this coupling, the data can be split into public features and private features at the data layer. For example, referring to Figure 8 as shown in, the data layer includes a sample layer and a feature input layer, and the feature input layer can include public features, private features, scenario features, user behavior preferences, etc.
[0121] Among them, in addition to including the public information of the user, the public features also cover the general portrait information of music and the user behavior sequence. Among them, the user behavior sequence is a key feature for multi-recommendation scenario learning because it can reflect the user's behavior patterns and preferences in various recommendation scenarios.
[0122] The private features refer to extracting the private information features unique to different recommendation scenarios according to the uniqueness of the recommendation scenarios, and these information contain the music features unique to each recommendation scenario. For example, in the private roaming scenario, there are some unique real-time features. These scenario-specific features play a positive and effective role in cross-scenario joint modeling. To a certain extent, such strongly correlated features can alleviate the problem that over-optimizing one task may lead to a decrease in the performance of other tasks. By introducing strongly correlated features, it can help the model better understand and capture the correlations between different scenarios, so as to achieve a better balance in multi-task learning.
[0123] For the scenario layer, when building a multi-scenario recommendation system, the recommendation model adopts a tower-shaped model architecture, including a public domain feature tower and multiple private domain feature towers. It makes full use of public features and private features, enabling the model to understand the user's behavior patterns and preferences in various recommendation scenarios.
[0124] Among them, in the public domain feature tower, in order to achieve cross-scenario recommendations, it is necessary to align the features from different recommendation scenarios. In this alignment process, the public features and the user behavior sequence will be processed through the public domain feature tower, while the private features unique to each recommendation scenario will be processed through the corresponding private domain feature tower. The task of the public domain feature tower is to extract and learn the public features and user behavior patterns across recommendation scenarios.
[0125] The private domain feature tower focuses on extracting and learning the private features of each recommendation scenario. In the cross-domain multi-scenario model, an adaptive Embedding method is adopted, that is, the Embedding can automatically adjust its distribution to meet the requirements of different scenarios. For example, each recommendation scenario requires an Embedding that better suits that scenario to capture more complex patterns and relationships. This adaptive method enables the model to automatically adjust the Embedding according to the scenario requirements, thereby improving the recommendation accuracy and efficiency. In addition, the recommendation model also includes a user parameter personalization layer in the scenario layer. The user parameter personalization layer adopts a parameter personalization strategy, so that the private domain feature tower of each recommendation scenario has its specific parameters, and these parameters are only used in specific recommendation scenarios, so as to better capture the specific features and patterns of that scenario. This method not only improves the recommendation performance of the model in specific scenarios, but also avoids parameter interference between different scenarios, achieving a better multi-task learning balance.
[0126] In a music recommendation system, parameters such as user hearts and music play duration need to be considered. Therefore, the task layer can adopt a structure of a multi-expert hybrid layer. The multi-expert hybrid layer consists of a shared expert network and a private expert network, forming a structure that conforms to the PLE network architecture. In this network, the prediction targets, that is, the tasks, can include predicting click-through rate, completion rate, heart rate, and multi-stage duration play rate of music. The shared expert network mixes the prediction results of multiple expert models to improve the accuracy of the final prediction. The shared expert network is responsible for processing common features and user behavior sequences, and its goal is to capture and understand cross-scenario user behavior patterns and preferences. The private expert network, on the other hand, focuses on processing the private features of each recommendation scenario, and its goal is to understand and capture the specific features and patterns of each scenario. In addition, the task layer can also include a task prediction layer, including predicting play duration, song hearts, front-end exposure, and duration quantiles. Through this design, the recommendation model can take into account both the cross-scenario commonalities and the single-scenario specificities, thus achieving higher accuracy and efficiency in multi-task recommendation.
[0127] The technical solution in the embodiments of the present disclosure proposes a multi-objective unified model with scenario differentiation. By using cross-domain transfer learning and multi-task learning technologies, a model architecture of a public domain multi-expert hybrid network - private domain multi-tower parallel connection is designed, realizing the function of a single model for music recommendation in all recommendation scenarios. While ensuring the modeling effect, it improves the model training and online inference performance, and guarantees the implementation of the model. Since for different recommendation scenarios, only one general model, namely the recommendation model, needs to be trained, the operation and maintenance cost, computing cost, and storage cost are reduced. In addition, the model training efficiency and the reliability of the model are improved. It can solve the limitation that different models are required for different recommendation scenarios, learn the commonalities and differences between different scenarios, solve the problem of behavioral transfer learning between different recommendation scenarios, improve the accuracy of the recommendation model, and has a good effect on scenario cold start.
[0128] In some embodiments of the present disclosure, a music recommendation method is further provided. As shown in Figure 9 , it mainly includes the following steps:
[0129] In step S910, user data, music data, and scenario data of multiple recommendation scenarios corresponding to the target user in the application platform are obtained;
[0130] In step S920, the user data, music data, and the scenario data are input into the recommendation model to obtain music recommendation results for each recommendation scenario.
[0131] In the embodiments of the present disclosure, for the target user, the user data in the application platform can be obtained. The user data may include a user profile and user behavior characteristics. The user profile is used to describe the specific characteristics of the user. The user behavior characteristics can be determined according to user behavior information. The music data refers to the data used to predict music, and the music data may include the music to be predicted and music characteristics. Among them, the music to be predicted can be the music that the target user may be interested in. The number of music to be predicted can be multiple. The music characteristics can be music profile characteristics, which are used to represent the general profile characteristics of music. The scenario data refers to the data corresponding to each recommendation scenario, which can be used to represent the private characteristics unique to each recommendation scenario and includes the music characteristics of each recommendation scenario. The multiple recommendation scenarios may include daily recommendation, private roaming, heart mode, private radar, home page private customization scenario, etc.
[0132] Next, the obtained user data, the music to be predicted, the music features, and the scenario data can be input into the recommendation model. According to the shared embedding layer of the recommendation model, feature mapping is performed on the user portrait features and the music features to determine the mapped user portrait features and the mapped music features, and a fully connected process is performed to obtain the first prediction feature. Feature mapping is performed on the user behavior features and the music to be predicted to determine the mapped user behavior features and the mapped predicted music features; through the self-attention layer, the mapped user behavior features and the mapped predicted music features are associated and calculated for weighted fusion to determine the second prediction feature. The first prediction feature and the second prediction feature are fused to determine the public feature.
[0133] For the scenario data of each recommendation scenario, high-order features of each recommendation scenario are extracted based on the specific scenario network in the private network, and further the high-order features of each recommendation scenario are connected in parallel to determine the private features related to each recommendation scenario.
[0134] Based on this, the public feature and the private feature are fused and input into the gating network, the private expert network, and the shared expert network of the multi-task network. For each task, the product of the output result of the gating network and the output result of the shared expert network can be added to the product of the output result of the gating network and the result of the private expert network to determine the combined processing result of each task. On this basis, the combined processing result can be fused with the output result of the scenario indicator to determine the task result of each task. The task result can be any one of the predicted click-through rate, the predicted red heart rate, and the predicted completion rate.
[0135] Furthermore, for each recommendation scenario, the music recommendation result is determined according to the task result of each task. Exemplarily, the task results of each task corresponding to each recommendation scenario can be weighted and summed to determine the score, and the music recommendation result of each recommendation scenario is determined from the music to be predicted according to the score. For example, for the recommendation scenarios of daily recommendation and style recommendation, the predicted click-through rate, the predicted red heart rate, and the predicted completion rate can be weighted and summed to obtain the score of each music to be predicted. For the recommendation scenarios of heart mode, private radar, and private roaming, the predicted red heart rate and the predicted completion rate can be weighted and summed to determine the score of each music to be predicted. After obtaining the score of each music to be predicted, the music recommendation result of each recommendation scenario can be selected from multiple musics to be predicted in descending order of the score. The number of music recommendation results of each recommendation scenario can be the same or different, and the number of each music recommendation result can be determined according to actual needs, such as 30 or 50, etc.
[0136] In the technical solution of the embodiments of the present disclosure, by inputting user data corresponding to a target user, a music to be evaluated, music features, and scenario data of multiple recommendation scenarios into a recommendation model, since the recommendation model is a prediction model for implementing different recommendation scenarios and different tasks, it is possible to achieve parallel prediction of different recommendation scenarios through a general recommendation model. During the prediction process, the commonalities and differences between different recommendation scenarios can be utilized, improving the efficiency and accuracy of music recommendation, enhancing the generality of music recommendation, increasing comprehensiveness, and at the same time reducing the operation and maintenance costs and computing costs of music recommendation.
[0137] Next, refer to Figure 10 to describe the training device of the recommendation model according to the exemplary embodiments of the present disclosure. As Figure 10 shown, the training device 1000 of the recommendation model may include:
[0138] A data acquisition module 1001, configured to acquire user data corresponding to a target user, sample music data, and scenario data of multiple recommendation scenarios in an application platform;
[0139] A public feature extraction module 1002, configured to extract public features from the user data and the sample music data through a public domain network;
[0140] A private feature extraction module 1003, configured to extract features from the scenario data of each recommendation scenario based on a private domain network to determine private features related to each recommendation scenario;
[0141] A loss determination module 1004, configured to perform feature fitting on the public features and the private features according to a multi-task network to obtain task results of at least one task, and determine a loss according to the task results;
[0142] A model training module 1005, configured to adjust model parameters of a recommendation model to be trained according to the loss to obtain the recommendation model.
[0143] In an exemplary embodiment of the present disclosure, the sample music data includes historical music features and historical music; the public feature extraction module includes: a first feature extraction module, configured to extract a first feature according to user portrait features in the user data and the historical music features; a second feature extraction module, configured to fuse the historical music and user behavior features in the user data to determine a second feature; a feature fusion module, configured to fuse the first feature and the second feature to obtain the public feature.
[0144] In an exemplary embodiment of the present disclosure, the first feature extraction module includes: a feature mapping module for performing feature mapping on the user portrait features and the historical music features to determine the mapped user portrait features and the mapped historical music features; and a fully connected processing module for performing fully connected processing on the mapped user portrait features and the mapped historical music features respectively to obtain the first feature.
[0145] In an exemplary embodiment of the present disclosure, the second feature extraction module includes: a feature mapping module for performing feature mapping on the user behavior features and the historical music to determine the mapped user behavior features and the mapped evaluation music features; and an association processing module for performing association calculation on the mapped user behavior features and the mapped evaluation music features through a self-attention layer for weighted fusion to determine the second feature.
[0146] In an exemplary embodiment of the present disclosure, the private feature extraction module includes: a scenario feature mapping module for performing feature mapping on the scenario data of each recommendation scenario to determine the mapped scenario features; a high-order feature extraction module for performing feature learning on the mapped scenario features through a specific scenario network corresponding to each recommendation scenario in the private domain network to extract the high-order features of each recommendation scenario; and a high-order feature parallel connection module for parallelly connecting the high-order features of each recommendation scenario to determine the private features related to each recommendation scenario.
[0147] In an exemplary embodiment of the present disclosure, the specific scenario network includes a feature masking layer, two fully connected layers, a normalization layer, a dropout layer, and a residual connection layer connecting the two fully connected layers; the high-order feature extraction module includes: a feature screening module for screening the mapped scenario features through the feature masking layer to obtain aligned features; a normalization module for performing fully connected processing on the aligned features through a fully connected layer and normalizing through the normalization layer to obtain normalized features; a fully connected module for performing fully connected processing on the normalized features to determine fully connected features; a residual connection module for performing a residual connection between the aligned features and the fully connected features based on the residual connection layer to determine a residual output; and a regularization processing module for adding the fully connected output and the residual output and performing regularization on the added result based on the dropout layer to determine the high-order features of each recommendation scenario.
[0148] In an exemplary embodiment of the present disclosure, the loss determination module includes: a fusion feature for fusing the public features and the private features to determine a fusion feature; and a task result determination module for performing feature fitting on the fusion feature through the multi-task network to obtain the task results of at least one task.
[0149] In an exemplary embodiment of the present disclosure, the multi-task network includes a gating network, a shared expert network, and a private expert network; the task result determination module includes: a network output result determination module, configured to input the fusion feature into the gating network, the shared expert network, and the private expert network to obtain a gating network output result, a shared expert network output result, and a private expert network result; a logical combination module, configured to perform a combination process on the gating network output result, the shared expert network output result, and the private expert network result to obtain a combined process result, and fuse the combined process result with the output result of the scenario indicator to determine the task result of each task.
[0150] In an exemplary embodiment of the present disclosure, the logical combination module is configured to: add the product of the gating network output result and the shared expert network output result to the product of the gating network output result and the private expert network result to determine the combined process result.
[0151] In an exemplary embodiment of the present disclosure, the number of private expert networks is the same as the number of tasks, and the number of shared expert networks is less than the number of private expert networks; the gating network is configured to determine the weights of the private expert networks and the shared expert networks for each task.
[0152] In an exemplary embodiment of the present disclosure, the model training module includes: an intermediate loss determination module, configured to determine an intermediate loss corresponding to each task according to the difference between the task result of each task and the true label corresponding to each task; a loss determination module, configured to perform a weighted sum of the intermediate losses corresponding to each task to determine the loss.
[0153] In an exemplary embodiment of the present disclosure, the model training module includes: a sample data determination module, configured to determine the sample data of each recommendation scenario; a parameter adjustment module, configured to determine a target loss related to the sample data of the recommendation scenario from the loss, and adjust the model parameters of the recommendation model to be trained based on the target loss to generate the recommendation model.
[0154] In an exemplary embodiment of the present disclosure, the parameter adjustment module includes: a target loss determination module, configured to determine the task of the recommendation scenario according to the sample data, and configure the weights of the intermediate losses irrelevant to the task of the recommendation scenario in the loss as fixed values to determine the target loss.
[0155] In addition, an embodiment of the present disclosure also provides a music recommendation device, refer to Figure 11As shown in the figure, the music recommendation device 1100 may include: a data acquisition module 1101 and a recommendation result determination module 1102, where:
[0156] The data acquisition module 1101 is configured to acquire user data, music data, and scenario data of multiple recommendation scenarios corresponding to a target user in an application platform;
[0157] The recommendation result determination module 1102 is configured to input the user data, music data, and the scenario data into a recommendation model to obtain music recommendation results for each recommendation scenario.
[0158] It should be noted that the specific details of the training device of the recommendation model and each module of the music recommendation device have been described in detail in the steps of the corresponding method, so they will not be elaborated here.
[0159] Next, refer to Figure 12 to describe the electronic device 1200 according to this embodiment of the present disclosure. Figure 12 The electronic device 1200 shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0160] As Figure 12 shown, the electronic device 1200 is presented in the form of a general computing device. The components of the electronic device 1200 may include, but are not limited to: at least one of the above-mentioned processing units 1210, at least one of the above-mentioned storage units 1220, a bus 1230 connecting different system components (including the storage unit 1220 and the processing unit 1210), and a display unit 1240. The bus 1230 may include a data bus, an address bus, and a control bus.
[0161] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 1210, so that the processing unit 1210 executes the steps according to various exemplary embodiments of the present disclosure described in the "Exemplary Method" section of this specification. For example, the processing unit 1210 can execute the steps as Figure 2 shown.
[0162] The storage unit 1220 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 12201 and / or a cache storage unit 12202, and may further include a read-only storage unit (ROM) 12203.
[0163] The storage unit 1220 may also include a program / utilities 12204 having a set (at least one) of program modules 12205. Such program modules 12205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include the implementation of a network environment.
[0164] The bus 1230 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration interface, a processing unit, or a local bus using any of the various bus structures.
[0165] The electronic device 1200 may also communicate with one or more external devices 1300 (such as a keyboard, a pointing device, a Bluetooth device, etc.). Such communication may be performed through the input / output (I / O) interface 1250. Also, the electronic device 1200 may communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through the network adapter 1260. As shown in the figure, the network adapter 1260 communicates with other modules of the electronic device 1200 through the bus 1230. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1200, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.
[0166] It should be noted that in some embodiments of the present disclosure, a computer program product is also provided. The computer program product includes a computer program, and when the computer program is executed by a processor, the above method is implemented.
[0167] In one implementation, the computer program product may be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium may be a storage medium based on signals such as electricity, magnetism, light, electromagnetic, infrared, etc., including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory (Flash), hard disk drive (HDD), solid state drive (SSD), etc. Exemplarily, the computer program product may be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, Nand Flash, etc.
[0168] In one implementation, the computer program product may be an intangible product containing a computer program. Exemplarily, the computer program product may be implemented as a virtual digital product, such as an executable file storing a computer program, an installation package, and other digital files.
[0169] The code of a computer program can be written in one or more programming languages. Examples of programming languages include C, Java, C++, etc. The program code can be executed entirely on the user's computing device, or partially on the user's computing device, or as an independent software package, or partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, such as a local area network (LAN), a wide area network (WAN), etc., or it can be connected to an external computing device (e.g., through an Internet connection provided by an operator).
[0170] A computer program can be carried or transmitted by signals such as electrical, magnetic, optical, electromagnetic, infrared, etc. An electronic device can convert the signal carrying the computer program into a digital signal and then run the computer program. When the computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to cause the processor of the electronic device to execute) the method steps of various exemplary embodiments of the present disclosure.
[0171] From the description of the above embodiments, those skilled in the art can easily understand that the exemplary embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a portable hard drive, etc.) or on a network, and includes several instructions to cause a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0172] In addition, the above drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not for limiting purposes. It is easy to understand that the processes shown in the above drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easy to understand that these processes can be executed synchronously or asynchronously, for example, in multiple modules.
[0173] It should be noted that although several modules or units of devices for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-described modules or units can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0174] Other embodiments of the present disclosure will be readily apparent to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include known common general knowledge or conventional technical means in the technical field not disclosed herein. The specification and examples are merely illustrative, and the true scope and spirit of the present disclosure are pointed out by the claims.
[0175] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. A training method for a recommendation model, characterized in that Including: Obtain user data, sample music data, and scenario data of multiple recommendation scenarios corresponding to a target user in an application platform; Extract public features from the user data and the sample music data through a public network; Based on a private network, extract features from the scenario data of each recommendation scenario to determine private features related to each recommendation scenario; According to a multi-task network, perform feature fitting on the public features and the private features to obtain task results of at least one task, and determine a loss according to the task results; Adjust the model parameters of the recommendation model to be trained according to the loss to obtain the recommendation model.
2. The training method of the recommendation model according to claim 1, wherein The sample music data includes historical music features and historical music; the extracting public features from the user data and the sample music data through a public network includes: Extract first features according to the user portrait features in the user data and the historical music features; Fuse the historical music and the user behavior features in the user data to determine second features; Fuse the first features and the second features to obtain the public features.
3. The training method of the recommendation model according to claim 2, characterized in that The extracting first features according to the user portrait features in the user data and the historical music features includes: Perform feature mapping on the user portrait features and the historical music features to determine the mapped user portrait features and the mapped historical music features; Perform fully connected processing on the mapped user portrait features and the mapped historical music features respectively to obtain the first features.
4. The training method of the recommendation model according to claim 2, wherein The fusing the historical music and the user behavior features in the user data to determine second features includes: Perform feature mapping on the user behavior features and the historical music to determine the mapped user behavior features and the mapped evaluation music features; Perform correlation calculation on the mapped user behavior features and the mapped evaluation music features through a self-attention layer for weighted fusion to determine the second features.
5. The training method of the recommendation model according to claim 1, characterized in that The extracting features from the scenario data of each recommendation scenario based on a private network to determine private features related to each recommendation scenario includes: Perform feature mapping on the scenario data of each recommendation scenario to determine the mapped scenario features; Through a specific scenario network corresponding to each recommendation scenario in the private network, perform feature learning on the mapped scenario features to extract high-order features of each recommendation scenario; Parallelly connect the high-order features of each recommendation scenario to determine the private features related to each recommendation scenario.
6. The training method of the recommendation model according to claim 5, wherein The specific scenario network includes a feature mask layer, two fully connected layers, a normalization layer, a dropout layer, and a residual connection layer connecting the two fully connected layers; The performing feature learning on the mapped scenario features through a specific scenario network corresponding to each recommendation scenario in the private network to extract high-order features of each recommendation scenario includes: Screen the mapped scenario features through the feature mask layer to obtain aligned features; Fully connect the aligned features through a fully connected layer and normalize them through a normalization layer to obtain normalized features; Perform a fully connected process on the normalized features to determine the fully connected features; Based on the residual connection layer, perform a residual connection between the aligned features and the fully connected features to determine the residual output; Add the fully connected output and the residual output, and regularize the added result based on the dropout layer to determine the high-order features for each recommendation scenario.
7. The training method of the recommendation model according to claim 1, characterized in that The feature fitting of the public features and the private features according to the multi-task network to obtain the task results of at least one task includes: Fuse the public features and the private features to determine the fused features; Perform feature fitting on the fused features through the multi-task network to obtain the task results of at least one task.
8. The training method of the recommendation model according to claim 7, characterized in that The multi-task network includes a gating network, a shared expert network, and a private expert network; The performing feature fitting on the fused features through the multi-task network to obtain the task results of at least one task includes: Input the fused features into the gating network, the shared expert network, and the private expert network to obtain the output result of the gating network, the output result of the shared expert network, and the result of the private expert network; Perform a combination process on the output result of the gating network, the output result of the shared expert network, and the result of the private expert network to obtain a combined processing result, and fuse the combined processing result with the output result of the scenario indicator to determine the task result of each task.
9. The training method of the recommendation model according to claim 8, characterized in that The performing a combination process on the output result of the gating network, the output result of the shared expert network, and the result of the private expert network to obtain a combined processing result includes: Add the product of the output result of the gating network and the output result of the shared expert network to the product of the output result of the gating network and the result of the private expert network to determine the combined processing result.
10. The training method of the recommendation model according to claim 8, wherein The number of the private expert networks is the same as the number of tasks, and the number of the shared expert networks is less than the number of the private expert networks; the gating network is used to determine the weights of the private expert networks and the shared expert networks for each task.