Content recommendation method and apparatus, electronic device, storage medium, and program product

By acquiring and adjusting the personalized identifiers and object features of the objects to be recommended, and then concatenating and encoding them to obtain the target vector, the problem that existing content recommendation models cannot meet personalized needs is solved, and more accurate content recommendations are achieved.

CN116932878BActive Publication Date: 2026-03-03TENCENT TECHNOLOGY (SHENZHEN) CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210359744.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-06
Publication Date
2026-03-03
Estimated Expiration
2042-04-06

AI Technical Summary

Technical Problem

Existing content recommendation models cannot meet the diverse and ever-changing personalized needs of the recommended users, resulting in low accuracy of recommended content.

Method used

By obtaining the personalized identifier and object features of the object to be recommended, concatenating and encoding them to obtain an initial encoding vector, and adjusting the initial encoding vector according to the target parameters corresponding to the personalized identifier, the target vector is determined to recommend content that matches the personalized identifier.

Benefits of technology

It improves the accuracy of content recommendations and meets the diverse and ever-changing personalized needs of the recommended users.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116932878B_ABST
    Figure CN116932878B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a content recommendation method and device, electronic equipment, a storage medium and a program product; an embodiment of the present application obtains a personalized identifier of a to-be-recommended object and an object feature of the to-be-recommended object; splices the personalized identifier and the object feature to obtain a spliced object feature; encodes the spliced object feature to obtain an initial encoding vector; adjusts the initial encoding vector through a target parameter corresponding to the personalized identifier to obtain a target vector; determines a target content corresponding to the target vector, and recommends the target content to the to-be-recommended object. Thus, in the content recommendation process, the present application can increase the attention to the personalized identifier, provide push content related to the personalized identifier, meet the recommendation demand of the to-be-recommended object, and improve the accuracy of the push content.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, specifically to a content recommendation method, apparatus, electronic device, storage medium, and program product. Background Technology

[0002] With the development of internet technology, more and more content platforms are recommending content to different users based on content recommendation services. However, current content recommendation services mainly rely on content recommendation models, and the content recommended by these models often does not meet the user's needs, resulting in low accuracy. Summary of the Invention

[0003] This application provides a content recommendation method, apparatus, electronic device, storage medium, and program product that can improve the accuracy of pushed content.

[0004] This application provides a content recommendation method, including: obtaining a personalized identifier of an object to be recommended and object features of the object to be recommended; concatenating the personalized identifier and the object features to obtain concatenated object features; encoding the concatenated object features to obtain an initial encoding vector; adjusting the initial encoding vector using target parameters corresponding to the personalized identifier to obtain a target vector; determining the target content corresponding to the target vector; and recommending the target content to the object to be recommended.

[0005] This application embodiment also provides a content recommendation device, including: an acquisition unit, configured to acquire a personalized identifier of an object to be recommended and object features of the object to be recommended; a splicing unit, configured to splice the personalized identifier and the object features to obtain spliced ​​object features; an encoding unit, configured to encode the spliced ​​object features to obtain an initial encoding vector; an adjustment unit, configured to adjust the initial encoding vector using target parameters corresponding to the personalized identifier to obtain a target vector; and a recommendation unit, configured to determine the target content corresponding to the target vector and recommend the target content to the object to be recommended.

[0006] This application also provides an electronic device, including a processor and a memory, wherein the memory stores a plurality of instructions; the processor loads instructions from the memory to execute steps in any of the content recommendation methods provided in this application.

[0007] This application also provides a computer-readable storage medium storing a plurality of instructions adapted for loading by a processor to execute steps in any of the content recommendation methods provided in this application.

[0008] This application also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps in any of the content recommendation methods provided in this application.

[0009] This application embodiment can obtain the personalized identifier of the object to be recommended and the object features of the object to be recommended; concatenate the personalized identifier and the object features to obtain concatenated object features; encode the concatenated object features to obtain an initial encoding vector; adjust the initial encoding vector through the target parameters corresponding to the personalized identifier to obtain a target vector; determine the target content corresponding to the target vector, and recommend the target content to the object to be recommended.

[0010] In this application, the solution provided in the embodiments of this application can concatenate and encode an initial encoding vector based on personalized identifiers and object characteristics. This increases the focus on personalized identifiers during the content recommendation process, providing push content related to the personalized identifiers. The initial encoding vector is then adjusted using target parameters corresponding to the personalized identifiers, enabling the initial encoding vector to learn the information corresponding to the personalized identifiers through the target parameters. This further increases the focus on personalized identifiers, recommending content that matches the personalized identifiers, meeting the recommendation needs of the target audience, and improving the accuracy of the pushed content. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1a This is a schematic diagram of a scenario illustrating the content recommendation method provided in an embodiment of this application;

[0013] Figure 1b This is a flowchart illustrating the content recommendation method provided in an embodiment of this application;

[0014] Figure 2a This is a schematic diagram of the content recommendation model provided in the embodiments of this application;

[0015] Figure 2b This is a flowchart illustrating a content recommendation method provided in another embodiment of this application;

[0016] Figure 2c This is a schematic diagram of the structure of the target content recommendation model provided in the embodiments of this application;

[0017] Figure 2dThis is a schematic diagram of the process of using a target content recommendation model for content recommendation provided in an embodiment of this application;

[0018] Figure 2e These are experimental results provided in this application embodiment of the scenario for evaluating the single-attribute fairness requirement based on the dataset of content platform 1;

[0019] Figure 2f These are experimental results provided in this application embodiment of the scenario for evaluating the single-attribute fairness requirement based on the dataset of content platform 2;

[0020] Figure 2g These are experimental results provided in the embodiments of this application for evaluating the fairness requirements of composite attributes in scenarios based on datasets from content platform 1 and content platform 2, respectively;

[0021] Figure 3 This is a flowchart illustrating a content recommendation method provided in another embodiment of this application;

[0022] Figure 4 This is a schematic diagram of the structure of the content recommendation device provided in the embodiments of this application;

[0023] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0024] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] This application provides a content recommendation method, apparatus, electronic device, storage medium, and program product.

[0026] Specifically, the content recommendation device can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet, smart Bluetooth device, laptop, or personal computer (PC); the server can be a single server or a server cluster consisting of multiple servers.

[0027] In some embodiments, the content recommendation device can also be integrated into multiple electronic devices. For example, the content recommendation device can be integrated into multiple servers, and the content recommendation method of this application can be implemented by multiple servers.

[0028] In some embodiments, the server may also be implemented as a terminal.

[0029] For example, refer to Figure 1a The content recommendation method is integrated into the server, which can obtain the personalized identifier and object features of the object to be recommended; concatenate the personalized identifier and object features to obtain the concatenated object features; encode the concatenated object features to obtain the initial encoding vector; adjust the initial encoding vector according to the target parameters corresponding to the personalized identifier to obtain the target vector; determine the target content corresponding to the target vector, and recommend the target content to the client using the object to be recommended.

[0030] Content recommendation models have been applied to various aspects of life, and fairness is a crucial aspect of these models. The goal of personalized recommendation is to provide suitable items for the target audience, and its core challenge is accurately capturing the target audience's preferences from their features. Because the target audience may have certain requirements regarding the fairness of the recommendation, for example, they might want recommendations for products unrelated to any attribute. Furthermore, the same target audience may have different recommendation needs in different scenarios and at different times. For instance, when buying electronics, they might expect recommendations for products unrelated to attribute A, while when buying clothing, they might expect recommendations for products unrelated to attribute B. Existing content recommendation models typically assume that the target audience needs absolutely fair recommendations (recommendations that perfectly match their features), which fails to meet the diverse and changing needs of target audiences.

[0031] However, the solution provided in this application can concatenate and encode an initial encoding vector based on personalized identifiers and object characteristics. This increases the focus on personalized identifiers during content recommendation, providing push content related to those identifiers. The initial encoding vector is then adjusted using target parameters corresponding to the personalized identifiers, enabling it to learn information about the personalized identifiers through these parameters. This further increases the focus on personalized identifiers, recommending content that matches them, meeting the recommendation needs of the target audience, and improving the accuracy of the pushed content.

[0032] The following sections provide detailed explanations. It is understood that in the specific embodiments of this application, data related to object characteristics, operations, attributes, and identifiers are involved. When these embodiments are applied to specific products or technologies, permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0033] Artificial intelligence (AI) is a technology that uses digital computers to simulate human perception of the environment, acquisition of knowledge, and use of that knowledge. This technology can enable machines to possess functions similar to human perception, reasoning, and decision-making. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, speech processing, natural language processing, as well as machine learning / deep learning, autonomous driving, and intelligent transportation.

[0034] Machine learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory, among others. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.

[0035] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, smart customer service, vehicle networking, and intelligent transportation. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.

[0036] In this embodiment, a content recommendation method involving artificial intelligence is provided, such as... Figure 1b As shown, the specific process of this content recommendation method can be summarized as follows:

[0037] 110. Obtain the personalized identifier and object characteristics of the object to be recommended.

[0038] The "object to be recommended" can refer to an object that performs interactive behavior on a content platform that provides the recommended content. For example, the content platform can be a service platform that provides various types of content, and the object to be recommended can obtain content and use content services through the content platform. The type of content is not limited in this application; for example, it can be various types of content such as video, audio, games, live streaming, and online shopping. That is, the solution provided in the embodiments of this application can be applied to content platforms that provide different types of content, as well as comprehensive content platforms that provide multiple types of content.

