Multi-objective model training method and device, electronic equipment and storage medium

By analyzing the correlation of multi-objective models and adjusting the weights or structure, the problem of mutual interference between objectives in multi-objective models is solved, thereby improving the effectiveness of multi-task learning and the convergence of the model.

CN116467591BActive Publication Date: 2026-05-15MICRO DREAM TECHTRONIC NETWORK TECH CHINACO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310341488.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-31
Publication Date
2026-05-15
Estimated Expiration
2043-03-31

AI Technical Summary

Technical Problem

In multi-task learning, the learning of multiple objectives in a multi-objective model may be mutually reinforcing or mutually interfering. How to adjust the correlation between multiple objectives in a multi-objective model to improve the learning effect is an urgent problem to be solved.

Method used

By obtaining sample features, determining multiple prediction scores and loss values, analyzing the correlation between multiple recommendation objectives, and adjusting weights or modifying model structure based on the correlation, iterative training is performed to optimize the multi-objective model.

Benefits of technology

By analyzing and adjusting the correlation of the multi-objective model, the influence of interference terms was reduced, the effect of multi-task learning was enhanced, and the convergence of the model was improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116467591B_ABST
    Figure CN116467591B_ABST
Patent Text Reader

Abstract

The application provides a multi-target model training method and device, an electronic device and a storage medium. The method comprises: obtaining sample features, wherein the sample features comprise sample user features, sample material features and sample cross features; inputting the sample features into a multi-target model to obtain a plurality of predicted scores of the sample features; determining a plurality of loss values of the sample features based on the plurality of predicted scores of the sample features; determining the correlation between a plurality of recommended targets of the multi-target model according to the plurality of loss values; adjusting the weights corresponding to the plurality of recommended targets and / or modifying the structure of the multi-target model according to the correlation; and iteratively training the multi-target model using the sample features based on the weights corresponding to the plurality of recommended targets to obtain a trained multi-target model. Through the application, the effect of multi-task learning can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to recommender system technology, and more particularly to a multi-objective model training method and apparatus, electronic device and storage medium. Background Technology

[0002] Currently, in multi-task learning, multi-objective models can be used to simultaneously learn multiple objectives. For example, in video recommendation, completion rate, interaction rate, and viewing duration can be used as objectives in a multi-objective model. In multi-objective models, the sharing layer can perform shared learning among multiple objectives, allowing the learning of multiple objectives to mutually reinforce each other.

[0003] However, the learning of multiple objectives in a multi-objective model may be mutually reinforcing or mutually interfering. Therefore, how to adjust the correlation between multiple objectives in a multi-task learning model is a problem that urgently needs to be solved. Summary of the Invention

[0004] This application provides a multi-objective model training method and apparatus, electronic device and storage medium, which can enhance the effect of multi-task learning.

[0005] The technical solution of this application is implemented as follows:

[0006] In a first aspect, this application provides a multi-objective model training method. The method includes: obtaining sample features, wherein the sample features include sample user features, sample material features, and sample cross-features between sample users and sample materials; inputting the sample features into a multi-objective model to obtain multiple predicted scores for the sample features, wherein the multiple predicted scores correspond one-to-one with multiple recommendation objectives of the multi-objective model; determining multiple loss values ​​for the sample features based on the multiple predicted scores, wherein the multiple loss values ​​correspond one-to-one with multiple recommendation objectives; determining the correlation between the multiple recommendation objectives of the multi-objective model based on the multiple loss values; adjusting the weights corresponding to the multiple recommendation objectives and / or modifying the structure of the multi-objective model based on the correlation, wherein the weights are used for weighted fusion of the multiple loss values; and iteratively training the multi-objective model using the sample features based on the weights corresponding to the multiple recommendation objectives until a preset convergence condition is met to obtain the trained multi-objective model.

[0007] In some possible implementations, determining the correlation between multiple recommendation objectives of a multi-objective model based on multiple loss values ​​may include: determining the gradients of multiple loss values ​​corresponding to the multiple recommendation objectives with respect to multiple parameters of a shared layer of the multi-objective model; and determining the correlation between the multiple recommendation objectives based on the gradients corresponding to the multiple recommendation objectives.

[0008] In some possible implementations, the operation of determining the gradients of multiple loss values ​​corresponding to multiple recommendation objectives with respect to multiple parameters of a shared layer of a multi-objective model may include: determining the gradient of each of the multiple loss values ​​with respect to the multiple parameters in the shared layer.

[0009] In some possible implementations, determining the correlation between multiple recommendation targets based on the gradients corresponding to multiple recommendation targets may include: determining the cosine similarity between the gradients of each pair of recommendation targets with respect to the same parameter among multiple parameters; and determining the correlation between each pair of recommendation targets based on the cosine similarity.

[0010] In some possible implementations, adjusting the weights corresponding to multiple recommendation targets based on relevance may include reducing the weight corresponding to the first recommendation target when the relevance between the first recommendation target and at least one other recommendation target is interfering.

[0011] In some possible implementations, modifying the structure of the multi-objective model based on correlation may include canceling parameter sharing between the second recommended objective and at least one other recommended objective in the shared layer of the multi-objective model if the correlation between the second recommended objective and at least one other recommended objective is a disturbance.

[0012] In some possible implementations, the operation of obtaining sample features may include: obtaining the original features of the sample; determining the feature identifier of the original features of the sample; and adding a label to the feature identifier to obtain the sample features, wherein the label is used to indicate that the sample features participate in the training of at least one of a plurality of recommendation objectives.

[0013] In some possible implementations, the label may include multiple identifier bits. Each identifier bit corresponds one-to-one with a plurality of recommendation targets. Each identifier bit is used to indicate whether a sample feature is involved in the training of the recommendation target corresponding to each identifier bit.

[0014] In some possible implementations, the operation of determining the feature identifier of the original features of the sample may include: performing a hash mapping on the original features of the sample to obtain feature data encoding; and combining the feature data encoding and feature slot encoding to obtain the feature identifier, wherein the feature slot encoding is used to characterize the feature type of the original features of the sample.

[0015] In a second aspect, this application provides a multi-objective model training apparatus. The apparatus includes an acquisition module, a prediction score determination module, a loss value determination module, a correlation determination module, an adjustment module, and a training module. The acquisition module is configured to acquire sample features. The sample features include sample user features, sample material features, and sample cross-features between sample users and sample materials. The prediction score determination module is configured to input the sample features into the multi-objective model to obtain multiple predicted scores for the sample features. Each of the multiple predicted scores corresponds one-to-one with multiple recommendation objectives of the multi-objective model. The loss value determination module is configured to determine multiple loss values ​​for the sample features based on the multiple predicted scores. Each of the multiple loss values ​​corresponds one-to-one with multiple recommendation objectives. The correlation determination module is configured to determine the correlation between the multiple recommendation objectives of the multi-objective model based on the multiple loss values. The adjustment module is configured to adjust the weights corresponding to the multiple recommendation objectives or modify the structure of the multi-objective model based on the correlation. The weights are used for weighted fusion of the multiple loss values. The training module is configured to iteratively train the multi-objective model using sample features based on weights corresponding to multiple recommendation objectives until a preset convergence condition is met, so as to obtain the trained multi-objective model.

[0016] In some possible implementations, the correlation determination module can be configured to: determine the gradients of multiple loss values ​​corresponding to multiple recommendation objectives with respect to multiple parameters of a shared layer of a multi-objective model; and determine the correlation between the multiple recommendation objectives based on the gradients corresponding to the multiple recommendation objectives.

[0017] In some possible implementations, the correlation determination module can be configured to determine the gradient of each of a plurality of loss values ​​with respect to a plurality of parameters in a shared layer.

[0018] In some possible implementations, the relevance determination module can be configured to: determine the cosine similarity between the gradients of each pair of recommended targets with respect to the same parameter among a plurality of parameters; and determine the relevance between each pair of recommended targets based on the cosine similarity.

[0019] In some possible implementations, the adjustment module can be configured to reduce the weight corresponding to the first recommended target when the correlation between the first recommended target and at least one other recommended target among a plurality of recommended targets is an interfering relationship.

