Model training method and device, live broadcast recommendation method and device, equipment and medium
Through the training method of multi-scene multi-objective model, the combination of scene personalization and parameter personalization modules is used to achieve joint learning of multi-scene multi-objectives, solving the problems of sparse data and high model maintenance costs, and improving the recommendation effect and data Utilization.
Patent Information
- Application Number
- CN202411015720.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-15
AI Technical Summary
The existing recommendation system has problems of sparse data and high model maintenance costs in joint learning of multiple scenarios and multi-objectives. It is impossible to effectively utilize feature information between different scenarios, resulting in poor model effectiveness.
Using the training method of multi-scene multi-objective model, by obtaining the training sample set and task target labels in multiple live recommended scenarios, using the scenario personalization module and parameter personalization module to determine vectors and weights, and adjusting the output of the task tower module to achieve prediction. As a result, the model parameters are then adjusted to achieve joint learning of multiple scenarios and multiple goals.
The recommendation effect of multi-scenario multi-objective models is enhanced, the training and maintenance requirements for multiple models are reduced, and the data utilization and overall model performance are improved.
Smart Images

Figure CN118972631A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer processing technology, and in particular to a training method, live broadcast recommendation method, device, equipment and medium for a multi-scenario multi-objective model. Background Art
[0002] At present, there are often multiple business scenarios (or simply called scenarios) in large-scale recommendation systems. For multiple business scenarios, some recommendation systems will train and use their own multi-scenario and multi-objective models for each business scenario, but this solution requires training and maintaining multiple models. In other recommendation systems, a single objective model is used for training for multiple business scenarios, but this will cause the relationship between multiple objectives to be ignored. Therefore, how to achieve joint learning for multiple scenarios and multiple objectives is an urgent problem to be solved. Summary of the invention
[0003] The present application provides a training method, live broadcast recommendation method, device, equipment and medium for a multi-scenario multi-objective model, which can realize joint learning for multiple scenes and multiple objectives and enhance the recommendation effect of the multi-scenario multi-objective model.
[0004] In a first aspect, the present application provides a training method for a multi-scenario multi-target model, the method comprising: obtaining a training sample set in a plurality of live broadcast recommendation scenarios, and each task target label corresponding to each training sample in the training sample set, the training sample comprising a scene feature of the scene, a user feature of a sample user in the scene, and a live broadcast feature of a sample live broadcast exposed in the scene; according to the training samples in the training sample set, determining a first vector corresponding to the scene through a scene personalization module of an initial multi-scenario multi-target model, the first vector representing a personalized representation of user features and live broadcast features in the corresponding scenario; according to the first vector, the user feature of the sample user, and the sample live broadcast feature, The live broadcast feature of this live broadcast is to determine the parameter weight vector through the parameter personalization module of the initial multi-scenario multi-objective model, and the parameter weight vector represents the weight of the network parameters in the initial multi-scenario multi-objective model under each task; according to the parameter weight vector and the first vector, through the task tower module corresponding to each task in the initial multi-scenario multi-objective model, determine the prediction result of the sample user in the scene output by each task tower module for the sample live broadcast about the corresponding task goal; according to the prediction result output by each task tower module and the task goal labels corresponding to the training samples, adjust the network parameters in the initial multi-scenario multi-objective model to obtain the trained multi-scenario multi-objective model.
[0005] In a second aspect, the present application provides a live broadcast recommendation method, the method comprising: responding to a live broadcast recommendation request of a target user in a first scenario, obtaining scene features of the first scene, user features of the target user in the first scenario, and live broadcast features of multiple candidate live broadcasts in the first scenario; determining, based on the scene features, user features, and live broadcast features, a prediction result of the target user regarding the corresponding task goal for the candidate live broadcast through a multi-scenario multi-target model, the multi-scenario multi-target model being trained based on the method described in the first aspect; and recommending a target live broadcast to the target user from multiple candidate live broadcasts based on the prediction results.
[0006] In a third aspect, the present application provides a training device for a multi-scenario multi-target model, the device comprising: a second acquisition module, for acquiring training sample sets in multiple live broadcast recommendation scenarios, and each task label corresponding to each training sample in the training sample set, the training sample comprising scene features of the scene, user features of sample users in the scene, and live broadcast features of sample live broadcasts exposed in the scene; a second determination module, for determining a first vector corresponding to the scene through a scene personalization module of an initial multi-scenario multi-target model based on the training samples in the training sample set, the first vector representing a personalized representation of user features and live broadcast features in the corresponding scenario; a third determination module, for determining a first vector corresponding to the scene based on the first vector, user features of sample users in the scene, and live broadcast features of sample live broadcasts exposed in the scene. Features, as well as the live broadcast features of the sample live broadcast, determine the parameter weight vector through the parameter personalization module of the initial multi-scenario multi-objective model, and the parameter weight vector represents the weight of the network parameters in the initial multi-scenario multi-objective model under each task; a fourth determination module is used to determine the prediction results of the sample users in the scene where each task tower module outputs the sample live broadcast about the corresponding task goals according to the parameter weight vector and the first vector through the task tower module corresponding to each task in the initial multi-scenario multi-objective model; a parameter adjustment module is used to adjust the network parameters in the initial multi-scenario multi-objective model according to the prediction results output by each task tower module and the task labels corresponding to the training samples, so as to obtain the trained multi-scenario multi-objective model.
[0007] In a fourth aspect, the present application provides a live broadcast recommendation device, which includes: a first acquisition module, used to respond to a live broadcast recommendation request of a target user in a first scenario, obtain scene characteristics of the first scene, user characteristics of the target user in the first scenario, and live broadcast characteristics of multiple candidate live broadcasts in the first scenario; a first determination module, used to determine the prediction results of the target user for the candidate live broadcast regarding the corresponding task objectives through a multi-scenario multi-objective model based on the scene characteristics, user characteristics and live broadcast characteristics; a recommendation module, used to recommend a target live broadcast to the target user from multiple candidate live broadcasts based on the prediction results.
[0008] In a fifth aspect, the present application provides an electronic device, comprising: a memory for storing executable instructions; and a processor for executing the executable instructions stored in the memory to implement the training method of the multi-scenario and multi-objective model provided in the present application, or the live broadcast recommendation method.
[0009] In a sixth aspect, the present application provides a computer-readable storage medium storing executable instructions, which are used to implement the multi-scenario and multi-objective model training method or live broadcast recommendation method provided in the present application when the executable instructions are executed by a processor.
[0010] In the seventh aspect, the present application provides a computer program product, including a computer program or instructions, which are used to implement the multi-scenario and multi-objective model training method or live broadcast recommendation method provided by the present application when the computer program or instructions are executed by a processor.
[0011] This application has the following beneficial effects:
[0012] In this application, firstly, a training sample set under multiple live recommendation scenarios and each task target label corresponding to each training sample in the training sample set are obtained, and then, according to the training samples in the training sample set, the first vector corresponding to the scene is determined by the scene personalization module of the initial multi-scenario multi-target model; according to the first vector, the user characteristics of the sample user, and the live broadcast characteristics of the sample live broadcast, the parameter weight vector is determined by the parameter personalization module; according to the parameter weight vector and the first vector, the prediction results of the sample user in the scene output by each task tower module for the sample live broadcast about the corresponding task target are determined by the task tower module corresponding to each task, and the network parameters in the initial multi-scenario multi-target model are adjusted according to the prediction results and each task target label corresponding to each training sample, so as to obtain the trained multi-scenario multi-target model. This application captures the characteristics of sample users in different scenarios through the scene personalization module to realize scene personalization; the prior information such as user characteristics and live broadcast characteristics is injected into each task tower module of the upper layer through the parameter personalization module to realize the personalization of the task. Therefore, from the perspective of the entire recommendation system, this application only needs to train and maintain a multi-scenario multi-target model to realize joint learning for multiple scenarios and multiple targets. Correspondingly, sample data from multiple scenes can be used to train a multi-scene multi-objective model, which greatly increases the amount of training data for the multi-scene multi-objective model. This allows the multi-scene multi-objective model to be trained more fully, thereby enhancing the recommendation effect of the multi-scene multi-objective model. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a structural diagram of a system architecture for training and live broadcast recommendation of a multi-scenario multi-objective model provided in an embodiment of the present application;
[0014] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0015] Figure 3 It is a flowchart of a training method for a multi-scenario multi-objective model provided in an embodiment of the present application;
[0016] Figure 4 is a schematic diagram of the structure of the transformer module provided in the embodiment of the present application;
[0017] Figure 5 It is a schematic diagram of the architecture of the scene personalization module provided in the embodiment of the present application;
[0018] Figure 6 It is a structural schematic diagram of a parameter personalization module and a task tower module provided in an embodiment of the present application;
[0019] Figure 7 is a schematic diagram of a multi-scenario multi-objective model provided in an embodiment of the present application;
[0020] Figure 8 It is a schematic diagram of the architecture of the SNR model provided in the embodiment of the present application;
[0021] Fig. 9 It is a flowchart of a live broadcast recommendation method provided in an embodiment of the present application;
[0022] Fig.10 A schematic diagram of the structure of a training device for a multi-scenario multi-objective model provided in an embodiment of the present application;
[0023] Fig.11 A schematic diagram of the structure of a live broadcast recommendation device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0025] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it can be 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.
[0026] If similar descriptions of "first / second" appear in the application documents, the following explanation is added. In the following description, the terms "first / second / third" involved are merely to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second / third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0027] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0028] With the rise of Internet live broadcast platforms, more and more traditional media are releasing the latest news through live broadcasts. Live broadcasting has also become a major channel for traffic monetization, and watching live broadcasts has also become the main channel for Internet users to obtain information. However, there are a large number of live videos, covering a wide range of categories, and the content is diverse and complex. Recommending live broadcasts of interest to users can improve the user experience while bringing more revenue to live broadcast platforms and merchants. Live broadcast platforms generally have multiple live broadcast entrances (live broadcast scenes), such as discovery pages, video streams, top apertures, and other live broadcast scenes. There will also be different optimization task goals in the same scene, such as click-through rate, viewing time, reward amount, and other task goals. How to use data from multiple scenes to optimize multiple task indicators is a direction that the industry has been exploring.
[0029] When solving multi-scenario problems, existing live broadcast recommendation methods usually use the data of each scenario to train separate models for each scenario, and then each scenario will have a separate model when it is deployed and estimated online. However, this method cannot solve the data sparsity problem of a single scenario well, because it cannot be supplemented with feature information of other scenarios of the same type, especially in some scenarios with small data volume or sparse behavior data, the data sparsity problem is more prominent. In addition, this single-scenario single-model modeling method consumes a lot of manpower and resources in terms of model maintenance and iteration costs, and there will also be a high cost problem when some new scenarios are connected to the business. If the sample data of all scenarios are mixed, the mixed data is used to add features to distinguish the scenes to train a model, and then the same model is deployed to all scenarios, this relatively rough data sample mixed training will destroy the data distribution between each scene, introduce some noise, and the overall model effect may be dominated by the data of a few large scenes.
[0030] Moreover, in the same live broadcast scenario, there will be a need to optimize multiple task goals at the same time, such as click-through rate, viewing time, etc. Existing methods generally use a multi-task learning model with parameter sharing. The feature parameters of the task tower in the multi-task learning model are shared across tasks. Since different tasks have different sparsities and there is correlation between tasks, they will affect each other, which will cause strange phenomena between tasks. For example, in the live broadcast recommendation business, when optimizing the two tasks of clicks and rewards, the samples of clicks will be far more than the samples of rewards, and the gradient updates of the two tasks will be unequal. The gradient signal of the reward task will be covered by the click task.
[0031] In response to the above technical problems, the embodiments of the present application provide a training method, live broadcast recommendation model, device and medium for a multi-scenario multi-objective model, which can realize joint learning of multiple scenes and multiple objectives and enhance the recommendation effect of the multi-scenario multi-objective model.
[0032] The model training and / or live broadcast recommendation method provided in the embodiments of the present application can be implemented by various electronic devices, for example, it can be implemented by a server alone, or it can be implemented by a terminal and a server in collaboration. For example, the server alone executes the model training and / or live broadcast recommendation method described below, or the terminal sends a model training message and / or a recommendation request message to the server, and the server executes the model training method and / or the live broadcast recommendation method according to the received model training message and / or recommendation request message.
[0033] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and the embodiments of the present application do not impose specific restrictions on this.
[0034] In some embodiments, the method of the embodiment of the present application is implemented by a server alone as an example. The server is used to obtain the scene features of each scene in multiple live broadcast recommendation scenes, the user features in each scene, and the live broadcast features in each scene, and then implement model training and / or live broadcast recommendation based on these features. In which, when performing model training, the user features are the user features of the sample users, and the live broadcast features are the live broadcast features of the sample live broadcast. When performing live broadcast recommendation, the user features are the user features of the target user, and the live broadcast features are the live broadcast features of the candidate live broadcast.
[0035] In some embodiments, the method of implementing the embodiment of the present application in collaboration with a server and a terminal is used as an example for description. Figure 1 , Figure 1 400-1 and 400-2 ( Figure 1 Only two terminals are shown, but this does not constitute a limitation on the number of terminals included in the system of the embodiment of the present application) The server 200 is connected via a network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.
[0036] In some embodiments, the terminal or server 200 can implement the model training and / or live broadcast recommendation method provided in the embodiments of the present application by running a computer program. For example, the computer program can be a native program or software module in the operating system; for example, it can be a local application (application, APP), that is, a program that needs to be installed in the operating system to run, such as a live broadcast APP; it can also be a live broadcast applet, that is, a live broadcast program that can be run only by downloading it to a browser environment; it can also be a live broadcast applet that can be embedded in any APP. In short, the above-mentioned computer program can be any form of application, module or plug-in, and the embodiments of the present application do not specifically limit this. Here, the above-mentioned computer program running on the terminal can also be described as a live broadcast client.
[0037] Take live broadcast recommendation as an example for explanation. Taking terminal 400-1 as the target object for explanation, terminal 400-1 displays the interface of APP on the current interface 410-1. Exemplarily, terminal 400-1 can also display the live broadcast content of the candidate live broadcast on the current interface. Server 200 can receive the scene features of the first scene sent by terminal 400-1, the user features of the target user in the first scene, and the live broadcast features of multiple candidate live broadcasts in the first scene. Then, server 200 determines the recommendation results of the target user for the candidate live broadcast regarding the corresponding task objectives through a multi-scene multi-target model based on the scene features, user features and live broadcast features; finally, server 200 recommends the target live broadcast to the target user from the candidate live broadcasts according to the recommendation probability.
[0038] See also Figure 2 , Figure 2 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 2The electronic device 400 shown may be the terminal and / or server mentioned above. The electronic device 400 may include: 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 achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, the bus system 440 is not shown in FIG. Figure 2 Various buses are labeled as bus system 440 .
[0039] 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., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0040] The user interface 430 includes one or more output devices 431 that enable presentation of media content, including one or more speakers and / or one or more visual display screens. The 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.
[0041] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0042] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0043] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0044] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0045] A network communication module 452, for reaching other computing devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, wireless compatibility certification (WiFi), and universal serial bus (USB), etc.;
[0046] a presentation module 453 for enabling presentation of information via one or more output devices 431 (e.g., display screen, speaker, etc.) associated with the user interface 430 (e.g., a user interface for operating peripherals and displaying content and information);
[0047] The input processing module 454 is used to detect one or more user inputs or interactions from one of the one or more input devices 432 and translate the detected inputs or interactions.
[0048] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 A multi-scene multi-objective model training device 455 and a live broadcast recommendation device 456 stored in a memory 450 are shown. The multi-scene multi-objective model training device 455 and / or the live broadcast recommendation device 456 can be software in the form of programs and plug-ins.
[0049] In other embodiments, the device provided in the embodiments of the present application can be implemented in hardware. As an example, the device provided in the embodiments of the present application can be a processor in the form of a hardware decoding processor, which is programmed to execute the live broadcast recommendation method provided in the embodiments of the present application. For example, the processor in the form of a hardware decoding processor can adopt one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA) or other electronic components. The following will be combined with the exemplary application and implementation of the electronic device provided in the embodiments of the present application to illustrate the training method of the multi-scenario multi-target model and the live broadcast recommendation method provided in the embodiments of the present application.
[0050] See also Figure 3, Figure 3 This is a flow chart of the training method of the multi-scenario multi-objective model provided in the embodiment of the present application. Figure 3 The steps shown illustrate the training method of the multi-scenario multi-objective model provided in the embodiment of the present application.
[0051] Step S301: obtaining training sample sets in multiple live broadcast recommendation scenarios and task target labels corresponding to each training sample in the training sample sets.
[0052] Here, the training samples include scene features of the scene, user features of sample users in the scene, and live broadcast features of sample live broadcasts exposed in the scene. The task target labels can be labels such as whether the sample users like and whether they give rewards.
[0053] In some embodiments, the initial multi-scenario multi-model includes a feature extraction module, based on which step S301 can be implemented as follows: for each live recommendation scenario, historical live data within a preset time period in the scenario is obtained, the historical live data includes the scenario data of the scenario, the user data of the sample user in the scenario, and the live data of the sample live broadcast exposed in the scenario, the user data includes the attribute data of the sample user and the historical behavior data of the sample user for the sample live broadcast, and the live data includes the attribute data of the live broadcast room corresponding to the sample live broadcast, and the anchor data of the anchor in the live broadcast room; through the feature extraction module in the initial multi-scenario multi-target model, feature extraction is performed on the historical live data in each live recommendation scenario, and multiple training samples in each live recommendation scenario are obtained to form a training sample set. Among them, the preset time period can be pre-set, such as 10 days before the current time.
[0054] It can be understood that the training device of the initial multi-scenario multi-objective model can obtain training samples in each live broadcast recommendation scenario. For a scenario, the training device of the initial multi-scenario multi-objective model can obtain the scene data in the scenario, the user data of the sample user in the scenario, and the live broadcast data of the sample live broadcast exposed in the scenario. Among them, the live broadcast recommendation scenario is the live broadcast entrance provided by the live broadcast platform for users, and examples include discovery pages, video streams, specified apertures and other scenarios. Sample users are users who watch live broadcasts in this scenario, and sample live broadcasts are live broadcasts recommended for sample users, which can also be called exposed live broadcasts.
[0055] In some embodiments, scene features may include scene identification and scene statistics data, where the scene statistics data is data describing the popularity of the scene, such as the number of clicks and rewards in the scene within a preset time period (such as one month).
[0056] In some embodiments, user data may include user attribute data (also referred to as user portrait), user behavior data, user context data, etc. User attribute data can be understood as the age, gender, region, interest tags (such as finance, entertainment, education, etc.) of the sample user. User behavior data can be understood as a series of behaviors of the sample user watching the live broadcast on the terminal within a preset time, such as the length of time the sample user watches the sample live broadcast, the sample user's likes, comments, rewards, etc. for the sample live broadcast, that is, the user behavior data is a sequence of data. User context data can be understood as the current geographical location of the sample user, the device currently used, etc.
[0057] In some embodiments, the live broadcast data may include the attribute data of the live broadcast room and the anchor data of the anchor in the live broadcast room, etc. Among them, the anchor data may include the anchor's gender, age, live broadcast type, number of fans, etc., and the attribute data of the live broadcast room may include the popularity of the live broadcast room, work category, label, keyword, etc. For example, the attribute data of the live broadcast room may also include the dynamically changing number of online people in the live broadcast room, the number of likes in the live broadcast room, the number of comments and interactions in the live broadcast room, etc.
[0058] After obtaining the historical live broadcast data in each scene, the feature extraction module in the initial multi-scene multi-objective model can be used to extract features from the historical live broadcast data in each scene to obtain training samples in each scene to form a training sample set.
[0059] For example, the training samples in each scene may include the scene data of the scene, the attribute data of the sample users in the scene, and the attribute data of the live broadcast room of the sample live broadcast exposed in the scene, the live broadcast room exposure data, the live broadcast room click data, the live broadcast room reward data, the anchor data of the anchor in the live broadcast room, etc. The training samples can exclude viewing records with too long viewing time and too short viewing time, such as excluding viewing records with a viewing time of more than 5 hours and a viewing time of less than 5 seconds. In an example, the present application can use 10 days of data as model training samples, with a total of 55,873,468 valid samples, including 19,634,456 sample users and 8,327 sample live broadcasts. The training samples in each scene are unbalanced. The present application counts the training samples of the three scenes of top aperture, post-video recommendation and discovery page. Among them, the sample size of each scene in the three scenes of top aperture, post-video recommendation and discovery page is unbalanced, with a ratio of approximately 7:2:1.
[0060] It can be understood that feature extraction is to capture the dynamic changes of user viewing behavior by extracting and updating multi-dimensional features in real time, so as to more accurately understand the user's interests and emotional feedback, that is, to obtain the historical behavior sequence characteristics of sample users based on user data, and to obtain the live broadcast sequence characteristics of sample live broadcasts based on live broadcast data. When constructing the user's historical behavior sequence characteristics, the embodiments of the present application respectively verified the effects of the deep interest network (DIN), the deep interest evolution network (DIEN), and the transformer network in modeling the user's historical behavior sequence. In terms of the overall structure, the scalability of the transformer module will be better. Therefore, in some embodiments, the feature extraction module can be a transformer module.
[0061] It is understandable that the core idea of the transformer module is the self-attention mechanism, which can capture long-distance dependencies in the input sequence and effectively model sequence data. It mainly consists of two parts: encoder and decoder, and the model is constructed by stacking multiple encoder and decoder layers. In addition, the transformer module also uses positional encoding to make up for the shortcomings of the model's inability to handle sequence order, ensuring that the model can fully utilize the position information in the sequence.
[0062] In this application, the encoder can model the relationship between each sample live broadcast in the sequence, and the decoder is used to learn the sample user's interest characteristics about the target sample live broadcast (referred to as the target live broadcast). Among them, the target live broadcast is a live broadcast among the sample live broadcasts recommended for the sample user. The encoder uses a self-attention mechanism for the embedding vector (embedding) of the sample live broadcast sequence, so that each sample live broadcast in the sequence can interact with all the live broadcasts in the input sequence, so as to better learn the sample user's interests from the sample user's historical behavior data.
[0063] To calculate self-attention, the transformer module uses three weight matrices: a query matrix, a keys matrix, and a values matrix. These matrices are obtained by linearly transforming the input sequence, and then the weight distribution of each sample live broadcast is obtained by calculating the dot product of the query matrix and the key matrix. Finally, these weights are used to weighted sum the value matrix to obtain the self-attention representation of each sample live broadcast. Since the interests of sample users are diverse, in this application, the decoder uses the target live broadcast as the query, the output of the encoder as the keys and values, and the decoder learns the association between the target live broadcast and the live broadcast sequence in the user's historical behavior, learns a unique interest representation for each sample user, and obtains the historical behavior sequence characteristics of the sample user. Moreover, the self-attention mechanism in this application uses multi-head attention. In multi-head attention, the query, keys, and values are split into multiple heads instead of a single attention head, because multiple heads allow the model to jointly pay attention to information from different positions in different representation spaces.
[0064] In addition, the transformer module also includes a positional encoding layer to provide the model with some information about the relative position of the target live broadcast in the sample live broadcast.
[0065] Figure 4 is a schematic diagram of the structure of the transformer module provided in the embodiment of the present application. Figure 4 As shown, the transformer module includes a position encoding layer 00, N encoders 10 and N decoders 20. N is a positive integer. Each encoder and decoder consists of a multi-head attention layer, a feed forward network layer (FFN), and a residual connection and normalization (add&norm) layer. This stacked structure enables the model to capture the complex relationships in the input sequence layer by layer, and stabilize the training process through residual connections and normalization layers.
[0066] like Figure 4As shown in the figure, after the input user behavior data is embedded and mapped, an embedding vector is obtained, which is added to the position coding information output by the position coding layer 00, and the output of the addition result is used as the input of the encoder 10, and then passes through the multi-head attention layer 101, add&norm layer 102, FFN layer 103, and add&norm layer 104 in the encoder 10 in sequence to obtain the output of the encoder 10. The output of the encoder 10 and the identifier of the target live broadcast are then used as the input of the decoder 20, and then pass through the multi-head attention layer 201, add&norm layer 202, FFN layer 203, and add&norm layer 204 in the decoder 20 in sequence, and finally output the sample user's interest representation vector for the current live broadcast.
[0067] In addition, there are multiple encoding methods for position coding: 1) Use the original sin / cos relative position coding information of the transformer module. The main feature of this encoding method is that the position coding information of adjacent live broadcasts in the sequence is also similar. 2) Use adaptive parameters to learn the position coding method. This encoding method randomly generates a vector matrix with the same length as the sequence representation vector, directly adds it to the sequence representation vector, and learns the position coding through parameter updates. 3) Use timestamp information to represent the position coding method. This encoding method discretizes the time from the timestamp to the present by recording the timestamp of the behavior in the behavior sequence, passes the timestamp representation vector corresponding to the behavior sequence through a fully connected layer to reach the same length as the behavior sequence representation vector, and then adds it to the behavior sequence representation vector, using the timestamp information to represent the position coding information.
[0068] In some embodiments, the present application adopts an adaptive parameter learning position encoding method.
[0069] It should be noted that the above is an example of user behavior data of a sample user, and feature extraction is performed on the user behavior data to obtain user behavior features of the sample user. For other sample data, the above method can also be used to obtain sample features corresponding to the sample data.
[0070] Step S302: According to the training samples in the training sample set, a first vector corresponding to the scene is determined by the scene personalization module of the initial multi-scene multi-objective model.
[0071] Here, the first vector represents the personalized representation of user features and live broadcast features in the corresponding scenario.
[0072] It is understandable that the training samples in different scenarios are different. Therefore, in order to solve the problem of aligning the feature representations of different scenarios, this application introduces an embedding personalized network (EPNet) module, which can be referred to as a scenario personalized module. The function of the EPNet module is to receive scenario information as input and enhance the model's underlying perception of user cross-domain behavior.
[0073] In some embodiments, step S302 is implemented as follows: according to the scene characteristics of the scene in the training sample, the user characteristics of the sample users in the scene, and the live broadcast characteristics of the sample live broadcast exposed in the scene, the scene weight vector of the scene is determined through the gating layer in the scene personalization module; the scene weight vector, the user characteristics of the sample users in the scene, and the live broadcast characteristics of the sample live broadcast exposed in the scene are subjected to Hadamard product through the output layer in the scene personalization module to determine the first vector.
[0074] It can be understood that the scene personalization module mainly dynamically adjusts the bottom feature representation of the initial multi-scene multi-objective model through different scene-specific gating networks to obtain a specific personalized representation vector for each scene. The scene personalization module in this application includes a gating layer and an output layer, wherein the gating layer is used to screen the embedding vector of the input feature, so that the initial multi-scene multi-objective model has scene differentiation at the input level. Specifically, the weight vector corresponding to a certain scene is determined by the gating layer, and the output layer is used to output the specific input personalized representation of the scene.
[0075] Here, the scene personalization module divides the input features into two parts: one part is the scene features, which include scene identification, scene popularity features, scene click rate and other scene statistical features. The other part is the conventional model input features, namely user features and live broadcast features.
[0076] For a specific sample in a certain scene, the gating layer output of the scene personalization module can be expressed by formula (1):
[0077] δ domin =GateNU(E(*)+E(df)) (1);
[0078] Among them, E(*) represents the embedded representation of the conventional features, that is, the conventional features are embedded (embedding) mapped to obtain the embedding vector of the conventional features. E(df) represents the embedded representation of the scene features, and the embedding vector of the scene features is obtained. domin Represents the scene weight vector output by the gating layer. The dimension of this vector is aligned with the dimension of the representation vector of the conventional feature, which is used as the weight representation of the scene. GateNU is the personalized gating unit of the scene.
[0079] Here, conventional features include sparse features and dense features. Sparse features refer to the situation where only a few elements in the feature vector are non-zero values. The sparse features in this application are user identifiers and live broadcast identifiers. Dense features refer to the situation where almost all elements in the feature vector are non-zero values. The dense features in this application are user behavior features, live broadcast popularity, live broadcast type features and other features. Scene features include scene identifiers, scene popularity and other features. The live broadcast identifier may include a live broadcast room identifier and / or an anchor identifier of the anchor in the live broadcast room.
[0080] The gating layer in this application consists of two layers of networks. The first layer of the network is used to perform simple cross-learning on the input of the gating layer, and the second layer of the network is used to generate a personalized weight vector through an activation function. The selected activation function is the sigmoid function. Therefore, the value range of the weight vector is (0, 1).
[0081] After the scene features and conventional features (user features and live broadcast features) are input into the gating layer, the scene weight vector of the scene is output through the gating layer. Then, the scene weight vector is Hadamard producted with the user features under the scene and the live broadcast features under the scene through the output layer to obtain the first vector. Among them, the Hadamard product can also be called the element-wise product. This operation is an operation performed between two matrices or vectors, in which the elements at corresponding positions are multiplied to generate a new matrix or vector. This operation requires that the dimensions of the two matrices or vectors are the same, and the result of the operation is also a matrix or vector with the same dimension as the input matrix or vector.
[0082] Figure 5 Schematic diagram of the architecture of the scene personalization module provided in the embodiment of the present application. Figure 5 As shown, the scene personalization module 30 includes an embedding layer 301, a gating layer 302 and an output layer (not shown in the figure). Among them, the embedding layer 301 is used to perform embedded representation on the received input features to obtain the embedding vectors corresponding to each feature. The gating layer 302 is used to perform weight representation on the embedding vectors corresponding to the scene features and the embedding vectors corresponding to the conventional features to obtain the scene weight vector of the scene. The output layer is used to perform Hadamard product operation on the scene weight vector and the embedding vector corresponding to the conventional feature to obtain multiple vectors after operation, and then sum each vector to obtain the scene personalization representation vector (first vector).
[0083] Step S303: Determine a parameter weight vector through a parameter personalization module of the initial multi-scenario multi-objective model according to the first vector, the user characteristics of the sample user, and the live broadcast characteristics of the sample live broadcast.
[0084] Here, the parameter weight vector represents the weight of the network parameters in the initial multi-scenario multi-objective model under each task.
[0085] It is understandable that the overall architecture of the initial multi-scenario multi-objective model is deep neural networks (DNN). For all sample users, the fully connected layer network (dense) parameters of DNN are shared. Different sample users have different preferences for different tasks. For example, some sample users like to watch for a long time but do not like to like comments, while some sample users like to like comments but do not like to watch for a long time. This form of sharing dense parameters by sample users is not conducive to the initial multi-scenario multi-objective model to capture the differences in sample users' preferences for different tasks. In order to enhance the personalized influence of the initial multi-scenario multi-objective model on the preferences of sample users, this application introduces a parameter personalized network (PPNet) module, which affects the dense parameters of each task through a task-specific gating mechanism to balance the interdependence problem between different tasks. In essence, it is still through the gating layer to use prior features to enhance the personalization of different task parameters.
[0086] In some embodiments, step S303 is implemented as follows: concatenating the user characteristics of the sample user and the live broadcast characteristics of the sample live broadcast to obtain a concatenated second vector; and determining a parameter weight vector through a gating layer of a task personalization module based on the first vector and the second vector.
[0087] It can be understood that the present application can use the user ID of the sample user, the live broadcast ID of the sample live broadcast, and their respective related features as part of the input of the parameter personalization module, combined with the scene personalized representation vector (first vector) output by the above-mentioned scene personalization module, and pass through the gating layer together to obtain a personalized network parameter weight vector for a specific task as an output. So that the subsequent initial multi-scenario multi-objective model can regulate the dense parameters in the task tower module through the parameter weight vector. Therefore, the parameter personalization module will impose a personalized influence of sample granularity on the dense parameters of different tasks to select and enhance the personalized parameter signal of the sample user for the task. In fact, the user's tendency prior information of a certain type of interactive behavior in a certain scene is injected into the initial multi-scenario multi-objective model, which can effectively alleviate the sparsity problem and data dependency problem in multi-objective modeling.
[0088] In one example, the user ID of the sample user, the live broadcast ID of the sample live broadcast, and their related features can be first input into the embedding layer of the scene personalization module to obtain the embedding vector corresponding to each feature, and then the embedding vectors corresponding to each feature are spliced to obtain the spliced vector. Then, according to the spliced vector and the first vector output by the scene personalization module, the parameter weight vector is output through the gating layer of the parameter personalization module.
[0089] Figure 6 Schematic diagram of the structure of the parameter personalization module and the task tower module provided in the embodiment of the present application. Figure 6 As shown, the parameter personalization module 40 includes an embedding layer 401 and a gating layer ( Figure 6 Three gating layers are shown, namely gating layer 402, gating layer 403 and gating layer 404). Among them, embedding layer 401 is used to embed the input user features and live broadcast features to obtain an embedding vector. Gating layer 402, gating layer 403 and gating layer 404 are used to weight the embedding vector and the scene personalized representation vector to obtain a personalized network parameter weight vector for a specific task. Among them, Figure 6 It includes three gating layers. The number of gating layers needs to be the same as the number of DNN layers in a single task tower module, so that the subsequent task tower module can perform Hadamard product of the parameter weight vector with the dense parameters of each DNN layer. The details will be explained later and will not be repeated here.
[0090] It should be noted that the following points should be noted in the construction of the parameter personalization module: 1) The input features of the parameter personalization module, such as user identification and other features, can overlap with the main input features of the initial multi-scenario multi-objective model, but two sets of representation vectors should be used, so the same features have different meanings in different modules; 2) The gated output of the parameter personalization module is shared by all task tower modules and is determined by input features such as user identification and live broadcast identification; 3) When the error back propagation is performed through the parameter personalization module to update the parameters, it is necessary to stop the gradient update of the scene personalization representation vector output by the scene personalization module to avoid direct impact on the scene personalization module.
[0091] Step S304: According to the parameter weight vector and the first vector, the task tower module corresponding to each task in the initial multi-scenario multi-objective model is used to determine the prediction result of the sample user for the sample live broadcast in the scene output by each task tower module regarding the corresponding task goal.
[0092] In some embodiments, step S304 is implemented as follows: through the network layer of each task tower module, a Hadamard product is performed on the parameter weight vector and the first vector to determine the third vector of the sample user for the sample live broadcast regarding the corresponding task goal; based on the third vector of the sample user for the sample live broadcast regarding the corresponding task goal, through the output layer of each task tower module, the prediction result of the sample user for the sample live broadcast regarding the corresponding task goal is determined.
[0093] It can be understood that the initial multi-scenario multi-objective model includes multiple task tower modules with DNN structures. The number of task tower modules corresponds to the number of tasks, that is, there are as many task tower modules as there are tasks, and each task tower module outputs the prediction result of the corresponding task. After obtaining the scene personalized characterization vector (first vector) output by the scene personalization module and the parameter weight vector output by the parameter personalization module, the parameter weight vector and the first vector can be input into each task tower module, and the network layer (DNN layer) in each task tower module outputs the third vector of the sample user for the sample live broadcast regarding the corresponding task target.
[0094] The task tower module includes multiple DNN layers. For a task tower module, the task tower module makes a Hadamard product with the dense parameters in the task tower through the parameter weight vector to obtain the output of the first DNN layer, and then the Hadamard product of the output of the first DNN layer and the parameter weight vector is used as the input of the second DNN layer. And so on, the third vector of the sample user's sample live broadcast about the corresponding task goal in a fixed scenario output by the last DNN layer can be obtained.
[0095] refer to Figure 6 , you can see Figure 6Two task tower modules (task tower module 51 and task tower module 52) are shown in the figure. The two task tower modules correspond to different tasks respectively. Both task tower modules include three DNN layers and an output layer (not shown in the figure), wherein the task tower module 51 includes a first DNN layer 511, a second DNN layer 512, and a third DNN layer 513, and the task tower module 52 includes a first DNN layer 521, a second DNN layer 522, and a third DNN layer 523. The number of DNN layers in the task tower module is the same as the number of gated layers (GataNU) in the parameter personalization module. For a task tower module, after the parameter weight vector and the scene personalization vector are input into the task tower module, the DNN layer of the task tower module can output the third vector of the sample user for the sample live broadcast with respect to the corresponding task target in the scene corresponding to the scene personalization vector representation. After obtaining the third vector, the prediction result of the sample user for the sample live broadcast with respect to the corresponding task target can be determined through the output layer of each task tower module. Among them, the prediction result represents the degree of interest of the sample user in the sample live broadcast with respect to the corresponding task target, and the prediction result can be exemplarily a probability value.
[0096] It can be understood that the output layer of each task tower module has an activation function. Therefore, the scalar value obtained by multiplying each value in the third vector by a preset value and then summing them can be used as the input value of the only variable in the activation function through the output layer, and the predicted probability corresponding to the scalar value can be output through the activation function.
[0097] For example, the activation function may be a sigmoid function, which may be used to process a binary classification problem and map a real number to an interval of (0, 1). For example, the activation function may also be a cross entropy function. The embodiment of the present application does not limit the type of the activation function.
[0098] In addition, users generally have selection biases in live broadcast recommendations, and models trained using implicit feedback data are generally biased. For example, live broadcasts with exposure positions in the front are more likely to be clicked by users than live broadcasts with exposure positions in the back. This is called position bias. Alternatively, users' clicks on live broadcasts will be affected by surrounding live broadcasts, which is called neighbor bias. This application considers the impact of these two biases on users' clicks on live broadcasts, and therefore eliminates the bias information inherent in implicit exposure samples by adding a position debiasing module to the initial multi-scene multi-target model.
[0099] Based on this, in some embodiments, according to the third vector of the sample user for the sample live broadcast regarding the corresponding task target, through the output layer of each task tower module, determining the prediction result of the sample user for the sample live broadcast regarding the corresponding task target is implemented as follows: obtaining the bias feature of the sample live broadcast, the bias feature includes the exposure position of the sample live broadcast in multiple sample live broadcasts, and / or, the live broadcast feature of the sample live broadcast around the exposure position of the sample live broadcast; according to the bias feature, determining the bias component through a position debiasing module; according to the third vector and the bias component, determining the prediction result of the sample user for the sample live broadcast regarding the corresponding task target through the output layer of each task module, the prediction result indicating the prediction result of the sample user for the sample live broadcast regarding the corresponding task target after removing the bias feature of the sample live broadcast.
[0100] It is understandable that when obtaining the training sample, the exposure position of the sample live broadcast in multiple sample live broadcasts, and / or the live broadcast features of the sample live broadcast around the exposure position of the sample live broadcast can also be obtained to obtain the bias feature of the sample live broadcast. When predicting the sample live broadcast, the bias feature can be input into the position debiasing module, and the bias component can be output through the position debiasing module. Then, according to the third vector and the bias component obtained above, the two vectors are processed by the activation function of the output layer in each task tower module to obtain the final prediction result. Among them, a random deactivation (dropout) layer can be added to the position debiasing module to prevent the main model output of the multi-scene multi-target model from being overly dependent on the output of the position debiasing module.
[0101] In addition, the position debiasing module in this application is only applicable to the model training process. Taking the bias information into account during modeling will make the prediction results of the multi-scenario multi-objective model more consistent with the causal relationship. When using the multi-scenario multi-objective model for online estimation, only the main model output is used.
[0102] Therefore, when training the model, the output of the multi-scenario multi-objective model can be expressed by formula (2):
[0103] y k =σ(u k +y b ) (2);
[0104] Among them, y k represents the final output of the multi-scenario multi-objective model, σ represents the operator of the activation function, and u k Represents the output of the main model, y b Represents the output of the position depolarization module.
[0105] When performing online estimation, the output of the multi-scenario multi-objective model can be expressed by formula (3):
[0106] y k =σ(uk ) (3);
[0107] The meaning of each parameter is the same as that of the parameter in formula (2).
[0108] Figure 7 Schematic diagram of a multi-scenario multi-objective model provided in an embodiment of the present application. Figure 7 As shown, the multi-scenario multi-target model includes a main model 60 and a position debiasing module 601, wherein the main model 60 includes the introduced transformer module, the scene personalization module, the parameter personalization module, and the task tower module corresponding to each task. When training the model, the scene features, the user features of the sample users, and the live broadcast features of the sample live broadcast are input into the main model 60, and the third vector is output through the joint output of each model in the main model 60. At the same time, the bias features of the sample live broadcast are input into the position debiasing module 601, and the bias vector is output through the position debiasing module 601. Then, according to the third vector and the bias vector, the prediction result of the sample user for the sample live broadcast regarding the corresponding task target is output through the activation function in the output layer 602 of each task tower module.
[0109] In addition, in some embodiments, the present application may adopt a sub-network routing (SNR) model as the main model of the initial multi-scenario multi-objective model. A binary network is used in SNR to replace the gating network in traditional parameter sharing. The output of the expert network corresponding to each task is equivalent to being controlled by the routing network, which greatly improves the flexibility of parameter sharing.
[0110] Figure 8 Schematic diagram of the architecture of the SNR model provided in the embodiment of the present application. Figure 8As shown in the figure, the SNR model includes an input layer 701, an expert layer 702 (including 6 experts, namely, expert 0, expert 1, expert 2, expert 3, expert 4 and expert 5) and tower layers corresponding to each task. Two tower layers (703-1 and 703-2) are shown in the figure. Among them, the input layer and the expert layer are connected by an ordinary fully connected network. The expert layer includes two layers, and the coding layer idea is proposed inside the expert layer, that is, the feature extracted by each expert in the lower layer has a 0 or 1 parameter to control whether it is effective for the upper expert. If the parameter is 0, it means that there is no routing connection between the lower expert and the upper expert. If the parameter is 1, it means that there is a routing connection between the lower expert and the upper expert. The routing connection between experts is controlled by a binary coding variable (0 or 1), which can increase the interaction between each expert (sub-network) on the one hand, and reduce the total number of parameters on the other hand. Moreover, the parameter can be updated through gradient backpropagation, so that the upper expert connection has more selection space, and sharing is also achieved within the expert. When connecting the expert layer to the tower layer, weight parameters are used to combine the experts. The weight parameters can also be updated through gradient feedback. The input to the tower corresponding to the task is the result of weighted features of multiple experts. The advantage of the SNR model is that parameter sharing between tasks is more flexible, which alleviates the seesaw effect between independent tasks to a certain extent. It should be noted that the tower layer here is the task tower module mentioned above.
[0111] Step S305: According to the prediction results output by each task tower module and the task labels corresponding to the training samples, the network parameters in the initial multi-scenario multi-objective model are adjusted to obtain the trained multi-scenario multi-objective model.
[0112] In some embodiments, step S305 is implemented as follows: for each task, the loss value of the task is determined according to the prediction results output by each task tower module and the task target label of the training sample for the task; based on the loss value of each task, the total loss of the initial multi-scenario multi-target model is determined; based on the total loss, the network parameters in the initial multi-scenario multi-target model are adjusted to obtain the trained multi-scenario multi-target model.
[0113] The present application can calculate the loss value of each task based on the difference between the prediction result and the label of the training sample for each task. For example, the loss value corresponding to each task can be calculated based on logistic regression or mean square error. The embodiments of the present application do not limit the specific implementation method of calculating the loss value of each task.
[0114] It should be noted that the loss value of each task is based on all the training samples in the training sample data set. The loss value of a single task can be represented as the average of the difference between the prediction results and the label values of all the training samples in the training sample data set. The smaller the loss value, the smaller the difference. Correspondingly, based on the loss value of each task, the smaller the total loss determined, the better the convergence degree of the model, that is, the accuracy of the model. Therefore, the embodiment of the present application can adjust the parameters of the initial multi-scenario multi-objective model based on the total loss to obtain a multi-scenario multi-objective model with better accuracy than the initial multi-scenario multi-objective model.
[0115] When determining the total loss based on the loss value of each task, the embodiment of the present application may be based on a predetermined loss function, with the loss value of each task as the independent variable and the total loss as the dependent variable to determine the total loss. For example, the sum of the loss values of each task may be used as the total loss. Different weights may also be assigned to each task and then summed and the sum is used as the total loss. The embodiment of the present application does not limit the method for determining the total loss.
[0116] In one example, the loss value of each task can be calculated by the cross entropy loss function. The loss value of each task can be expressed by formula (4):
[0117]
[0118] Among them, L k represents the loss value of a task, N represents the total number of tasks, y i represents the probability of the task label of the i-th training sample for the task, y k Represents the predicted probability of the i-th training sample output by the multi-scenario multi-objective model for the task.
[0119] After obtaining the loss value of each task, we can assign different weights to each task and sum them up, and use the sum as the total loss value. Therefore, the total loss value can be expressed by formula (5):
[0120]
[0121] Among them, L represents the total loss value, L k represents the loss value of a task, λ k represents the weight of the corresponding task, and k represents the kth task.
[0122] It can be understood that in the embodiments of the present application, the total loss is determined based on the loss of each task, and the parameters in the initial multi-scenario multi-objective model are adjusted based on the total loss, rather than adjusting the parameters based on a single task, so that the multi-scenario multi-objective model can balance the processing of different tasks, and train multiple tasks as a whole, so that the multi-scenario multi-objective model obtained by training can obtain more comprehensive and accurate multi-task recognition results.
[0123] In addition, the present application can calculate the model loss through the cross entropy loss function, and finally update the model parameters and each feature representation vector through the gradient back propagation of the model loss. After the model loss tends to be stable, the model file is saved for online scoring of recommendation engines in multiple scenarios. In this application scenario, the model effect evaluation adopts offline and online AB test evaluation, and the offline indicator uses the area under the curve (AUC) indicator to judge the model training effect. Compared with the original multiple separate task models, the offline effect of the multi-scenario and multi-objective model trained using this solution is better than the original model, and the page views (pv) are also significantly improved compared with the original model, while reducing the number of models and model maintenance costs in multiple scenarios.
[0124] In this application, firstly, a training sample set under multiple live recommendation scenarios and each task target label corresponding to each training sample in the training sample set are obtained, and then, according to the training samples in the training sample set, the first vector corresponding to the scene is determined by the scene personalization module of the initial multi-scenario multi-target model; according to the first vector, the user characteristics of the sample user, and the live broadcast characteristics of the sample live broadcast, the parameter weight vector is determined by the parameter personalization module; according to the parameter weight vector and the first vector, the prediction results of the sample user in the scene output by each task tower module for the sample live broadcast about the corresponding task target are determined by the task tower module corresponding to each task, and the network parameters in the initial multi-scenario multi-target model are adjusted according to the prediction results and each task target label corresponding to each training sample, so as to obtain the trained multi-scenario multi-target model. This application captures the characteristics of sample users in different scenarios through the scene personalization module to realize scene personalization; the prior information such as user characteristics and live broadcast characteristics is injected into each task tower module of the upper layer through the parameter personalization module to realize the personalization of the task. Therefore, from the perspective of the entire recommendation system, this application only needs to train and maintain a multi-scenario multi-target model to realize joint learning for multiple scenarios and multiple targets. Correspondingly, sample data from multiple scenes can be used to train a multi-scene multi-objective model, which greatly increases the amount of training data for the multi-scene multi-objective model. This allows the multi-scene multi-objective model to be trained more fully, thereby enhancing the recommendation effect of the multi-scene multi-objective model.
[0125] In an embodiment of the present application, based on the trained multi-scenario multi-objective model, it can be applied to the aforementioned live broadcast recommendation system to provide users with live broadcasts that are more in line with their current interests.
[0126] Fig. 9 is a flow chart of the live broadcast recommendation method provided in the embodiment of the present application. Fig. 9 As shown, the live broadcast recommendation method includes the following steps:
[0127] Step S901: In response to a live broadcast recommendation request from a target user in a first scenario, scene features of the first scenario, user features of the target user in the first scenario, and live broadcast features of candidate live broadcasts in the first scenario are obtained.
[0128] Here, the candidate live broadcast is the live broadcast that is currently being broadcast.
[0129] It can be understood that the first scene is the scene that the target user is currently in. For example, if the target user is currently browsing the discovery page, the first scene is the discovery page scene.
[0130] In some embodiments, step S901 is implemented as follows: obtaining historical live broadcast data within a preset time period under the first scenario, the historical live broadcast data including the scenario data of the first scenario, the user data of the target user under the first scenario, and the live broadcast data of multiple candidate live broadcasts under the first scenario, the user data including the attribute data of the target user and the historical behavior data of the target user for the candidate live broadcast, and the live broadcast data including the attribute data of the live broadcast room corresponding to the candidate live broadcast, and the anchor data of the anchor in the live broadcast room; through the feature extraction module in the multi-scenario multi-target model, feature extraction is performed on the historical live broadcast data under the first scenario to obtain scenario features, user features, and live broadcast features. Among them, the preset time period can be pre-set, such as being set to within one hour before the current time, etc., and the embodiments of the present application are not limited to this. The current time is the time for recommending live broadcasts for target users.
[0131] It is understandable that the live broadcast recommendation request may carry scene data, user data and live broadcast data. Next, after obtaining the scene data, user data and live broadcast data, the live broadcast recommendation device extracts features from the scene data, user data and live broadcast data, and obtains scene features, user features of the target user (also described as user-side features) and live broadcast features of the candidate live broadcast (also described as live broadcast-side features).
[0132] In some embodiments, user data may include user attribute data (also referred to as user portrait), user behavior data, user context data, etc.
[0133] It is understandable that when the live broadcast room starts broadcasting, the device will obtain the live broadcast data related to the live broadcast room and the anchor in real time. The live broadcast data may include the attribute data of the live broadcast room and the anchor data of the anchor in the live broadcast room. Among them, the anchor data may include the anchor's gender, age, live broadcast type, number of fans, etc., and the attribute data of the live broadcast room may include the popularity of the live broadcast room, work category, label, keyword, etc. For example, the attribute data of the live broadcast room may also include the dynamically changing number of online people in the live broadcast room, the number of likes in the live broadcast room, the number of comments and interactions in the live broadcast room, etc. Since there is more than one live broadcast in the preset time period, that is, there may be multiple candidate live broadcasts, the live broadcast recommendation device can obtain the live broadcast data of multiple candidate live broadcasts.
[0134] Step S902: According to the scene features, user features and live broadcast features, the prediction results of the target user for the corresponding task goals for the candidate live broadcast are determined through a multi-scene multi-objective model.
[0135] In some embodiments, step S902 is implemented as follows: according to the scene features, user features and live broadcast features, a first vector corresponding to the first scene is determined through a scene personalization module of a multi-scene multi-objective model, the first vector represents the personalized representation of the user features and live broadcast features in the first scene; according to the first vector, user features and live broadcast features, a parameter weight vector is determined through a parameter personalization module of a multi-scene multi-objective model, the parameter weight vector represents the weight of the network parameters in the multi-scene multi-objective model under each task; according to the parameter weight vector and the first vector, a prediction result of the target user for the candidate live broadcast about the corresponding task target in the first scene output by each task tower module is determined through a task tower module corresponding to each task in the multi-scene multi-objective model. Among them, the implementation method of step S902 can refer to the relevant content in the above-mentioned model training process, which will not be repeated here.
[0136] Step S903: According to the prediction result, a target live broadcast is recommended to the target user from multiple candidate live broadcasts.
[0137] In some embodiments, step S903 is implemented as follows: sorting multiple candidate live broadcasts according to the prediction results corresponding to each task target, wherein the prediction results represent the degree of interest of the target user in the candidate live broadcasts with respect to the corresponding task target; determining at least one candidate live broadcast that meets the preset conditions from the multiple candidate live broadcasts as the target live broadcast according to the sorting results, and recommending the target live broadcast to the target user. The preset conditions may be pre-set by the target user, and may be, for example, the top ten recommended live broadcasts, which are not limited in the embodiments of the present application.
[0138] In one embodiment, the prediction results corresponding to each task target may be fused to obtain a fused total prediction result, and then multiple candidate live broadcasts may be sorted according to the total prediction result.
[0139] In one embodiment, multiple candidate live broadcasts can be ranked for each task target according to the prediction results corresponding to each task target in the prediction results. In this way, the candidate live broadcasts can have different rankings for different tasks. After that, the rankings of the candidate live broadcasts under one or more tasks can be combined to complete the comprehensive ranking of the candidate live broadcasts.
[0140] It is understandable that when the prediction result is a probability, multiple candidate live broadcasts can be sorted in order of predicted probability from high to low, or multiple candidate live broadcasts can be sorted according to other rules. The embodiments of the present application do not make specific limitations on this.
[0141] The following describes an exemplary structure of a multi-scenario multi-objective model training device 455 provided in an embodiment of the present application implemented as a software module. Fig.10 A schematic diagram of the structure of a training device for a multi-scenario multi-objective model provided in an embodiment of the present application. Fig.10 As shown, the training device 455 of the multi-scenario multi-objective model includes a second acquisition module 4551, a second determination module 4552, a third determination module 4553, a fourth determination module 4554 and a parameter adjustment module 4555.
[0142] The second acquisition module 4551 is used to obtain training sample sets in multiple live broadcast recommendation scenarios and task labels corresponding to each training sample in the training sample set, wherein the training samples include scene features of the scene, user features of sample users in the scene, and live broadcast features of sample live broadcasts exposed in the scene; the second determination module 4552 is used to determine a first vector corresponding to the scene through a scene personalization module of an initial multi-scenario multi-objective model based on the training samples in the training sample set, wherein the first vector represents a personalized representation of user features and live broadcast features in the corresponding scene; the third determination module 4553 is used to determine a first vector corresponding to the scene based on the first vector, user features of sample users, and live broadcast features of sample live broadcasts , a parameter weight vector is determined through the parameter personalization module of the initial multi-scenario multi-objective model, and the parameter weight vector represents the weight of the network parameters in the initial multi-scenario multi-objective model under each task; a fourth determination module 4554 is used to determine, according to the parameter weight vector and the first vector, through the task tower module corresponding to each task in the initial multi-scenario multi-objective model, the prediction result of the sample user in the scene output by each task tower module for the sample live broadcast about the corresponding task goal; a parameter adjustment module 4555 is used to adjust the network parameters in the initial multi-scenario multi-objective model according to the prediction result output by each task tower module and the task labels corresponding to the training samples, so as to obtain the trained multi-scenario multi-objective model.
[0143] In some possible implementations, the second determination module 4552 is further used to: determine the scene weight vector of the scene through the gating layer in the scene personalization module based on scene characteristics of the scene in the training sample, user characteristics of the sample users in the scene, and live broadcast characteristics of the sample live broadcast exposed in the scene; and determine the first vector by performing a Hadamard product on the scene weight vector, the user characteristics of the sample users in the scene, and the live broadcast characteristics of the sample live broadcast exposed in the scene through the output layer in the scene personalization module.
[0144] In some possible implementations, the third determination module 4553 is further used to: concatenate the user characteristics of the sample user and the live broadcast characteristics of the sample live broadcast to obtain a concatenated second vector; and determine the parameter weight vector through the gating layer of the task personalization module based on the first vector and the second vector.
[0145] In some possible implementations, the fourth determination module 4554 is also used to: perform a Hadamard product on the parameter weight vector and the first vector through the network layer of each task tower module to determine the third vector of the sample user with respect to the corresponding task target for the sample live broadcast; and determine the prediction result of the sample user with respect to the corresponding task target for the sample live broadcast through the output layer of each task tower module based on the third vector of the sample user with respect to the corresponding task target for the sample live broadcast.
[0146] In some possible embodiments, the initial multi-scene multi-target model also includes a position debiasing module; the fourth determination module 4554 is also used to: obtain bias features of the sample live broadcast, the bias features include the exposure position of the sample live broadcast in multiple sample live broadcasts, and / or, the live broadcast features of the sample live broadcast around the exposure position of the sample live broadcast; according to the bias features, determine the bias component through the position debiasing module; according to the third vector and the bias component, determine the prediction result of the sample user for the sample live broadcast regarding the corresponding task target through the output layer of each task tower module, the prediction result indicates the prediction result of the sample user for the sample live broadcast regarding the corresponding task target after removing the bias features of the sample live broadcast.
[0147] In some possible implementations, the initial multi-scenario multi-target model also includes a feature extraction module; the second acquisition module 4551 is also used to: for each live broadcast recommendation scenario, obtain historical live broadcast data within a preset time period in the scenario, the historical live broadcast data including scene data of the scenario, user data of sample users in the scenario, and live broadcast data of sample live broadcasts exposed in the scenario, the user data including attribute data of the sample users and historical behavior data of the sample users for the sample live broadcasts, the live broadcast data including attribute data of the live broadcast room corresponding to the sample live broadcast, and anchor data of the anchor in the live broadcast room; through the feature extraction module, feature extraction is performed on the historical live broadcast data in each live broadcast recommendation scenario, and multiple training samples in each live broadcast recommendation scenario are obtained to form a training sample set.
[0148] In some possible implementations, the parameter adjustment module 4555 is also used to: for each task, determine the loss value of the task according to the prediction results output by each task tower module and the task target label of the training sample for the task; based on the loss value of each task, determine the total loss of the initial multi-scenario multi-objective model; based on the total loss, adjust the network parameters in the initial multi-scenario multi-objective model to obtain the trained multi-scenario multi-objective model.
[0149] The following describes an exemplary structure of the live broadcast recommendation device 456 provided in the embodiment of the present application implemented as a software module. Fig.11 This is a schematic diagram of the structure of the live broadcast recommendation device provided in the embodiment of the present application. Fig.11 As shown, the live broadcast recommendation device 456 includes a first acquisition module 4561, a first determination module 4562 and a recommendation module 4563.
[0150] Among them, the first acquisition module 4561 is used to respond to the live broadcast recommendation request of the target user in the first scene, obtain the scene characteristics of the first scene, the user characteristics of the target user in the first scene, and the live broadcast characteristics of multiple candidate live broadcasts in the first scene; the first determination module 4562 is used to determine the prediction results of the target user regarding the corresponding task objectives for the candidate live broadcasts through a multi-scene multi-objective model based on the scene characteristics, user characteristics and live broadcast characteristics; the recommendation module 4563 is used to recommend the target live broadcast to the target user from multiple candidate live broadcasts based on the prediction results.
[0151] In some possible implementations, the first acquisition module 4561 is also used to: obtain historical live broadcast data within a preset time period under the first scenario, the historical live broadcast data including scene data of the first scenario, user data of the target user under the first scenario, and live broadcast data of multiple candidate live broadcasts under the first scenario, the user data including attribute data of the target user and historical behavior data of the target user for the candidate live broadcasts, the live broadcast data including attribute data of the live broadcast room corresponding to the candidate live broadcast, and anchor data of the anchor in the live broadcast room; perform feature extraction on the historical live broadcast data under the first scenario through the feature extraction module in the multi-scenario multi-target model to obtain scene features, user features, and live broadcast features.
[0152] In some possible implementations, the first determination module 4562 is also used to: determine a first vector corresponding to the first scene through a scene personalization module of a multi-scene multi-objective model based on scene characteristics, user characteristics and live broadcast characteristics, the first vector representing the personalized representation of the user characteristics and live broadcast characteristics in the first scene; determine a parameter weight vector through a parameter personalization module of the multi-scene multi-objective model based on the first vector, user characteristics and live broadcast characteristics, the parameter weight vector representing the weight of the network parameters in the multi-scene multi-objective model under each task; determine the prediction result of the target user for the candidate live broadcast under the first scene output by each task tower module based on the parameter weight vector and the first vector through a task tower module corresponding to each task in the multi-scene multi-objective model.
[0153] In some possible implementations, the recommendation module 4563 is also used to: sort multiple candidate live broadcasts according to the prediction results corresponding to each task goal, the prediction results characterizing the degree of interest of the target user in the candidate live broadcasts regarding the corresponding task goal; determine at least one candidate live broadcast that meets preset conditions from the multiple candidate live broadcasts as the target live broadcast according to the sorting results, and recommend the target live broadcast to the target user.
[0154] The embodiment of the present application provides a computer program product or a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the training method of the multi-scenario multi-objective model and / or the live broadcast recommendation method described in the embodiment of the present application.
[0155] An embodiment of the present application provides a computer-readable storage medium storing executable instructions, wherein executable instructions are stored. When the executable instructions are executed by a processor, the processor will execute the multi-scenario multi-objective model training method and / or live broadcast recommendation method provided in the embodiment of the present application.
[0156] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0157] In some embodiments, executable instructions may be in 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 stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0158] As an example, executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0159] As an example, executable instructions may be deployed to be executed on one computing device, or on multiple computing devices located at one location, or on multiple computing devices distributed at multiple locations and interconnected by a communication network. The above is only an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.
Claims
1. A training method for a multi-scenario and multi-objective model, It is characterized in that The method comprises: Acquire a training sample set in a plurality of live broadcast recommendation scenarios, and each task target label corresponding to each training sample in the training sample set, wherein the training sample includes a scene feature of the scenario, a user feature of a sample user in the scenario, and a live broadcast feature of a sample live broadcast exposed in the scenario; According to the training samples in the training sample set, determining a first vector corresponding to the scene through a scene personalization module of the initial multi-scene multi-objective model, wherein the first vector represents a personalized representation of the user feature and the live broadcast feature in the corresponding scene; Determine a parameter weight vector through a parameter personalization module of the initial multi-scenario multi-objective model according to the first vector, the user characteristics of the sample user, and the live broadcast characteristics of the sample live broadcast, wherein the parameter weight vector represents the weight of the network parameters in the initial multi-scenario multi-objective model under each task; According to the parameter weight vector and the first vector, through the task tower module corresponding to each task in the initial multi-scenario multi-objective model, determine the prediction result of the sample user for the sample live broadcast about the corresponding task goal in the scene output by each task tower module; According to the prediction results output by each task tower module and the task target labels corresponding to the training samples, the network parameters in the initial multi-scenario multi-target model are adjusted to obtain a trained multi-scenario multi-target model.
2. The method according to claim 1, It is characterized in that The determining, according to the training samples in the training sample set, a first vector corresponding to the scene by a scene personalization module of the initial multi-scene multi-objective model comprises: Determine a scene weight vector of the scene through a gating layer in the scene personalization module according to scene features of the scene in the training sample, user features of sample users in the scene, and live broadcast features of sample live broadcasts exposed in the scene; The first vector is determined by performing a Hadamard product on the scene weight vector, the user characteristics of the sample users in the scene, and the live broadcast characteristics of the sample live broadcast exposed in the scene through the output layer in the scene personalization module.
3. The method according to claim 1, It is characterized in that The determining of the parameter weight vector by a parameter personalization module in the initial multi-scenario multi-objective model according to the first vector, the user characteristics of the sample user, and the live broadcast characteristics of the sample live broadcast includes: Concatenate the user features of the sample user and the live broadcast features of the sample live broadcast to obtain a concatenated second vector; The parameter weight vector is determined by a gating layer of the task personalization module according to the first vector and the second vector.
4. The method according to claim 1, It is characterized in that The step of determining, according to the parameter weight vector and the first vector, a prediction result of the sample user for the sample live broadcast regarding the corresponding task goal in the scenario output by each task tower module through the task tower module corresponding to each task in the initial multi-scenario multi-objective model, includes: Performing a Hadamard product on the parameter weight vector and the first vector through the network layer of each task tower module to determine a third vector of the sample user with respect to the sample live broadcast with respect to the corresponding task target; According to the third vector of the sample user regarding the corresponding task target for the sample live broadcast, the prediction result of the sample user regarding the corresponding task target for the sample live broadcast is determined through the output layer of each task tower module.
5. The method according to claim 4, It is characterized in that The initial multi-scene multi-objective model also includes a position debiasing module; The method of determining the prediction result of the sample user for the sample live broadcast with respect to the corresponding task target according to the third vector of the sample user for the sample live broadcast with respect to the corresponding task target through the output layer of each task tower module includes: Obtaining bias features of the sample live broadcast, the bias features including an exposure position of the sample live broadcast among multiple sample live broadcasts, and / or live broadcast features of other sample live broadcasts around the exposure position of the sample live broadcast; Determining a bias component through the position debiasing module according to the bias feature; According to the third vector and the bias component, the prediction result of the sample user for the sample live broadcast regarding the corresponding task target is determined through the output layer of each task tower module, and the prediction result indicates the prediction result of the sample user for the sample live broadcast regarding the corresponding task target after removing the bias features of the sample live broadcast.
6. The method according to claim 1, It is characterized in that The initial multi-scene multi-objective model also includes a feature extraction module; The obtaining of training sample sets in multiple live broadcast recommendation scenarios includes: For each live broadcast recommendation scenario, historical live broadcast data within a preset time period in the scenario is obtained, the historical live broadcast data includes scenario data of the scenario, user data of sample users in the scenario, and live broadcast data of sample live broadcasts exposed in the scenario, the user data includes attribute data of the sample users and historical behavior data of the sample users for the sample live broadcasts, and the live broadcast data includes attribute data of the live broadcast room corresponding to the sample live broadcast and anchor data of the anchor in the live broadcast room; The feature extraction module is used to extract features from the historical live broadcast data in each live broadcast recommendation scenario, and a plurality of training samples in each live broadcast recommendation scenario are obtained to form the training sample set.
7. The method according to any one of claims 1 to 6, It is characterized in that The method further comprises adjusting the network parameters in the initial multi-scenario multi-objective model according to the prediction results output by each task tower module and the task target labels corresponding to the training samples to obtain the trained multi-scenario multi-objective model, including: For each task, determining a loss value of the task according to the prediction result output by each task tower module and the task target label of the training sample for the task; Determining the total loss of the initial multi-scenario multi-objective model based on the loss value of each task; Based on the total loss, the network parameters in the initial multi-scenario multi-objective model are adjusted to obtain a trained multi-scenario multi-objective model.
8. A live broadcast recommendation method, It is characterized in that The method comprises: In response to a live broadcast recommendation request of a target user in a first scenario, acquiring a scenario feature of the first scenario, a user feature of the target user in the first scenario, and live broadcast features of a plurality of candidate live broadcasts in the first scenario; According to the scene features, the user features and the live broadcast features, a prediction result of the target user regarding the corresponding task goal for the candidate live broadcast is determined by a multi-scene multi-objective model, wherein the multi-scene multi-objective model is trained by the method described in any one of claims 1 to 7; According to the prediction result, a target live broadcast is recommended to the target user from the multiple candidate live broadcasts.
9. The method according to claim 8, It is characterized in that The step of determining the prediction result of the target user regarding the corresponding task goal for the candidate live broadcast through a multi-scenario multi-objective model according to the scene feature, the user feature and the live broadcast feature includes: According to the scene features, the user features, and the live broadcast features, determining a first vector corresponding to the first scene through a scene personalization module of the multi-scene multi-objective model, wherein the first vector represents a personalized representation of the user features and the live broadcast features in the first scene; Determining a parameter weight vector through a parameter personalization module of the multi-scenario multi-objective model according to the first vector, the user feature, and the live broadcast feature, wherein the parameter weight vector represents the weight of the network parameters in the multi-scenario multi-objective model under each task; According to the parameter weight vector and the first vector, the prediction result of the target user for the candidate live broadcast regarding the corresponding task goal in the first scenario output by each task tower module is determined through the task tower module corresponding to each task in the multi-scenario multi-objective model.
10. A live broadcast recommendation device, It is characterized in that The device comprises: A first acquisition module is configured to, in response to a live broadcast recommendation request from a target user in a first scenario, acquire a scene feature of the first scenario, a user feature of the target user in the first scenario, and live broadcast features of a plurality of candidate live broadcasts in the first scenario; A first determination module is used to determine the prediction result of the target user on the corresponding task goal for the candidate live broadcast through a multi-scenario multi-objective model according to the scene characteristics, the user characteristics and the live broadcast characteristics; A recommendation module is used to recommend a target live broadcast to the target user from the multiple candidate live broadcasts according to the prediction result.
11. An electronic device, It is characterized in that The electronic device comprises: A memory for storing executable instructions; A processor, configured to implement the method of any one of claims 1 to 7, or the method of any one of claims 8 or 9, when executing the executable instructions or computer programs stored in the memory.
12. A computer-readable storage medium storing executable instructions or computer programs, It is characterized in that When the executable instructions are executed by a processor, the method described in any one of claims 1 to 7, or the method described in any one of claims 8 or 9 is implemented.
Citation Information
Cited By
Inference method and apparatus, and computing device cluster and readable storage medium
WO2026200032A1