[0039] Personalized identifiers can refer to identifier information used to characterize the features or characteristics of the object to be recommended. Personalized identifiers can be attribute information related to the object, information representing the object's preference for recommended content, and so on. For example, with the object's permission, multiple attribute information of the object can be used as its personalized identifier. Alternatively, a personalized identifier can be an identifier that characterizes the object's preference for recommended content, obtained after training an initial adjustment network using an initial identifier. In some implementations, personalized identifiers can be identifiers corresponding to the target scenario.

[0040] Among them, object features may include, but are not limited to, object operation features. For example, interactive operations performed by an object on a content platform (such as clicking, purchasing, etc.). The content platform service can store an interactive operation record. With the permission of the object to be recommended, it can obtain all or part of the interactive operation records of the object to be recommended as object features of the object to be recommended.

[0041] In some implementations, to ensure that the acquired personalized identifier can characterize the preferences of the target user for recommended content and that the recommended content matches the target user's needs, the corresponding personalized identifier can be determined based on the target user's selection actions. Specifically, acquiring the personalized identifier of the target user may include:

[0042] In response to the target scene selection operation of the object to be recommended, the identifier of the corresponding target scene is obtained as the personalized identifier of the object to be recommended.

[0043] The target scene can refer to a scene selected from at least one preset scene based on the selection operation of the object to be recommended. For example, at least one control can be displayed on the terminal's display interface, and each control corresponds to a preset scene. When the object to be recommended touches any control, the preset scene corresponding to that control becomes the target scene. At this time, the identifier corresponding to the target scene can be obtained as the personalized identifier of the object to be recommended.

[0044] In some implementations, the personalized identifier of the object to be recommended can be the identifier of the corresponding target scenario.

[0045] For example, in some implementations, an object can have multiple attributes across different dimensions. The specific information for each attribute corresponding to any one dimension is called attribute information. The identifier for the target scenario can include all or part of the attribute information of the object to be recommended. For instance, preset scenarios corresponding to at least one attribute dimension can be set, and different identifiers can be set for different preset scenarios. For example, an object can include attributes A, B, and C. Preset scenario 1 corresponding to attribute A, preset scenario 2 corresponding to attribute B, preset scenario 3 corresponding to attribute C, preset scenario 4 corresponding to attributes A and B, preset scenario 5 corresponding to attributes A and C, preset scenario 6 corresponding to attributes B and C, and preset scenario 7 corresponding to attributes A, B, and C can be set. Preset scenarios 1 through 7 correspond to identifiers 1 through 7, respectively. Since content platforms generally pay attention to all dimensions of the attributes of the object to be recommended when recommending content, they ensure that the recommended content matches the attribute information of all dimensions of the object. However, in the solution provided in this application embodiment, the target object can select different preset scenarios to choose the attribute information of all or some dimensions that the content platform focuses on when recommending content. Recommended content is then filtered based on the attribute information of the focused dimensions, ensuring that the recommended content matches the attribute information of the focused dimensions, while attribute information of other unfocused dimensions is not used for filtering. For example, if the target object does not want to receive recommended content for attribute B, it can select preset scenario 5 as the target scenario to add the personalized identifier corresponding to that scenario to the object's features. Thus, when the content platform recommends content to the target object, it will focus on the attribute information of attribute A and attribute C corresponding to the target scenario, but not on the attribute information of attribute B. Therefore, the target object can determine its recommendation needs for any attribute by selecting any preset scenario as the target scenario, satisfying its recommendation needs and improving the accuracy of the pushed content.

[0046] In some implementations, when the identifier of the target scenario includes some attribute information of the object to be recommended, the identifier of the target scenario may also include a preset character. For example, when the preset scenario corresponds to attributes of all dimensions, the identifier of the preset scenario may include attribute information of the recommended object corresponding to attribute A, attribute information of the recommended object corresponding to attribute B, and attribute information of the recommended object corresponding to attribute C. When the preset scenario corresponds to attributes of some dimensions, such as preset scenario 5 corresponding to attributes A and C, the identifier of preset scenario 5 may include attribute information of the recommended object corresponding to attribute A, a preset character, and attribute information of the recommended object corresponding to attribute C. In this case, the preset character is a character used to replace attribute information of attribute B. Thus, when the content platform recommends content, it will pay attention to attribute information of attribute A and attribute information of attribute C. Since attribute B is replaced by the preset character, the content platform cannot pay attention to attribute information of attribute B.

[0047] For example, in some implementations, the identifier for the target scene can be the identifier obtained after training the network using the training sample set for the target scene and the initial identifier.

[0048] The sample set corresponding to the target scene can be a sample set with labels set for the target scene. During training, these sample labels can be used as ground truth values, and the initial network output can be used as predicted values. By calculating the loss between the ground truth values ​​and predicted values ​​of the training samples, the parameters and output of the initially adjusted network are mapped to the target scene. The training sample set can include multiple sample object features. A sample object can refer to an object used as a training sample. Sample object features can refer to the object characteristics of the sample object.

[0049] The identifier corresponding to the target scene can include the target identifier or attribute information of the object to be recommended. Correspondingly, the initial identifier can include a preset identifier or attribute information of the sample object. For example, the initial identifier can be a randomly generated symbol vector or an attribute vector of the sample object. The target identifier is obtained from the preset identifier after the network is trained during initial adjustment. For example, the training sample object features for any sample object can be represented as (A, C), or as (A, B, C), where A represents the randomly generated symbol vector, B represents the attribute vector of the sample object, and C represents the object feature of the sample object.

[0050] The initial adjustment network can be a pre-set network for adjusting the initial identifier, such as at least one of the following, including but not limited to Transformer networks or multilayer sensing networks.

[0051] During the initial adjustment network training, a training sample set including features of multiple sample objects and multiple initial labels can be obtained. The initial labels and each sample object feature are concatenated to obtain the training object features. These training object features are then used to train the initial adjustment network, resulting in the target adjustment network. The vector corresponding to the initial label position in the output at the end of training is used as the label for the corresponding target scene. For example, if the initial labels include the attribute information of the sample objects, multiple different sample object features can be selected as the training sample set during training. The attribute information of these multiple different sample objects is obtained, and the attribute information and object features of each sample object are concatenated, encoded, and adjusted. Since the attribute information of different sample objects is different, such as the information of attribute A corresponding to sample object A and sample object B being a1 and a2 respectively, the vectors b1 and b2 corresponding to the positions of attributes a1 and a2 in the output at the end of training can be regarded as vector mapping results of the information of attribute A corresponding to sample object A and sample object B, respectively. Therefore, when recommending content to an object, the attribute information of the object can be obtained, and the vector corresponding to the attribute information of the object can be obtained from the training output as the identifier corresponding to the attribute information in its personalized identifier. For example, if the information of attribute A corresponding to the object to be recommended can be a1, then b1 obtained after training can be obtained as the mapping result of attribute A of the object to be recommended, and b1 can be concatenated with the object features of the object to be recommended as the attribute information of the object to be recommended.

[0052] In some implementations, the identifier corresponding to the target scene may include the target identifier and the attribute information of the object to be recommended, and the initial identifier may include a preset identifier and the attribute information of the sample object.

[0053] During the initial adjustment network training, a preset identifier, a training sample set including features of multiple sample objects, and multiple initial identifiers can be obtained. For each sample object, the preset identifier, initial identifier, and sample object features are concatenated to obtain the object features used for training. The initial adjustment network is then trained using these object features to obtain the target adjustment network. The vector corresponding to the preset identifier and the position of the initial identifier in the output result at the end of training is used as the identifier for the corresponding target scene. Specifically, the vector corresponding to the preset identifier position in the output result is the aforementioned target identifier. When recommending content to the object to be recommended, the attribute information of the object to be recommended can be obtained. The vector corresponding to the attribute information of the object to be recommended is obtained from the training output result and used as the identifier corresponding to the attribute information in its personalized identifier. The target identifier is also obtained, and the target identifier and the vector corresponding to the attribute information of the object to be recommended are used as the identifier for the corresponding target scene.

[0054] By obtaining the vector mapping results of target identifiers or attribute information of recommended objects in personalized identifiers through the training results obtained when adjusting the network at the initial training stage, the vectors of target identifiers or attribute information of objects in the target scene identifiers can carry information of the target scene. This can further increase the attention of the content recommendation algorithm model to its corresponding target scene, provide more accurate push content, and meet the recommendation needs of the recommended objects.

[0055] 120. Combine the personalized identifier and object features to obtain the combined object features.

[0056] Personalized identifiers and object features can be combined using a concatenation method to obtain concatenated object features. For example, personalized identifiers and object features can be compiled and vectorized to obtain personalized identifiers and object features represented in vector form. Then, the vectors of personalized identifiers and object features can be concatenated. The concatenation order is not limited here and can be selected according to the application scenario or different neural network models.

[0057] 130. Encode the features of the concatenated objects to obtain the initial encoding vector.

[0058] The concatenated object features can be encoded using a Long Short-Term Memory (LSTM) network or an attention network to obtain an initial encoding vector. The attention network can be a multi-head attention network or a self-attention network.