[0020] In some possible implementations, the adjustment module can be configured to: cancel parameter sharing between the second recommended target and at least one other recommended target in the shared layer of the multi-objective model if the correlation between the second recommended target and at least one other recommended target is an interfering relationship.

[0021] In some possible implementations, the obtaining module may be configured to: obtain the original features of the sample; determine the feature identifiers of the original features of the sample; and add labels to the feature identifiers to obtain the sample features, wherein the labels are used to indicate that the sample features participate in the training of at least one of a plurality of recommendation objectives.

[0022] In some possible implementations, the label may include multiple identifier bits. Each identifier bit corresponds one-to-one with a plurality of recommendation targets. Each identifier bit is used to indicate whether a sample feature is involved in the training of the recommendation target corresponding to each identifier bit.

[0023] In some possible implementations, the obtaining module may be configured to: perform a hash mapping on the original features of the sample to obtain feature data encoding; and combine the feature data encoding and feature slot encoding to obtain feature identifiers, wherein the feature slot encoding is used to characterize the feature type of the original features of the sample.

[0024] In a third aspect, this application provides an electronic device. The electronic device includes a memory and a processor. The memory stores executable instructions. When the processor executes the executable instructions stored in the memory, it implements the multi-objective model training method as described in the first aspect and its possible embodiments.

[0025] In a fourth aspect, this application provides a computer-readable storage medium. Executable instructions are stored on this computer-readable storage medium. When executed by a processor, the executable instructions implement the multi-objective model training method as described in the first aspect and its possible embodiments.

[0026] This application has the following beneficial effects:

[0027] In this application, the correlation between multiple recommendation objectives in a multi-objective model is determined, and the weights corresponding to these objectives or the structure of the multi-objective model is adjusted or modified based on this correlation. Based on the adjusted weights or modified multi-objective model, sample features are used to train the multi-objective model to achieve multi-task learning. In this way, the correlation between multiple recommendation objectives in the multi-objective model is analyzed and adjusted during multi-task learning, reducing the interference of some recommendation objectives as distractors on other recommendation objectives, thereby deepening the convergence of the multi-objective model and enhancing the effectiveness of multi-task learning. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the system architecture for implementing multi-objective model training in the embodiments of this application.

[0029] Figure 2 yes Figure 1The diagram shows the structure of the terminal in the system architecture shown.

[0030] Figure 3 This is a flowchart illustrating the multi-objective model training method provided in the embodiments of this application.

[0031] Figure 4 This is a schematic diagram illustrating the specific process of obtaining sample features in the embodiments of this application.

[0032] Figure 5 This is a schematic diagram illustrating the specific process of determining the feature identifier in the embodiments of this application.

[0033] Figure 6 This is a schematic diagram of the structure of the multi-objective model in the embodiments of this application.

[0034] Figure 7 This is a schematic diagram illustrating the specific process for determining the correlation between multiple targets in the embodiments of this application.

[0035] Figure 8 This is a schematic diagram illustrating the specific process for determining the correlation between every two targets in the embodiments of this application.

[0036] Figure 9 This is a schematic diagram of the modified multi-objective model in the embodiments of this application.

[0037] Figure 10 This is a schematic diagram of an exemplary embodiment of the multi-objective model in this application.

[0038] Figure 11 This is a schematic diagram of the structure of the multi-objective model training device in the embodiments of this application. Detailed Implementation

[0039] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be considered as limitations on this application. All other embodiments obtained by those skilled in the art without inventive effort are within the scope of protection of this application.

[0040] In the following description, references to "an embodiment," "some embodiments," etc., describe a subset of all possible embodiments. However, it is understood that "an embodiment" or "some embodiments" can be the same subset or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0041] In the following description, the terms "first / second / third" are used merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that shown in the illustrations or descriptions herein.

[0042] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0043] Currently, in multi-task learning, multi-objective models can be used to simultaneously learn multiple objectives. Because multi-objective models are used in recommendation systems, the multiple objectives within a multi-objective model can also be referred to as multiple recommendation objectives. For example, in video recommendation services, completion rate, interaction rate, and viewing duration can be used as objectives in a multi-objective model. In multi-objective models, the sharing layer can perform shared learning among multiple objectives, allowing the learning of multiple objectives to mutually reinforce each other.

[0044] However, the learning of multiple objectives in a multi-objective model may be mutually reinforcing or mutually interfering. Therefore, how to adjust the correlation between multiple objectives in a multi-task learning model is a problem that urgently needs to be solved.

[0045] This application provides a multi-objective model training method and apparatus, electronic device, and storage medium, which can enhance the effect of multi-task learning. The exemplary application of the electronic device provided in this application is described below. The electronic device provided in this application can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, and mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), or as a server. Exemplary applications when the electronic device is implemented as a terminal or server will be described below.

[0046] Figure 1 This is a schematic diagram of the system architecture for multi-objective model training in this embodiment of the application. To train the multi-objective model, terminal 110 and server 120 can be connected via network 130. Network 130 can be a wide area network (WAN), a local area network (LAN), or a combination of both.

[0047] In some cases, terminal 110 can be used to acquire at least one of user information, material information, and cross-cutting information, and server 120 can be used to acquire other information among user information, material information, and cross-cutting information. After acquiring the information, terminal 110 can upload it to server 120. After receiving the information from terminal 110, server 120, combined with the information acquired by server 120 itself, can obtain all the information among user information, material information, and cross-cutting information. Subsequently, server 120 can obtain the corresponding raw features based on user information, material information, and cross-cutting information, and use the raw features to train a multi-objective model.

[0048] In some cases, terminal 110 can be used to acquire at least one of user information, material information, and cross-cutting information, and to acquire other information from server 120. After acquiring all the user information, material information, and cross-cutting information, terminal 110 can obtain the corresponding raw features based on the user information, material information, and cross-cutting information. Then, terminal 110 can upload the raw features to server 120 for server 120 to train the multi-objective model.

[0049] It is understood that, under normal circumstances, the training of the multi-objective model is completed by the server 120. However, in some cases, the training of the multi-objective model can also be completed by the terminal 110, and this embodiment of the application does not specifically limit this.

[0050] In some embodiments, terminal 110 may be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc. In some embodiments, server 120 may be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. It should be noted that terminal 110 and server 120 in this embodiment are not limited to these. Furthermore, terminal 110 and server 120 may be directly or indirectly connected via wired or wireless communication, and this embodiment does not impose specific limitations on this.

[0051] Figure 2 yes Figure 1 The diagram shows the terminal structure of the system architecture. Figure 2As shown, terminal 110 includes at least one processor 210, memory 250, at least one network interface 220, and user interface 230. The various components in terminal 110 are coupled together via bus system 240. It is understood that bus system 240 is used to implement communication between at least one processor 210, memory 250, at least one network interface 220, and user interface 230. In addition to a data bus, bus system 240 may also include at least one of a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2 The general labeled all buses as Bus System 240.

[0052] Processor 210 can be an integrated circuit chip with signal processing capabilities. For example, processor 210 can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. For example, a general-purpose processor can be a microprocessor or any conventional processor.

[0053] Network interface 220 may include Bluetooth, Wi-Fi, and Universal Serial Bus (USB), etc.

[0054] User interface 230 may include one or more output devices 231 that enable the presentation of media content. Output devices 231 may include one or more speakers and / or one or more visual displays. User interface 230 may also include one or more input devices 232. Input devices 232 may include user interface components that facilitate user input. For example, user interface components may include a keyboard, mouse, microphone, touchscreen display, camera, other input buttons, and controls.

[0055] Memory 250 may be removable, non-removable, or a combination thereof. Exemplarily, hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. Memory 250 may optionally include one or more storage devices physically located remote from processor 210. Memory 250 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM). Volatile memory may be random access memory (RAM). The memory 250 described in this application embodiment is intended to include any suitable type of memory.

[0056] In some embodiments, memory 250 is capable of storing data to support various operations. Examples of such data include programs, modules, and data structures, or subsets or supersets thereof, as illustrated below. Operating system 251 includes system programs for handling various basic system services and performing hardware-related tasks, such as a framework layer, core library layer, driver layer, etc., for implementing various basic services and handling hardware-based tasks. Network communication module 252 is used to reach other computing devices via one or more (wired or wireless) network interfaces 220. Presentation module 253 is used to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 231 associated with user interface 230 (e.g., a display screen, speakers, etc.). Input processing module 254 is used to detect and translate one or more user inputs or interactions from one or more input devices 232.

