Recommended method, device, equipment, storage medium and program product
By using a gating network trained with user data from low-frequency users in a multi-task learning model, and adjusting the model output, the problem of poor recommendation performance for low-frequency users is solved, and the recommendation accuracy and model stability are improved.
Patent Information
- Application Number
- CN202510194637.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-21
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-02-21
AI Technical Summary
Existing recommendation models struggle to accurately capture the true preferences of low-frequency users and are easily dominated by data from high-frequency users during training, resulting in poor recommendation performance for low-frequency users.
By employing a gated network in the multi-task learning (MTL) model, the model output is adjusted using weight parameters trained based on user data from low-frequency users, thereby improving the recommendation accuracy for low-frequency users.
It effectively solves the problem that recommendation results for low-frequency users are dominated by high-frequency users, and improves the recommendation accuracy and robustness of the recommendation model for low-frequency users.
Smart Images

Figure CN120144859B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information flow recommendation technology, and in particular to a recommendation method, apparatus, device, storage medium, and program product. Background Technology
[0002] Recommendation models capture user interests by learning from massive user interactions with materials and then recommend materials that interest them. They are widely used in e-commerce, video, and music applications. However, for low-frequency users who have little or no interaction with materials, recommendation models struggle to capture their true preferences and are easily dominated by data from high-frequency users during training, thus failing to accurately recommend materials that interest low-frequency users. Summary of the Invention
[0003] This application provides a recommendation method, apparatus, device, storage medium, and program product, which can effectively solve the problem that recommendation results for low-frequency users are dominated by high-frequency users, and improve the recommendation accuracy of the recommendation model for low-frequency users.
[0004] In a first aspect, this application provides a recommendation method, comprising: in response to a recommendation request, acquiring user data of a target user and material data of a material to be recommended; based on the user data, determining a set of weight parameters corresponding to the target user by setting a gating network in a multi-task learning (MTL) model; wherein the gating network includes at least one, each gating network corresponding to a first network layer in the MTL model, and each gating network is trained based on user data of at least low-frequency sample users; the MTL model outputs the target user's level of interest in the material to be recommended based on the input user data and material data; for any first network layer in the MTL model, adjusting the first output data of the first network layer based on a set of weight parameters output by the gating network corresponding to the first network layer, to obtain a second output data of the first network layer adjusted by the gating network; adjusting the first output data of at least one first network layer in the MTL model through at least one gating network to obtain the adjusted level of interest of the target user in the material to be recommended output by the MTL model; and recommending materials to the target user based on the adjusted level of interest.
[0005] In some possible implementations, based on user data, a set of weight parameters corresponding to the target user is determined by a gating network set in the MTL model, including: obtaining the third output data of the last activation layer in the gating network through multiple activation layers in the gating network based on user data; multiplying the scaling factor of the gating network and the third output data to obtain a set of weight parameters output by the gating network; wherein the scaling factor is obtained after training the gating network based at least on user data of low-frequency sample users.
[0006] In some possible implementations, when there is only one gating network, the gating network is a first-type gating network. The first network layer corresponding to the first-type gating network is used to extract features from user data and material data. Based on user data, a set of weight parameters corresponding to the target user is determined through the gating network set in the MTL model. This includes obtaining a set of weight parameters output by the first-type gating network based on user data and the target user's consumption data. The consumption data is used to represent the target user's consumption behavior of materials in different recommendation scenarios and at different times.
[0007] In some possible implementations, the first output data of the first network layer is adjusted based on a set of weight parameters output by the gating network corresponding to the first network layer to obtain the second output data of the first network layer after adjustment by the gating network. This includes: extracting features from user data and material data through the first network layer corresponding to the first type of gating network to obtain the first output data output by the first network layer; and multiplying the first output data by a set of weight parameters output by the first type of gating network to obtain the second output data.
[0008] In some possible implementations, when there are multiple gating networks, these multiple gating networks include a first type of gating network and a second type of gating network. The first network layer corresponding to the first type of gating network is used for feature extraction of user data and material data, and the first network layer corresponding to the second type of gating network is used for data transformation processing of the input data. Based on user data, a set of weight parameters corresponding to the target user is determined through the gating networks set in the MTL model, including: based on user data and the target user's consumption data, obtaining a set of weight parameters output by the first type of gating network through the first type of gating network; wherein, the consumption data is used to represent the target user's consumption behavior of materials in different recommendation scenarios and at different times; based on user data and material data, obtaining a set of weight parameters output by the second type of gating network through the second type of gating network.
[0009] In some possible implementations, based on user data and material data, a set of weight parameters output by the second type of gating network is obtained through the second type of gating network, including: concatenating user data, material data and the second output data of the first network layer corresponding to the first type of gating network to obtain concatenated data; and obtaining a set of weight parameters output by the second type of gating network by inputting the concatenated data into the second type of gating network.
[0010] In some possible implementations, each gating network includes multiple cascaded activation layers, and different gating networks include different numbers of activation layers, and / or the activation functions of the activation layers in different gating networks are different.
[0011] Secondly, this application provides a recommendation device, comprising: a data acquisition module, configured to acquire user data of a target user and material data of a material to be recommended in response to a recommendation request; a first data processing module, configured to determine a set of weight parameters corresponding to the target user based on the user data and through a gating network set in a multi-task learning (MTL) model; wherein the gating network includes at least one, each gating network corresponds to a first network layer in the MTL model, and each gating network is trained based on user data of at least low-frequency sample users; the MTL model outputs the target user's level of interest in the material to be recommended based on the input user data and material data; a second data processing module, configured to adjust the first output data of any first network layer in the MTL model based on a set of weight parameters output by the gating network corresponding to the first network layer, to obtain a second output data of the first network layer adjusted by the gating network; the first output data of at least one first network layer in the MTL model is adjusted through at least one gating network to obtain the adjusted level of interest of the target user in the material to be recommended output by the MTL model; and a recommendation module, configured to recommend materials to the target user based on the adjusted level of interest.
[0012] In some possible implementations, the first data processing module is used to obtain the third output data of the last activation layer in the gating network based on user data and through multiple activation layers in the gating network; multiply the scaling factor of the gating network and the third output data to obtain a set of weight parameters of the gating network output; wherein the scaling factor is obtained after training the gating network based at least on user data of low-frequency sample users.
[0013] In some possible implementations, when there is only one gating network, it is a first-type gating network. The first network layer corresponding to the first-type gating network is used to extract features from user data and material data. The first data processing module is used to obtain a set of weight parameters output by the first-type gating network based on user data and target user consumption data, through the first-type gating network; wherein, the consumption data is used to represent the target user's consumption behavior of materials in different recommendation scenarios and at different times.
[0014] In some possible implementations, the second data processing module is used to extract features from user data and material data through a first network layer corresponding to the first type of gating network to obtain first output data output by the first network layer; and to perform a dot product between a set of weight parameters output by the first type of gating network and the first output data to obtain second output data.
[0015] In some possible implementations, when there are multiple gating networks, these multiple gating networks include a first type of gating network and a second type of gating network. The first network layer corresponding to the first type of gating network is used for feature extraction of user data and material data, and the first network layer corresponding to the second type of gating network is used for data transformation processing of the input data. A first data processing module is used to obtain a set of weight parameters output by the first type of gating network based on user data and the target user's consumption data; wherein, the consumption data represents the target user's consumption behavior of materials in different recommendation scenarios and at different times; and based on user data and material data, to obtain a set of weight parameters output by the second type of gating network.
[0016] In some possible implementations, the first data processing module is used to concatenate user data, material data, and the second output data of the first network layer corresponding to the first type of gating network to obtain concatenated data; and to obtain a set of weight parameters output by the second type of gating network by inputting the concatenated data into the second type of gating network.
[0017] In some possible implementations, each gating network includes multiple cascaded activation layers, and different gating networks include different numbers of activation layers, and / or the activation functions of the activation layers in different gating networks are different.
[0018] Thirdly, this application provides an electronic device, including: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the method provided in this application.
[0019] Fourthly, this application provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the method provided in this application.
[0020] Fifthly, this application provides a computer program product, including a computer program or instructions, which, when executed by a processor, implement the method provided in this application.
[0021] This application has the following beneficial effects:
[0022] In this application, a gating network trained with user data from low-frequency users is used to obtain the weight parameters corresponding to the target user. By adjusting the output of the MTL model with the weight parameters corresponding to the target user, the problem that the recommendation results for low-frequency users are dominated by high-frequency users can be effectively solved, thereby improving the recommendation accuracy of the recommendation model for low-frequency users. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the architecture of a recommendation system provided in an embodiment of this application;
[0024] Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application;
[0025] Figure 3 This is a schematic diagram of an optional process of a recommended method provided in an embodiment of this application;
[0026] Figure 4 This is a schematic diagram of a gating network structure provided in an embodiment of this application;
[0027] Figure 5 This is a schematic diagram of another gating network structure provided in an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of the structure of an MTL model provided in an embodiment of this application;
[0029] Figure 7 This is a schematic diagram of the structure of a recommendation model provided in an embodiment of this application. Detailed Implementation
[0030] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] If the application documents contain similar descriptions such as "first / second", the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0033] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0034] In a recommendation system, after browsing the recommended materials, users interact with them, generating various interactive behaviors such as clicking, forwarding, liking, commenting, and saving. The recommendation system often collects user interactions as samples to model recommendation models with different objectives, such as click-through rate and interaction rate. This allows the system to predict user preferences in real time when the user makes a subsequent request, determine which materials in the material library the user is more interested in, and then recommend them to the user.
[0035] Recommendation models often require massive amounts of user data for training to fully learn user preferences and achieve accurate predictions and recommendations. However, for low-frequency or new users, on the one hand, these users have limited historical data, resulting in insufficient training data for recommendation models and making it difficult for them to learn the interests and preferences of low-frequency or new users. On the other hand, because high-frequency users have far more historical data than low-frequency users, the recommendation model is dominated by high-frequency user data during training, leading to poor recommendation performance for low-frequency users.
[0036] This application provides a recommendation method, apparatus, device, storage medium, and program product that addresses the problem of recommendation results for low-frequency users being dominated by high-frequency users, thereby ensuring good recommendation results for different types of users and effectively improving the robustness and stability of the recommendation model.
[0037] The following describes exemplary applications of the electronic devices provided in the embodiments of this application. The electronic devices provided in the embodiments of this application can be various types of user terminals such as laptops, tablets, desktop computers, and mobile devices (e.g., mobile phones, wearable smartwatches, dedicated messaging devices), or they can be implemented as servers. The following will describe exemplary applications when the electronic device is implemented as a server.
[0038] See Figure 1 , Figure 1 This is a schematic diagram of the architecture of a recommendation system 100 provided in an embodiment of this application. To implement the recommendation method of this embodiment, electronic devices 400-1 and 400-2 (… Figure 1 (Only two electronic devices are shown in the figure, but this does not constitute a limitation on the number of electronic devices included in the recommended system of this application embodiment.) The system is connected to the server 200 via network 300, which may be a wide area network or a local area network, or a combination of both.
[0039] In one implementation, server 200 is used to obtain user data of target users and material data of target materials from database 500, and to obtain at least one gated network and a multi-task learning (MTL) model that have been trained from database 500, wherein each gated network is trained based on user data of low-frequency users.
[0040] In one implementation, server 200 determines at least one set of weight parameters corresponding to a target user based on user data through at least one gating network. Each gating network outputs a set of weight parameters, and each gating network corresponds to each of at least one first network layer in an MTL model. Through the MTL model, first output data of each first network layer is obtained based on user data and material data. Based on at least one set of weight parameters, the first output data of each first network layer is adjusted to obtain second output data of each first network layer. Based on the second output data, output data of the MTL model is determined, wherein the output data is used to represent the target user's degree of interest in the target material. Based on the output data and the material to be recommended, materials are recommended to the target user.
[0041] In one implementation, terminal 400 is used to display materials recommended by the server on a graphical interface.
[0042] In some embodiments, server 200 may be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, and big data and artificial intelligence platforms. Electronic device 400 may be a smartphone, tablet, laptop, desktop computer, smartwatch, or other electronic device with a display screen, but is not limited to these. Electronic devices and servers can be directly or indirectly connected via wired or wireless communication, and this is not limited in this embodiment of the invention.
[0043] Figure 2 This is a schematic diagram of the structure of the electronic device 400 provided in the embodiments of this application. Figure 2 The illustrated electronic device 400 includes at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the electronic device 400 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 440.
[0044] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0045] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0046] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0047] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0048] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0049] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0050] The network communication module 452 is used to reach other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0051] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;
[0052] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.
[0053] In some embodiments, the recommended device 455 provided in this application can be implemented in software. Figure 2 A recommended device 455 stored in memory 450 is shown. This device can be software in the form of programs and plug-ins, and includes the following software modules: a data acquisition module 4551, a first data processing module 4552, a second data processing module 4553, and a recommendation module 4554. These modules are logically connected and can therefore be arbitrarily combined or further divided according to their implemented functions. The functions of each module will be described below.
[0054] In other embodiments, the recommended device 455 provided in this application can be implemented in hardware. As an example, the recommended device 455 provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the recommended method provided in this application. For example, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0055] The recommended methods provided in this application will be described below with reference to exemplary applications and implementations of the electronic devices provided in the embodiments of this application.
[0056] See Figure 3 , Figure 3 This is a schematic diagram of an optional process of a recommended method provided in an embodiment of this application. The following will be combined with... Figure 3 The steps shown illustrate the recommended method provided in the embodiments of this application.
[0057] In this embodiment of the disclosure, the recommended method is performed by an electronic device, which may be a server or a terminal. The terminal includes, but is not limited to, at least one of the following: mobile phone, smartwatch, wearable device, Internet of Things device, car with communication function, smart car, tablet computer, computer with wireless transceiver function, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal device in industrial control, wireless terminal device in self-driving, wireless terminal device in remote medical surgery, wireless terminal device in smart grid, wireless terminal device in transportation safety, wireless terminal device in smart city, and wireless terminal device in smart home.
[0058] Step S301: In response to the recommendation request, obtain the user data of the target user and the material data of the material to be recommended.
[0059] In some embodiments, the electronic device can retrieve user data of the target user and material data of the recommended material from a database. User data represents user identity and user interests. Material data represents material type, material interaction information, and the material publisher.
[0060] In some embodiments, the target user can be a low-frequency user, which is a user whose historical behavior data is less than a first threshold; low-frequency users can also be referred to as cold-start users. Alternatively, the target user can be a high-frequency user, which is a user whose historical behavior data is greater than the first threshold; high-frequency users can also be referred to as warm-start users.
[0061] In some embodiments, user data may include at least one of the following: identity data and preference data. Identity data includes at least one of the following: age data, gender data, height data, weight data, appearance data, education data, and occupation data. Preference data includes the user's level of interest in different types of materials, which may include text materials, image materials, graphic and text materials, and video materials. Different types of materials may also include materials on multiple different topic types; for example, different types of materials may include: materials associated with entertainment stars, materials associated with current affairs and politics, materials associated with sports events, and materials associated with technology and digital topics.
[0062] In some embodiments, material data includes at least one of the following: material type data, click-through rate (CTR) of the material at different times, interaction rate of the material at different times, and material publisher data. The CTR is the ratio of the number of times the material is clicked to the number of times the material is displayed. The interaction rate is the ratio of the number of times users interact with the material to the number of times the material is displayed. Interactions include at least one of the following: commenting on the material, forwarding the material, liking the material, and saving the material.
[0063] Step S302: Based on user data, determine a set of weight parameters corresponding to the target user through a gating network set in the MTL model.
[0064] In some embodiments, the gated network includes at least one, each gated network corresponding to a first network layer in the MTL model, and each gated network is trained based on user data of low-frequency sample users; the MTL model outputs the target user's level of interest in the recommended materials based on the input user data and material data.
[0065] In some embodiments, the electronic device can acquire at least one gated network that has been trained, input user data of the target user into at least one gated network, and obtain at least one set of weight parameters output by at least one gated network, wherein each gated network outputs a set of weight parameters.
[0066] In some embodiments, each gating network can be trained based at least on user data from low-frequency users. In some embodiments, the training data for different gating networks can be the same or different. In some embodiments, the training data can be obtained from historical user data and historical material data in a database, or it can be generated by Flink real-time tasks. For example, Flink real-time tasks can be used to generate consumption data for all users in various recommendation scenarios on Weibo over the past 3, 7, or 30 days, and this consumption data can be used as training data.
[0067] In some embodiments, when the training data for different gating networks is the same, each gating network can be trained based on the consumption data of low-frequency users. In some embodiments, each gating network can be trained based on user data of low-frequency users and user data of high-frequency users, or it can be trained based on user data of low-frequency users and consumption data of low-frequency users, or it can be trained based on user data of low-frequency users, consumption data of low-frequency users, user data of high-frequency users, and consumption data of high-frequency users.
[0068] In some embodiments, when the training data for different gating networks differs, a portion of the multiple gating networks can be trained based on user data from low-frequency users, while another portion can be trained based on both low-frequency user data and material data. In some embodiments, a portion of the multiple gating networks can be trained based on user data from low-frequency users and consumption data from low-frequency users, while another portion can be trained based on both low-frequency user data and material data. In some embodiments, a portion of the multiple gating networks can be trained based on user data from low-frequency users and user data from high-frequency users, while another portion can be trained based on a combination of low-frequency user data, high-frequency user data, and material data. In some embodiments, a portion of the multiple gating networks can be trained based on user data from low-frequency users, consumption data from low-frequency users, user data from high-frequency users, and consumption data from high-frequency users, while another portion can be trained based on a combination of low-frequency user data, high-frequency user data, and material data.
[0069] In some embodiments, consumption data represents the target user's consumption behavior of materials in different recommendation scenarios and at different time periods. Consumption behavior includes at least one of the following: browsing materials, clicking materials, clicking the comment section of materials, clicking the author's homepage of materials, liking materials, commenting on materials, collecting materials, forwarding materials, and paying to browse materials. Consumption data includes at least one of the following: consumption days, number of materials exposed, number of refreshes, number of clicks, number of interactions, and total consumption duration.
[0070] In one example, consumption data represents a user's consumption data over 3 days, 7 days, and 30 days under different recommendation scenarios. Consumption days include the number of days a user consumed materials within 3 days, 7 days, and 30 days. Material exposure count includes the total number of materials viewed by the user within 3 days, 7 days, and 30 days. Refresh count includes the total number of times a user refreshed materials within 3 days, 7 days, and 30 days. Click count includes the number of times a user clicked on materials within 3 days, 7 days, and 30 days. Interaction count includes the number of times a user interacted with materials within 3 days, 7 days, and 30 days. Total consumption time includes the total time a user spent consuming materials within 3 days, 7 days, and 30 days.
[0071] Understandably, consumer data can more accurately reflect the behavioral differences of different users (such as low-frequency users and high-frequency users) compared to other data. Therefore, by training a gating network with consumer data, users can be finely divided into different types, so that users with the same behavioral habits are classified into the same type, thereby achieving the purpose of personalized recommendations for different types of users.
[0072] In some embodiments, each gating network includes multiple activation layers, and the activation functions of the multiple activation layers may be the same or different. The activation function of each activation layer may be one of the following: sigmoid function, tanh function, rectified linear unit (ReLU) function, exponential linear unit (ELU) function, maxout function, swish function, and mish function.
[0073] In some embodiments, each gating network includes multiple activation layers connected in series, and different gating networks include different numbers of activation layers, and / or the activation functions of the activation layers included in different gating networks are different.
[0074] In some embodiments, the network structures of different gating networks may be the same or different. In some embodiments, the number of activation layers included in different gating networks may be the same or different. In some embodiments, the activation functions of the activation layers included in different gating networks may be the same or different. In some embodiments, the input data of different gating networks may be the same or different.
[0075] In one example, assume there are three gated networks: gate1, gate2, and gate3. Gate1 has two activation layers: the first layer uses the ReLU function, and the second layer uses the sigmoid function. Gate2 has two activation layers: the first layer uses the ELU function, and the second layer uses the sigmoid function. Gate3 has three activation layers: the first layer uses the swish function, the second layer uses the tanh function, and the third layer uses the mish function. That is, gate1 and gate2 have the same number of activation layers, but their activation functions are partially the same and partially different. Gate3 has a different number of activation layers and different activation functions than both gate1 and gate2.
[0076] In one example, assume there are two gated networks: gate1 and gate2. Gate1 includes three activation layers connected in series, and gate2 includes three activation layers. The first activation layer is connected in parallel with the second activation layer, the first activation layer is connected in series with the third activation layer, and the second activation layer is connected in series with the third activation layer.
[0077] In some embodiments, user data can be preprocessed before being input into the gating network. For example, if the preprocessing parameters include w and b, and the input data of the gating network is represented by x, then the preprocessing process can be expressed by the formula f(x) = wx + b.
[0078] In some embodiments, Figure 4 This is a schematic diagram of a gating network structure provided in an embodiment of this application, such as... Figure 4 As shown, taking a gating network consisting of two cascaded activation layers, with the first activation layer having the ReLU function and the second activation layer having the sigmoid function as an example, the input data x (for example, the input data x includes user data and consumption data, or the input data x includes user data and material data) passes through the first activation layer. The first activation layer performs cross-learning on the user data to obtain the output data y1. The second activation layer maps the output data y1 of the first activation layer to the (0, 1) interval to obtain the weight parameter g.
[0079] In some embodiments, step S302 further includes: obtaining the third output data of the last activation layer in the gating network based on user data through multiple activation layers in the gating network; multiplying the scaling coefficients of the gating network and the third output data to obtain a set of weight parameters for the output of the gating network. The scaling coefficients are obtained after training the gating network based at least on user data from low-frequency sample users.
[0080] Understandably, the gating network also includes a multiplier, which is connected in series with the last activation layer. The electronic device inputs user data into the gating network, processes the user data through multiple activation layers of the gating network, and obtains the third output data of the last activation layer. The third output data is multiplied by the scaling factor through the multiplier to obtain the weight of the gating network output.
[0081] Figure 5 This is a schematic diagram of another gating network structure provided in an embodiment of this application, as shown below. Figure 5As shown, taking a gated network consisting of two cascaded activation layers and a multiplier connected to the last activation layer as an example, with the activation function of the first activation layer being the ReLU function and the activation function of the second activation layer being the sigmoid function, the input data x (for example, the input data x includes user data and consumption data, or the input data x includes user data and material data) passes through the first activation layer. The first activation layer performs cross-learning on the user data to obtain the output data y1. The second activation layer maps the output data y1 of the first activation layer to the (0,1) interval to obtain the output data y2. y2 is multiplied by the scaling factor γ through the multiplier to obtain the weight parameter g.
[0082] In some embodiments, when there is only one gating network, the gating network is a first-type gating network, and the first network layer corresponding to the first-type gating network is used to extract features from user data and material data. Step S302 includes: based on user data and the target user's consumption data, obtaining a set of weight parameters output by the first-type gating network through the first-type gating network. The consumption data represents the target user's consumption behavior of materials in different recommendation scenarios and at different times. In other words, the weight parameters output by the first-type gating network are obtained based on user data and consumption data through the first-type gating network.
[0083] In some embodiments, the first type of gated network corresponds to the first network layer in the MTL model; that is, the first network layer corresponding to the first type of gated network is the first network layer in the MTL model. In some embodiments, the first network layer corresponding to the first type of gated network is used to extract features from the input data. That is, the weight parameters output by the first type of gated network are used to adjust the output data obtained after feature extraction from the input data in the MTL model.
[0084] In some embodiments, if there are multiple gating networks, the gating networks include a first type of gating network and a second type of gating network. In some embodiments, the input data of the first type of gating network and the second type of gating network may be the same or different. In some embodiments, the first type of gating network and the second type of network correspond to different network layers in the MTL model.
[0085] In some embodiments, when there are multiple gating networks, these multiple gating networks include a first type of gating network and a second type of gating network. The first network layer corresponding to the first type of gating network is used for feature extraction of user data and material data, and the first network layer corresponding to the second type of gating network is used for data transformation processing of the input data. Step S302 includes: obtaining a set of weight parameters output by the first type of gating network based on user data and the target user's consumption data. The consumption data represents the target user's consumption behavior of materials in different recommendation scenarios and at different times; and obtaining a set of weight parameters output by the second type of gating network based on user data and material data. That is, the input data of the first type of gating network includes user data and consumption data, and the input data of the second type of gating network includes user data and material data; i.e., the input data of the first type of gating network and the second type of gating network are different.
[0086] Step S303: For any first network layer in the MTL model, based on a set of weight parameters output by the gating network corresponding to the first network layer, adjust the first output data of the first network layer to obtain the second output data of the first network layer after adjustment by the gating network.
[0087] In some embodiments, the first output data of each first network layer is obtained through the MTL model, based on user data and material data.
[0088] In some embodiments, the MTL model learns multiple objectives and tasks simultaneously using a single model. The framework of the MTL model primarily employs a shared-bottom structure, where different tasks share the same hidden layer, and different objective towers are built at the top to correspond to different tasks. Specifically, the MTL model can be a PLE (Progressive Layered Extraction) model, an SNR (Sub-Network Routing) model, etc.
[0089] In some embodiments, each gated network corresponds to each of at least one first network layer in an MTL model. Understandably, the MTL model includes multiple network layers, and the network layer corresponding to the gated network is a first network layer. The number of first network layers is equal to the number of gated networks, with one first network layer corresponding to one gated network. The output data of the first network layer corresponding to the gated network is adjusted using the weight parameters output by the gated network.
[0090] In other words, the electronic device inputs user data and material data into the MTL model. The user data and material data are processed through multiple network layers within the MTL model until the output data of the last network layer in the MTL model is obtained. During the processing of user data and material data, the output data of the first network layer corresponding to the gating network can be adjusted using the weight parameters of the corresponding gating network output. Output data from network layers not corresponding to the gating network are directly input into the next network layer for further data processing.
[0091] In one example, Figure 6 This is a schematic diagram of the structure of an MTL model provided in an embodiment of this application, as shown below. Figure 6 As shown, taking the MTL model as an example of the SNR model, the SNR model includes five network layers. The first network layer is the embedding layer; the second network layer includes expert layers 11, 21, and 31; the third network layer includes expert layers 12, 22, and 32; the fourth network layer includes target towers 11, 12, and 31; and the fifth network layer includes target towers 12, 22, and 32. The electronic equipment inputs user data and material data into the SNR model, processes the user data and material data sequentially through the five network layers, and finally obtains the output data of the SNR model.
[0092] In the process of processing user data and material data in the above SNR model, if the first network layer (i.e., the embedding layer) and the third network layer (i.e., expert layer 12, expert layer 22 and expert layer 32) in the SNR model are the first network layers, then the output data of the embedding layer, the output data of expert layer 12, the output data of expert layer 22 and the output data of expert layer 32 are obtained. The output data of these network layers can be adjusted by the weight parameters of the corresponding gating network output, while the output data of the remaining network layers are directly input into the next network layer for further processing.
[0093] In some embodiments, each gating network outputs a set of weight parameters, which correspond to a user. The number of weight parameters in this set is equal to the dimension of the first output data of the first network layer. For example, if the first output data of the first network layer corresponding to gating network 1 has a dimension of 256, then gating network 1 outputs 256 weight parameters, which are obtained based on user data of the same user.
[0094] In some embodiments, when there is only one gated network, the first output data of a first network layer corresponding to the gated network is adjusted based on a set of weight parameters to obtain the adjusted second output data.
[0095] In some embodiments, when there are multiple gated networks, the first output data of multiple first network layers corresponding to the multiple gated networks are adjusted based on multiple sets of weight parameters to obtain adjusted second output data. Each set of weight parameters adjusts one set of first output data.
[0096] In some embodiments, adjusting the first output data of the first network layer based on a set of weight parameters output by the gating network corresponding to the first network layer to obtain the second output data of the first network layer after adjustment by the gating network includes: extracting features from user data and material data through the first network layer corresponding to the first type of gating network to obtain the first output data output by the first network layer; and performing a dot product between the set of weight parameters output by the first type of gating network and the first output data to obtain the second output data.
[0097] In other words, the second output data is obtained by multiplying the weight parameters by the first output data. For example, by extracting features from user data and material data through the first network layer corresponding to the first type of gating network, the first output data is obtained. The second output data is obtained by multiplying the weight parameters output by the first type of gating network by the output data of the first network layer.
[0098] In some embodiments, based on user data and material data, a set of weight parameters output by the second type of gating network is obtained through the second type of gating network, including: concatenating user data, material data and the second output data of the first network layer corresponding to the first type of gating network to obtain concatenated data; and obtaining a set of weight parameters output by the second type of gating network by inputting the concatenated data into the second type of gating network.
[0099] In some embodiments, the input data of the second type of gating network may further include the second output data of the first network layer corresponding to the first type of gating network. In some embodiments, for the second type of gating network, user data, material data, and the second output data corresponding to the second type of gating network are concatenated to obtain concatenated data; the weight parameters of the output of the second type of gating network are obtained based on the concatenated data through the second type of gating network.
[0100] In some embodiments, first output data of a first network layer corresponding to a second type of gating network is obtained, and the weight parameters output by the second type of gating network are multiplied by the first output data to obtain second output data.
[0101] Understandably, the MTL model inputs model samples from multiple targets into the same model and outputs predictions for different targets through learning in one model. However, in a multi-task model, the parameters of the shared layer and the parameters of the independent target towers are the same for all users. The training results of low-frequency users will be dominated by high-frequency users. By using a gate network, different weight parameters can be assigned to different users, achieving personalized parameters for each user and effectively solving the problem that the recommendation results of low-frequency users are dominated by high-frequency users.
[0102] Step S304: Adjust the first output data of at least one first network layer in the MTL model through at least one gating network to obtain the target user's interest level in the recommended materials after adjustment; recommend materials to the target user based on the adjusted interest level.
[0103] In some embodiments, the output data of the MTL model is determined based on the second output data. In some embodiments, the second output data is used as input data for the next network layer in the MTL model, that is, the second output data is input into the next network layer for further data processing until the output data of the last network layer in the MTL model is obtained. The output data of the MTL model is used to represent the target user's level of interest in the recommended materials.
[0104] In some embodiments, the output data of the MTL model may include at least one of the following: predicted click-through rate (CTR), predicted interaction rate (CTR), predicted consumption duration (CPT), predicted forwarding rate (RFR), and predicted collection rate (CFG). Wherein, the predicted CTR is the probability that the recommended material is clicked by the target user. The predicted CTR is the probability that the target user interacts with the recommended material. The predicted CPT is the predicted duration of the target user's consumption of the recommended material. The predicted forwarding rate is the probability that the recommended material is forwarded by the target user. The predicted CFG is the probability that the recommended material is collected by the target user.
[0105] In some embodiments, materials are recommended to a target user based on the output data of the MTL model and the materials to be recommended. In some embodiments, the electronic device recommends materials to the target user based on the output data. For example, if the predicted click-through rate is greater than a first threshold, the materials to be recommended are recommended to the target user. For example, if the predicted interaction rate is greater than a second threshold, the materials to be recommended are recommended to the target user. For example, if the predicted consumption duration is greater than a third threshold, the materials to be recommended are recommended to the target user. For example, if the predicted click-through rate is greater than the first threshold, the predicted interaction rate is greater than the second threshold, and the predicted consumption duration is greater than the third threshold, the materials to be recommended are recommended to the target user.
[0106] In some embodiments, the recommendation model used in the above recommendation method includes at least one gated network and an MTL model. Figure 7 This is a schematic diagram of the structure of a recommendation model provided in an embodiment of this application, such as... Figure 7 As shown, gating network 1 is a first-type gating network. The input data x1 of gating network 1 can include user data, material data, and consumption data. The weight parameter g1 output by gating network 1 is used to adjust the output data of the embedding layer. The adjusted output data serves as the input data for expert layer 11, expert layer 21, and expert layer 31.
[0107] Gated networks 2, 3, and 4 are all type II gated networks. The input data for each of these networks includes input data x2 and the output data of the embedded layers adjusted by weight parameter g1. Input data x2 includes user data and material data. The weight parameter g2 output by gated network 2 is used to adjust the output data of expert layers 11, 21, and 31, respectively. The weight parameter g3 output by gated network 3 is used to adjust the output data of expert layers 12, 22, and 32, respectively. The weight parameter g4 output by gated network 4 is used to adjust the output data of target towers 11, 21, and 31, respectively.
[0108] The recommendation method of this disclosure obtains the weight parameters corresponding to the target user through a gating network trained with user data of low-frequency users. By adjusting the output of the MTL model with the weight parameters corresponding to the target user, the method can effectively solve the problem that the recommendation results of low-frequency users are dominated by high-frequency users and improve the recommendation accuracy of the recommendation model for low-frequency users.
[0109] The following continues to describe exemplary structures of the recommended device 455 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2 As shown, the software modules stored in the recommended device 455 of the memory 450 may include:
[0110] The data acquisition module 4551 is used to acquire user data of the target user and material data of the material to be recommended in response to a recommendation request; the first data processing module 4552 is used to determine a set of weight parameters corresponding to the target user based on the user data and through a gating network set in the multi-task learning MTL model; wherein, the gating network includes at least one, each gating network corresponds to a first network layer in the MTL model, and each gating network is trained based on user data of at least low-frequency sample users; the MTL model outputs the target user's interest level in the material to be recommended based on the input user data and material data; the second data processing module 4553 is used to adjust the first output data of any first network layer in the MTL model based on a set of weight parameters output by the gating network corresponding to the first network layer, to obtain the second output data of the first network layer after adjustment by the gating network; after adjusting the first output data of at least one first network layer in the MTL model through at least one gating network, the target user's adjusted interest level in the material to be recommended output by the MTL model is obtained; the recommendation module 4554 is used to recommend materials to the target user based on the adjusted interest level.
[0111] In some possible implementations, the first data processing module 4552 is used to obtain the third output data of the last activation layer in the gating network based on user data and through multiple activation layers in the gating network; multiply the scaling factor of the gating network and the third output data to obtain a set of weight parameters of the gating network output; wherein the scaling factor is obtained after training the gating network based at least on user data of low-frequency sample users.
[0112] In some possible implementations, when there is only one gating network, it is a first-type gating network. The first network layer corresponding to the first-type gating network is used to extract features from user data and material data. The first data processing module 4552 is used to obtain a set of weight parameters output by the first-type gating network based on user data and target user consumption data, through the first-type gating network; wherein, the consumption data is used to represent the target user's consumption behavior of materials in different recommendation scenarios and at different times.
[0113] In some possible implementations, the second data processing module 4553 is used to extract features from user data and material data through a first network layer corresponding to the first type of gating network to obtain first output data output by the first network layer; and to multiply a set of weight parameters output by the first type of gating network with the first output data to obtain second output data.
[0114] In some possible implementations, when there are multiple gating networks, these multiple gating networks include a first type of gating network and a second type of gating network. The first network layer corresponding to the first type of gating network is used for feature extraction of user data and material data, and the first network layer corresponding to the second type of gating network is used for data transformation processing of the input data. The first data processing module 4552 is used to obtain a set of weight parameters output by the first type of gating network based on user data and the target user's consumption data; wherein, the consumption data represents the target user's consumption behavior of materials in different recommendation scenarios and at different times; and to obtain a set of weight parameters output by the second type of gating network based on user data and material data.
[0115] In some possible implementations, the first data processing module 4552 is used to concatenate user data, material data and the second output data of the first network layer corresponding to the first type of gating network to obtain concatenated data; and to obtain a set of weight parameters output by the second type of gating network by inputting the concatenated data into the second type of gating network.
[0116] In some possible implementations, each gating network includes multiple cascaded activation layers, and different gating networks include different numbers of activation layers, and / or the activation functions of the activation layers in different gating networks are different.
[0117] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the recommended method described above in this application.
[0118] This application provides a computer-readable storage medium storing executable instructions. When these executable instructions are executed by a processor, they cause the processor to perform the recommended method provided in this application, for example... Figure 3 The recommended method is shown.
[0119] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0120] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0121] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0122] As an example, executable instructions may be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network. The above descriptions are merely embodiments of this application and are not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A recommendation method, characterized in that, The method includes: In response to a recommendation request, obtain user data of the target user and material data of the material to be recommended; Based on the user data, a set of weight parameters corresponding to the target user is determined by using a gating network set in a multi-task learning MTL model; wherein, the gating network includes at least one, each gating network corresponds to a first network layer in the MTL model, and each gating network is trained based on user data of at least low-frequency sample users; the MTL model outputs the target user's level of interest in the recommended material based on the input user data and the material data; For any first network layer in the MTL model, based on a set of weight parameters output by the gating network corresponding to the first network layer, the first output data of the first network layer is adjusted to obtain the second output data of the first network layer after adjustment by the gating network. The first output data of at least one first network layer in the MTL model is adjusted by the at least one gating network to obtain the adjusted interest level of the target user for the recommended material output by the MTL model; based on the adjusted interest level, the material is recommended to the target user.
2. The method according to claim 1, characterized in that, Based on the user data, a set of weight parameters corresponding to the target user is determined through a gating network set in the MTL model, including: Based on the user data, the third output data of the last activation layer in the gating network is obtained through multiple activation layers in the gating network; Multiply the scaling factor of the gating network by the third output data to obtain a set of weight parameters output by the gating network; wherein the scaling factor is obtained by training the gating network based at least on user data of low-frequency sample users.
3. The method according to claim 1, characterized in that, When there is only one gated network, the gated network is a first type of gated network, and the first network layer corresponding to the first type of gated network is used to extract features from the user data and the material data; Based on the user data, a set of weight parameters corresponding to the target user is determined through a gating network set in the MTL model, including: Based on the user data and the target user's consumption data, a set of weight parameters output by the first type of gating network is obtained through the first type of gating network; wherein, the consumption data is used to represent the target user's consumption behavior of materials in different recommendation scenarios and at different times.
4. The method according to claim 3, characterized in that, The adjustment of the first output data of the first network layer based on a set of weight parameters output by the gating network corresponding to the first network layer to obtain the second output data of the first network layer after adjustment by the gating network includes: By using the first network layer corresponding to the first type of gating network, feature extraction is performed on the user data and the material data to obtain the first output data output by the first network layer. The second output data is obtained by multiplying the set of weight parameters output by the first type of gating network with the first output data.
5. The method according to claim 1, characterized in that, When there are multiple gated networks, the multiple gated networks include a first type of gated network and a second type of gated network. The first network layer corresponding to the first type of gated network is used to extract features from the user data and the material data, and the first network layer corresponding to the second type of gated network is used to perform data transformation processing on the input data. Based on the user data, the step of determining a set of weight parameters corresponding to the target user through a gating network set in the MTL model includes: Based on the user data and the target user's consumption data, a set of weight parameters output by the first type of gating network is obtained through the first type of gating network; wherein, the consumption data is used to represent the target user's consumption behavior of materials in different recommendation scenarios and at different times; Based on the user data and the material data, a set of weight parameters output by the second type of gating network is obtained through the second type of gating network.
6. The method according to claim 5, characterized in that, Based on the user data and the material data, a set of weight parameters output by the second type of gating network is obtained through the second type of gating network, including: The user data, the material data, and the second output data of the first network layer corresponding to the first type of gating network are concatenated to obtain concatenated data. By inputting the spliced data into the second type of gating network, a set of weight parameters output by the second type of gating network is obtained.
7. The method according to any one of claims 1 to 6, characterized in that, Each gated network includes multiple activation layers connected in series. Different gated networks include different numbers of activation layers, and / or the activation functions of the activation layers in different gated networks are different.
8. A recommended device, characterized in that, include: The data acquisition module is used to respond to recommendation requests by acquiring user data of the target user and material data of the material to be recommended. A first data processing module is used to determine a set of weight parameters corresponding to the target user based on the user data and through a gating network set in a multi-task learning MTL model; wherein the gating network includes at least one, each gating network corresponds to a first network layer in the MTL model, and each gating network is trained based on user data of at least low-frequency sample users; the MTL model outputs the target user's level of interest in the recommended material based on the input user data and the material data; The second data processing module is used to adjust the first output data of any first network layer in the MTL model based on a set of weight parameters output by the gating network corresponding to the first network layer, to obtain the second output data of the first network layer after adjustment by the gating network; and to obtain the target user's level of interest in the recommended material after adjustment by the at least one gating network of the first network layer in the MTL model. The recommendation module is used to recommend materials to the target user based on the adjusted level of interest.
9. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable instructions; A processor, when executing executable instructions or computer programs stored in the memory, implements the method according to any one of claims 1 to 7.
10. A computer-readable storage medium storing executable instructions or a computer program, characterized in that, When the executable instructions are executed by the processor, they implement the method described in any one of claims 1 to 7.
Citation Information
Patent Citations
Commodity recommendation method, prediction model training method and related equipment
CN115564517A
Recommendation model training method and device
CN115618235A