[0059] In some implementations, to obtain the correlation between personalized identifiers and object features, the concatenated object features can be weighted using an attention mechanism to obtain an initial encoding vector. Since the attention mechanism can be used for feature importance filtering—that is, enhancing information from important parts and suppressing information from unimportant parts—weighting the concatenated object features using an attention mechanism can enhance the learning effect between personalized identifiers and object features. Especially when the personalized identifier corresponds to the target scene, and the object features include object operation features and object attribute information, the global attention network using the attention mechanism can increase the learning effect between personalized identifiers and object attribute information, increase attention to the attribute information corresponding to the personalized identifier, provide more accurate push content, and meet the recommendation needs of the target object.

[0060] This application argues that there is a correlation between personalized identifiers and object features, and this correlation can be captured through an attention mechanism. For example, to enhance the learning effect on the relationship between personalized identifiers, object operation features, and object attribute information, and to improve model training efficiency, a multi-head attention network can be used to encode the concatenated object features to obtain an initial encoding vector. The multi-head attention network mainly consists of multi-head self-attention layers. Through the attention mechanism, and via the parameter matrix W... Q (Request Vector Parameter Matrix), W K (Key vector parameter matrix) and W V The (value vector parameter matrix) performs linear transformations on the concatenated object feature vectors to obtain attention weights Q (request vector sequence), K (key vector sequence), and V (value vector sequence). The initial encoding vector is then calculated by weighting the concatenated object feature vectors based on Q, K, and V. Where W... Q W K and W V It is learned during the training process. Therefore, through multi-head attention networks, each position of the concatenated object feature vector can capture information from the entire sequence, enabling the learning of features across different dimensions.

[0061] For example, in practical applications, a multi-head attention network (MLP) can include multiple encoding layers, each containing a MLP layer, and may also include a feedforward neural network layer (MLP) connected after the MLP layers. The concatenated object features can be input into the MLP. After performing self-attention computation on the input vector, the MLP of the encoding layers sends the result to the feedforward neural network layer of that layer. The feedforward neural network layer then processes the result and sends it to the next encoding layer, repeating this process until all encoding layers have been executed, resulting in the initial encoded vector. Furthermore, a LayerNorm operation can be applied before each decoding layer, and residual connections can be applied after each decoding layer.

[0062] 140. By adjusting the target parameters corresponding to the personalized identifier, the initial encoding vector is obtained.

[0063] The target parameter can refer to the parameters used to adjust the initial encoding vector into a target vector corresponding to the personalized identifier. The target parameter can include, but is not limited to, at least one of the following: normalization parameter, weight parameter, bias parameter, deviation parameter, residual parameter, activation parameter, etc.

[0064] In some implementations, the target parameters can be parameters in the target adjustment network. By personalizing the target parameters, the initial encoding vector is adjusted to obtain the target vector. This can include adjusting the initial encoding vector through the target adjustment network to obtain the target vector.

[0065] The target adjustment network can be a pre-set adjustment network used to adjust the initial encoding vector, or it can be a network obtained after training the aforementioned initial adjustment network. The target adjustment network can include, but is not limited to, at least one of Transformer networks or multilayer perceptron networks.

[0066] For example, in some implementations, the target parameters may include normalization parameters and weighting coefficients. By personalizing the target parameters and adjusting the initial encoding vector, the target vector can be obtained, which may include:

[0067] The initial encoded vector is normalized using normalization parameters to obtain an intermediate vector;

[0068] The target vector is obtained by weighting the intermediate vector using weighting coefficients.

[0069] The normalization parameter refers to the parameter used for normalization processing. For example, the normalization parameter can be a Softmax function, a sigmoid function, or a MySQL function. Normalization processing refers to adjusting the values ​​of the initial encoded vector to a preset numerical range using the normalization parameter; that is, the values ​​of the intermediate vector obtained after normalization processing are within the preset range. In practical applications, after weighting the intermediate vector using weight coefficients, the process can further include bias calculations on the weighted result using deviation values ​​to obtain the target vector.

[0070] The weighting coefficient refers to the parameter used to weight the intermediate vector. By using the weighting coefficient to weight the intermediate vector, the weights of the values ​​in the intermediate vector can be adjusted, thereby adjusting the weights of the values ​​corresponding to personalized identifiers and object features.

[0071] In some implementations, the target adjustment network may include a target normalization network and a first target multilayer sensing network. The normalization parameters can be parameters of the target normalization network, and the weight coefficients can be parameters of a second target multilayer sensing network. Normalizing the initial encoded vector using the normalization parameters to obtain an intermediate vector may include: normalizing the initial encoded vector using the target normalization network to obtain an intermediate vector. Weighting and summing the intermediate vector using the weight coefficients to obtain the target vector may include: weighting the intermediate vector using the first target multilayer sensing network to obtain the target vector.

[0072] Therefore, by normalizing the initial input encoding vector through a target normalization network, the influence of dimensionality between personalized identifiers and object features can be eliminated, simplifying the input vector. Then, a first-target multilayer perceptron network weights the intermediate vector output by the target normalization network to adjust the weights of the values ​​in the intermediate vector. Since weighting enhances the features at corresponding positions, it strengthens the information of important parts, making the output target vector more focused on the information corresponding to the personalized identifiers of the recommended object. This allows for the recommendation of content that matches the personalized identifiers, meeting the recommendation needs of the target object and improving the accuracy of the pushed content.

[0073] For example, in practical applications, the first-target multilayer perceptron can be a neural network with a unidirectional structure, including an input layer, hidden layers, and an output layer. The layers are fully connected, each layer contains several neurons arranged hierarchically, with no interconnections between neurons within the same layer. Information transmission between layers occurs only in one direction. Each neuron takes the outputs of the nodes in the previous layer as input, performs a linear transformation (combined with bias) through weight coefficients, and then applies a non-linear function activation, making the data linearly separable in the output layer. The output of each node is then passed to the nodes in the next layer. It should be noted that the input layer does not perform any processing on the input vector. Thus, through the multilayer processing of the first-target multilayer perceptron, feature extraction can be performed through the linear transformation process of each layer, learning the interaction between personalized identifiers and object features, and adjusting the intermediate input vector into a feature vector that better reflects the personalized identifier information of the object to be recommended.

[0074] For example, in practical applications, a network model can be set up that includes multiple multi-head attention networks and multiple target adjustment networks. This network model repeatedly executes steps 130-140 on the concatenated object feature vector until the final layer, the first target multilayer perceptron, outputs the target vector. For instance, each multi-head attention network includes an encoding layer, and each multi-head attention network is sequentially connected to a target adjustment network. When the concatenated object feature vector is input into this network model, it sequentially passes through a multi-head attention network and a target adjustment network for encoding, normalization, and weighting. The processing result is then sent to the next multi-head attention network, and the corresponding processing is repeated until all multiple multi-head attention networks and multiple target adjustment networks have completed their execution, resulting in the target vector. Thus, through multiple encodings and the normalization and weighting of the encoding results, the attention paid to the personalized identifiers of the target object can be increased through repeated learning and adjustment processes. This allows for the recommendation of content that matches the personalized identifiers, meeting the recommendation needs of the target object and improving the accuracy of the pushed content.

[0075] 150. Determine the target content corresponding to the target vector and recommend the target content to the objects to be recommended.

[0076] The target content is determined based on the target vector. For example, various recommendation algorithms can be used to determine the content corresponding to the target vector, and the content platform can then recommend this content to the target audience. Different recommendation algorithms can determine the content corresponding to the target vector through their respective algorithm models. Recommendation algorithm models can include, but are not limited to, collaborative filtering recommendation algorithm models, factorization machine algorithm models, or matrix factorization algorithms.

[0077] For example, in practical applications, a content recommendation algorithm model can be used to process the input target vector and output a recommendation sequence. This recommendation sequence can include multiple target contents or target content identifiers determined based on the target vector. For instance, when the content is video, the target content can be the video identifiers corresponding to multiple videos. The content platform can obtain and display preview interfaces of multiple videos on the display interface of the terminal using the device to be recommended the video from the recommendation sequence.

[0078] In some implementations, the aforementioned target adjustment network can be trained by the following steps to adjust the parameters in the target adjustment network to target parameters corresponding to the personalized identifier. Specifically, before obtaining the personalized identifier of the object to be recommended and the object features of the object to be recommended, the following steps may also be included:

[0079] Obtain the initial adjustment network and the initial discrimination network;

[0080] Adversarial training is performed on the initial adjustment network and the initial discriminator network to obtain the target adjustment network, which is used to adjust the initial encoding vector according to the target parameters.

[0081] The initial adjustment network can be a pre-set adjustment network based on the application scenario or experience, and the initial discrimination network can be a pre-set discrimination network based on the application scenario or experience.

[0082] In this embodiment, during training, an initial adjustment network is used as the generator network, and an initial discriminator network is introduced to judge the output of the initial adjustment network. The initial adjustment network and the initial discriminator network are trained alternately to adjust the parameters of the initial adjustment network until the target adjustment network is reached. Thus, through adversarial training, the parameters in the initial adjustment network are adjusted to target parameters corresponding to the personalized identifier. This improves the initial adjustment network's ability to adjust the initial encoding vector, and the target parameters can be used to adjust the initial encoding vector, thereby enhancing the information in important parts. This makes the output target vector more focused on the information corresponding to the personalized identifier of the object to be recommended, thus recommending content that matches the personalized identifier and meeting the recommendation requirements of the object to be recommended. Furthermore, the method in this embodiment includes encoding, adjusting, and determining target content. During training, only the target adjustment network used for the adjustment process is adjusted, not the networks used for encoding and determining the target content. This reduces the number of parameters that need to be adjusted during training, improving training efficiency.