[0057] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A multi-objective model training device 1100 stored in memory 250 is shown. The multi-objective model training device 1100 can be software in the form of programs and plugins.

[0058] In some embodiments, the apparatus provided in this application can be implemented in hardware. For example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, programmed to execute the multi-objective model training method provided in this application. For instance, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0059] The following will describe the multi-objective model training method provided in this application based on the system architecture provided in the embodiments of this application. It is understood that the multi-objective model training method can be implemented by the terminal alone, by the server alone, or by both the terminal and the server.

[0060] Figure 3 This is a flowchart illustrating the multi-objective model training method provided in an embodiment of this application. Figure 3As shown, the multi-objective model training method includes steps S310 to S360.

[0061] In step S310, sample features are obtained.

[0062] In this embodiment, sample features are used as inputs into a multi-objective model to train the model. Sample features may include sample user features, sample material features, and sample cross features. Sample user features represent information about the sample user. Sample material features represent information about the sample material. Sample cross features represent matching information between the sample user and the sample material.

[0063] In one embodiment, the number of sample features can be one or more. For example, when there are multiple sample features, the number of sample user features, the number of sample material features, and the number of sample cross features can all be one or more. In practical applications, the number of sample features is often large to ensure that the trained multi-objective model converges sufficiently.

[0064] It is understood that the sample features used as input to the multi-objective model are obtained based on the original sample features. The original sample features are the original features obtained for sample users, sample materials, and the matching between sample users and sample materials. In one embodiment, the original sample features can be raw data without embedding layer processing. In this case, the original sample features can be obtained after embedding layer processing. In this case, the user data of the sample user, the material data of the sample material, and the matching data between the sample user and the sample material can respectively take the form of original user data, original material data, and original matching data. In one embodiment, the original sample features can be obtained after embedding layer processing. In this case, the user data of the sample user, the material data of the sample material, and the matching data between the sample user and the sample material can respectively take the form of user data embedding, material data embedding, and matching data embedding.

[0065] Therefore, in order to obtain sample features, it is necessary to first obtain the original features of the sample, and then obtain the sample features based on the original features of the sample.

[0066] Figure 4 This is a schematic diagram illustrating the specific process of obtaining sample features in an embodiment of this application. For example... Figure 4 As shown, in one embodiment, step S310 may include steps S311 to S313.

[0067] In step S311, the original features of the sample are obtained.

[0068] Here, the original characteristics of the sample can include user data of the sample users, material data of the sample materials, and matching data between the sample users and the sample materials. User data is data related to the sample users. Material data is data related to the sample materials. Matching data is data characterizing the matching between the sample users and the sample materials.

[0069] In this embodiment, the sample user is the user to whom the acquired user data belongs. The sample user includes at least one user. In practical applications, the number of sample users is often very large.

[0070] In one embodiment, user data may include attribute data of sample users and interaction data of sample users. Attribute data can be used to characterize the user attributes of sample users. Attribute data may include at least one of the following: user identifier, gender information, age information, interest information, follower relationship information, time information, frequency information, location information, and network type information.

[0071] A user identifier can be used to uniquely identify a sample user. In one embodiment, the user identifier can be a username or a nickname. For example, the user identifier can be the username used by the sample user to log in. Alternatively, the user identifier can be a nickname set by the sample user for display to others.

[0072] Gender information can be used to indicate the gender of a sample user. In one embodiment, gender information can indicate that the sample user's gender is male, female, or other. In another embodiment, gender information can indicate that the sample user's gender is not set or is hidden. If gender information is not set, it means that the sample user has not filled in their gender. If gender information is hidden, it means that the sample user does not wish to disclose their gender.

[0073] Age information can be used to represent the age of a sample user. In one embodiment, age information may include the sample user's specific age. For example, age information may include the sample user's date of birth. Alternatively, age information may include the sample user's age in years. In one embodiment, age information may represent the sample user's age range. For example, age information may indicate that the sample user's age is not set or is hidden.

[0074] Interest information can be used to represent the interests of sample users. In one embodiment, interest information may include at least one interest tag. Each interest tag corresponds to one interest. In one embodiment, interest tags may have one or more levels. For example, a sample user may have three levels of interest tags. In the three levels of interest tags, the first level interest tag may be sports, the second level interest tag may be running, and the third level interest tag may be marathon. For example, a sample user may have multiple interest tags at the same level. For instance, multiple interest tags may include sports, celebrities, games, etc. In one embodiment, interest tags may include long-term interest tags and short-term interest tags. Long-term interest tags represent the long-term interests of sample users. For example, a long-term interest tag may be financial management. Short-term interest tags represent the short-term interests of sample users. For example, a short-term interest tag may be financial courses.

[0075] Follower information can be used to represent the follower relationships between a sample user and other users. Specifically, follower information can represent the follower status of a sample user on other users, and / or the follower status of a sample user by other users. It should be noted that the "other users" here may or may not be sample users.

[0076] Time information can be used to represent the active time of sample users. In one embodiment, time information may include the distribution of sample users across multiple time periods. For example, a time period may include 24 time periods obtained by dividing a day into equal parts, and each time period is one hour long. Alternatively, a time period may include 7 time periods obtained by dividing a week into parts, and each time period is one day long. In one embodiment, time information may include the login time of sample users. In one embodiment, time information may include the active duration of sample users. For example, active duration may be the active duration of sample users within a day, within a week, within a month, etc.

[0077] Frequency information can be used to represent the activity frequency of sample users. In one embodiment, frequency information can represent the number of times a sample user logs in within a time period. For example, frequency information can represent the number of times a sample user logs in within a time period such as an hour, a day, a week, or a month.

[0078] Location information can be used to represent the location of a sample user. This location can be a geographic location or an administrative region location. For example, location information can include the sample user's location information. Specifically, location information can be the sample user's longitude and latitude coordinates. Another example is that location information can include the sample user's Internet Protocol (IP) address. Yet another example is that location information can include the user's administrative region location. For example, location information can represent the sample user's country, province, city, district / county, street, neighborhood, etc.

[0079] Network type information can be used to indicate the type of network accessed by a sample user's terminal. For example, network type information can indicate whether the sample user is using a mobile network, a wireless local area network, etc.

[0080] Interaction information can be used to represent interactive materials used by sample users. In one embodiment, interaction information may include content tags for the interactive materials used by sample users. Content tags can be used to represent the interests corresponding to the interactive materials. In one embodiment, an interactive material may have at least one content tag. Each content tag corresponds to an interest. In one embodiment, content tags may have one or more levels. For example, an interactive material may have three levels of content tags. In the three levels of content tags, the first level content tag may be sports, the second level content tag may be running, and the third level content tag may be marathon. For example, an interactive material may have multiple content tags at the same level. For instance, multiple content tags may include sports, celebrities, games, etc. In one embodiment, interaction information may include interaction type information. Interaction type information may represent the interaction of sample users with the interactive materials. For example, for video-type interactive materials, interaction information may include at least one of the following: completion instruction information, interaction instruction information, and viewing duration information. Completion instruction information is used to instruct sample users to complete the playback of the interactive material. Interaction instruction information instructs sample users to participate in the interaction of the interactive material. For example, the interaction may be liking, favorite, sending bullet comments, commenting, etc. Viewing duration information is used to indicate the length of time sample users played interactive materials.

[0081] It should be noted that the above is merely an exemplary description of user data for sample users in this application embodiment. In practical applications, user data may also include other information or have other settings, and this application embodiment does not specifically limit this.

[0082] In this embodiment, sample materials are the materials to which the acquired material data belongs. Sample materials may include at least one material. In practical applications, the number of sample materials is often very large. It should be noted that sample materials are different from the interactive materials of the sample users mentioned above. In one embodiment, all or part of the interactive materials of the sample users can be used as sample materials. In this case, all or part of the sample materials are interactive materials of the sample users. In addition to interactive materials, sample materials may also include materials that the sample users have not interacted with. In one embodiment, during the acquisition of sample materials, it is not distinguished whether the sample material is interactive material. In this case, sample materials may not include interactive materials.

