Behavior prediction method, device and related products
By performing shared and personalized feature extraction in the multi-task learning model, and combining shared features and personalized feature results for behavior prediction, the problem of insufficient prediction accuracy in the prior art is solved, and high accuracy prediction in scenarios with low behavior correlation is achieved.
Patent Information
- Application Number
- CN202110796095.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-14
- Publication Date
- 2025-08-15
- Estimated Expiration
- 2041-07-14
AI Technical Summary
The existing multi-task learning model ignores the difference in behavior characteristics between tasks in user behavior prediction, resulting in low prediction accuracy, especially in scenarios with low task correlation.
By obtaining the feature sequence of the target content and the N historical behavior sequences of the target user, shared feature extraction and personalized feature extraction are performed, and behavior prediction is performed by combining the shared feature extraction results and personalized feature extraction results, considering the differences in different historical behavior sequences.
In scenarios with low behavioral correlation, the prediction accuracy of multi-task learning is improved to ensure the accuracy and reliability of prediction results.
Smart Images

Figure CN113821720B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of machine learning technology, and in particular to a behavior prediction method, device, and related products. Background Art
[0002] With the rapid development of the internet, content is becoming increasingly abundant. Users can easily access a wide variety of content, such as videos, books, products, and advertisements, through their computers. Currently, the proliferation of diverse content on many internet platforms is exploding. The operations teams of internet platforms often need to find content that may be of interest to users from this vast amount of content. This massive volume of content poses significant challenges for these teams. A key step before content recommendation is to predict various user behaviors (such as clicks, subscriptions, comments, and favorites) on the content to be recommended. This can be achieved through multi-task learning, where multiple tasks correspond to various user behaviors. Multi-task learning is a machine learning approach that combines multiple related tasks based on shared data. Multi-task learning learns relevant domain information from different tasks and then shares this domain information within the model. By enabling multiple tasks to learn and share information with each other, the generalization capability and performance of the entire model are improved.
[0003] In the existing technology, the full space multi-task learning model (ESMM) or the neural network based on hard parameter sharing can be applied for multi-task learning. In both of the above multi-task learning methods, homogeneous features are input into a separate task network after passing through the parameter sharing network layer, so as to predict user operation behavior. Taking the multi-task learning based on the neural network based on hard parameter sharing as an example, Figure 1 This is the model architecture diagram of the solution. Figure 1 As shown in the figure, based on the structure of the shared underlying network, different tasks share the bottom hidden layer. Going up, each task A and B corresponds to a feature extraction network respectively, and then the output of the feature extraction network of each task is used as the output of the task.
[0004] Combine Figure 1 It's not hard to see that in existing technologies, the input features for each task in multi-task learning models are essentially the same. This contradicts the fact that user behavior characteristics vary across tasks, resulting in low accuracy in model predictions. This accuracy issue becomes even more pronounced in learning scenarios where task relevance is low. Existing multi-task learning models struggle to meet accuracy requirements when predicting a variety of user behaviors. Therefore, improving the accuracy of predicting user operational behavior during multi-task learning has become a pressing technical issue in the field. Summary of the Invention
[0005] The embodiments of the present application provide a behavior prediction method, device, and related products to improve the accuracy of behavior prediction using multi-task learning.
[0006] In view of this, the first aspect of the present application provides a behavior prediction method, the method comprising:
[0007] Obtaining a feature sequence of target content;
[0008] Obtain N historical behavior sequences of the target user, where the N historical behavior sequences correspond one-to-one to the N behaviors and indicate the behavior objects and behavior order; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1.
[0009] Performing shared feature extraction processing based on N historical behavior sequences and feature sequences of target content to obtain shared feature extraction results;
[0010] Based on N historical behavior sequences, personalized feature extraction processing is performed respectively to obtain N personalized feature extraction results corresponding to the N historical behavior sequences;
[0011] The probability of the target user performing the target behavior in the target content is predicted based on the shared feature extraction results and the personalized feature extraction results corresponding to the target historical behavior sequence; the target historical behavior sequence is any historical behavior sequence among N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence among the N behaviors.
[0012] A second aspect of the present application provides a behavior prediction device, comprising:
[0013] A first acquisition unit is used to acquire a feature sequence of target content;
[0014] The second acquisition unit is configured to acquire N historical behavior sequences of the target user, wherein the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate the behavior objects and behavior order; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1;
[0015] A shared feature extraction unit is used to perform shared feature extraction processing based on N historical behavior sequences and feature sequences of target content to obtain shared feature extraction results;
[0016] A personalized feature extraction unit is used to perform personalized feature extraction processing based on N historical behavior sequences, and obtain N personalized feature extraction results corresponding to the N historical behavior sequences;
[0017] The prediction unit is used to predict the target user's target behavior in the target content based on the shared feature extraction results and the personalized feature extraction results corresponding to the target historical behavior sequence; the target historical behavior sequence is any one of the N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence in the N behaviors.
[0018] A third aspect of the present application provides a computer device, comprising a processor and a memory:
[0019] The memory is used to store program codes and transmit the program codes to the processor;
[0020] The processor is configured to execute the steps of the behavior prediction method of the first aspect described above according to the instructions in the program code.
[0021] In a fourth aspect, the present application provides a computer-readable storage medium, which is used to store program code, and the program code is used to execute the behavior prediction method of the first aspect.
[0022] It can be seen from the above technical solutions that the embodiments of the present application have the following advantages:
[0023] The present application provides a behavior prediction method, apparatus, and related products. The behavior prediction method requires obtaining a feature sequence of target content and N historical behavior sequences of a target user. These N historical behavior sequences correspond one-to-one to the N behaviors of the target user on the target content to be predicted. The historical behavior sequence indicates the behavior objects and order of the target user's past behaviors, where the behavior objects are of the same type as the target content. In this application, not only are shared feature extraction results extracted based on the N historical behavior sequences and the feature sequence of the target content, but also corresponding personalized feature extraction results are extracted based on each of the N historical behavior sequences. When predicting any of the N behaviors of the target user on the target content, the previously obtained shared feature extraction results and the personalized feature extraction results of the corresponding historical behavior sequence are combined to predict the probability of the target user subsequently performing that behavior. Unlike existing technologies, the novel multi-task learning approach in this solution emphasizes the differences in behavioral characteristics among various historical behavior sequences and performs targeted personalized feature extraction, rather than simply predicting the probabilities of different behaviors based solely on shared feature extraction results. This ensures high prediction accuracy even in scenarios where the correlation between the behaviors to be predicted is low. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A model architecture diagram for multi-task learning based on a neural network with hard parameter sharing provided in this application;
[0025] Figure 2A schematic diagram of a behavior prediction method in a practical application scenario provided by this application;
[0026] Figure 3 A flowchart of a behavior prediction method provided in an embodiment of the present application;
[0027] Figure 4 A schematic diagram of the structure of a multi-task learning model provided in an embodiment of the present application;
[0028] Figure 5 A flowchart of another behavior prediction method based on a multi-task learning model provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of the structure of another multi-task learning model provided in an embodiment of the present application;
[0030] Figure 7 It is a structural diagram of a traditional MMoE model;
[0031] Figure 8 A schematic diagram of the structure of a gated shared network layer when a shared feature processing module provided in an embodiment of the present application includes only one gated shared network layer;
[0032] Figure 9 A schematic diagram of the structure of a shared feature processing module provided in an embodiment of the present application including M layers of gated shared network layers;
[0033] Figure 10 A schematic diagram of the structure of another multi-task learning model provided in an embodiment of the present application;
[0034] Figure 11 Flowchart of another behavior prediction method based on a multi-task learning model provided in an embodiment of the present application
[0035] Figure 12 A flowchart of a method for training a multi-task learning model provided in an embodiment of the present application;
[0036] Figure 13 A schematic diagram of the structure of a behavior prediction device provided in an embodiment of the present application;
[0037] Figure 14 A schematic diagram of the structure of a server provided in an embodiment of the present invention;
[0038] Figure 15 A schematic diagram of the structure of a terminal device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The embodiments of the present application are described below with reference to the accompanying drawings.
[0040] Multi-task learning, a research hotspot in machine learning, has garnered widespread attention. In content recommendation scenarios, personalized content recommendations are influenced by user behavior. Multi-task learning can predict a variety of user behaviors within content. Currently, the main multi-task learning solutions include ESMM and neural networks based on hard parameter sharing. However, these approaches maintain essentially identical input features for each task, ignoring the impact of behavioral differences between tasks. This results in low prediction accuracy for various behaviors after multi-task learning. In content recommendation scenarios, low prediction accuracy for user behavior impacts the accuracy of content recommendations, making it difficult for users to quickly experience content of interest.
[0041] In order to solve the above technical problems, the present application proposes a behavior prediction method, device and related products. The purpose of implementing this solution is to predict N kinds of behaviors of the target user in the target content in the future. Based on the N kinds of historical behavior sequences of the target user and the feature sequence of the target content, shared feature extraction results are extracted, and based on the N kinds of historical behavior sequences, corresponding personalized feature extraction results are extracted respectively. When predicting any behavior of the target user in the target content, the prediction result of the probability of executing the behavior is obtained based on the shared feature extraction results obtained previously and the personalized feature extraction results of the corresponding historical behavior sequence. This solution takes into account the differences in behavioral characteristics of various historical behavior sequences, and performs personalized feature extraction in a targeted manner, and no longer performs predictions on different behaviors based solely on shared feature extraction results. Even in scenarios where the relevance of the behaviors to be predicted is low, a high prediction accuracy can be guaranteed.
[0042] The above-mentioned behavior prediction method can be applied to a processing device, which is a processing device with a behavior prediction function, for example, a terminal device or a server with a behavior prediction function. The method is independently executed by the terminal device or the server, and can also be applied to a network scenario in which the terminal device and the server communicate, and the terminal device and the server cooperate to run. Among them, the terminal device can be a mobile phone, a desktop computer, a personal digital assistant (PDA for short), a tablet computer and other devices. The server can be understood as an application server or a web server. In actual deployment, the server can be an independent physical server or a server cluster or distributed system composed of multiple physical servers. The terminal and the server can be directly or indirectly connected through wired or wireless communication, and this application is not limited here.
[0043] In addition, this application also relates to artificial intelligence (AI) technology. Artificial intelligence is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to achieve the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.
[0044] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and smart transportation.
[0045] Computer vision (CV) is the science of making machines "see." Specifically, it refers to using cameras and computers to replace the human eye in target identification, tracking, and measurement. Further image processing is performed to transform the computer-generated images into images more suitable for human observation or transmission to instrumentation. As a scientific discipline, computer vision studies related theories and technologies, attempting to build artificial intelligence systems capable of extracting information from images or multidimensional data. Computer vision technologies typically include image processing, image recognition, image semantic understanding, image retrieval, optical character recognition (OCR), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D technology, virtual reality, augmented reality, simultaneous localization and mapping, autonomous driving, and smart transportation. It also includes common biometric recognition technologies such as facial recognition and fingerprint recognition.
[0046] Key technologies in speech technology include automatic speech recognition, speech synthesis, and voiceprint recognition. Enabling computers to hear, see, speak, and feel is the future direction of human-computer interaction, with speech becoming one of the most promising methods of human-computer interaction.
[0047] Natural language processing (NLP) is a key area of research in computer science and artificial intelligence. It studies the theories and methods that enable effective communication between humans and computers using natural language. Natural language processing (NLP) integrates linguistics, computer science, and mathematics. Therefore, research in this field involves natural language—the language we use in everyday life—and is closely linked to the study of linguistics. Natural language processing technologies typically include text processing, semantic understanding, machine translation, robotic question answering, and knowledge graphs.
[0048] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.
[0049] Autonomous driving technology usually includes high-precision maps, environmental perception, behavioral decision-making, path planning, motion control and other technologies. Autonomous driving technology has broad application prospects.
[0050] With the research and progress of artificial intelligence technology, artificial intelligence technology has been studied and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, automatic driving, drones, robots, smart medical care, smart customer service, Internet of Vehicles, automatic driving, smart transportation, etc. It is believed that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important role.
[0051] In an embodiment of the present application, the processing device may utilize natural language processing and other technologies to obtain the multiple sequences required for behavior prediction, including feature sequences of target content and N historical behavior sequences of the target user. The processing device may also utilize machine learning technologies to perform feature extraction on the obtained sequences to obtain shared feature extraction results and personalized feature extraction results. Based on the shared feature extraction results and the personalized feature extraction results corresponding to the behavior to be predicted, the processing device performs a prediction task for the behavior to obtain a prediction result.
[0052] To facilitate understanding of the technical solution provided by this application, the behavior prediction method provided by the embodiment of this application will be introduced below in conjunction with an actual application scenario. It should be noted that this scenario is only an example and does not limit the actual application scenario of the behavior prediction method.
[0053] See also Figure 2 A schematic diagram of a behavior prediction method in an actual application scenario provided by an embodiment of the present application. In this actual application scenario, the processing device is a server 201 with a behavior prediction function. The server 201 can obtain the feature sequence of the target content through a certain application (Application, APP) installed on the terminal device 202 used by the target user, and obtain N historical behavior sequences of the target user on other behavior objects on the APP based on the historical operations of the target user. Here, the other behavior objects have the same content type as the target content. For example, the APP is a short video APP. The behavior objects involved in the target content and the historical behavior sequence are all short videos. The user's terminal device 202 can actively upload the above sequence to the server 201, and the server 201 can also actively obtain the above sequence from the terminal device 202.
[0054] The feature sequence of the target video and the N historical behavior sequences of the target user obtained by server 201 will serve as the basis for predicting the target user's N behaviors in the target video. Here, the N behaviors can be clicks, likes, comments, favorites, forwarding, etc. Based on the different content types, the N behaviors to be predicted here may also have corresponding differences, which are not specifically limited. Server 201 performs feature extraction based on the N historical behavior sequences and the feature sequence of the target video to obtain a shared feature extraction result; server 201 also performs feature extraction based on the N historical behavior sequences separately to obtain N personalized feature extraction results corresponding to the N historical behavior sequences. Taking click behavior as an example, server 201 extracts personalized feature extraction results corresponding to the historical click behavior sequence based on the target user's historical click behavior sequence, and then combines the shared feature extraction results with the personalized feature extraction results corresponding to the historical click behavior sequence to predict the target user's click behavior in the target video. The prediction of other behaviors is similar to the prediction method of click behavior and will not be repeated here. As described above, server 201 can complete the prediction of various behaviors of the target user in the target video. The prediction results can be the predicted probabilities of the target user performing various actions on the target video, such as click probability, like probability, and comment probability. The higher the probability in the prediction result, the more likely the target user will perform the corresponding action. Because the prediction of a single action takes into account the results of personalized feature extraction and incorporates the results of shared feature extraction, the prediction not only considers the connections between different actions, but also focuses on the differences between behavioral features, resulting in higher prediction accuracy.
[0055] Next, the behavior prediction method provided in the embodiment of the present application will be introduced with reference to the accompanying drawings.
[0056] See also Figure 3 This is a flow chart of a behavior prediction method provided in an embodiment of the present application. Figure 3 The behavior prediction method shown includes:
[0057] S301: Acquire a feature sequence of target content.
[0058] The characteristic sequence of the target content can distinguish the target content from other content of the same type in the form of a sequence. In the embodiment of the present application, the target content to be predicted can be uniquely determined by the characteristic sequence of the target content.
[0059] As an example, all content under the content type of the target content in the content platform is in a content library. Taking the video platform APP as an example, all videos are in the video library. In order to uniquely identify the content, a code can be assigned to each content, such as 0000101 and 0000100 representing different content. The code can be presented in the form of a feature sequence. In this way, the feature sequence can uniquely identify the content.
[0060] As another example, each position in the feature sequence represents a specific label, 1 indicates that the label at that position is present, and 0 indicates that the label at that position is not present. In this way, the target content can also be uniquely identified by the presence or absence of a label at each position in the feature sequence. The label at each position can be set manually, such as a high-quality label for the content, a funny label, a news label, a pet label, etc. Based on the different content types, the types of labels in the feature sequence may also be different. For example, the type of feature label for a video does not completely overlap with the type of feature label for a book.
[0061] S302: Obtain N historical behavior sequences of the target user, where the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate the behavior objects and behavior order.
[0062] N is an integer greater than 1, which means that in order to predict N types of behaviors, it is necessary to obtain the historical behavior sequence of the target user corresponding to the above behaviors. In the embodiment of the present application, the behavior object referred to by the historical behavior sequence is content with the same content type as the target content. For example, if the target content is a video, the historical behavior sequence is also a historical behavior sequence involving the video. For example, the historical click behavior sequence, the historical comment behavior sequence, etc. The length of the historical behavior sequence can be set according to actual needs, for example, the length is 5 or 10. The behavior object and the behavior order are indicated in the historical behavior sequence. As an example, the historical click behavior sequence is expressed as [01 02 03 04 05], which means that the user clicked on the five videos identified as 01, 02, 03, 04 and 05 in sequence. The N historical behavior sequences of the target user represent the target user's past behavior on other content of the same type as the target content, so it can be used as a basis for predicting the target user's N types of behavior on the target content.
[0063] It should be noted that in this application, S301 and S302 can be executed one after the other, for example, S301 is executed first and then S302, or S302 is executed first and then S302. In addition, S301 and S302 can also be executed at the same time. Therefore, the execution order of the two steps is not limited.
[0064] S303: Performing shared feature extraction processing based on the N historical behavior sequences and the feature sequence of the target content to obtain a shared feature extraction result.
[0065] In this solution, the shared feature extraction results serve as one of the foundations for predicting N types of behaviors. When this step is implemented, a network layer with feature extraction capabilities in a neural network structure can be used to perform shared feature extraction processing based on N historical behavior sequences and feature sequences of target content to obtain shared feature extraction results. There is no restriction on the number of network layers or network structure used when extracting shared features. The purpose of shared feature extraction processing is to horizontally explore the feature associations between N types of behaviors and target content.
[0066] S304: Performing personalized feature extraction processing based on the N historical behavior sequences respectively to obtain N personalized feature extraction results corresponding to the N historical behavior sequences.
[0067] In this solution, the personalized feature extraction results corresponding to each historical behavior sequence serve as another basis for predicting that behavior. When this step is implemented, the network layer with feature extraction function in the neural network structure can be used to extract the personalized features corresponding to each behavior based on N historical behavior sequences, thereby obtaining personalized feature extraction results. There is no restriction on the number of network layers and network structure when extracting personalized features of behavior. The purpose of personalized feature extraction processing is to independently explore the unique characteristics of the behavior sequence of a behavior.
[0068] S305: Predicting the probability of the target user performing the target behavior in the target content based on the shared feature extraction result and the personalized feature extraction result corresponding to the target historical behavior sequence.
[0069] This step is explained by taking the prediction of the target behavior among multiple behaviors to be predicted as an example. The target historical behavior sequence is any one of the N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence among the N behaviors. In the embodiment of the present application, the personalized feature extraction result for guiding behavior prediction is not extracted on the basis of homogenized shared features, but is extracted from the historical behavior sequence corresponding to the behavior, thereby retaining the unique features of many historical behavior sequences that are different from other behaviors. And shared features are used in behavior prediction, therefore, the learning of the association between N historical behavior sequences is retained. The target behavior of the target user in the target content is predicted based on the shared feature extraction results and the personalized feature extraction results corresponding to the target historical behavior sequence, taking into account the characteristics of the behavior and the association between the behaviors, so that the prediction result of the target behavior can be made more accurate.
[0070] The behavior prediction method provided in the embodiment of the present application can be implemented by a multi-task training model with a new structure. Figure 4 The multi-task learning model shown and Figure 5 The flowchart of the behavior prediction method based on the multi-task learning model is shown in the figure to introduce this method.
[0071] like Figure 4The multi-task learning model shown includes a shared feature extraction module 401, N personalized feature extraction modules 402, and N prediction modules 403. The shared feature extraction module 401 includes N+1 inputs and N outputs, the personalized feature extraction module 402 includes one input and one output, and the prediction module 403 includes two inputs and one output. Of the N+1 inputs of the shared feature extraction module 401, N are used to input historical behavior feature sequences, and one is used to input target content feature sequences. The N outputs are each connected to one of the two inputs of the N prediction modules 403. The user inputs a historical behavior sequence into the personalized feature extraction module 402, and the output is connected to the other input of the prediction module 403. The output of the prediction module 403 is the prediction result for the corresponding behavior.
[0072] Combine Figure 4 The structure of the multi-task learning model shown in Figure 5 The method flow shown in the figure includes the following steps:
[0073] S501: Obtain a feature sequence of target content.
[0074] S502: Obtain N historical behavior sequences of the target user, where the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate the behavior objects and behavior order.
[0075] The implementation of S501-S502 in this embodiment is basically the same as the implementation of S301-S302 in the above embodiment, and will not be described in detail here.
[0076] In an embodiment of the present application, the trained shared feature extraction module 401 in the multi-task learning model can extract shared feature extraction results based on N historical behavior sequences and feature sequences of target content. The trained N personalized feature extraction modules 402 can respectively perform feature extraction on N historical behavior sequences to obtain N personalized feature extraction results corresponding to the N historical behavior sequences. The trained N prediction modules 403 can each predict the target user's behavior in the target content based on the shared feature extraction results and the personalized feature extraction results corresponding to a historical behavior sequence. For the process of the shared feature extraction module 401, the personalized feature extraction module 402 and the prediction module 403 performing operations in this method, see S503-S505 below. The multi-task learning model used in the embodiment of the present application is obtained through training. Since the use process of the model is basically similar to the training process of the model, for the sake of ease of understanding, the following first introduces the structure of the model and the use functions of each structural layer. After the use process is introduced, the training process of the model is explained.
[0077] S503: Perform shared feature extraction processing on the N historical behavior sequences and the feature sequences of the target content through the shared feature extraction module of the multi-task learning model to obtain shared feature extraction results.
[0078] S504: Perform personalized feature extraction processing on the N historical behavior sequences through the N personalized feature extraction modules of the multi-task learning model, and obtain N personalized feature extraction results corresponding to the N historical behavior sequences.
[0079] S505: Based on the shared feature extraction results and the personalized feature extraction results corresponding to the target historical behavior sequence, the target prediction module of the multi-task learning model predicts the probability of the target user performing the target behavior in the target content.
[0080] In the introduction to S505, the use of the target prediction module is used as an example. The target prediction module is the prediction module corresponding to the target behavior among the N prediction modules 403 of the multi-task learning model. Similarly, the functions of the other prediction modules are similar to those of the target prediction module and will not be described in detail here.
[0081] In the above embodiment, the prediction module can directly share the feature results and the personalized feature extraction results of the historical behavior sequence to predict behavior. In another possible implementation, the multi-task learning model also processes the shared feature extraction results, and the prediction module specifically performs behavior prediction based on the processing results and the personalized feature extraction results. Figure 6 Schematic diagram of the structure of another multi-task learning model shown.
[0082] like Figure 6 In the structure shown, the multi-task learning model includes: a shared feature extraction module 601, a shared feature processing module 602, a personalized feature extraction module 603 and a prediction module 604. Among them, the shared feature processing module 602 is connected between the output end of the shared feature extraction module 601 and the input end of the prediction module 604. The function of the shared feature processing module 602 in this model is to further extract and regulate the shared feature extraction results, so as to generate corresponding shared feature processing results for N types of behaviors. Still taking the target prediction module 604 as an example, in this implementation method, the target prediction module 604 predicts the target behavior of the target user in the target content based on the shared feature processing results generated by the shared feature processing module 602 for the target behavior and the personalized feature extraction results corresponding to the target historical behavior sequence, and obtains the prediction result corresponding to the target behavior.
[0083] The Multi-gate Mixture-of-Experts (MMoE) multi-task learning model overlays multiple expert networks on top of a shared underlying network, enabling the extraction of robust features required for each task. Each task's gated network selectively utilizes the outputs of different expert networks by weighting the outputs of the expert networks. Figure 7 This is a structural diagram of a traditional MMoE model. Figure 7 In , A and B correspond to different tasks. Figure 7 As shown, each gating network regulates the weights of all expert networks (expert network 0, expert network 1, expert network 2). Although different underlying features are learned for different tasks through the expert network and the gating mechanism, the model structure still lacks the mining of targeted behavioral differentiation features based on historical behavior sequences. That is, the MmoE model is difficult to achieve effective fusion of personalized extraction and sharing. In this solution, the traditional MmoE model is improved in the shared feature processing module 602, and the expert network and gating mechanism are also adopted in the shared feature processing module 602. The shared feature processing module 602 completes the work of generating corresponding shared feature extraction results for different behaviors based on the shared feature extraction results.
[0084] At least one gated shared network layer is included in the shared feature processing module 602. Each gated shared network layer includes: a shared expert network, N independent expert networks corresponding to N behaviors, and N independent gated networks. The shared expert network is used to learn the shared feature extraction results based on the directions of the N behaviors. That is to say, the shared expert network does not use a certain behavior or part of the behavior as a learning bias when learning features. In contrast, in an embodiment of the present application, the independent expert network is used to learn the shared feature extraction results based on the direction of the corresponding behavior to be predicted. The independent gated network is used to perform weight control on the output of the corresponding independent expert network and the output of the shared expert network to generate a shared feature processing result for the corresponding behavior to be predicted. Figure 8 This is a schematic diagram of the structure of the gated shared network layer when the shared feature processing module 602 only includes one gated shared network layer. Figure 8 A, B, and C correspond to different tasks. Since each task is to predict different behaviors, A, B, and C also correspond to different behaviors to be predicted.
[0085] like Figure 8 As shown, different from Figure 7Compared to the traditional MmoE model structure, in this solution, each gating network in the shared feature processing module 602 no longer controls the weights of the outputs of all expert networks. Instead, it only regulates the output weights of the shared expert network and its corresponding independent expert network. This step in the shared feature processing module 602 effectively integrates task-shared learning with task-specific learning. Ultimately, the output of each independent gating network is fed into an input of the corresponding prediction module 604.
[0086] In order to improve the degree of parameter sharing between different tasks, in the embodiment of the present application, the shared feature processing module 602 may also include a multi-layer gated shared network layer. Figure 9 Another implementation of the shared feature processing module 602 is introduced. Figure 9 Schematic diagram of the structure of the shared feature processing module 602 including a multi-layer gated shared network layer, Figure 9 Only three layers are used as an example. In actual applications, M layers may be included, where M is an integer greater than 1 and the value of M is not limited. Figure 9 A, B, and C correspond to different tasks. Since each task is to predict different behaviors, A, B, and C also correspond to different behaviors to be predicted.
[0087] exist Figure 9 In the implementation of the shared feature processing module 602 shown in FIG, it is assumed that M=3, and from bottom to top, the gated shared network layers are layer 1 to layer 3. Figure 8 In the structure shown in this implementation, the gated shared network layers 1 through M-1 also include a shared gating network. The shared gating network is used to perform weight control on the outputs of the N independent expert networks and the output of the shared expert network within the same gated shared network layer. In other words, the shared gating network controls a wider range of objects than the independent gating networks.
[0088] The process of performing feature extraction and regulation based on the shared feature extraction results by the M-layer gated shared network layer of the shared feature processing module 602 to generate corresponding shared feature processing results for N types of behaviors is as follows, including:
[0089] In the first gated shared network layer, the shared feature extraction results are used as inputs to the shared expert network and N independent expert networks respectively. Learning is performed through the shared expert network and N independent expert networks, and weight control is performed through the shared gating network and N independent gating networks.
[0090] The Lth layer refers to any layer between the 1st layer and the M-1th layer (including the 1st layer and the M-1th layer). The output of the shared gating network in the Lth layer gated shared network layer is used as the input of the shared expert network in the L+1th layer gated shared network layer. The output of the independent gating network is used as the input of the independent expert network in the L+1th layer gated shared network layer until it reaches the Mth layer gated shared network layer.
[0091] In the Mth gated shared network layer, learning is performed through the shared expert network and N independent expert networks, and weight control is performed through N independent gated networks. The output of the N independent gated networks is used as the shared feature processing result generated for N behaviors.
[0092] In an embodiment of the present application, by performing feature extraction and regulation with a multi-layer gated shared network layer in the shared feature processing module 602 of the multi-task learning model, parameter sharing between different tasks is made more sufficient, thereby helping to more fully learn the associated features between different tasks and improve the accuracy of prediction.
[0093] In order to more fully understand the structure and working mechanism of the multi-task learning model used in the embodiment of the present application, the following Figure 10 The structure of the multi-task learning model shown and Figure 11 The flowchart of the behavior prediction method based on the multi-task learning model is shown.
[0094] See also Figure 10 The multi-task learning model shown is broadly divided into a shared feature extraction module 601, a shared feature processing module 602, a personalized feature extraction module 603, and a prediction module 604. The shared feature extraction module 601 includes N first embedding layers, a second embedding layer, a first feature extraction layer, and a connection layer. The shared feature processing module 602 is equipped with a multi-layer gated shared network layer. The personalized feature extraction module 603 includes a third embedding layer and a second feature extraction layer. The following describes the specific functions of the different network layers in each module in conjunction with the method steps.
[0095] like Figure 11 The behavior prediction methods shown include:
[0096] S1101: Acquire a feature sequence of target content, acquire a basic feature sequence of a target user, and acquire N historical behavior sequences of the target user.
[0097] The implementation methods for obtaining the feature sequence of the target content and the N historical behavior sequences of the target user have been introduced above and will not be repeated here. The following describes the implementation method for obtaining the basic feature sequence of the target user. Basic features can be the user's personal account information. For example, basic features can include: gender, age, gender, education level, payment method, etc. Some user behaviors on the content platform are also driven by basic features. The basic feature sequence of the target user presents basic features in a sequence format to facilitate learning and processing by the multi-task learning model.
[0098] S1102: Using the N first embedding layers of the shared feature extraction module, the corresponding historical behavior sequences in the N historical behavior sequences are reduced in dimension and densified to obtain dense behavior features; using the second embedding layer of the shared feature extraction module, the feature sequence of the target content is reduced in dimension and densified to obtain dense content features; using the first feature extraction layer of the shared feature extraction module, feature extraction is performed on the basic feature sequence to obtain dense basic features of the target user.
[0099] As introduced in S1102, the first embedding layer, the second embedding layer, and the first feature extraction layer each perform their respective functions and have acquired the functions described above through pre-training.
[0100] S1103: The connection layer of the shared feature extraction module merges the dense behavior features output by the N first embedding layers, the dense content features output by the second embedding layer, and the dense basic features output by the first feature extraction layer to obtain a shared feature extraction result.
[0101] The connection layer can directly merge the dense behavioral features output by the N first embedding layers, the dense content features output by the second embedding layer, and the dense basic features output by the first feature extraction layer. Figure 10As shown, the feature mining layer of the shared feature extraction module 601 is used to merge the dense behavioral features output by the N first embedding layers, the dense content features output by the second embedding layer, and the dense basic features output by the first feature extraction layer, and then the features mined by the feature mining layer and the dense basic features are merged through the connection layer. The feature mining layer can be a transformer layer, which uses an encoder-decoder method to output the hidden features of the target user, which is convenient for subsequent further feature extraction and mining. Compared with traditional direct input, the introduction of the transformer layer can better pay attention to and focus on the impact of the user's historical behavior on the current behavior, and compared with the ordinary attention layer, the transformer layer can more accurately capture the user's long sequence features. Therefore, the use of the transformer layer in this multi-task learning model is conducive to in-depth mining of user interests on the basis of multi-task learning, thereby making the behavior prediction results more accurate.
[0102] In the embodiment of the present application, the feature merging operation of the connection layer is the concat operation in deep learning. The implementation of the concat operation is a mature technology in this field, and this process will not be described in detail here.
[0103] S1104: Perform feature extraction and regulation based on the shared feature extraction results through the multi-layer gated shared network layer of the shared feature processing module, and generate corresponding shared feature processing results for the N types of behaviors.
[0104] The structure and function of the multi-layer shared gated network layer have been described in detail in the previous article. Figure 9 , which will not be elaborated here.
[0105] It should be noted that the shared feature processing result can be directly given to the corresponding prediction module 604, or it can be Figure 10 As shown, the results enter a third feature extraction layer, where they are further processed to extract features from the shared feature processing results. Of course, the third feature extraction layer is optional. Adding this third feature extraction layer can help uncover deeper features. The output of the third feature extraction layer is fed into the prediction module 604.
[0106] S1105: Reduce the dimension of the corresponding historical behavior sequence in the N historical behavior sequences and perform densification processing through the third embedding layer of the personalized feature extraction module to obtain a sequence personalized processing result.
[0107] In the embodiment of the present application, each personalized feature extraction module 603 has a third embedding layer. The personalized extraction of features in the historical behavior sequence is first implemented through the third embedding layer.
[0108] In this application, the extraction of shared features and the extraction of personalized features can be implemented simultaneously, so Figure 11 This is only an example of the process sequence. In actual applications, S1105 can also be executed before S1102 or simultaneously. The execution order is not limited here.
[0109] S1106: Perform feature extraction according to the sequence personalized processing result through the second feature extraction layer of the personalized feature extraction module to obtain a personalized feature extraction result.
[0110] The second feature extraction layer can further deeply mine and extract the personalized processing results of the sequence output by the third embedding layer. In one possible implementation, the second feature extraction layer includes: a transformer layer. The advantages of the transformer layer have been introduced above and will not be repeated here. In addition, the second feature extraction layer can also include any of the following: a multilayer perceptron (MLP) neural network, a deep network and a cross network (DCN) or a deepfm structure. Figure 10 In the multi-task learning model shown, the second feature extraction layer is immediately followed by the third embedding layer. The sequence personalization processing results output by the third embedding layer pass through the transformer layer and MLP in the second feature extraction layer. The transformer layer can also be removed.
[0111] S1107: Based on the shared feature processing results and the personalized feature extraction results corresponding to the target historical behavior sequence, the target prediction module of the multi-task learning model predicts the probability that the target user performs the target behavior in the target content.
[0112] In the above embodiment, by combining the shared feature processing results and the personalized feature extraction results, it is possible to effectively make comprehensive predictions based on the features extracted from the two paths during behavior prediction, making the multi-task learning model more accurate in predicting various behaviors. At the same time, the generalization ability of the multi-task learning model is improved.
[0113] The above behavior prediction method can be applied not only to predicting the target user's behavior towards video content, but also to predicting the target user's behavior towards books, electronic products, advertisements, applications, and other content. The type of target content is not limited here. After predicting multiple behavior prediction results, the method provided in the embodiment of the present application can further include:
[0114] When it is determined that the target content meets the recommendation condition based on the prediction results of the N behaviors of the target user on the target content, the target content is recommended to the target user.
[0115] The recommendation conditions are related to the type of target content. As an example, when the target content is a video, the recommendation conditions are set to a click probability exceeding 0.5 and a like probability exceeding 0.3. As another example, when the target content is a commodity, the recommendation conditions are set to a click probability exceeding 0.5 and a purchase probability exceeding 0.15. There is no limitation on the recommendation conditions here. In other words, when the target content meets the recommendation conditions, it is judged that the probability of the target user being interested in the target content is high enough, and the target content is recommended to the target user. The specific recommendation method is not limited. For example, it can be displayed on the currently browsed page, or a list of recommended content can be popped up.
[0116] The following describes the training process of the multi-task learning model in the embodiment of the present application.
[0117] Figure 12 This is a flow chart of a training method for a multi-task learning model provided in an embodiment of the present application. Figure 12 The model training methods shown include:
[0118] S1201: Obtain training samples.
[0119] The following is an introduction to the training samples. The training sample proposed here only represents one training sample, but in actual training, a training sample set can be prepared, which includes multiple training samples with similar specifications. Taking a training sample as an example, the training sample includes a feature sequence of a sample target object and N sample behavior sequences of the user. The N sample behavior sequences correspond one-to-one to the N behaviors, and the sample behavior sequence indicates the behavior object and the behavior order. The sample target object and the behavior object indicated in the sample behavior sequence are both of the same content type as the target content. The behavior in the sample behavior sequence occurs before the user generates any of the N behaviors on the sample target object.
[0120] It should be noted that multi-task learning models can be trained separately based on different content types. For example, multi-task learning models can be trained separately for video and book content to predict user behavior in video and book content.
[0121] In addition, the training samples are also labeled. The labels of the training samples include the actual values of the N behaviors of the user on the sample target object after the N sample behavior sequences. For example, the labels of the training samples include: click (1), like (0), comment (1), and favorite (0). The actual value 1 in the brackets indicates that the corresponding behavior has occurred, and the actual value 0 in the brackets indicates that the corresponding behavior has not occurred.
[0122] The model to be trained includes at least a shared feature extraction module, N personalized feature extraction modules, and N prediction modules. That is, the network structure is basically the same as the previously trained multi-task learning model, the only difference being that the parameters are trained.
[0123] S1202: Performing shared feature extraction processing on the N types of sample behavior sequences and feature sequences of sample target objects through the shared feature extraction module of the model to be trained to obtain sample shared feature extraction results.
[0124] S1203: Perform personalized feature extraction processing on the N types of sample behavior sequences respectively through the N personalized feature extraction modules of the to-be-trained model to obtain N sample personalized feature extraction results corresponding to the N types of sample behavior sequences.
[0125] S1204: Based on the sample shared feature extraction results and the sample personalized feature extraction results corresponding to the target sample behavior sequence, the target prediction module in the N prediction modules of the model to be trained predicts the probability of the user's target behavior in the sample target object.
[0126] In the description of the training of the prediction module in S1204, the target prediction module is used as an example for description. Other prediction modules are similarly input and trained. The target sample behavior sequence is any one of the N sample behavior sequences.
[0127] S1205: Determine whether the model to be trained meets the training cutoff condition. If not, execute S1206; if yes, enter S1207.
[0128] The training cutoff condition may include at least one of the following:
[0129] The number of model iterations exceeds the preset threshold, or the overall model loss is less than the preset loss value.
[0130] S1206: According to the difference between the predicted result of the same behavior among the N behaviors and the actual value in the label, the parameters of the training model are adjusted, and the process goes to S1201 again.
[0131] The difference between the predicted result and the actual value in the label can be measured by the loss function.
[0132] If a training sample set is obtained in advance, then in the next iteration, S1201 specifically refers to extracting new training samples from the training sample set to train the model.
[0133] S1207: Complete the training to obtain a multi-task learning model.
[0134] Through the above training, a set of model coefficients that meet the training cutoff conditions can be obtained. This set of model coefficients is loaded into the framework of the model to be trained, and a trained multi-task learning model is obtained. This model can play the role described in the above embodiments.
[0135] Currently, the loss function used in multi-task learning model training often directly adds the losses of each task to obtain the overall loss. However, this loss calculation method is not rational because the magnitude of the loss for different tasks may vary. This method unifies the loss for all tasks, resulting in tasks with larger loss magnitudes learning faster during training and being more adequately fitted, while tasks with smaller loss magnitudes learn more slowly and suffer from inadequate fitting. This, in turn, creates a seesaw effect. The seesaw effect states that the magnitude of the loss for different tasks in multi-task learning may vary. If one loss is too large, the model will favor learning the task with that loss and reduce the weighting of other tasks, resulting in overfitting of some tasks and underfitting of others.
[0136] In order to weaken the seesaw effect and make the learning of each task more balanced, the embodiment of the present application proposes to optimize the loss function, which will be introduced in conjunction with S1206.
[0137] In the above S1206, according to the difference between the predicted result (i.e., predicted probability) of the same behavior among the N behaviors and the actual value in the label, the parameters of the training model are adjusted, which may specifically include:
[0138] The loss values corresponding to N behaviors are obtained through the preset loss function. Among them, the preset loss function is used to measure the difference between the predicted result of the same behavior and the actual value in the label. Subsequently, the dynamic weight corresponding to the target behavior is determined according to the change in the loss value of the preset loss function and the change in the area under the curve (Aera Under Curve, AUC). The curve is the Receiver Operating Characteristics (ROC) curve. Among them, AUC specifically refers to the area enclosed by the ROC curve and the coordinate axis. Then, according to the loss values and dynamic weights corresponding to the N behaviors, the dynamic loss value of the model to be trained is obtained. This dynamic loss value is used to characterize the overall loss of the model. Finally, the parameters of the model to be trained are adjusted according to the dynamic loss value.
[0139] The dynamic loss function of the entire model is expressed as follows. The loss values, dynamic weights, and dynamic loss values of the model to be trained corresponding to the N behaviors satisfy the following formula:
[0140]
[0141] In formula (1), L represents the dynamic loss value, l i represents the loss value corresponding to the i-th behavior (hereinafter referred to as target behavior i), w i Represents the dynamic weight corresponding to the target behavior i. i The dynamic weight is related to the loss value and AUC corresponding to the behavior. i The dynamic weight calculation formula is as follows: the total variation coefficient corresponding to the target behavior of this training, the weight of the prediction task of the target behavior, and the dynamic weight corresponding to the target behavior satisfy the following relationship:
[0142]
[0143] In formula (2), c i (t-1) represents the total coefficient of change of the target behavior i during the t-1th iteration of training. t-1 refers to the current iteration. For example, when t-1=20, it means the 20th iteration. t-2 refers to the previous iteration. In formula (2), s i is the weight of the prediction task for the target behavior i, which can be a pre-assigned weight value. As the iteration increases, the weight s i There will also be changes.
[0144] The expression of the total variation coefficient is as follows. The total variation coefficient, the first variation coefficient, and the second variation coefficient of the target behavior of this training satisfy the following relationship:
[0145] c i (t-1)=r i (t-1)*y i (t-1) Formula (3)
[0146] In formula (3), r i (t-1) represents the first change coefficient of target behavior i during the t-1th iteration training, y i (t-1) represents the second change coefficient of target behavior i during the t-1th iteration training. The first change coefficient r i The expression formula of (t-1) and the second coefficient of variation y i The expression formulas for (t-1) are shown in Formula (4) and Formula (5) respectively. The first coefficient of change of the target behavior in this training, the loss value corresponding to the target behavior in the previous training, and the loss value corresponding to the target behavior in this training satisfy the relationship in Formula (4). The second coefficient of change of the target behavior in this training, the AUC corresponding to the target behavior in the previous training, and the AUC corresponding to the target behavior in this training satisfy the relationship in Formula (5).
[0147]
[0148] In formula (4), li (t-1) and l i (t-2) represents the loss value corresponding to the target behavior i during the training of the t-1th iteration and the t-2th iteration (i.e., this and the previous iteration). In formula (5), AUC i (t-1) and AUC i (t-2) represents the AUC corresponding to the target behavior i during training at the t-1th iteration and the t-2th iteration (i.e., this and the previous iteration), respectively.
[0149] Combining the above-mentioned formulas (1)-(5), we can know that the dynamic weight corresponding to the target behavior is determined according to the change of the loss value of the target behavior in the preset loss function and the change of the area under the curve AUC, including:
[0150] The loss value and AUC corresponding to the target behavior in the previous training of the model to be trained are obtained through the preset loss function; the first change coefficient is obtained according to the loss value corresponding to the target behavior in the previous training and the loss value corresponding to the target behavior in this training; and the second change coefficient is obtained according to the AUC corresponding to the target behavior in the previous training and the AUC corresponding to the target behavior in this training; the first change coefficient is used to characterize the change in the loss value of the target behavior in the preset loss function; the second change coefficient is used to characterize the change in the AUC of the target behavior; the first change coefficient of the target behavior is multiplied by the second change coefficient to obtain the total change coefficient of the target behavior; and the dynamic weight corresponding to the target behavior is obtained according to the total change coefficient.
[0151] Combined with formulas (1)-(5), in the embodiment of the present application, the greater the change in the loss value of the task (the greater the first change coefficient), the greater the change in AUC (the greater the second change coefficient), the smaller the dynamic weight of the task. This is because the first change coefficient and the second change coefficient can be used to find that the training effect of this task is better, and the learning of this task in this iteration is more complete than that in the previous iteration. For this reason, the dynamic weight of the task can be configured to be smaller. Conversely, the smaller the change in the loss value of the task and the smaller the change in AUC, the poor training effect of this training on the task and the need to configure a larger dynamic weight.
[0152] In an embodiment of the present application, by introducing a dynamic loss optimization scheme based on AUC, dynamic weights are assigned to different tasks respectively, so that the overall loss value is no longer calculated by simply adding up the losses, but the relative values of the single task loss and AUC changes in different training times are taken into account. In this way, it is convenient to distribute dynamic weights more reasonably and evenly, realize a balanced training process for multiple tasks, assist in overcoming the seesaw phenomenon, and achieve a more balanced learning effect for multiple tasks. By optimizing the training of multiple tasks, the optimization of multiple objectives can be effectively balanced, and the time and energy investment in the model building process can be effectively reduced. This integrated loss optimization scheme is conducive to improving the stability of the model.
[0153] Based on the behavior prediction method provided in the above embodiment, the embodiment of the present application also provides a behavior prediction device. Figure 13 The implementation method of the device is introduced.
[0154] like Figure 13 The behavior prediction device 1300 shown includes:
[0155] A first acquiring unit 1301 is configured to acquire a feature sequence of target content;
[0156] The second acquisition unit 1302 is configured to acquire N historical behavior sequences of the target user, wherein the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate the behavior objects and behavior order; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1.
[0157] A shared feature extraction unit 1303 is configured to perform shared feature extraction processing based on the N historical behavior sequences and the feature sequence of the target content to obtain a shared feature extraction result;
[0158] The personalized feature extraction unit 1304 is configured to perform personalized feature extraction processing based on the N historical behavior sequences, and obtain N personalized feature extraction results corresponding to the N historical behavior sequences.
[0159] Prediction unit 1305 is used to predict the probability of the target user performing the target behavior in the target content based on the shared feature extraction results and the personalized feature extraction results corresponding to the target historical behavior sequence; the target historical behavior sequence is any one of the N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence among the N behaviors.
[0160] Unlike existing technologies, the behavior prediction device 1300 proposed in this solution considers the differences in behavioral characteristics across various historical behavior sequences and performs targeted, personalized feature extraction, rather than simply predicting different behaviors based on shared feature extraction results. This ensures high prediction accuracy even in scenarios where the predicted behaviors are less relevant.
[0161] In a possible implementation, the behavior prediction device 1300 further includes a model training unit;
[0162] The model training unit is used to:
[0163] Obtain training samples; the training samples include a feature sequence of a sample target object and N sample behavior sequences of the user, the N sample behavior sequences corresponding one-to-one to the N behaviors, and the sample behavior sequences indicating the behavior objects and behavior sequences; the sample target object and the behavior objects indicated in the sample behavior sequences are of the same content type as the target content; the labels of the training samples include the actual values of the N behaviors of the user on the sample target object after the N sample behavior sequences;
[0164] Perform shared feature extraction processing on N types of sample behavior sequences and feature sequences of sample target objects through the shared feature extraction module of the model to be trained, and obtain sample shared feature extraction results;
[0165] Perform personalized feature extraction on N types of sample behavior sequences through the N personalized feature extraction modules of the model to be trained, and obtain personalized feature extraction results of N samples corresponding to the N types of sample behavior sequences;
[0166] Based on the sample shared feature extraction results and the sample personalized feature extraction results corresponding to the target sample behavior sequence, the target prediction module corresponding to the target behavior in the N prediction modules of the to-be-trained model is used to predict the probability that the user will perform the target behavior on the sample target object; the target sample behavior sequence corresponds to the target behavior;
[0167] When the model to be trained does not meet the training cutoff condition, the parameters of the model to be trained are adjusted according to the difference between the probability predicted by the model to be trained and the actual value of performing the same behavior in the label until the training cutoff condition is met.
[0168] The step of adjusting the parameters of the model to be trained according to the difference between the probability predicted by the model to be trained and the actual value of performing the same behavior in the label includes:
[0169] The loss values corresponding to N behaviors are obtained through a preset loss function; the preset loss function is used to measure the difference between the predicted result of the same behavior and the actual value in the label; the dynamic weight corresponding to the target behavior is determined according to the change in the loss value of the target behavior in the preset loss function and the change in the area under the curve (AUC); the curve is the receiver operating characteristic (ROC) curve; the dynamic loss value of the model to be trained is obtained according to the loss values and dynamic weights corresponding to the N behaviors; the parameters of the model to be trained are adjusted according to the dynamic loss value.
[0170] By introducing a dynamic loss optimization scheme based on AUC, dynamic weights are assigned to different tasks, so that the overall loss value is no longer calculated by simply adding up the losses, but the relative values of the changes in the loss and AUC of individual tasks in different training times are taken into account. In this way, it is easier to distribute dynamic weights more reasonably and evenly, achieve a balanced training process for multiple tasks, help overcome the seesaw phenomenon, and achieve a more balanced learning effect for multiple tasks. By optimizing the training of multiple tasks, it is possible to effectively balance the optimization of multiple objectives and effectively reduce the time and energy investment in the model building process. This integrated loss optimization scheme is conducive to improving the stability of the model.
[0171] The embodiment of the present application also provides a computer device, and the computer device provided by the embodiment of the present application will be introduced below from the perspective of hardware instantiation.
[0172] Figure 14 : This is a schematic diagram of a server structure provided in an embodiment of the present application. The server 900 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 922 (for example, one or more processors) and memories 932, and one or more storage media 930 (for example, one or more mass storage devices) for storing application programs 942 or data 944. Among them, the memories 932 and the storage media 930 may be temporary storage or permanent storage. The program stored in the storage medium 930 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 922 can be configured to communicate with the storage medium 930 to execute a series of instruction operations in the storage medium 930 on the server 900.
[0173] The server 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, and / or one or more operating systems 941, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0174] The steps performed by the server in the above embodiment can be based on the Figure 14 The server structure shown.
[0175] The CPU 922 is configured to execute the following steps:
[0176] Obtaining a feature sequence of target content;
[0177] Obtain N historical behavior sequences of the target user, where the N historical behavior sequences correspond one-to-one to the N behaviors and indicate the behavior objects and behavior order; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1.
[0178] Performing shared feature extraction processing based on N historical behavior sequences and feature sequences of target content to obtain shared feature extraction results;
[0179] Based on N historical behavior sequences, personalized feature extraction processing is performed respectively to obtain N personalized feature extraction results corresponding to the N historical behavior sequences;
[0180] The probability of the target user performing the target behavior in the target content is predicted based on the shared feature extraction results and the personalized feature extraction results corresponding to the target historical behavior sequence; the target historical behavior sequence is any historical behavior sequence among N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence among the N behaviors.
[0181] With respect to the behavior prediction method described above, an embodiment of the present application further provides a terminal device for the behavior prediction method, so that the above-mentioned behavior prediction method can be implemented and applied in practice.
[0182] The present application also provides another behavior prediction device, such as Figure 15 For ease of explanation, only the parts related to the embodiments of the present application are shown. For specific technical details not disclosed, please refer to the method part of the embodiments of the present application. The terminal can be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (English full name: Personal Digital Assistant, English abbreviation: PDA), a sales terminal (English full name: Point of Sales, English abbreviation: POS), a car computer, etc., taking the mobile phone as an example:
[0183] Figure 15 The block diagram shows a partial structure of a mobile phone related to the terminal provided in the embodiment of the present application. Figure 15 The mobile phone includes components such as a radio frequency (RF) circuit 1010, a memory 1020, an input unit 1030, a display unit 1040, a sensor 1050, an audio circuit 1060, a wireless fidelity (WiFi) module 1070, a processor 1080, and a power supply 1090. Those skilled in the art will appreciate that Figure 15 The mobile phone structure shown in the figure does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0184] The following combination Figure 15 A detailed introduction to the various components of a mobile phone:
[0185] RF circuitry 1010 can be used to receive and transmit signals during information transmission or calls. Specifically, it receives downlink information from the base station and transmits it to processor 1080 for processing. It also transmits uplink data to the base station. Typically, RF circuitry 1010 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier (LNA), a duplexer, and more. RF circuitry 1010 can also communicate with the network and other devices via wireless communications. The above-mentioned wireless communications may use any communication standard or protocol, including but not limited to Global System of Mobile Communications (Global System of Mobile communication, English abbreviation: GSM), General Packet Radio Service (English full name: General Packet Radio Service, GPRS), Code Division Multiple Access (English full name: Code Division Multiple Access, English abbreviation: CDMA), Wideband Code Division Multiple Access (English full name: Wideband Code Division Multiple Access, English abbreviation: WCDMA), Long Term Evolution (English full name: Long Term Evolution, English abbreviation: LTE), email, Short Messaging Service (English full name: Short Messaging Service, SMS), etc.
[0186] The memory 1020 can be used to store software programs and modules. The processor 1080 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 1020. The memory 1020 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 1020 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state memory device.
[0187] The input unit 1030 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 1030 may include a touch panel 1031 and other input devices 1032. The touch panel 1031, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 1031) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 1031 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 1080. It can also receive commands sent by the processor 1080 and execute them. In addition, the touch panel 1031 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 1031, the input unit 1030 may further include other input devices 1032. Specifically, the other input devices 1032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick.
[0188] The display unit 1040 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 1040 may include a display panel 1041. Optionally, the display panel 1041 may be configured in the form of a liquid crystal display (English full name: Liquid Crystal Display, English abbreviation: LCD), an organic light-emitting diode (English full name: Organic Light-Emitting Diode, English abbreviation: OLED), etc. Further, the touch panel 1031 may cover the display panel 1041. When the touch panel 1031 detects a touch operation on or near it, it is transmitted to the processor 1080 to determine the type of touch event. Subsequently, the processor 1080 provides corresponding visual output on the display panel 1041 according to the type of touch event. Although in Figure 15 In the embodiment, the touch panel 1031 and the display panel 1041 are used as two independent components to realize the input and output functions of the mobile phone, but in some embodiments, the touch panel 1031 and the display panel 1041 can be integrated to realize the input and output functions of the mobile phone.
[0189] The mobile phone may also include at least one sensor 1050, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1041 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 1041 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.
[0190] Audio circuit 1060, speaker 1061, and microphone 1062 provide an audio interface between the user and the phone. Audio circuit 1060 converts received audio data into electrical signals and transmits them to speaker 1061, which then converts them into sound signals for output. Microphone 1062, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 1060 and converted into audio data. The audio data is then processed by processor 1080 and transmitted to, for example, another phone via RF circuit 1010, or stored in memory 1020 for further processing.
[0191] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse the web and access streaming media through the WiFi module 1070. It provides users with wireless broadband Internet access. Figure 15 A WiFi module 1070 is shown, but it is understandable that it is not an essential component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0192] The processor 1080 is the control center of the phone, connecting all parts of the phone using various interfaces and circuits. It executes software programs and / or modules stored in the memory 1020 and accesses data stored in the memory 1020 to perform various phone functions and process data. Optionally, the processor 1080 may include one or more processing units. Preferably, the processor 1080 integrates an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 1080.
[0193] The mobile phone also includes a power supply 1090 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 1080 through a power management system, thereby managing charging, discharging, and power consumption through the power management system.
[0194] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0195] In the embodiment of the present application, the processor 1080 included in the terminal further has the following functions:
[0196] Obtaining a feature sequence of target content;
[0197] Obtain N historical behavior sequences of the target user, wherein the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate the behavior objects and behavior order; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1;
[0198] Performing shared feature extraction processing based on the N historical behavior sequences and the feature sequence of the target content to obtain a shared feature extraction result;
[0199] Performing personalized feature extraction processing based on the N historical behavior sequences to obtain N personalized feature extraction results corresponding to the N historical behavior sequences;
[0200] The probability of the target user performing the target behavior in the target content is predicted based on the shared feature extraction result and the personalized feature extraction result corresponding to the target historical behavior sequence; the target historical behavior sequence is any one of the N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence among the N behaviors.
[0201] An embodiment of the present application also provides a computer-readable storage medium for storing program code, which is used to execute any implementation of a behavior prediction method described in the aforementioned embodiments.
[0202] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute any one of the implementations of the behavior prediction method described in the aforementioned embodiments.
[0203] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0204] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.
[0205] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0206] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0207] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (English full name: Read-Only Memory, English abbreviation: ROM), random access memory (English full name: Random Access Memory, English abbreviation: RAM), disk or optical disk and other media that can store program code.
[0208] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A behavior prediction method, characterized in that: Based on a multi-task learning model, the multi-task learning model includes: a shared feature processing module; the method includes: Obtaining a feature sequence of target content; Obtain N historical behavior sequences of the target user, wherein the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate the behavior objects and behavior order; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1; Performing shared feature extraction processing based on the N historical behavior sequences and the feature sequence of the target content to obtain a shared feature extraction result; Performing personalized feature extraction processing based on the N historical behavior sequences to obtain N personalized feature extraction results corresponding to the N historical behavior sequences; Predicting the probability of the target user performing a target behavior in the target content based on the shared feature extraction result and the personalized feature extraction result corresponding to the target historical behavior sequence; the target historical behavior sequence is any one of the N historical behavior sequences, and the target behavior is the behavior corresponding to the target historical behavior sequence among the N behaviors; The shared feature processing module includes at least one gated shared network layer; the gated shared network layer includes a shared expert network, N independent expert networks corresponding to the N behaviors, and N independent gated networks; The shared expert network is used to learn the shared feature extraction results based on the directions of the N behaviors; the independent expert network is used to learn the shared feature extraction results based on the directions of the corresponding behaviors to be predicted; the independent gating network is used to perform weight control on the outputs of the corresponding independent expert networks and the outputs of the shared expert network to generate corresponding shared feature processing results for the corresponding behaviors to be predicted; the shared feature processing results are used to predict the probability of the target user performing the target behavior in the target content.
2. The method according to claim 1, characterized in that The multi-task learning model further includes: a shared feature extraction module, N personalized feature extraction modules and N prediction modules; The predicting the probability of the target user performing the target behavior in the target content based on the shared feature extraction result and the personalized feature extraction result corresponding to the target historical behavior sequence includes: Based on the shared feature extraction results provided by the shared feature extraction module and the personalized feature extraction results provided by the personalized feature extraction modules corresponding to the target historical behavior sequences in the N personalized feature extraction modules, the probability of the target user performing the target behavior in the target content is predicted by the target prediction module; the target prediction module is the prediction module corresponding to the target behavior in the N prediction modules.
3. The method according to claim 2, characterized in that The method predicts the probability of the target user performing the target behavior in the target content by a target prediction module based on the shared feature extraction result provided by the shared feature extraction module and the personalized feature extraction results provided by the personalized feature extraction modules corresponding to the target historical behavior sequence in the N personalized feature extraction modules, including: Performing feature extraction and regulation based on the shared feature extraction results by the shared feature processing module to generate corresponding shared feature processing results for the N types of behaviors respectively; The target prediction module predicts the probability of the target user performing the target behavior in the target content based on the shared feature processing results corresponding to the target behavior and the personalized feature extraction results corresponding to the target historical behavior sequence.
4. The method according to claim 1, wherein The at least one gated shared network layer includes the 1st to the Mth gated shared network layers, where M is an integer greater than 1; the 1st to the M-1th gated shared network layers also include a shared gated network; the shared gated network is used to perform weight control on the outputs of the N independent expert networks and the output of the shared expert network in the same gated shared network layer; The shared feature extraction result is used as input to the shared expert network and the N independent expert networks in the first gated shared network layer; In the Lth gated shared network layer, the output of the shared gated network serves as the input of the shared expert network in the L+1th gated shared network layer, and the output of the independent gated network serves as the input of the independent expert network in the L+1th gated shared network layer; L is an integer between 1 and M-1; Outputs of the N independent gating networks in the M-th gated shared network layer are used as the shared feature processing results generated for the N behaviors.
5. The method according to claim 2, characterized in that The multi-task learning model is trained in the following way: Acquire training samples; the training samples include a feature sequence of a sample target object and N sample behavior sequences of the user, the N sample behavior sequences correspond one-to-one to the N behaviors, and the sample behavior sequences indicate the behavior objects and behavior sequences; The sample target object and the behavior object indicated in the sample behavior sequence are of the same content type as the target content; the label of the training sample includes the actual value of the user performing the N behaviors on the sample target object after the N sample behavior sequences; Performing shared feature extraction processing on the N sample behavior sequences and the feature sequence of the sample target object through the shared feature extraction module of the to-be-trained model to obtain a sample shared feature extraction result; Performing personalized feature extraction processing on the N types of sample behavior sequences respectively through the N personalized feature extraction modules of the to-be-trained model to obtain N sample personalized feature extraction results corresponding one-to-one to the N types of sample behavior sequences; Based on the sample shared feature extraction result and the sample personalized feature extraction result corresponding to the target sample behavior sequence, predicting the probability of the user performing the target behavior on the sample target object through the target prediction module in the N prediction modules of the to-be-trained model; The target sample behavior sequence corresponds to the target behavior; When the model to be trained does not meet the training cutoff condition, the parameters of the model to be trained are adjusted according to the difference between the probability predicted by the model to be trained and the actual value of performing the same behavior in the label until the training cutoff condition is met.
6. The method according to claim 5, characterized in that The adjusting the parameters of the model to be trained according to the difference between the probability predicted by the model to be trained and the actual value of performing the same behavior in the label includes: Obtaining loss values corresponding to the N behaviors respectively through a preset loss function; the preset loss function is used to measure the difference between the predicted result of the same behavior and the actual value in the label; Determine the dynamic weight corresponding to the target behavior according to the change of the loss value of the target behavior in the preset loss function and the change of the area under the curve AUC; the curve is the receiver operating characteristic ROC curve; Obtaining a dynamic loss value of the model to be trained according to the loss values and dynamic weights corresponding to the N behaviors; The parameters of the model to be trained are adjusted according to the dynamic loss value.
7. The method according to claim 6, characterized in that Determining the dynamic weight corresponding to the target behavior according to the change in the loss value of the preset loss function and the change in the area under the curve AUC of the target behavior includes: Obtaining the loss value and AUC corresponding to the target behavior during the previous training of the model to be trained by the preset loss function; A first variation coefficient is obtained based on the loss value corresponding to the target behavior in the previous training and the loss value corresponding to the target behavior in the current training; and a second variation coefficient is obtained based on the AUC corresponding to the target behavior in the previous training and the AUC corresponding to the target behavior in the current training; the first variation coefficient is used to characterize the change in the loss value of the target behavior in the preset loss function; the second variation coefficient is used to characterize the change in the AUC of the target behavior; multiplying the first variation coefficient of the target behavior by the second variation coefficient to obtain a total variation coefficient of the target behavior; A dynamic weight corresponding to the target behavior is obtained according to the total variation coefficient.
8. The method according to claim 2, characterized in that The personalized feature extraction module includes a third embedding layer and a second feature extraction layer; The third embedding layer is used to reduce the dimension of the corresponding historical behavior sequence in the N historical behavior sequences and perform densification processing to obtain a sequence personalized processing result; The second feature extraction layer is used to perform feature extraction according to the sequence personalized processing result to obtain the personalized feature extraction result.
9. The method according to claim 2, characterized in that Also includes: Obtaining a basic feature sequence of the target user; the shared feature extraction module includes N first embedding layers, a second embedding layer, a first feature extraction layer and a connection layer; The N first embedding layers are respectively used to reduce the dimension of the corresponding historical behavior sequences in the N types of historical behavior sequences and perform densification processing to obtain dense behavior features; The second embedding layer is used to reduce the dimension of the feature sequence of the target content and perform densification processing to obtain dense content features; The first feature extraction layer is used to extract features from the basic feature sequence to obtain dense basic features of the target user; The connection layer is used to merge the dense behavior features output by the N first embedding layers, the dense content features output by the second embedding layer, and the dense basic features output by the first feature extraction layer to obtain the shared feature extraction result.
10. The method according to claim 9, characterized in that The shared feature extraction module also includes a feature mining layer; The feature mining layer is used to perform feature mining based on the dense behavior features output by the N first embedding layers and the dense content features output by the second embedding layer; The connection layer is specifically used to merge the features mined by the feature mining layer and the dense basic features to obtain the shared feature extraction result.
11. The method according to any one of claims 1 to 10, characterized in that Also includes: When it is determined that the target content meets the recommendation condition based on the predicted probabilities that the target user performs N actions on the target content, the target content is recommended to the target user.
12. A behavior prediction device, characterized in that: The multi-task learning model is implemented based on the shared feature processing module. The device includes: A first acquisition unit is used to acquire a feature sequence of target content; A second acquisition unit is configured to acquire N historical behavior sequences of the target user, wherein the N historical behavior sequences correspond one-to-one to the N behaviors, and the historical behavior sequences indicate behavior objects and behavior orders; the behavior objects are content of the same content type as the target content; and N is an integer greater than 1; a shared feature extraction unit, configured to perform shared feature extraction processing based on the N historical behavior sequences and the feature sequence of the target content to obtain a shared feature extraction result; A personalized feature extraction unit, configured to perform personalized feature extraction processing based on the N historical behavior sequences, respectively, to obtain N personalized feature extraction results corresponding to the N historical behavior sequences; a prediction unit, configured to predict a probability of the target user performing a target behavior in the target content based on the shared feature extraction result and a personalized feature extraction result corresponding to a target historical behavior sequence; the target historical behavior sequence being any one of the N historical behavior sequences, and the target behavior being a behavior among the N behaviors corresponding to the target historical behavior sequence; The shared feature processing module includes at least one gated shared network layer; the gated shared network layer includes a shared expert network, N independent expert networks corresponding to the N behaviors, and N independent gated networks; The shared expert network is used to learn the shared feature extraction results based on the directions of the N behaviors; the independent expert network is used to learn the shared feature extraction results based on the directions of the corresponding behaviors to be predicted; the independent gating network is used to perform weight control on the outputs of the corresponding independent expert networks and the outputs of the shared expert network to generate corresponding shared feature processing results for the corresponding behaviors to be predicted; the shared feature processing results are used to predict the probability of the target user performing the target behavior in the target content.
13. The device according to claim 12, characterized in that Also includes: Model training unit; The model training unit is used to: Acquire training samples; the training samples include a feature sequence of a sample target object and N sample behavior sequences of the user, the N sample behavior sequences correspond one-to-one to the N behaviors, and the sample behavior sequences indicate the behavior objects and behavior sequences; The sample target object and the behavior object indicated in the sample behavior sequence are of the same content type as the target content; the label of the training sample includes the actual value of the user performing the N behaviors on the sample target object after the N sample behavior sequences; Performing shared feature extraction processing on the N sample behavior sequences and the feature sequence of the sample target object through the shared feature extraction module of the to-be-trained model to obtain a sample shared feature extraction result; Performing personalized feature extraction processing on the N types of sample behavior sequences respectively through the N personalized feature extraction modules of the to-be-trained model to obtain N sample personalized feature extraction results corresponding one-to-one to the N types of sample behavior sequences; Based on the sample shared feature extraction result and the sample personalized feature extraction result corresponding to the target sample behavior sequence, predicting the probability of the user performing the target behavior on the sample target object through the target prediction module in the N prediction modules of the to-be-trained model; The target sample behavior sequence corresponds to the target behavior; When the model to be trained does not meet the training cutoff condition, the parameters of the model to be trained are adjusted according to the difference between the probability predicted by the model to be trained and the actual value of performing the same behavior in the label until the training cutoff condition is met.
14. The device according to claim 13, characterized in that When the model training unit adjusts the parameters of the model to be trained based on the difference between the probability predicted by the model to be trained and the actual value of performing the same behavior in the label, it is specifically used to: Obtaining loss values corresponding to the N behaviors respectively through a preset loss function; the preset loss function is used to measure the difference between the predicted result of the same behavior and the actual value in the label; Determine the dynamic weight corresponding to the target behavior according to the change of the loss value of the target behavior in the preset loss function and the change of the area under the curve AUC; the curve is the receiver operating characteristic ROC curve; Obtaining a dynamic loss value of the model to be trained according to the loss values and dynamic weights corresponding to the N behaviors; The parameters of the model to be trained are adjusted according to the dynamic loss value.
15. A computer device, characterized in that: The device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the behavior prediction method according to any one of claims 1 to 11 according to instructions in the program code.
16. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store program code, and the program code is used to execute the behavior prediction method according to any one of claims 1 to 11.
17. A computer program product, characterized in that The invention comprises instructions which, when executed on a computer, enable the computer to execute the behavior prediction method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Method and device for determining interest degree of user in article, equipment and storage medium
CN110162690A
Flexible multi-task neutral network for content ranking
US20190114528A1