[0083] For example, in adversarial training, after the initial adjustment network processes the training samples, the adjustment result is input into the initial discriminator network. The initial discriminator network can then discriminate the training samples and update the parameters in the initial adjustment network based on the discrimination result. This iterative training continues until the loss function corresponding to the discrimination result converges, thus obtaining the target adjustment network.

[0084] In some implementations, obtaining the initial adjustment network and the initial discrimination network may include:

[0085] An initial adjustment network is constructed based on the initial normalization network and the first initial multilayer sensing network. The initial normalization network and the first initial multilayer sensing network are used to adjust the input vector through initial parameters.

[0086] An initial discrimination network is constructed based on a second initial multilayer sensing network. The second initial multilayer sensing network is used to determine the discrimination result of the target adjustment network output.

[0087] The initial parameters can be parameters used in the initial adjustment network, and may include, but are not limited to, at least one of the following: normalization parameters, weight parameters, bias parameters, deviation parameters, residual parameters, activation parameters, etc. In some implementations, the initial parameters may include initial normalization parameters and initial weight coefficients. Through the aforementioned adversarial training process, the initial normalization parameters and initial weight coefficients in the initial adjustment network can be adjusted to the aforementioned normalization parameters and weight coefficients.

[0088] For example, in practical applications, the second target multilayer perceptron can be a neural network with a unidirectional structure, including an input layer, hidden layers, and an output layer. The connection relationships and functions of each layer in the second target multilayer perceptron can be found in the aforementioned first target multilayer perceptron. Thus, through the multilayer processing of the second target multilayer perceptron, the linear transformation process of each layer is used to classify the output of the target adjustment network, obtaining the classification result as the discrimination result.

[0089] By constructing an initial normalization network and an initial adjustment network using a first initial multilayer perceptual network, and an initial discrimination network using a second initial multilayer perceptual network, the initial adjustment network and the initial discrimination network have simple structures with only a few parameters, achieving parameter saving and improving training efficiency.

[0090] In some implementations, adversarial training is performed on the initial adjustment network and the initial discriminator network to obtain the target adjustment network, which may include:

[0091] Obtain the preset encoding network, initial identifier, and training sample set corresponding to the target scene. The training sample set includes features of multiple sample objects.

[0092] The initial identifier and sample object features are combined to obtain the combined sample object features;

[0093] The concatenated sample object features are input into a preset encoding network, and the concatenated sample object features are encoded to obtain a sample encoding vector;

[0094] Input the sample encoding vector into the initial adjustment network to obtain the training encoding vector;

[0095] The training encoded vectors are input into the initial discrimination network to obtain the discrimination results;

[0096] Based on the discrimination results, the initial adjustment network and the initial discrimination network are trained alternately using a preset loss function to obtain the target adjustment network and personalized labels. The personalized labels are the labels of the corresponding target scenes.

[0097] Here, the sample set corresponding to the target scene can be a sample set with labels set for the target scene. During training, these sample labels can be used as ground truth values, and the initial network output can be used as predicted values. By calculating the loss between the ground truth values ​​and predicted values ​​of the training samples, the parameters and output of the initially adjusted network are mapped to the target scene. The sample object can refer to the object used as a training sample. The sample object features can refer to the object characteristics of the sample object.

[0098] The preset encoding network can be a pre-trained network used for encoding, such as a Long Short-Term Memory (LSTM) network or an attention network. It should be noted that the preset encoding network can be a pre-trained network used for encoding. During the adversarial training process in this embodiment, the preset encoding network is used to encode the features of the concatenated sample objects and its network parameters are not adjusted during iterative training.

[0099] The preset loss function refers to a pre-set function used to evaluate whether training is complete. For example, the preset loss function can be used to evaluate the degree of difference between the predicted value and the true value. It can be any kind of loss function, such as the logarithmic loss function, the squared loss function, the exponential loss function, or the Hinge loss function, etc., which can be set according to specific needs.

[0100] During adversarial training, initial identifiers are added to the training samples to train personalized identifiers. These personalized identifiers also learn and carry information about the target scene. For example, when the target adjustment network is obtained after adversarial training, the value at the corresponding position of the initial identifier in the training encoding vector output by the target adjustment network can be used as the personalized identifier. When encoding the concatenated object features using Long Short-Term Memory (LSTM) networks or attention networks, or when adjusting the initial encoding vector through the target adjustment network, personalized identifiers can leverage their learning effect with object attribute information to increase attention to the attribute information corresponding to the personalized identifier, providing more accurate content recommendations and meeting the recommendation needs of the target audience. When the content recommendation algorithm model determines the target content based on the target vector, personalized identifiers can further increase the algorithm model's attention to the corresponding attribute information, providing more accurate content recommendations and meeting the recommendation needs of the target audience.

[0101] For example, in adversarial training, a pre-defined encoding network can encode the features of the concatenated sample objects, resulting in a sample encoding vector. This vector is then adjusted by an initial adjustment network to obtain a training encoding vector. An initial discriminator network can classify the training encoding vector using a second initial multilayer perceptron. Based on the classification result, the attribute information of the sample objects represented by the training encoding vector is used as the initial discriminator network's judgment result. The attribute information recorded by the training sample's label is used as the true value, and the attribute information judged by the initial discriminator network is used as the predicted value. The loss between the true and predicted values ​​of the training samples is calculated. During training, gradient descent or other optimization methods are used to adjust the parameters in the initial adjustment network until the loss function converges, resulting in the target adjustment network. By introducing perturbations to interfere with the training process, adversarial training can be achieved, improving the robustness and generalization ability of the initial adjustment network.

[0102] Furthermore, in the adversarial training process, this application embodiment can select sample object features from different scenarios for adversarial training. This allows the parameters of the initially adjusted network to capture the feature information of that scenario during training, and adjust the parameters of the initially adjusted network to the target parameters corresponding to that scenario. This enables the resulting target adjusted network to learn the information of the target scenario from the input initial encoding vector, making it more in line with the recommendation needs of the object to be recommended and improving the accuracy of the pushed content.

[0103] It should be noted that the target scene can be modified by setting different labels for the features of sample objects. In practical applications, different labels can be set for the same sample object features according to different preset scenes. Through adversarial training, an adjusted network and label corresponding to any preset scene can be obtained. For example, during adversarial training, labels including different attribute information can be set for training samples for different preset scenes. Since the target scene is related to the object's attributes, during adversarial training, the discriminant network calculates the loss between the true value and the predicted value, enabling the parameters of the initial adjusted network to capture the attribute information corresponding to the target scene. The resulting target adjusted network allows the input initial encoding vector to learn the attributes corresponding to the target scene, better meeting the recommendation needs of the object to be recommended and improving the accuracy of the pushed content.

[0104] For example, an object can include attributes A, B, and C. Attribute A can include two types of attribute information: a1 and a2; attribute B can include two types of attribute information: b1 and b2; and attribute C can include two types of attribute information: c1 and c2. The attribute information for object A (which can be a recommended object or a sample object) is a1 for attribute A, b1 for attribute B, and c1 for attribute C. A preset scenario 1 can be set for attributes A and B, and a preset scenario 2 for attributes A and C. Clearly, for preset scenario 1, object A expects to be recommended content that focuses only on its attribute information a1 and b1, and does not expect to be recommended content that focuses on attribute information c1 (i.e., the recommended object expects to be recommended content that does not focus on its attribute information C). For preset scenario 2, object A expects to be recommended content that focuses only on its attribute information a1 and c1, and does not expect to be recommended content that focuses on attribute information b1. It should be noted that in this embodiment, the content that focuses on attribute information refers to the content corresponding to the attribute information. For example, if the vector output by the network (which can be the target vector or the encoded vector used for training) focuses on attribute A and attribute B of object A, then the content corresponding to the vector can be considered to be obtained by filtering based on attribute information a1 and attribute information b1 of object A in the dimensions of attribute A and attribute B. That is, the obtained content is related to attribute information a1 and attribute information b1, but not related to attribute information a2 and attribute information b2. However, no filtering is performed in the dimension of attribute C, that is, the obtained content is related to attribute information c1 and attribute information c2.

[0105] Therefore, during adversarial training, to train the target adjustment network and personalized identifier corresponding to the preset scenario 1, the training sample set can be labeled as attribute information c1. When the discriminator network judges the attribute information of the sample object represented by the training encoding vector, if the discriminator network cannot identify the attribute information of the sample object's attribute C as c1 through the training sample set, it is considered that the training encoding vector output by the adjustment network cannot represent the attribute information of the sample object in the dimension of attribute C. Therefore, it can be considered that the content corresponding to the training encoding vector output by the adjustment network is unrelated to the attribute C of the sample object and can meet the expectation that the object to be recommended will not be recommended to focus on the content of its attribute information c1.

[0106] The content recommendation scheme provided in this application can be applied to various content recommendation scenarios. For example, taking a content platform as an example, the scheme obtains the personalized identifier and object features of the object to be recommended; it concatenates the personalized identifier and object features to obtain concatenated object features; it encodes the concatenated object features to obtain an initial encoding vector; it adjusts the initial encoding vector using the target parameters corresponding to the personalized identifier to obtain a target vector; it determines the target content corresponding to the target vector and recommends the target content to the object to be recommended.