[0083] In one embodiment, material data may include at least one of the following: material identifier, publisher identifier, publisher information, material information, content tags, and interaction information.

[0084] A material identifier can be used to uniquely identify a sample material. In one embodiment, the material identifier can be the title of the sample material. In another embodiment, the material identifier can be an index of the sample material.

[0085] A publisher identifier can be used to uniquely identify the publisher of sample materials. In one embodiment, the publisher identifier can be a username or a nickname. For example, the publisher identifier can be the username used by the publisher to log in. Another example is a nickname that the publisher sets for themselves to display to others.

[0086] The publisher information may include the publisher's basic information. In one embodiment, the publisher information may include at least one of the following: gender information, age information, interest information, and location information. For a description of this information, please refer to the description of the attribute data of the user data for the sample users; this embodiment will not be repeated here.

[0087] Material information may include basic information about the sample material. In one embodiment, material information may include at least one of the following: release time information and contents information. Release time information may be used to indicate the time when the material information was released. Contents information may be used to indicate the content of the sample material. For example, contents information may indicate that the sample material contains text, images, videos, links, etc.

[0088] Content tags can be used to represent the interests corresponding to sample materials. In one embodiment, a sample material may have at least one content tag. Each content tag corresponds to an interest. In one embodiment, content tags may have one or more levels. For example, a sample material may have three levels of content tags. In a three-level content tagging system, the first-level content tag may be sports, the second-level content tag may be running, and the third-level content tag may be marathon. For example, a sample material may have multiple content tags at the same level. For instance, multiple content tags may include sports, celebrities, games, etc.

[0089] Interactive information can be used to represent at least one user's interaction with the sample material. For example, an interaction could be a like, favorite, post a comment, or leave a message. In one embodiment, the interactive information can be the number of interactions. In another embodiment, the interactive information can be the ratio of the number of interactions to the number of views.

[0090] It should be noted that the above is merely an exemplary description of the material data of the sample materials in the embodiments of this application. In practical applications, the material data may also include other information or have other settings, and the embodiments of this application do not specifically limit this.

[0091] In this embodiment, matching data can be used to indicate whether a sample user and sample material match, or to indicate the degree of matching between them. In one embodiment, matching data can be used to indicate the matching degree between a sample user's interest tags and a sample material's content tags. For example, matching data may include the number of identical parts in the sample user's interest tags and the sample material's content tags, or the ratio of the number of identical parts to the total number of interest tags and content tags. For another example, if the number of identical parts in the sample user's interest tags and the sample material's content tags reaches a threshold, or the ratio of the number of identical parts to the total number of interest tags and content tags reaches a threshold, the matching data may include an indication of a match between the sample user and the sample material; otherwise, the matching data may include an indication of a mismatch between the sample user and the sample material. In one embodiment, matching data can be used to indicate the matching degree between the content tags of a sample user's interactive material and the content tags of the sample material. For example, matching data may include the number of identical parts in the content tags of the interactive material and the sample material's content tags, or the ratio of the number of identical parts to the total number of content tags of the interactive material and the sample material. For example, if the number of identical parts in the content tags of the interactive material and the sample material reaches a threshold, or if the ratio of the number of identical parts to the total number of content tags of the interactive material and the sample material reaches a threshold, the matching data may include an indication of a match between the sample user and the sample material; otherwise, the matching data may include an indication of a mismatch between the sample user and the sample material. It should be noted that the above is merely an exemplary description of the matching data in this application's embodiments. In practical applications, the matching data may also include other information or have other settings, and this application's embodiments do not specifically limit this.

[0092] In practical applications, the original features of a sample can be obtained from sample users, their behavior, and sample materials within a time window. For example, when a sample user browses sample materials through a terminal within a time window, the terminal can generate and save a log. The log records all sample users, sample materials, interactions, and activities within that time window. The original features of the sample can then be obtained based on the log.

[0093] In one embodiment, after obtaining the original sample features, the original sample features can be converted into a sample stream. For example, the original sample features can be input into a stream processing platform to generate a sample stream. The stream processing platform can be, for example, an open-source stream processing platform such as Kafka.

[0094] In one embodiment, the original sample features can be concatenated before being converted into a sample stream. Specifically, based on logs, data on sample users, their corresponding interactions, and sample materials can be concatenated to form a concatenated sample feature. The original sample features can then be input into a stream processing platform to generate a sample stream.

[0095] In step S312, the feature identifier of the original features of the sample is determined.

[0096] Here, feature identifiers can be determined for each sample's original features.

[0097] Understandably, the number of original features in a sample is often quite large. For example, for a sample user, each piece of information in that user's user data can constitute one original feature. Thus, multiple original features of a sample user can represent user identifier, gender, age, interests, follower relationships, time, frequency, location, network type, interaction, etc. As another example, for a sample user's interests, the sample user can possess one or more original features. For instance, one interest tag of a sample user corresponds to one original feature. Similarly, for a sample material, each piece of information in that material's material data can constitute one original feature. Thus, multiple original features of a sample material can represent material identifier, publisher identifier, publisher information, material information, content tags, and interaction. As another example, for the content tags of a sample material, the sample material can possess one or more original features. For instance, one content tag of a sample material corresponds to one original feature.

[0098] It is understandable that the original features of the samples represent different information, so these original features may have different numerical ranges and different data lengths. Therefore, the format of the original features of the samples can be standardized.

[0099] Figure 5 This is a schematic diagram illustrating the specific process of determining the feature identifier in an embodiment of this application. For example... Figure 5 As shown, in one embodiment, step S312 may include steps S3121 and S3122.

[0100] In step S3121, the original features of the sample are hashed to obtain the feature data encoding.

[0101] To standardize the original features of samples, a hash mapping can be performed on the original features to ensure that they have the same format. In one embodiment, through hash mapping, the original features of samples can be converted into feature data encoding of a certain number of bits. This feature data encoding can be binary encoding, octal encoding, or hexadecimal encoding. The number of bits in the feature data encoding can be set according to actual needs. For example, the feature data encoding can be 54-bit binary encoding.

[0102] In practical applications, the original features of a sample can be either discrete or continuous values. When the original features are continuous values, data bucketing can be performed on the original features before mapping.

[0103] It should be noted that, in addition to hash mapping, other mapping methods can also be used to map the original features of the samples, and this application does not specifically limit this method.

[0104] In step S3122, the feature data encoding and feature slot encoding are combined to obtain the feature identifier.

[0105] Here, feature slot encoding is used to characterize the feature type of the original features of the sample.

[0106] It is understandable that in step S3121, the feature data encoding obtained through hash mapping is not in a one-to-one correspondence with the original features of the sample. As can be seen from the principle of hash mapping, original features of samples of different types (i.e., representing different information) but with the same value may be mapped to the same feature data encoding. Even more importantly, original features of samples of different types (i.e., representing different information) and with different values ​​may be mapped to the same feature data encoding.

[0107] In one embodiment, to prevent the original features of different types of samples from being indistinguishable after hash mapping, feature slot encoding can be introduced. Feature slot encoding can be used to represent the information type corresponding to the feature data encoding. In other words, feature slot encoding is used to distinguish the type of feature data encoding. This feature slot encoding can be binary encoding, or octal or hexadecimal encoding. The number of bits in the feature slot encoding can be set according to actual needs. For example, the feature slot encoding can be a 10-bit binary encoding. In this case, the feature slot encoding can represent 2... 10 Types of information.

[0108] In one embodiment, the feature slot encoding can be obtained based on the original features of the sample. For example, the information type of the original features can be determined based on their content, thereby further determining the feature slot encoding.

[0109] After determining the feature slot encoding, the feature data encoding and the feature slot encoding can be concatenated to obtain the feature identifier. Clearly, the combination of the feature data encoding and the feature slot encoding can uniquely identify the original features of the sample. In other words, the feature identifier can serve as a unique identifier (or index) of the original features of the sample. For example, if the feature data encoding is 54-bit binary and the feature slot encoding is 10-bit binary, the feature identifier can be a 64-bit binary encoding.

[0110] At this point, the feature identifier can be used as an index for the original features of the sample, and can be stored together with the original features of the sample.

[0111] In step S313, labels are added to the feature identifiers to obtain sample features.

[0112] Here, the label is used to indicate that the sample features are involved in the training of at least one of the multiple targets.

[0113] A label may include one or more flag bits. In one embodiment, the number of flag bits in a label may be the same as the number of targets in a multi-target model. That is, multiple flag bits may correspond to multiple targets respectively. In this case, each of the multiple flag bits can be used to indicate whether a sample feature participates in the training of the target corresponding to that flag bit. For example, if a flag bit is set to "1", then the flag bit indicates that the sample feature participates in the training of the corresponding target; if a flag bit is set to "0", then the flag bit indicates that the sample feature does not participate in the training of the corresponding target, that is, the sample feature is filtered for that target.

[0114] In practical applications, labels can be obtained based on the original features of the sample. For example, for a target, the value of the identifier bit in the label corresponding to that target can be extracted from the original features of the sample. For instance, if the sample user or sample material has an interaction corresponding to the target, the identifier bit can be set to "1"; if the sample user or sample material does not have an interaction corresponding to the target, the identifier bit can be set to "0".

[0115] It's understandable that the above tagging operation can be considered as filtering the original features of the samples. Furthermore, different objectives can correspond to different filtering conditions. For example, for video-type samples, filtering may not be required for the objectives of video duration and interaction. Meanwhile, for the objective of completing the video playback, the filtering condition can be set to the video playback duration being greater than a threshold (e.g., 5000 milliseconds). If the video playback duration does not exceed this threshold, the corresponding flag can be set to "0"; if the video playback duration exceeds this threshold, the corresponding flag can be set to "1".

[0116] It should be noted that steps S312 and S313 can be considered as preprocessing of the original features of the sample. This preprocessing yields the sample features.

[0117] In one example, the sample features obtained after the above preprocessing can have the following format: {sample identifier, (target 1, target 2, ..., target n), (identifier 1, identifier 2, ..., identifier n)}. Here, n is a positive integer. In some cases, the value of n can be equal to the number of targets in the multi-target model. In this case, target 1, target 2, ..., target n can be set according to the multi-target model. In some cases, the value of n can be less than the number of targets in the multi-target model. In this case, target 1, target 2, ..., target n can be extracted from the original sample features.

[0118] In step S320, the sample feature data is modeled using a multi-objective model to obtain multiple predicted scores for the sample features.

[0119] Here, multiple predicted scores correspond one-to-one with multiple objectives of the multi-objective model.

[0120] In this embodiment of the application, the multi-objective model is used to train for multiple objectives. Figure 6 This is a schematic diagram of the structure of the multi-objective model in an embodiment of this application. For example... Figure 6 As shown, the multi-objective model may include an embedding layer 601, a sharing layer 602, and a tower layer 603. The embedding layer 601 is used to obtain embeddings based on input features. The sharing layer 602 is used to achieve shared learning among multiple objectives of the multi-objective model. The sharing layer 602 may include an expert network and an interconnection network. The expert network may include multiple expert layers. For example, multiple expert layers may include expert layer e1, expert layer e2, ..., expert layer en. The sharing layer 602 has shared layer parameters. These shared layer parameters are shared by multiple objectives. The interconnection network 602B is used to interconnect the outputs of multiple expert layers. In one embodiment, the interconnection network may be a gating network. The gating network can be used to learn the weights of the connections between each tower layer and each expert layer. The tower layer 603 can be used to achieve individual learning of each objective of the multi-objective model. In other words, the tower layer 603 can be used to learn specific information for the corresponding objective.

[0121] In one embodiment, the multi-objective model may include a multi-gate mixture-of-experts (MMoE) model, a sub-network routing (SNR) model, or other multi-objective models.

[0122] In one embodiment, after the embedding layer obtains the corresponding embeddings based on the original features of the sample, the same feature slot codes can be fused. For example, since the embeddings corresponding to multiple interest tags of a sample user correspond to the same feature slot code, all embeddings of that sample user corresponding to that feature slot code can be fused. For instance, these embeddings can be pooled. Pooling can include at least one of the following: max pooling, average pooling, weighted pooling, and summative pooling. In this way, one feature slot code of the sample user can correspond to only one embedding.

[0123] In one embodiment, after fusing multiple embeddings corresponding to the same feature slot encoding, the fused embeddings can be densified. This can be understood as densifying a sparse matrix.

[0124] Understandably, after inputting sample features into a multi-objective model, the model can output multiple predicted scores. These multiple predicted scores can correspond one-to-one with multiple objectives.

[0125] In step S330, multiple loss values ​​for the sample features are determined based on multiple predicted scores of the sample features.

[0126] Here, multiple loss values ​​correspond one-to-one with multiple objectives.

[0127] Specifically, based on multiple predicted scores and actual scores of sample features, multiple loss values ​​corresponding to multiple targets can be determined. Similarly, multiple loss values ​​can be one-to-one corresponded to multiple targets.

[0128] In practical applications, various loss functions can be used to determine the loss value corresponding to different objectives. These loss functions include, but are not limited to, cross-entropy loss function and mean squared error loss function. In one example, for objectives such as completion rate and interaction rate, the cross-entropy loss function can be used to determine the loss value. In another example, for objectives such as viewing time, the mean squared error loss function can be used to determine the loss value.

[0129] In step S340, the correlation between multiple objectives of the multi-objective model is determined based on multiple loss values.

[0130] Here, correlation is used to indicate whether the training of any two objectives among multiple objectives is mutually reinforcing or mutually interfering. Understandably, for two mutually interfering objectives, it is difficult to guarantee that the parameters in the shared layers will be well tuned simultaneously for both objectives when training a multi-objective model.

[0131] The parameters in the shared layer include the parameters from each of the multiple expert layers. Therefore, the parameters can also be referred to as expert parameters. In one embodiment, the parameters can be in matrix form. In this case, the parameters can include one or more parameter elements (or parameter items). Of course, the parameters can also be in other forms, and this application does not specifically limit them.

[0132] Figure 7 This is a schematic diagram illustrating the specific process for determining the correlation between multiple targets in an embodiment of this application. For example... Figure 7 As shown, step S340 may include steps S341 to S342.

[0133] In step S341, the gradients of multiple loss values ​​corresponding to multiple objectives are determined relative to multiple parameters in the shared layer of the multi-objective model.

[0134] Specifically, in step S341, the gradient of each of the multiple loss values ​​relative to the multiple parameters in the shared layer can be determined. For example, in a multi-objective model with multiple objectives, the shared layer of the multi-objective model has multiple parameters. The gradient of the loss value corresponding to each objective relative to each parameter is calculated.

[0135] In step S342, the correlation between multiple targets is determined based on the gradients corresponding to the multiple targets.

[0136] After obtaining the gradient of the loss value corresponding to each target with respect to each parameter in step S341, the correlation between multiple targets can be determined based on these gradients.

[0137] It is understandable that the correlation between multiple objectives can include the correlation between any two objectives. Therefore, determining the correlation between multiple objectives can be specifically implemented by determining the correlation between any two objectives.

[0138] Figure 8 This is a schematic diagram illustrating the specific process for determining the correlation between every two targets in the embodiments of this application. For example... Figure 8 As shown, step S341 may include steps S3411 and S3412.

[0139] In step S3411, the cosine similarity between the gradients of every two targets relative to the same parameter among the multiple parameters is determined.

[0140] Here, cosine similarity is used to indicate whether the gradients of two objectives with respect to the same parameter conflict in direction. In this case, the two gradients can be understood as two vectors. If the angle between the two vectors is acute, the cosine similarity is positive. This indicates that both objectives want the parameter to adjust in the same or similar direction, and the correlation between the two objectives is strong. Conversely, if the angle between the two vectors is obtuse, the cosine similarity is negative. This indicates that both objectives want the parameter to adjust in opposite or contradictory directions, and the correlation between the two objectives is weak.

[0141] In step S3412, the correlation between each pair of targets is determined based on cosine similarity.