[0107] The solution provided in this application can concatenate and encode an initial encoding vector based on personalized identifiers and object characteristics. This increases the focus on personalized identifiers during content recommendation, providing push content related to those identifiers. The initial encoding vector is then adjusted using target parameters corresponding to the personalized identifiers, enabling it to learn information about the personalized identifiers through these parameters. This further increases the focus on personalized identifiers, recommending content that matches them, meeting the recommendation needs of the target audience, and improving the accuracy of the pushed content.

[0108] The method provided in this application embodiment can use an initial discriminant network to perform adversarial training on an initial adjustment network to obtain a target adjustment network. Therefore, in the training process, this application embodiment only adjusts the target adjustment network used for the adjustment process, and does not adjust the network used for encoding and determining the target content. The number of parameters that need to be adjusted during training is small, thus improving training efficiency.

[0109] Furthermore, by combining adversarial training using training sample sets corresponding to the target scene to obtain the target adjustment network and personalized identifiers, the parameters of the initial adjustment network capture the attribute information corresponding to the target scene. This allows the resulting target adjustment network to learn the attributes corresponding to the target scene from the input initial encoding vector, making it more aligned with the recommendation needs of the target audience and improving the accuracy of the pushed content. In addition, the trained personalized identifiers, carrying information from the target scene, further enhance the content recommendation algorithm model's focus on its corresponding attribute information, providing more accurate pushed content and meeting the recommendation needs of the target audience.

[0110] Blockchain is a novel application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanisms, and cryptographic algorithms. Essentially, a blockchain is a decentralized database, a chain of data blocks linked together using cryptographic methods. Each data block contains information about a batch of network transactions, used to verify the validity of the information (anti-counterfeiting) and generate the next block. A blockchain can include an underlying platform, a platform product service layer, and an application service layer.

[0111] The underlying blockchain platform can include processing modules such as object management, basic services, smart contracts, and operational monitoring. The object management module is responsible for managing the identity information of all blockchain participants, including maintaining public and private key generation (account management), key management, and maintaining the correspondence between object real identities and blockchain addresses (access management). Under authorization, it also manages and audits transactions of certain real identities and provides risk control rule configuration (risk control audit). The basic services module is deployed on all blockchain node devices to verify the validity of business requests. After consensus is reached on valid requests, they are recorded in storage. For a new business request, the basic services first perform interface adaptation parsing and authentication (interface adaptation), and then encrypt the business information through a consensus algorithm (consensus management). After encryption, the data is transmitted completely and consistently to the shared ledger (network communication) and recorded and stored. The smart contract module is responsible for contract registration, issuance, triggering, and execution. Developers can define contract logic using a programming language and publish it to the blockchain (contract registration). According to the contract terms, the key or other events are invoked to trigger execution and complete the contract logic. It also provides functions for contract upgrades and cancellations. The operation and monitoring module is mainly responsible for deployment, configuration modification, contract settings, cloud adaptation, and real-time status visualization output during product release, such as alarms, network status monitoring, and node device health status monitoring.

[0112] The platform's product service layer provides the basic capabilities and implementation frameworks for typical applications. Developers can leverage these basic capabilities, along with the specific characteristics of their business needs, to implement blockchain-based business logic. The application service layer provides blockchain-based application services to business stakeholders.

[0113] In one embodiment, the electronic device provided in this application can serve as a node in a blockchain system. After obtaining the personalized identifier and object features of the object to be recommended, it concatenates the personalized identifier and object features to obtain concatenated object features. The concatenated object features are then encoded to obtain an initial encoding vector. Using the target parameters corresponding to the personalized identifier, the initial encoding vector is adjusted to obtain a target vector. The target content corresponding to the target vector is determined, and the target content is verified. Upon successful verification, it is stored in the blockchain as a new block to ensure that these extraction results are not tampered with. Alternatively, after adjusting the initial encoding vector to obtain the target vector, the target vector can be verified. Upon successful verification, it is stored in the blockchain as a new block to ensure that these extraction results are not tampered with.

[0114] The method described in the above embodiments will be further described in detail below.

[0115] In this embodiment, the method of this application embodiment will be described in detail using an application to a content recommendation model as an example.

[0116] like Figure 2a As shown, a content recommendation model may include a concatenation module, a pre-defined encoding network, an adjustment network, a discriminator network, and a recommendation algorithm model. It should be noted that during the training of the content recommendation model, Figure 2a The content recommendation model in this paper can be the pre-defined content recommendation model, with the concatenation module being the initial concatenation module, the adjustment network being the initial adjustment network, the discriminator network being the initial discriminator network, the task-specific prompts being the initial task-specific prompts, the personalized prompts being the initial personalized prompts, the object operation features being the training object operation features, and the object representation being the training encoding vector. After training the pre-defined content recommendation model using multiple sample object features applied to the corresponding target scenario, Figure 2a The content recommendation model in the text is the target content recommendation model for this article, the splicing module is the target splicing module, the adjustment network is the target adjustment network, the discriminator network is the target discriminator network, the task-specific prompt is the target task-specific prompt, the personalized prompt is the target personalized prompt, and the object representation is the target vector.

[0117] like Figure 2b As shown, the specific process of a content recommendation method is as follows:

[0118] 210. Obtain the preset content recommendation model, which includes an initial splicing module, a preset encoding network, an initial adjustment network, an initial discrimination network, and a recommendation algorithm model.

[0119] The preset content recommendation model can be a content recommendation model pre-set according to application scenarios or experience. Among them, the initial splicing module is used to splice the initial task special prompts, initial personalized prompts and sample object features; the preset encoding network is used to encode the spliced ​​object features; the initial adjustment network is used to adjust the encoded vectors; the initial discriminator network is used for adversarial training and outputs the discrimination results; and the recommendation algorithm model is used to determine the target content based on the results of the adjustment network output.

[0120] For example, after obtaining a preset content recommendation model, one can arbitrarily select one of multiple preset scenarios as the target scenario, and use the sample object features of the corresponding target scenario to train the preset content recommendation model to obtain the target content recommendation model for the corresponding target scenario. For example, an object has three attributes: attribute G, attribute A, and attribute C. Selecting a preset scenario corresponding to attributes A and C as the target scenario means that the sample objects in the target scenario have a fair requirement for attribute G, that is, the content they expect to be recommended does not care about the attribute information of attribute G. This can be achieved by setting the label of the sample object as the attribute information of the sample object's attribute G, thus generating the sample object features for the corresponding target scenario.

[0121] It should be noted that the initial splicing module and the initial adjustment network are the fairness modules in this embodiment. Therefore, during training, only the initial splicing module, the initial adjustment network, and the initial discriminator network are adjusted, without adjusting the preset encoding network and recommendation algorithm model. By adjusting the initial splicing module and the initial adjustment network, the target splicing module and target adjustment network for the corresponding target scenario are obtained, thus achieving fair recommendation for the target scenario. This embodiment only adjusts a portion of the network structure in the preset content recommendation model, which greatly improves training efficiency. Furthermore, the other unadjusted network structures can be applied to different preset scenarios, increasing the universality of the preset content recommendation model and improving efficiency.

[0122] For example, in this embodiment of the application, a fairness module (concatenation module and adjustment network) that can be adjusted according to the target scenario is added to the preset encoding network and recommendation algorithm model. In this way, different preset scenarios can be determined as target scenarios, and the preset content recommendation model can be trained into multiple target content recommendation models corresponding to different target scenarios. In practical applications, the corresponding target content recommendation model can be selected to accurately recommend the target object and ensure that the recommended content meets the fairness requirements of the target object, thus satisfying the diverse fairness requirements of the target object.

[0123] 220. Obtain and input the initial task special prompt, the initial personalized prompt, and the features of multiple sample objects in the corresponding target scene into the preset content recommendation model.

[0124] It can obtain the initial task special prompt (i.e., the initial identifier), the initial personalized prompt (i.e., the attribute information of the sample object), and the sample object features of the corresponding target scene, and use this information to train the preset content recommendation model.

[0125] 230. Using the splicing module, obtain and splice the initial task special prompt, the initial personalized prompt, and the sample object features to obtain the spliced ​​sample object features.

[0126] For example, the initial task-specific prompt can be a character composed of 10 randomly initialized symbol vectors, and the initial personalized prompt can be composed of attribute vectors of m sample objects, where m is a positive integer. The concatenated sample object features in step 230 can refer to object operation features. The concatenated sample object features can be represented by the following formula:

[0127]

[0128] in, This represents the features of the concatenated sample object. The special prompt for the initial task, p u Indicates the initial personalized prompt. Let represent the features of the sample objects, k represent the k-th task (i.e., the fairness requirement corresponding to the target scenario), u represent the sample objects, and |s u | indicates the length of the sample object feature sequence. Therefore, the splicing module can be used to splice the initial task-specific prompt, the initial personalized prompt, and the sample object features to obtain the spliced ​​sample object features.

[0129] 240. Input the spliced ​​sample object features into the preset encoding network and the initial adjustment network, and obtain the training encoding vector after encoding and adjustment.

[0130] The default encoding network can adopt the Transformer Encoder architecture. The Transformer module is a model framework built on attention mechanisms, and its overall architecture can be divided into an input layer, an encoding layer, a decoding layer, and an output layer. The encoding layer in the Transformer network can be a Transformer Encoder architecture, consisting of a multi-head self-attention module and a feedforward network layer (MLP). LayerNorm is applied before each block, and residual connections are applied after each block. If the Transformer network has multiple decoding layers, the concatenated sample object features are input into the encoding layer. After the encoding layer performs self-attention calculation on the concatenated sample object features, it sends the result of the self-attention calculation to the feedforward neural network of that layer, and then the feedforward neural network sends the processing result to the next encoding layer, repeating the corresponding processing until all multiple encoding layers have been executed.

[0131] In practical applications, an Adapter module (i.e., the initial adjustment network) can be used to insert a specific network (Adapter module) with only a few parameters between Transformer networks to achieve adaptation for a specific task. The process of encoding and adjusting a Transformer network with an inserted Adapter module can be represented by the following formula:

[0132]

[0133] in, This represents the output representation of object u at level l with respect to task k, where l represents level l and k represents the k-th task. To represent a function of a Transformer network with an Adapter module in layer l, represents the attention layer in a Transformer network, and FNN represents the feedforward neural network layer in a Transformer network.

[0134] It should be noted that multiple Adapter modules can be inserted into the Transformer network to adjust the encoding results of multiple encoding layers in the Transformer network respectively. In some implementations, multiple Adapter modules can be inserted into one encoding layer of the Transformer network. For example, as shown in the above formula, an Adapter module is inserted after the attention layer and the feedforward neural network layer of one encoding layer of the Transformer network.

[0135] The Adapter module can contain one LayerNorm layer and two MLP (feedforward neural network) layers. The adjustment process of the Adapter module can be represented by the following formula:

[0136]

[0137] Where X represents the input of the Adapter function, which is a function of the Adapter module, and k represents the k-th task. as well as This represents the trainable parameter matrix (i.e., the target parameters) in the Adapter module, and LayerNorm represents the LayerNorm function.

[0138] After adding the Adapter module, a fair object representation can be obtained by encoding through a Transformer network with the Adapter module inserted. For example, after processing the concatenated sample object features using the above formula, the resulting training encoding vector can be represented as follows:

[0139]

[0140] in, This represents the encoding vector used for training. This represents the features of the concatenated sample objects, Θ represents the parameters in the Transformer network, and fseq() represents the sequence generated using the seq() function. It should be noted that Θ does not change during adversarial training. This represents the final output of the Transformer network with the Adapter module inserted (i.e., the training encoding vector).

[0141] 250. Input the training encoding vector into the initial discriminant network to obtain the discriminant result.

[0142] To train and validate the output of the initial adjustment network, embodiments of this application can use the vector output by the adjustment network during adversarial training as a representation of the sample object. The adjustment effect of the initial adjustment network is evaluated by determining whether the vector output by the adjustment network can represent the attribute information of the sample object recorded in the sample label. For example, if the initial discriminator network cannot correctly identify the attribute information of the sample object recorded in the sample label based on the vector output by the adjustment network, it is considered that the result of the initial adjustment network output can achieve fair recommendation that meets the expectations of the target scenario; otherwise, it is considered that the result of the initial adjustment network output cannot achieve fair recommendation that meets the expectations of the target scenario. For example, the target scenario has a fairness requirement for attribute A, that is, the content recommended in the target scenario does not focus on the attribute information of the sample object attribute A. If the attribute information of the sample object attribute A cannot be determined by the vector output by the adjustment network, it is considered that the result of the initial adjustment network output can achieve fair recommendation that meets the expectations of the target scenario.

[0143] 260. Based on the discrimination results, adjust the initial adjustment network and the initial splicing module to obtain the target adjustment network and the target splicing module, so as to obtain the target content recommendation model.

[0144] By training the adversary and generator alternately, they play a game against each other during training, thus training a robust fairness module. For example, the loss between the true value (sample label) and the predicted value (training encoding vector) can be calculated, and the parameters in the initial adjustment network (adapter module) can be adjusted during training using gradient descent or other optimization methods until the loss function converges, resulting in the target adjustment network. Figure 2c As shown, a target content recommendation model may include at least a target adjustment network, a target splicing module, a pre-defined encoding network, and a recommendation algorithm model.

[0145] Specifically, the fairness module can be trained using adversarial training. Adversarial training consists of two modules: (1) Generator (i.e., generator network, fairness module): The generator aims to generate a representation of the sample object, which can make accurate recommendations for the sample object, and the personalized identifier in the representation meets the fairness requirements of the sample object selection (i.e., the sample object does not want to be recommended for content that does not focus on the attribute information corresponding to the target scene). (2) Adversarial device (i.e., discriminator network): The adversarial device aims to determine the attribute information of the sample object based on the vector output by the adjusted network. The adversarial device can be a two-layer MLP (feedforward neural network). For example, in adversarial training, the attribute information that the target scene does not want to be focused on can be used as the true value, and the adversarial device predicts the attribute information of the sample object through a two-layer MLP (feedforward neural network).

[0146] During adversarial training, the discriminator network aims to determine the attribute information of the sample object as much as possible, while the tuner network aims to prevent the discriminator network from determining the attribute information of the sample object as much as possible. Therefore, the following classification loss function can be set to evaluate the classification result of the discriminator network on the vector output by the tuner network.

[0147]

[0148] Where, φ k θ represents the parameters of the discriminant network. k This indicates adjusting the network parameters. Let B represent the expected attributes of an object, and let a represent the sample object set (i.e., a batch of sample objects). i This indicates attributes that are not expected to be recommended. Let u represent the encoding vector used for training, denoted by , and P represent the probability distribution. When the classification loss function converges, it is considered that the discriminator network is unable to determine the attribute information of the sample object based on the adjusted network output vector.

[0149] Furthermore, during adversarial training, the loss between positive and negative samples can be calculated to determine whether adjusting the network's output vector can accurately recommend content to the sample objects. Therefore, the following recommendation loss function can be set to evaluate whether adjusting the network's output vector can accurately recommend content to the sample objects.

[0150]

[0151] Among them, S + S represents a positive sample, i.e., a real interaction of the sample object. - Let u represent the set of negative samples, and let (u, v) represent the object. j) represents the sample object feature, B represents the sample object set (i.e. a batch of sample objects), and logσ() represents the sigmoid function. In this embodiment, the object features of sample objects that have not been interacted with are selected as negative samples from the object features of the sample objects.

[0152] In summary, during adversarial training, the two loss functions mentioned above can be combined to obtain the following new loss function:

[0153]

[0154] Here, λ represents the weight, which can be used to adjust the weights between the two loss functions. Since the discriminator network may affect the adjustment network, leading to a worse recommendation result, the combination of the two loss functions can be used to simultaneously determine whether the discriminator network can identify the attribute information of the sample object during training and whether the output vector of the adjustment network can recommend accurate content for the object, until the combination of the two loss functions converges, thus obtaining the target content recommendation model.

[0155] 270. Obtain and input the object features of the object to be recommended into the target content recommendation model so that the target content can be recommended to the object to be recommended.

[0156] After receiving the adversarial training data, the resulting target content recommendation model can be used for content recommendation. For example... Figure 2c as well as Figure 2d As shown, the specific process of content recommendation using the target content recommendation model is as follows:

[0157] 271. Using the target splicing module, the target task special prompt, the target personalized prompt, and the object features of the object to be recommended are spliced ​​together to obtain the spliced ​​object features.

[0158] The target concatenation module can store target task-specific prompts and target personalized prompts. For example, the target task-specific prompt can be the vector corresponding to the position of the initial task-specific prompt in the output of the target encoding network when the target content recommendation model is trained using the features of the concatenated sample objects. That is, the target task-specific prompt is obtained after adversarial training of the target task-specific prompt. The target personalized prompt is a vector mapped from the attribute information of the object to be recommended, which can be composed of m attribute vectors of the object to be recommended, where m is a positive integer. For example, the vector corresponding to the position of the initial personalized prompt in the output at the end of adversarial training can be used as the corresponding target personalized prompt. That is, the target personalized prompt is obtained after adversarial training of the initial personalized prompt. It should be noted that in step 220, the obtained initial task-specific prompt and initial personalized prompt can be stored as parameters in the initial concatenation module. During adversarial training, the initial task-specific prompt and initial personalized prompt in the initial concatenation module are continuously adjusted until the target task-specific prompt and target personalized prompt are obtained at the end of training.

[0159] 272. The features of the spliced ​​objects are encoded using a pre-defined encoding network to obtain an initial encoding vector.

[0160] When the preset encoding network is the Transformer Encoder architecture, the features of the concatenated object can be encoded through the encoding layer in the Transformer network to obtain the initial encoding vector.

[0161] 273. By adjusting the initial encoding vector through the target adjustment network, the target vector is obtained.

[0162] When the target adjustment network includes a LayerNorm layer and two MLP (feedforward neural network) layers, layer normalization can be performed on the hidden layers through the LayerNorm layer, that is, the input of all neurons is normalized. Then, the target vector is linearly transformed through the two MLP (feedforward neural network) layers to obtain the target vector. That is, steps 271 to 273 complete the encoding of the object features of the object to be recommended through the target splicing module, the preset encoding network, and the target adjustment network, and obtain the object representation of the corresponding target scene of the object to be recommended.

[0163] 274. Through the recommendation algorithm model, determine the target content corresponding to the target vector so that the target content can be recommended to the object to be recommended.

[0164] The recommendation algorithm model can be a CTR (click-through rate) recommendation algorithm model. The CTR recommendation algorithm model can combine or transform features based on the input target vector and output a recommendation sequence containing the target content identifier. The target content can then be obtained and recommended to the target object based on the target content identifier in the recommendation sequence.