[0142] In this step, the cosine similarity between the gradients of the two targets with respect to each parameter element in the parameters can be statistically analyzed, and the correlation between the two targets with respect to the parameter can be determined based on the statistical results.

[0143] In one embodiment, for a parameter, the number of parameter elements with positive cosine similarity values ​​can be counted as a first quantity, and the number of parameter elements with negative cosine similarity values ​​can be counted as a second quantity. By comparing the first and second quantities, the correlation between the two targets regarding that parameter can be determined. For example, if the first quantity is much larger than the second quantity, the correlation between the two targets regarding that parameter can be determined to be a facilitating relationship. In practice, the first quantity can be one or more orders of magnitude larger than the second quantity. Conversely, if the first and second quantities are similar, the correlation between the two targets can be determined to be a disruptive relationship. In practice, the first and second quantities can be of the same order of magnitude.

[0144] It is understandable that by performing steps 3411 and 3412 above on every two targets among multiple targets, the correlation between multiple targets can be obtained.

[0145] In step S350, the weights corresponding to multiple objectives are adjusted or the structure of the multi-objective model is modified based on the correlation.

[0146] After obtaining the correlation between multiple objectives in the multi-objective model in step S340 above, one objective can be identified. This objective will cause significant interference to the other objectives. At this point, adjustments need to be made to this objective to mitigate or eliminate the interference it causes.

[0147] In one embodiment, step S350 can be implemented as follows: if the correlation between the first target and at least one other target is an interference relationship, the weight corresponding to the first target is reduced. Here, the first target and at least one other target are interference relationships. In one embodiment, the number of first targets can be one or more. It is understood that during the training process of a multi-target model, the loss values ​​corresponding to multiple targets need to be fused to obtain a fused loss value. This fused loss value is used to determine whether the multi-target model has converged. The fusion of multiple loss values ​​corresponding to multiple targets can be performed using a weighted fusion method. Then, the multiple loss values ​​corresponding to multiple targets can have their own weights. In this case, the weight corresponding to the first target can be reduced. In this way, the influence of the loss value corresponding to the first target on the fused loss value can be reduced, thereby reducing the interference of the first target on other targets. In one embodiment, the adjustment of weights can be performed according to preset rules or by professionals based on experience.

[0148] In one embodiment, the weights corresponding to the first target can be reduced to 0. This is an extreme case of reducing the weights of the loss value. Thus, the loss value corresponding to the first target has no effect on the fusion loss value, thereby eliminating the interference of the first target on other targets. However, in this case, training of the first target is not possible during the training of the multi-target model. In particular, training of the tower layer corresponding to the first target is not possible. Therefore, other methods can be used to train the first target. In one embodiment, a separate deep neural network (DNN) model or other models can be used to train the first target separately.

[0149] In one embodiment, for a batch of sample data containing multiple sample data points, the loss value corresponding to each objective in the multi-objective model can be determined first, and then the loss values ​​of multiple objectives can be fused. In the previous step, for the sample data participating in the training of each objective in the batch of sample data, the loss value corresponding to that objective can be obtained separately, and then the average of the loss values ​​of the sample data participating in the training of that objective can be calculated as the loss value corresponding to that objective. In this way, the loss value corresponding to each objective can be obtained. In the subsequent step, the loss values ​​corresponding to multiple objectives are weighted and fused to obtain the fused loss value.

[0150] In one embodiment, step S350 can be implemented as follows: if the correlation between the second target and at least one other target is an interference relationship, cancel parameter sharing between the second target and at least one target in the shared layer of the multi-target model. Specifically, in the interconnection network of the shared layer of the multi-target model, the connection between the tower layer corresponding to the second target and other expert layers other than the expert layer corresponding to the second target can be deleted. Figure 9 This is a schematic diagram of the modified multi-objective model in an embodiment of this application. Figure 9 In this context, the second objective is the objective that corresponds to the expert level (ek) among multiple objectives. For example... Figure 9 As shown, there is no connection between tower layer 603 corresponding to the second objective and the expert layers in the shared network 602, except for expert layer ek. That is, the second objective is jointly trained with other objectives, but does not participate in parameter sharing between expert networks.

[0151] Understandably, in Figure 9 In the modified multi-objective model shown, there is no connection between the tower layer 603 corresponding to the second objective and the expert layers in the shared network 602 other than the expert layer ek. However, in some cases, the tower layer 603 corresponding to the second objective may be connected to some of the expert layers in the shared network 602 other than the expert layer ek, and may not be connected to others. This application embodiment does not specifically limit this.

[0152] In step S360, based on the weights corresponding to multiple targets, the multi-target model is iteratively trained using sample features until the preset convergence condition is met, so as to obtain the trained multi-target model.

[0153] After modifying the structure of the multi-objective model or adjusting the weights corresponding to multiple objectives, iterative training can be performed using sample features. Specifically, when adjusting the weights, the structure of the multi-objective model remains unchanged. When the structure of the multi-objective model is modified, the structure changes. In this case, training is performed on the modified multi-objective model.

[0154] In one embodiment, a stochastic gradient descent algorithm and a fusion loss value can be used to adjust the parameters of the multi-objective model. After iterative training with multiple sample features or multiple batches of sample features, the multi-objective model can reach a convergent state.

[0155] In one embodiment, after training the multi-objective model, the multi-objective model can be evaluated offline and deployed online.

[0156] Offline evaluation refers to assessing the accuracy of a multi-objective model. Specifically, a feature can be input into the multi-objective model. The model outputs predicted scores for each of the multiple objectives. The accuracy of the multi-objective model can be determined by calculating the difference between the predicted score and the true score for that feature. For example, if the difference between the predicted and true scores is less than a threshold, the multi-objective model is accurate. Conversely, if the difference is greater than or equal to the threshold, the multi-objective model is inaccurate. In this case, further training of the multi-objective model is necessary.

[0157] Online deployment refers to deploying a multi-objective model on the server of a recommendation system to predict and rank candidate materials. For example, a multi-objective model can be used to obtain a fusion prediction score for candidate materials. Based on the fusion prediction score, the candidate materials can be ranked, thereby enabling material recommendations.

[0158] It should be noted that, based on the sample features, after steps S310 to S340 above, the structure of the multi-objective model and / or the weights corresponding to the multiple objectives are determined. In this case, in addition to the sample features already used, other sample features can also be used directly for training the multi-objective model.

[0159] In this embodiment, the correlation between multiple objectives in a multi-objective model is determined, and the weights corresponding to these objectives are adjusted or the structure of the multi-objective model is modified based on this correlation. Based on the adjusted weights or modified multi-objective model, sample features are used to train the multi-objective model to achieve multi-task learning. In this way, the correlation between multiple objectives in the multi-objective model is analyzed and adjusted during multi-task learning, reducing the interference of objectives as distractors on other objectives, thereby deepening the convergence of the multi-objective model and enhancing the effectiveness of multi-task learning.

[0160] Furthermore, in this embodiment, not only are the original features of the samples converted into feature identifiers with a unified format through mapping, but labels are also added to indicate whether the sample features participate in the training of a specific target. This achieves feature filtering, overcomes the problem of inconsistent sample spaces for different targets in multi-target models, and expands the range of applicable samples.

[0161] Furthermore, while avoiding interference between different objectives, the embodiments of this application can also maintain the use of a single multi-objective model. Thus, the embodiments of this application can significantly reduce the computational load, thereby saving computational resources.

[0162] Furthermore, the training method in this application has good scalability. By adjusting the weights or modifying the model structure, the adaptability of the multi-objective model is improved, thereby extending the recommendation system containing the multi-objective model to more application areas.

[0163] To facilitate understanding of the embodiments of this application, the scheme of this application will be described below in conjunction with exemplary embodiments.

[0164] Figure 10 This is a schematic diagram illustrating an exemplary embodiment of the multi-objective model in this application. This multi-objective model is used in a video material-related recommendation system. Figure 10 As shown, the multi-objective model may include an embedding layer 601, a sharing layer 602, and a tower layer 603. This multi-objective model has three objectives: Objective 1 can be completion of the broadcast; Objective 2 can be interaction; and Objective 3 can be duration. The loss value corresponding to Objective 1 is L1, and the parameter of expert layer e1 is θe1. The loss value corresponding to Objective 2 is L2, and the parameter of expert layer e2 is θe2. The loss value corresponding to Objective 3 is L2, and the parameter of expert layer e3 is θe3.