[0165] As shown above, in the preset content recommendation model, the recommendation algorithm model is a pre-trained recommendation model. This model does not have personalized fairness requirements and can recommend objects without fairness requirements. Based on this, this application further designs a module (i.e., a fairness module) that enables the preset content recommendation model to make fair recommendations for different preset scenarios. This fairness module can include two parts: a personalized prompt (i.e., an initial concatenation module), which can concatenate the personalized prompt before the object's operation features; and an adapter module, which can be inserted into the sequence model (i.e., the preset encoding network). The initial concatenation module and the adapter module have only a few parameters, achieving parameter efficiency and saving. Furthermore, different fairness modules can be trained to meet different fairness requirements of objects (i.e., fairness requirements corresponding to different preset scenarios). By incorporating a fairness module into the sequence model (i.e., the target concatenation module and the Transformer network with an inserted Adapter module), fair object representations (i.e., target vectors) corresponding to different scenarios can be obtained. Based on these fair object representations, the recommendation algorithm model can recommend the desired content to the object to be recommended, thus meeting the fairness requirements of personalized recommendations.

[0166] Furthermore, to verify the effectiveness of the target content recommendation model in this application's embodiments, experiments were conducted on datasets obtained from content platform 1 and content platform 2. The experiments assumed that the recommended object had fairness requirements regarding attributes G, A, and C, and included scenarios with single-attribute fairness requirements (each requiring fairness for attributes G, A, and C separately) and scenarios with simultaneous fairness requirements for at least two of attributes G, A, and C. The experimental results are as follows: Figure 2e , Figure 2f as well as Figure 2gTables 1 to 3 are shown below. Table 1 presents the experimental results of evaluating the performance of different models for scenarios with single-attribute fairness requirements (attribute G, attribute A, and attribute C) based on the dataset of content platform 1. Table 2 presents the experimental results of evaluating the performance of different models for scenarios with fairness requirements for all three attributes based on the dataset of content platform 2. Table 3 presents the experimental results of evaluating the performance of different models for scenarios with composite attribute fairness requirements based on the datasets of content platform 1 and content platform 2, respectively.

[0167] It should be noted that the data sets obtained from content platform 1 and content platform 2 involve object-related data such as object characteristics, operations, attributes, and identifiers. When the embodiments of this application are applied to specific products or technologies, permission or consent from the object is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0168] In Tables 1-3, Model 1 is the SASRec (Self-Attentive Sequential Recommendation) model, Model 2 is the BERT4Rec (Sequential Recommendation with Bidirectional Encoder Representations from Transformer) model, Model 3 is an existing content recommendation model, and the target model is the target content recommendation model of this application embodiment. F1 represents the harmonic mean of model precision and recall, with a maximum value of 1 and a minimum value of 0. The experiment uses F1 to evaluate the fairness of the model; downward arrows indicate that a lower F1 value indicates better performance. F1-G, F1-A, and F1-C represent the F1 scores for attributes G, A, and C, respectively.

[0169] comprehensive Figure 2e , Figure 2f as well as Figure 2g As can be seen from Tables 1 to 3, compared with Models 1 to 3, the target content recommendation model of this application embodiment is significantly better than other models in terms of fairness, and can better meet the different fairness needs of the subjects.

[0170] The method described in the above embodiments will be further described in detail below.

[0171] In this embodiment, the method of this application embodiment will be described in detail using an application to a content platform as an example.

[0172] like Figure 3 As shown, the specific process of a content recommendation method is as follows:

[0173] 310. Provide multiple controls on the terminal's display interface, each control corresponding to a preset scene.

[0174] The terminal can be a client terminal running the content platform. The target user can log in to the content platform through this terminal to perform interactive behaviors, such as obtaining content and using content services. After the target user logs in to the content platform, multiple controls can be displayed on the terminal's interface. The preset scenarios corresponding to any two controls can be preset scenarios for different object attributes.

[0175] 320. In response to the selection operation of the target scene by the object to be recommended, obtain the identifier of the corresponding target scene as the personalized identifier of the object to be recommended, and obtain the target content recommendation model corresponding to the target scene.

[0176] When the object to be recommended touches any control, the preset scene corresponding to that control becomes the target scene. The identifier corresponding to the target scene and the target content recommendation model can be obtained. The target recommendation model can at least include a target concatenation module, a preset encoding network, a target adjustment network, and a recommendation algorithm model.

[0177] 330. Obtain and input the object features of the object to be recommended into the target content recommendation model.

[0178] The object features of the objects to be recommended are input into the target content recommendation model, and the object features of the objects to be recommended are processed using the target concatenation module, the preset encoding network, the target adjustment network, and the recommendation algorithm model. Specific processing methods can be found in the process described in the preceding embodiments, and will not be repeated here.

[0179] 340. The target content recommendation model processes the object features of the objects to be recommended and outputs a recommendation sequence.

[0180] After the object features of the objects to be recommended are processed by the target content recommendation model, a recommendation sequence is output. The recommendation sequence may contain identifiers of multiple target contents. For specific processing methods, please refer to the process in the foregoing embodiments, which will not be repeated here.

[0181] 350. The content platform obtains at least one target content based on the recommendation sequence and recommends the target content to the terminal.

[0182] Content platforms can retrieve corresponding target content based on identifiers in the recommendation sequence and display the target content information on the terminal's display interface. For example, when the target content is audio, the audio name and icon can be displayed on the terminal's display interface.

[0183] As can be seen from the above, in this embodiment of the application, the object to be recommended can select any preset scenario as the target scenario to determine the recommendation needs for the target scenario. Through personalized identifiers corresponding to the target scenario and a target adjustment network, the encoded vector's focus on the features of the target scenario can be enhanced, enabling the recommendation algorithm model to determine recommendation sequences with higher correlation to the features of the target scenario, providing more accurate push content, and meeting the recommendation needs of the object to be recommended. Therefore, by setting fairness option switches (i.e., multiple controls) for different preset scenarios in the content platform, fair content, such as products or articles, can be recommended according to the needs of the object to be recommended based on their selection.

[0184] To better implement the above methods, this application also provides a content recommendation device, which can be integrated into an electronic device, such as a terminal or server. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, or personal computer; the server can be a single server or a server cluster composed of multiple servers.

[0185] For example, in this embodiment, the method of this application embodiment will be described in detail by taking the content recommendation device specifically integrated into the terminal as an example.

[0186] For example, such as Figure 4 As shown, the content recommendation device may include an acquisition unit 410, a splicing unit 420, an encoding unit 430, an adjustment unit 440, and a recommendation unit 450, as follows:

[0187] (a) Acquisition Unit 410

[0188] Used to obtain the personalized identifier and object characteristics of the object to be recommended.

[0189] In some implementations, the acquisition unit 410 may specifically be used for the following steps:

[0190] In response to the target scene selection operation of the object to be recommended, the identifier of the corresponding target scene is obtained as the personalized identifier of the object to be recommended.

[0191] (II) Splicing Unit 420

[0192] It is used to combine personalized identifiers and object features to obtain the combined object features.

[0193] (III) Encoding Unit 430

[0194] This is used to encode the features of the concatenated object to obtain the initial encoding vector.

[0195] (iv) Adjustment Unit 440

[0196] It is used to adjust the initial encoding vector by using the target parameters corresponding to the personalized identifier, so as to obtain the target vector.

[0197] In some implementations, the target parameters include normalization parameters and weighting coefficients, and the adjustment unit 440 can be specifically used for the following steps:

[0198] The initial encoded vector is normalized using normalization parameters to obtain an intermediate vector;

[0199] The target vector is obtained by weighting the intermediate vector using weighting coefficients.

[0200] (V) Recommended Unit 450

[0201] This is used to determine the target content corresponding to the target vector and recommend the target content to the objects to be recommended.

[0202] In some embodiments, the content recommendation device may further include a training unit, which may be used to acquire an initial adjustment network and an initial discriminant network, perform adversarial training on the initial adjustment network and the initial discriminant network to obtain a target adjustment network, which is used to adjust the initial encoding vector through target parameters.

[0203] In some implementations, obtaining the initial adjustment network and the initial discrimination network may include:

[0204] An initial adjustment network is constructed based on the initial normalization network and the first initial multilayer sensing network. The initial normalization network and the first initial multilayer sensing network are used to adjust the input vector through initial parameters.

[0205] An initial discrimination network is constructed based on a second initial multilayer sensing network. The second initial multilayer sensing network is used to determine the discrimination result of the target adjustment network output.

[0206] In some implementations, adversarial training is performed on the initial adjustment network and the initial discriminator network to obtain the target adjustment network, which may include:

[0207] Obtain the preset encoding network, initial identifier, and training sample set corresponding to the target scene. The training sample set includes features of multiple sample objects.

[0208] The initial identifier and sample object features are combined to obtain the combined sample object features;

[0209] The concatenated sample object features are input into a preset encoding network, and the concatenated sample object features are encoded to obtain a sample encoding vector;

[0210] Input the sample encoding vector into the initial adjustment network to obtain the training encoding vector;

[0211] The training encoded vectors are input into the initial discrimination network to obtain the discrimination results;

[0212] Based on the discrimination results, the initial adjustment network and the initial discrimination network are trained alternately using a preset loss function to obtain the target adjustment network and personalized labels. The personalized labels are the labels of the corresponding target scenes.

[0213] In practice, each of the above units can be implemented as an independent entity or can be arbitrarily combined to be implemented as the same or several entities. For the specific implementation of each of the above units, please refer to the previous method embodiments, which will not be repeated here.

[0214] Therefore, the embodiments of this application can increase the attention to personalized identifiers during the content recommendation process, provide push content related to personalized identifiers, meet the recommendation needs of the target audience, and improve the accuracy of the push content.

[0215] This application also provides an electronic device, which can be a terminal, a server, or other similar device. The terminal can be a mobile phone, tablet computer, smart Bluetooth device, laptop computer, personal computer, etc.; the server can be a single server or a server cluster composed of multiple servers, etc.

[0216] In some embodiments, the content recommendation device can also be integrated into multiple electronic devices. For example, the content recommendation device can be integrated into multiple servers, and the content recommendation method of this application can be implemented by multiple servers.

[0217] In this embodiment, the electronic device will be described in detail as a terminal, for example, such as... Figure 5 As shown, it illustrates the structural diagram of the terminal involved in the embodiments of this application, specifically:

[0218] The terminal may include components such as a processor 510 with one or more processing cores, a memory 520 with one or more computer-readable storage media, a power supply 530, an input module 540, and a communication module 550. Those skilled in the art will understand that... Figure 5 The terminal structure shown does not constitute a limitation on the terminal and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0219] The processor 510 is the control center of the terminal, connecting various parts of the terminal via various interfaces and lines. It executes various functions and processes data by running or executing software programs and / or modules stored in the memory 520, and by calling data stored in the memory 520. In some embodiments, the processor 510 may include one or more processing cores; in some embodiments, the processor 510 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, display interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into the processor 510.

[0220] The memory 520 can be used to store software programs and modules. The processor 510 executes various functional applications and data processing by running the software programs and modules stored in the memory 520. The memory 520 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 520 may also include a memory controller to provide the processor 510 with access to the memory 520.

[0221] The terminal also includes a power supply 530 that supplies power to the various components. In some embodiments, the power supply 530 can be logically connected to the processor 510 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 530 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0222] The terminal may also include an input module 540, which can be used to receive input numeric or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to object settings and function control.

[0223] The terminal may also include a communication module 550. In some embodiments, the communication module 550 may include a wireless module, through which the terminal can perform short-range wireless transmission, thereby providing the user with wireless broadband internet access. For example, the communication module 550 can be used to help the user send and receive emails, browse web pages, and access streaming media.

[0224] Although not shown, the terminal may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 510 in the terminal loads the executable files corresponding to the processes of one or more applications into the memory 520 according to the following instructions, and the processor 510 runs the applications stored in the memory 520 to realize various functions, as follows:

[0225] Obtain the personalized identifier and object features of the object to be recommended; concatenate the personalized identifier and object features to obtain the concatenated object features; encode the concatenated object features to obtain the initial encoding vector; adjust the initial encoding vector according to the target parameters corresponding to the personalized identifier to obtain the target vector; determine the target content corresponding to the target vector and recommend the target content to the object to be recommended.

[0226] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.

[0227] As can be seen from the above, the embodiments of this application can increase the attention to personalized identifiers during the content recommendation process, provide push content related to personalized identifiers, meet the recommendation needs of the target audience, and improve the accuracy of the push content.

[0228] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0229] Therefore, embodiments of this application provide a computer-readable storage medium storing a plurality of instructions that can be loaded by a processor to execute steps in any of the content recommendation methods provided in embodiments of this application. For example, the instructions can execute the following steps:

[0230] Obtain the personalized identifier and object features of the object to be recommended; concatenate the personalized identifier and object features to obtain the concatenated object features; encode the concatenated object features to obtain the initial encoding vector; adjust the initial encoding vector according to the target parameters corresponding to the personalized identifier to obtain the target vector; determine the target content corresponding to the target vector and recommend the target content to the object to be recommended.

[0231] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0232] According to one aspect of this application, a computer program product or computer program is provided, comprising a computer program / instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer program / instructions from the computer-readable storage medium and executes the computer program / instructions, causing the electronic device to perform the methods provided in the various optional implementations of the above embodiments.

[0233] Since the instructions stored in the storage medium can execute the steps of any of the content recommendation methods provided in the embodiments of this application, the beneficial effects that any of the content recommendation methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0234] The foregoing has provided a detailed description of a content recommendation method, apparatus, electronic device, storage medium, and program product provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A content recommendation method characterized by, The method comprises: obtaining a personalized identifier of a to-be-recommended object and object features of the to-be-recommended object; wherein the personalized identifier of the to-be-recommended object is an identifier corresponding to a target scene, and the identifier corresponding to the target scene comprises attribute information of all or part of the to-be-recommended object; splicing the personalized identifier and the object features to obtain spliced object features; encoding the spliced object features to obtain an initial encoding vector; adjusting the initial encoding vector by using a target adjustment network through a target parameter corresponding to the personalized identifier to obtain a target vector; determining target content corresponding to the target vector and recommending the target content to the to-be-recommended object; wherein the target content comprises a video, an audio, a game, a live broadcast, a commodity, or an article; wherein the target adjustment network is obtained in the following manner: obtaining a preset encoding network, an initial identifier, and a training sample set corresponding to a target scene; the training sample set comprises a plurality of sample object features; wherein the initial identifier comprises a preset identifier or attribute information of a sample object; splicing the initial identifier and the sample object features to obtain spliced sample object features; inputting the spliced sample object features into the preset encoding network to encode the spliced sample object features to obtain a sample encoding vector; inputting the sample encoding vector into an initial adjustment network to obtain a training encoding vector; inputting the training encoding vector into an initial discrimination network to obtain a discrimination result; based on the discrimination result, alternately training the initial adjustment network and the initial discrimination network by using a preset loss function to obtain the target adjustment network.

2. The content recommendation method of claim 1, wherein, The method further comprises: in response to a selection operation of the to-be-recommended object on a target scene, obtaining an identifier corresponding to the target scene as the personalized identifier of the to-be-recommended object.

3. The content recommendation method of claim 1, wherein, The target parameter comprises a normalization parameter and a weight coefficient, and the adjustment of the initial encoding vector by using the target parameter corresponding to the personalized identifier to obtain a target vector comprises: normalizing the initial encoding vector by using the normalization parameter to obtain an intermediate vector; weighting the intermediate vector by using the weight coefficient to obtain a target vector.

4. The content recommendation method of claim 1, wherein, The method further comprises: obtaining an initial adjustment network and an initial discrimination network; performing adversarial training on the initial adjustment network and the initial discrimination network to obtain a target adjustment network, wherein the target adjustment network is used to adjust the initial encoding vector through a target parameter.

5. The content recommendation method of claim 4, wherein, The method further comprises: based on an initial normalization network and a first initial multilayer perception network, constructing an initial adjustment network, wherein the initial normalization network and the first initial multilayer perception network are used to adjust an input vector through an initial parameter; based on a second initial multilayer perception network, constructing an initial discrimination network, wherein the second initial multilayer perception network is used to determine a discrimination result of an output result of the target adjustment network.

6. The content recommendation method of claim 1, wherein, The method further comprises: After the initial adjustment network and the initial discriminant network are alternately trained by using the preset loss function, a personalized identifier is obtained, the personalized identifier being an identifier corresponding to a target scene.

7. A content recommendation apparatus characterized by comprising: The method comprises the following steps: An acquisition unit is configured to acquire a personalized identifier of a to-be-recommended object and an object feature of the to-be-recommended object, wherein the personalized identifier of the to-be-recommended object is an identifier corresponding to a target scene, and the identifier corresponding to the target scene comprises attribute information of all or part of the to-be-recommended object; A splicing unit is configured to splice the personalized identifier and the object feature to obtain a spliced object feature; An encoding unit is configured to encode the spliced object feature to obtain an initial encoding vector; An adjustment unit is configured to adjust the initial encoding vector by using a target adjustment network according to a target parameter corresponding to the personalized identifier to obtain a target vector; A recommendation unit is configured to determine target content corresponding to the target vector and recommend the target content to the to-be-recommended object, wherein the target content comprises a video, an audio, a game, a live broadcast, a commodity, or an article; A training unit is configured to acquire a preset encoding network, an initial identifier, and a training sample set corresponding to a target scene, wherein the training sample set comprises a plurality of sample object features, the initial identifier comprises a preset identifier or attribute information of a sample object, a spliced sample object feature is obtained by splicing the initial identifier and the sample object feature, the spliced sample object feature is input into the preset encoding network, a sample encoding vector is obtained by encoding the spliced sample object feature, the sample encoding vector is input into an initial adjustment network to obtain a training encoding vector, the training encoding vector is input into an initial discriminant network to obtain a discriminant result, the initial adjustment network and the initial discriminant network are alternately trained by using a preset loss function based on the discriminant result, and the target adjustment network is obtained.

8. An electronic device, comprising: The computer readable storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by the processor to execute the steps in the content recommendation method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a plurality of instructions, and the instructions are adapted to be loaded by the processor to execute the steps in the content recommendation method according to any one of claims 1 to 6.

10. A computer program product comprising computer programs / instructions, characterized in that, The computer program / instructions are executed by the processor to implement the steps in the content recommendation method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Content recommendation method and device based on adversarial learning and computer equipment

    CN112182384A

  • Multimedia resource recommendation method and device, electronic equipment and storage medium

    CN113704511A