[0165] In this embodiment, the sample features obtained after preprocessing the original sample features can have the following form: {sample identifier, (target 1, target 2, target 3), (identifier bit 1, identifier bit 2, identifier bit 3)}. Identifier bit 1 indicates whether the sample feature participates in the training of target 1. Identifier bit 2 indicates whether the sample feature participates in the training of target 2. Identifier bit 3 indicates whether the sample feature participates in the training of target 3. For example, the label can be set to (1, 0, 1). In this case, the sample feature participates in the training of target 1 and target 3, but not in the training of target 2.

[0166] For three objectives, the correlation between any two objectives can be determined in the following way.

[0167] In the first step, the gradient of the loss value for each objective with respect to the parameters in the shared layer is determined.

[0168] Specifically, the gradient can be calculated using the following formula:

[0169]

[0170] Here, i is the index of the target, and i = 1, 2, or 3. j is the index of the expert layer, and j = 1, 2, or 3. θej is the parameter of the j-th expert layer. This represents differentiation. (D) Li_ej Let be the gradient of the loss value of the i-th objective with respect to the parameters of the j-th expert layer ej.

[0171] For example, by calculating for target 1, target 2, target 3 and expert layers e1, e2, and e3 respectively, we can obtain the gradients DL1_e1, DL1_e2, and DL1_e3 of the loss value L1 with respect to the parameters of expert layers e1, e2, and e3, the gradients DL2_e1, DL2_e2, and DL2_e3 of the loss value L2 with respect to the parameters of expert layers e1, e2, and e3, and the gradients DL3_e1, DL3_e2, and DL3_e3 of the loss value L2 with respect to the parameters of expert layers e1, e2, and e3.

[0172] In the second step, the cosine similarity between every two targets is determined.

[0173] Specifically, cosine similarity can be calculated using the following formula:

[0174]

[0175] Here, p is also the index of the target, and p = 1, 2, or 3. Li_ej Let D be the gradient of the loss value for the i-th objective with respect to the parameters of the j-th expert layer ej. Lp_ej Let be the gradient of the loss value of the p-th objective with respect to the parameters of the j-th expert layer ej. It should be noted that i and p have different values. cos_ej_ip is the gradient D of the i-th objective with respect to the parameters of the j-th expert layer ej. Li_ej The gradient D of the parameters of the p-th objective relative to the j-th expert layer ej Lp_ej Cosine similarity between them.

[0176] For example, by calculating the cosine similarity for target 1, target 2, target 3, and expert layers e1, e2, and e3 respectively, the following cosine similarities can be obtained: cos_e1_12, cos_e1_23, cos_e1_13, cos_e2_12, cos_e2_23, cos_e2_13, cos_e3_12, cos_e3_23, cos_e3_13.

[0177] Here, if the cosine similarity is greater than 0, the angle between the two gradient vectors corresponding to this cosine similarity is acute. Training the two targets causes the parameters to adjust in the same or similar directions, indicating a strong correlation between the two targets. Conversely, if the cosine similarity is less than 0, the angle between the two gradient vectors corresponding to this cosine similarity is obtuse. Training the two targets causes the parameters to adjust in opposite or contradictory directions, indicating a weak correlation between the two targets.

[0178] It should be noted that since the parameters can be in matrix form, the gradients of the parameters DL1_e1, DL1_e2, DL1_e3, DL2_e1, DL2_e2, DL2_e3, DL3_e1, DL3_e2, and DL3_e3 can all be in matrix form. Furthermore, the cosine similarities obtained based on the gradients cos_e1_12, cos_e1_23, cos_e1_13, cos_e2_12, cos_e2_23, cos_e2_13, cos_e3_12, cos_e3_23, and cos_e3_13 can also be in matrix form. In this case, each cosine similarity can include multiple cosine similarity values.

[0179] In the third step, the cosine similarity values ​​in each cosine similarity are statistically analyzed.

[0180] Specifically, among multiple objectives, the cosine similarity values ​​between each pair of objectives relative to the parameters of each expert layer are statistically analyzed.

[0181] For sample features, the following formulas can be used to count the number of cosine similarity values ​​greater than 0 and the number of cosine similarity values ​​less than 0:

[0182] count ip_pos =∑ k cos_ej_ip(k) > 0 (3);

[0183] count ip_neg =∑ k cos_ej_ip(k)<0 (4).

[0184] Here, k is a positive integer, and the maximum value of k is the number of cosine similarity values ​​in the parameters; count ip_pos This represents the number of cosine similarity values ​​greater than 0 in the parameters, and count... ip_neg This represents the number of cosine similarity values ​​less than 0 in the parameters.

[0185] For example, regarding the cosine similarity cos_e2_12 obtained between target 1 and target 2 for the parameters of expert layer e2, all cosine similarity values ​​in cos_e2_12 can be statistically analyzed. For example, through the statistics of formulas (3) and (4), cos_e2_12 includes 30 cosine similarity values ​​greater than 0 and 70 cosine similarity values ​​less than 0. Therefore, the obtained statistical result is count. ip_p os The value is 30, and the count is... ip_neg It is 70.

[0186] In one embodiment, for a batch of sample data, the correlation between multiple targets can be obtained for each sample data. Then, these sample data can be statistically analyzed to obtain statistical data on the correlation between the multiple targets.

[0187] In one embodiment, for Figure 6 In a multi-objective model, the loss value for each objective can be determined using the following formula:

[0188]

[0189] Here, N is the number of samples in a batch. q is the index of a sample in the batch, and q takes values ​​of 1, 2, ..., N. s is the index of the target, and s takes values ​​of 1, 2, 3. q Lq_s is the identifier bit in the label corresponding to the q-th sample data that corresponds to the s-th target. Lq_s is the loss value corresponding to the q-th sample data and the s-th target. Ls is the average loss value of all samples corresponding to the s-th target.

[0190] After obtaining the average loss value for each objective from a batch of sample data, these average loss values ​​can be fused. Specifically, the average loss values ​​for each objective can be weighted and fused using the following formula:

[0191] L = w1×L1+w2×L2+w3×L3 (6). Here, w1, w2, and w3 are the weights corresponding to the loss values ​​L1, L2, and L3 of target 1, target 2, and target 3, respectively.

[0192] In this way, a fusion loss value can be obtained based on a batch of sample data. This fusion loss value can then be used to adjust the parameters of the multi-objective model.

[0193] Based on the same inventive concept, embodiments of this application provide a multi-objective model training device. Figure 11 This is a schematic diagram of the structure of a multi-objective model training device according to an embodiment of this application. Figure 11As shown, the multi-objective model training device 1100 includes an acquisition module 1101, a prediction score determination module 1102, a loss value determination module 1103, a correlation determination module 1104, an adjustment module 1105, and a training module 1106. The acquisition module 1101 is configured to acquire sample features. Sample features include sample user features, sample material features, and sample cross-features between sample users and sample materials. The prediction score determination module 1102 is configured to input the sample features into the multi-objective model to obtain multiple predicted scores for the sample features. Each predicted score corresponds one-to-one with a different objective of the multi-objective model. The loss value determination module 1103 is configured to determine multiple loss values ​​for the sample features based on the multiple predicted scores. Each loss value corresponds one-to-one with a different objective. The correlation determination module 1104 is configured to determine the correlation between the multiple objectives of the multi-objective model based on the multiple loss values. The adjustment module 1105 is configured to adjust the weights corresponding to the multiple objectives or modify the structure of the multi-objective model based on the correlation. Weights are used for weighted fusion of multiple loss values. Training module 1106 is configured to iteratively train the multi-objective model using sample features based on weights corresponding to multiple objectives until a preset convergence condition is met, thereby obtaining the trained multi-objective model.

[0194] In some possible implementations, the correlation determination module 1104 may be configured to: determine the gradients of multiple loss values ​​corresponding to multiple targets with respect to multiple parameters of a shared layer of a multi-target model; and determine the correlation between the multiple targets based on the gradients corresponding to the multiple targets.

[0195] In some possible implementations, the correlation determination module 1104 may be configured to determine the gradient of each of a plurality of loss values ​​relative to a plurality of parameters in a shared layer.

[0196] In some possible implementations, the correlation determination module 1104 may be configured to: determine the cosine similarity between the gradients of each pair of targets relative to the same parameter among the multiple parameters; and determine the correlation between each pair of targets based on the cosine similarity.

[0197] In some possible implementations, the adjustment module 1105 may be configured to reduce the weight corresponding to the first target when the correlation between the first target and at least one other target among a plurality of targets is an interference relationship.

[0198] In some possible implementations, the adjustment module 1105 may be configured to: cancel parameter sharing between the second target and at least one other target in a multi-target model when the correlation between the second target and at least one other target is an interference relationship.

[0199] In some possible implementations, the obtaining module 1101 may be configured to: obtain the original features of the sample; determine the feature identifier of the original features of the sample; and add a label to the feature identifier to obtain the sample features, wherein the label is used to indicate that the sample features participate in the training of at least one of a plurality of targets.

[0200] In some possible implementations, the label may include multiple identifier bits. Each identifier bit corresponds one-to-one with a plurality of targets. Each identifier bit is used to indicate whether a sample feature is involved in the training of the target corresponding to each identifier bit among the plurality of targets.

[0201] In some possible implementations, the obtaining module 1101 may be configured to: perform a hash mapping on the original features of the sample to obtain feature data encoding; and combine the feature data encoding and feature slot encoding to obtain feature identifiers, wherein the feature slot encoding is used to characterize the feature type of the original features of the sample.

[0202] It should be noted that the technical details of the multi-objective model training device in the embodiments of this application can be found in the detailed description of the multi-objective model training method described above, and will not be repeated here.

[0203] Based on the same inventive concept, this application provides an electronic device. The electronic device includes a memory and a processor. The memory stores executable instructions. When the processor executes the executable instructions stored in the memory, it implements the multi-objective model training method as described in the above embodiments.

[0204] Based on the same inventive concept, embodiments of this application provide a computer program product or computer program. The computer program product or computer program includes computer instructions. These computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the multi-objective model training method described in the above embodiments.

[0205] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing executable instructions. The computer-readable storage medium stores executable instructions. When the executable instructions are executed by a processor, the processor will cause the processor to execute the multi-objective model training method described in the above embodiments.

[0206] In some embodiments, the computer-readable storage medium may be a non-volatile computer-readable storage medium, such as a memory like FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0207] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0208] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).

[0209] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0210] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A multi-objective model training method, characterized in that, The method includes: Obtain sample features, wherein the sample features include sample user features, sample material features, and sample cross features between sample users and sample materials, wherein the sample material is of video type, the sample user features are used to represent the information of the sample user, the sample material features are used to represent the information of the sample material, and the sample cross features are used to represent the matching information between the sample user and the sample material; The sample features are input into a multi-objective model to obtain multiple predicted scores for the sample features, wherein the multiple predicted scores correspond one-to-one with multiple recommendation targets of the multi-objective model, and the multiple recommendation targets are video recommendation targets; Based on the multiple predicted scores of the sample features, multiple loss values ​​of the sample features are determined, wherein the multiple loss values ​​correspond one-to-one with the multiple recommendation targets; Based on the multiple loss values, the correlation between the multiple recommendation objectives of the multi-objective model is determined; Based on the correlation, the structure of the multi-objective model is modified; and Based on the weights corresponding to the multiple recommendation objectives, the sample features are used to iteratively train the multi-objective model until a preset convergence condition is met, so as to obtain the trained multi-objective model, wherein the weights are used for weighted fusion of the multiple loss values; The step of modifying the structure of the multi-objective model based on the correlation includes: If the correlation between the second recommended target and at least one other recommended target among the multiple recommended targets is an interference relationship, then parameter sharing between the second recommended target and the at least one recommended target in the shared layer of the multi-objective model is cancelled.

2. The method according to claim 1, characterized in that, The step of determining the correlation between the multiple recommendation objectives of the multi-objective model based on the multiple loss values ​​includes: Determine the gradients of the plurality of loss values ​​corresponding to the plurality of recommendation objectives with respect to the plurality of parameters in the shared layer of the multi-objective model; and The correlation between the multiple recommendation objectives is determined based on the gradients corresponding to the multiple recommendation objectives.

3. The method according to claim 2, characterized in that, Determining the gradients of the multiple loss values ​​corresponding to the multiple recommendation objectives with respect to multiple parameters in the shared layer of the multi-objective model includes: Determine the gradient of each of the plurality of loss values ​​relative to the plurality of parameters in the shared layer.

4. The method according to claim 2 or 3, characterized in that, Determining the correlation between the multiple recommendation objectives based on the gradients corresponding to the multiple recommendation objectives includes: Determine the cosine similarity between the gradients of each pair of recommendation targets relative to the same parameter among the plurality of parameters; and The correlation between each pair of recommended targets is determined based on the cosine similarity.

5. The method according to claim 1, wherein, The method further includes: Based on the relevance, the weights corresponding to the multiple recommendation targets are adjusted.

6. The method according to claim 5, characterized in that, The step of adjusting the weights corresponding to the plurality of recommendation targets based on the relevance includes: If the correlation between the first recommended target and at least one other recommended target among the plurality of recommended targets is an interference relationship, the weight corresponding to the first recommended target shall be reduced.

7. The method according to claim 1, characterized in that, The obtained sample features include: Obtain the original features of the sample; The feature identifier that determines the original features of the sample; and A label is added to the feature identifier to obtain the sample feature, wherein the label is used to indicate that the sample feature participates in the training of at least one of the plurality of recommendation targets.

8. The method according to claim 7, characterized in that, The label includes multiple identifier bits, each of which corresponds one-to-one with the multiple recommendation targets. Each of the multiple identifier bits is used to indicate whether the sample feature participates in the training of the recommendation target corresponding to each of the multiple recommendation targets.

9. The method according to claim 7, characterized in that, The feature identifier used to determine the original features of the sample includes: The original features of the sample are hashed to obtain feature data encoding; and The feature data encoding and feature slot encoding are combined to obtain the feature identifier, wherein the feature slot encoding is used to characterize the feature type of the original feature of the sample.

10. A multi-objective model training device, characterized in that, The device includes: The acquisition module is configured to acquire sample features, wherein the sample features include sample user features, sample material features, and sample cross features between sample users and sample materials, wherein the sample material is of video type, the sample user features are used to represent the information of the sample user, the sample material features are used to represent the information of the sample material, and the sample cross features are used to represent the matching information between the sample user and the sample material; The prediction score determination module is configured to input the sample features into a multi-objective model to obtain multiple predicted scores for the sample features, wherein the multiple predicted scores correspond one-to-one with multiple recommendation targets of the multi-objective model, and the multiple recommendation targets are video recommendation targets; The loss value determination module is configured to determine multiple loss values ​​for the sample features based on the multiple predicted scores of the sample features, wherein the multiple loss values ​​correspond one-to-one with the multiple recommendation targets; The correlation determination module is configured to determine the correlation between the multiple recommendation objectives of the multi-objective model based on the multiple loss values. The adjustment module is configured to modify the structure of the multi-objective model based on the correlation; and The training module is configured to iteratively train the multi-objective model using the sample features based on the weights corresponding to the multiple recommendation objectives until a preset convergence condition is met, so as to obtain the trained multi-objective model, wherein the weights are used for weighted fusion of the multiple loss values; The adjustment module is configured as follows: If the correlation between the second recommended target and at least one other recommended target among the multiple recommended targets is an interference relationship, then parameter sharing between the second recommended target and the at least one recommended target in the shared layer of the multi-objective model is cancelled.

11. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable instructions; The processor, when executing executable instructions stored in the memory, implements the multi-objective model training method as described in any one of claims 1 to 9.

12. A computer-readable storage medium having executable instructions stored thereon, characterized in that, When the executable instructions are executed by the processor, they implement the multi-objective model training method as described in any one of claims 1 to 9.