CN116932878A - Content recommendation method, device, electronic equipment, storage medium and program product - Google Patents

Content recommendation method, device, electronic equipment, storage medium and program product Download PDF

Info

Publication number
CN116932878A
CN116932878A CN202210359744.7A CN202210359744A CN116932878A CN 116932878 A CN116932878 A CN 116932878A CN 202210359744 A CN202210359744 A CN 202210359744A CN 116932878 A CN116932878 A CN 116932878A
Authority
CN
China
Prior art keywords
target
initial
network
recommended
vector
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210359744.7A
Other languages
Chinese (zh)
Inventor
吴贻清
谢若冰
张旭
林乐宇
朱勇椿
敖翔
何清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Institute of Computing Technology of CAS
Original Assignee
Tencent Technology Shenzhen Co Ltd
Institute of Computing Technology of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd, Institute of Computing Technology of CAS filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202210359744.7A priority Critical patent/CN116932878A/en
Publication of CN116932878A publication Critical patent/CN116932878A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Biomedical Technology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses a content recommendation method, a content recommendation device, electronic equipment, a storage medium and a program product; the method comprises the steps of obtaining personalized identification of an object to be recommended and object characteristics of the object to be recommended; splicing the personalized identifier and the object feature to obtain a spliced object feature; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector through the target parameters corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended. Therefore, in the content recommendation process, attention to the personalized identifier can be increased, push content related to the personalized identifier is provided, the recommendation requirement of an object to be recommended is met, and the accuracy of the push content is improved.

Description

Content recommendation method, device, electronic equipment, storage medium and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a content recommendation method, apparatus, electronic device, storage medium, and program product.
Background
With the development of network technology, more and more content platforms can make content recommendations for different objects based on content recommendation services. However, at present, the content recommendation service mainly depends on a content recommendation model, and the content recommended by the content recommendation model for the object often does not meet the requirement of the object, so that the accuracy of the recommended content is low.
Disclosure of Invention
The embodiment of the application provides a content recommendation method, a content recommendation device, electronic equipment, a storage medium and a program product, which can improve the accuracy of pushing content.
The embodiment of the application provides a content recommendation method, which comprises the following steps: acquiring a personalized identifier of an object to be recommended and object characteristics of the object to be recommended; splicing the personalized identifier and the object feature to obtain a spliced object feature; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector through the target parameters corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
The embodiment of the application also provides a content recommendation device, which comprises: the acquisition unit is used for acquiring the personalized identification of the object to be recommended and the object characteristics of the object to be recommended; the splicing unit is used for splicing the personalized identifier and the object characteristics to obtain spliced object characteristics; the coding unit is used for coding the spliced object features to obtain an initial coding vector; the adjusting unit is used for adjusting the initial coding vector through the target parameters corresponding to the personalized identifier to obtain a target vector; and the recommending unit is used for determining target content corresponding to the target vector and recommending the target content to the object to be recommended.
The embodiment of the application also provides electronic equipment, which comprises 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 content recommendation method provided by the embodiment of the application.
The embodiment of the application also provides a computer readable storage medium, which stores a plurality of instructions, the instructions are suitable for being loaded by a processor to execute the steps in any content recommendation method provided by the embodiment of the application.
The embodiments of the present application also provide a computer program product comprising a computer program/instruction which, when executed by a processor, implements the steps of any of the content recommendation methods provided by the embodiments of the present application.
The embodiment of the application can acquire the personalized identification of the object to be recommended and the object characteristics of the object to be recommended; splicing the personalized identifier and the object feature to obtain a spliced object feature; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector through the target parameters corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
According to the scheme provided by the embodiment of the application, the initial coding vector can be spliced and coded according to the personalized identifier and the object characteristics, so that the attention to the personalized identifier is increased in the content recommendation process, and the push content related to the personalized identifier is provided. And then, the initial coding vector is adjusted through the target parameter corresponding to the personalized identifier, so that the initial coding vector can learn the information corresponding to the personalized identifier through the target parameter, the attention to the personalized identifier is further increased, the content conforming to the personalized identifier is recommended, the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1a is a schematic view of a scenario of a content recommendation method according to an embodiment of the present application;
FIG. 1b is a flowchart illustrating a content recommendation method according to an embodiment of the present application;
FIG. 2a is a schematic diagram of a content recommendation model according to an embodiment of the present application;
FIG. 2b is a flowchart illustrating a content recommendation method according to another embodiment of the present application;
FIG. 2c is a schematic diagram of a target content recommendation model according to an embodiment of the present application;
FIG. 2d is a schematic flow chart of content recommendation using a target content recommendation model according to an embodiment of the present application;
FIG. 2e is an experimental result of different model effects of a scenario in which single attribute fairness requirements are evaluated according to a data set of the content platform 1, provided by an embodiment of the present application;
FIG. 2f is an experimental result of different model effects of a scenario in which single attribute fairness requirements are evaluated based on a data set of content platform 2, provided by an embodiment of the present application;
FIG. 2g is an experimental result of different model effects of a scenario for evaluating composite attribute fairness requirements based on data sets of content platform 1 and content platform 2, respectively, provided by an embodiment of the present application;
FIG. 3 is a flowchart of a content recommendation method according to still another embodiment of the present application;
fig. 4 is a schematic structural diagram of a content recommendation device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
The embodiment of the application provides a content recommendation method, a content recommendation device, electronic equipment, a storage medium and a program product.
The content recommendation device may be integrated in an electronic device, and the electronic device may be a terminal, a server, or other devices. The terminal can be a mobile phone, a tablet computer, an intelligent Bluetooth device, a notebook computer, a personal computer (Personal Computer, PC) or the like; the server may be a single server or a server cluster composed of a plurality of servers.
In some embodiments, the content recommendation device may also be integrated in a plurality of electronic devices, for example, the content recommendation device may be integrated in a plurality of servers, and the content recommendation method of the present application is implemented by the plurality of servers.
In some embodiments, the server may also be implemented in the form of a terminal.
For example, referring to fig. 1a, the content recommendation method is integrated in a server, which may acquire a personalized identifier of an object to be recommended and an object feature of the object to be recommended; splicing the personalized identifier and the object characteristics to obtain spliced object characteristics; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector by the target parameter corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to a client used by the object to be recommended.
The content recommendation model has been applied to various fields in life, and fairness of the content recommendation model is an important block thereof. The aim of personalized recommendation is to provide proper items for the object to be recommended, and the core problem is how to accurately capture the tendency of the object to be recommended from the characteristics of the object to be recommended. Since the object to be recommended may have a certain requirement on fairness of recommendation, for example, the object to be recommended wants to recommend a commodity irrelevant to any attribute. For another example, under different scenes and times, the same object to be recommended may have different recommendation requirements, for example, the object to be recommended is recommended to expect the recommended content corresponding to the product irrelevant to the attribute a when purchasing the electronic product, but is recommended to expect the recommended content corresponding to the product irrelevant to the attribute B when purchasing the clothes. In the existing content recommendation model, it is generally assumed that the object to be recommended needs an absolutely fair recommendation result (a recommendation result completely matched with the characteristics of the object to be recommended), and the requirement of diversity and variability of the object to be recommended cannot be met.
However, the scheme provided by the embodiment of the application can splice and encode the initial encoding vector according to the personalized identifier and the object characteristics, so that the attention to the personalized identifier is increased in the content recommendation process, and the push content related to the personalized identifier is provided. And then, the initial coding vector is adjusted through the target parameter corresponding to the personalized identifier, so that the initial coding vector can learn the information corresponding to the personalized identifier through the target parameter, the attention to the personalized identifier is further increased, the content conforming to the personalized identifier is recommended, the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved.
The following will describe in detail. It will be appreciated that in the specific embodiments of the present application, related data such as object features, operations, attributes, and identifiers are involved, when the embodiments of the present application are applied to specific products or technologies, permissions or agreements need to be obtained, and the collection, use, and processing of related data need to comply with relevant laws and regulations and standards of relevant countries and regions.
Artificial intelligence (Artificial Intelligence, AI) is a technology that utilizes a digital computer to simulate the human perception environment, acquire knowledge, and use the knowledge, which can enable machines to function similar to human perception, reasoning, and decision. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning, automatic driving, intelligent traffic and other directions.
Among them, machine Learning (ML) is a multi-domain interdisciplinary, and involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, etc. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
With research and progress of artificial intelligence technology, research and application of artificial intelligence technology are being developed in various fields, such as common smart home, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned, autopilot, unmanned, robotic, smart medical, smart customer service, car networking, autopilot, smart transportation, etc., and it is believed that with the development of technology, artificial intelligence technology will be applied in more fields and will be of increasing importance.
In this embodiment, a content recommendation method related to artificial intelligence is provided, as shown in fig. 1b, the specific flow of the content recommendation method may be as follows:
110. and acquiring the personalized identification of the object to be recommended and the object characteristics of the object to be recommended.
Wherein, the object to be recommended may refer to an object performing interactive behavior on a content platform providing recommended content. For example, the content platform may be a service type platform providing various types of content, and the object to be recommended may acquire the content through the content platform and use the service of the content. The type of the content is not limited in the present application, and may be various types of content such as video, audio, game, live broadcast, online shopping, and the like. That is, the scheme provided by the embodiment of the application can be suitable for a content platform for providing different types of content and can also be suitable for a comprehensive content platform for providing multiple types of content.
Wherein the personalized identity may refer to identification information for characterizing a feature or characteristic of the object to be recommended. The personalized identifier may be attribute information related to the object, information representing the tendency of the object to be recommended to the recommended content, and the like. For example, when the to-be-recommended object is allowed, various attribute information of the to-be-recommended object can be used as the personalized identifier of the to-be-recommended object. For another example, the personalized identifier may also be an identifier that can characterize the tendency of the object to the recommended content after the initial adjustment network is trained through the initial identifier. In some implementations, the personalized identity may be an identity of the corresponding target scene.
The object features may include, but are not limited to, object operation features, for example, an interaction operation (such as clicking, purchasing, etc.) performed by the object on the content platform, where the content platform service may store an interaction record, and where the interaction record is allowed by the object to be recommended, all or part of the interaction record of the object to be recommended may be acquired as the object feature of the object to be recommended.
In some embodiments, in order to enable the obtained personalized identifier to represent the tendency of the object to be recommended to the recommended content, the recommended content is enabled to meet the requirement of the object to be recommended, and the corresponding personalized identifier can be determined according to the selection operation of the object to be recommended. Specifically, obtaining the personalized identifier of the object to be recommended may include:
and responding to the selection operation of the object to be recommended on the target scene, and acquiring the identification of the corresponding target scene as the personalized identification of the object to be recommended.
The target scene may refer to a scene selected from at least one preset scene according to a selection operation of an object to be recommended. For example, at least one control may be displayed on a display interface of the terminal, where each control corresponds to a preset scene, and when an object to be recommended touches any control, the preset scene corresponding to the control is a target scene, and at this time, an identifier corresponding to the target scene may be obtained as a personalized identifier of the object to be recommended.
In some embodiments, the personalized identity of the object to be recommended may be an identity of the corresponding target scene.
For example, in some embodiments, the objects may have attributes of a plurality of different dimensions, specific information of each object corresponding to an attribute of any one dimension is attribute information, and the identifier corresponding to the target scene may include all or part of attribute information of the object to be recommended. For example, preset scenes corresponding to any one of the at least one dimension attribute may be set, and different identifications may be set for different preset scenes. For example, the object may include three dimensions of attributes a, B, and C, and a preset scene 1 corresponding to the attribute a, a preset scene 2 corresponding to the attribute B, a preset scene 3 corresponding to the attribute C, a preset scene 4 corresponding to the attribute a and the attribute B, a preset scene 5 corresponding to the attribute a and the attribute C, a preset scene 6 corresponding to the attribute B and the attribute C, and a preset scene 7 corresponding to the attribute a, the attribute B, and the attribute C may be set. The preset scene 1 to the preset scene 7 correspond to the marks 1 to 7 respectively. Because, when recommending content to an object to be recommended, the content platform generally focuses on the attributes of all dimensions of the object to be recommended, so that the recommended content matches with the attribute information of all dimensions of the object to be recommended. However, in the scheme provided by the embodiment of the application, the object to be recommended can select different preset scenes to pay attention to attribute information of all or part of dimensions of the content platform when recommending the content, and screen the recommended content according to the attribute information of the dimension of interest, so that the recommended content is matched with the attribute information of the dimension of interest, and the attribute information of other dimensions which are not paid attention to are not used for screening the recommended content. For example, if the object to be recommended does not want to obtain the recommended content for the attribute B, the preset scene 5 may be selected as the target scene, so as to add the personalized identifier corresponding to the scene to the object feature, so that when the content platform recommends the content to the object to be recommended, the attribute information of the attribute a and the attribute information of the attribute C corresponding to the target scene are focused, but not the attribute information of the attribute B. Therefore, the object to be recommended can determine the recommendation requirement aiming at any attribute by selecting any preset scene as a target scene, so that the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved.
In some embodiments, when the identifier of the corresponding target scene includes part of attribute information of the object to be recommended, the identifier of the corresponding target scene may further include a preset character. For example, when the preset scene corresponds to the attribute of all dimensions, the identification of the preset scene may include attribute information of the attribute a corresponding to the recommended object, attribute information of the attribute B corresponding to the recommended object, and attribute information of the attribute C corresponding to the recommended object. When the attribute of the corresponding part dimension of the scene is preset, for example, the attribute a and the attribute C corresponding to the scene 5 are preset, the identifier of the scene 5 may include attribute information of the attribute a corresponding to the recommended object, a preset character, and attribute information of the attribute C corresponding to the recommended object, where the preset character is a character for replacing the attribute information of the attribute B. Accordingly, when the content platform recommends content, the attribute information of the attribute a and the attribute information of the attribute C are focused, and the content platform cannot focus on the attribute information of the attribute B because the attribute B is replaced by the preset character.
For another example, in some embodiments, the identification of the corresponding target scene may be an identification obtained after training the initial tuning network using the training sample set of the corresponding target scene and the initial identification.
The sample set corresponding to the target scene may be a sample set in which a label corresponding to the target scene is set, so that the sample label may be used as a true value in the training process, the output result of the initial adjustment network is used as a predicted value, and parameters in the initial adjustment network and the output result are corresponding to the target scene by calculating the loss between the true value and the predicted value of the training sample. The training sample set may include a plurality of sample object features. A sample object may refer to an object that is a training sample. Sample object features may refer to object features of a sample object.
The identifier of the corresponding target scene may include the target identifier or attribute information of the object to be recommended. Accordingly, the initial identifier may include a preset identifier or attribute information of the sample object, for example, the initial identifier may be a randomly generated symbol vector or an attribute vector of the sample object. The target mark is obtained by a preset mark after training of the initial adjustment network. For example, the training sample object feature of any sample object may be characterized as (a, C), and for another example, the training sample object feature of any sample object may be characterized 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.
The initial adjustment network may be a preset network for adjusting the initial identifier, and may include, but is not limited to, at least one of a transducer network or a multi-layer aware network.
When the initial adjustment network is trained, a training sample set comprising a plurality of sample object features and a plurality of initial identifiers can be obtained, the initial identifiers are correspondingly spliced, the object features for training are obtained for each sample object feature, the initial adjustment network is trained by using the object features for training, the target adjustment network is obtained, and a vector corresponding to the initial identifier position in a result output when training is finished is used as an identifier of a corresponding target scene. For example, if the initial identifier includes attribute information of sample objects, object features of a plurality of different sample objects may be selected as a sample set for training, the attribute information of the plurality of different sample objects may be obtained, and the attribute information of each sample object and the object features may be spliced and then encoded and adjusted, where the attribute information of the different sample objects is different, for example, the sample object a and the sample object B correspond to the attribute aThe information can be a respectively 1 And a 2 And attribute a in the result output after training 1 And a 2 Vector b corresponding to position 1 And b 2 Can be regarded as the vector mapping result of the information of the corresponding attribute a of the sample object a and the sample object B, respectively. In this way, when recommending content for the object to be recommended, the attribute information of the object to be recommended may be obtained, and the vector corresponding to the attribute information of the object to be recommended is obtained from the training output result as the identifier corresponding to the attribute information in the personalized identifier thereof, for example, the information of the attribute a corresponding to the object to be recommended may be a 1 Then b obtained after training can be obtained 1 As a mapping result of the attribute A of the object to be recommended, and b 1 The attribute information of the object to be recommended is spliced with the object characteristics of the object to be recommended.
In some embodiments, the identifier of the corresponding target scene may include a target identifier and attribute information of the object to be recommended, and the initial identifier may include a preset identifier and attribute information of the sample object.
When the initial adjustment network is trained, a preset mark, a training sample set comprising a plurality of sample object features and a plurality of initial marks can be obtained, the preset mark, the initial mark and the sample object features are spliced for each sample object to obtain object features for training, the initial adjustment network is trained by using the object features for training to obtain a target adjustment network, vectors corresponding to the preset mark and the initial mark positions in a result output after the training is finished are used as marks of corresponding target scenes, and the vectors corresponding to the preset mark positions in the output result are the target marks. When recommending content for an object to be recommended, the attribute information of the object to be recommended can be obtained, a vector corresponding to the attribute information of the object to be recommended is obtained from the training output result to serve as an identifier corresponding to the attribute information in the personalized identifier, the target identifier is obtained, and the target identifier and the vector corresponding to the attribute information of the object to be recommended serve as identifiers of corresponding target scenes.
The vector mapping result of the target mark or the object attribute information to be recommended in the personalized mark is obtained through the training result obtained when the network is initially adjusted in training, so that the vector corresponding to the target mark or the object attribute information in the target scene mark carries the information of the target scene, the attention of the content recommendation algorithm model to the corresponding target scene can be further increased, more accurate push content is provided, and the recommendation requirement of the object to be recommended is met.
120. And splicing the personalized identifier and the object characteristics to obtain spliced object characteristics.
The personalized identifier and the object feature can be combined in a splicing mode, so that the spliced object feature is obtained. For example, the personalized identifier and the object feature represented in the form of a vector can be obtained by compiling and vector mapping the personalized identifier and the object feature, and then the vectors of the personalized identifier and the object feature are spliced, so that the splicing order is not limited, and the splicing order can be selected according to application scenes or different neural network models.
130. And encoding the spliced object features to obtain an initial encoding vector.
The spliced object features can be encoded through a long short term memory network (LSTM) or an attention network and the like to obtain initial encoded vectors, and the attention network can be a multi-head attention network or a self-attention network and the like.
In some embodiments, in order to obtain the personalized identifier and the association relationship between the object features, the spliced object features may be weighted based on an attention mechanism to obtain the initial encoding vector. Because the attention mechanism can be used for filtering the importance of the features, namely enhancing the information of important parts and inhibiting the information of unimportant parts, the attention mechanism is used for weighting the spliced object features, so that the personalized identification and the learning effect among the object features can be enhanced. Especially when the personalized identifier is an identifier corresponding to a target scene and the object characteristics comprise object operation characteristics and object attribute information, the global attention network through the attention mechanism can increase the learning effect between the personalized identifier and the object attribute information, increase the attention to the attribute information corresponding to the personalized identifier, provide more accurate push content and meet the recommendation requirement of the object to be recommended.
In the application, the personalized identifier is considered to be related to the object characteristics, and the related relationship can be acquired through an attention mechanism. For example, to enhance learning effects on relationships among personalized identifiers, object operational features, and object attribute information, and improve model training efficiency, spliced object features may be encoded using a multi-headed attention network to obtain an initial encoding vector. The Multi-head attention network is mainly composed of Multi-head self-attention layers (Multi-head self-attention). By means of a attentiveness mechanism, by means of a parameter matrix W Q (request vector parameter matrix), W K (Key vector parameter matrix) and W V (value vector parameter matrix) respectively performing linear transformation on the spliced object feature vectors to obtain attention weights Q (request vector sequence), K (key vector sequence) and V (value vector sequence), and performing weight calculation on the spliced object feature vectors according to Q, K and V to obtain initial coding vectors, wherein W Q 、W K W is provided V Is learned during the training process. Therefore, each position of the spliced object feature vector can capture the information of the whole sequence through the multi-head attention network, and features with different dimensions can be learned.
For example, in practice, the multi-head attention network may include multiple encoded layers, each of which includes a multi-head attention layer, and may include a feed-forward network layer (MLP) connected after the multi-head attention layer. The object characteristics after splicing can be input into a multi-head attention network, after the multi-head attention layer of the coding layer carries out self-attention calculation on the input vector, the self-attention calculated result is sent to the feedforward neural network layer of the layer, the processing result is sent to the next coding layer after being processed by the feedforward neural network layer of the layer, and the corresponding processing is repeated until all the multi-layer coding layers are executed, so that the initial coding vector is obtained. Furthermore, layerNorm operation may be applied before each decoding layer, and residual concatenation may be applied after each decoding layer.
140. And adjusting the initial coding vector by the target parameters corresponding to the personalized identifiers to obtain a target vector.
The target parameter may refer to a parameter for adjusting the initial encoding vector to a target vector corresponding to the personalized identity. The target parameters may include, but are not limited to, at least one for normalization parameters, weight parameters, bias parameters, residual parameters, activation parameters, and the like.
In some embodiments, the target parameter may be a parameter in a target adjustment network, and the adjusting the initial encoding vector to obtain the target vector by identifying the corresponding target parameter in a personalized manner may include: and adjusting the initial coding vector through a target adjustment network to obtain a target vector.
The target adjustment network may be a preset adjustment network for adjusting the initial encoding vector, or may be a network obtained after training the initial adjustment network. The target tuning network may include, but is not limited to, at least one of a transducer network or a multi-layer aware network, etc.
For example, in some embodiments, the target parameters may include normalized parameters and weight coefficients, and the adjusting the initial encoding vector to obtain the target vector by identifying the corresponding target parameter in a personalized manner may include:
Normalizing the initial coding vector by the normalization parameter to obtain an intermediate vector;
and weighting the intermediate vector by the weight coefficient to obtain a target vector.
The normalization parameter refers to a parameter used for normalization processing, and for example, the normalization parameter may be a Softmax function, a sigmoid function, or a Mysql function. The normalization process refers to a process of adjusting the value of the initial encoding vector to be within a preset numerical range by adopting a normalization parameter, namely, the value of the intermediate vector obtained by the normalization process is within the preset numerical range. In practical application, after the intermediate vector is weighted by the weight coefficient, the method may further include performing bias calculation on the weighted result by the bias value to obtain the target vector.
The weight coefficient refers to a parameter for weighting the intermediate vector. And weighting the intermediate vectors by adopting the weight coefficients, and adjusting the weights of the numerical values in the intermediate vectors so as to adjust the weights of the personalized identifications and the corresponding numerical values of the object features.
In some embodiments, the target tuning network may include a target normalized network and a target first multi-layer perceived network, the normalized parameter may be a parameter of the target normalized network, and the weight coefficient may be a parameter of a second target multi-layer perceived network. Normalizing the initial encoding vector by the normalization parameter to obtain an intermediate vector may include: and carrying out normalization processing on the initial coding vector through a target normalization network to obtain an intermediate vector. The weighted summation processing is performed on the intermediate vector through the weight coefficient to obtain a target vector, which may include: and weighting the intermediate vector through the first target multi-layer perception network to obtain a target vector.
Therefore, the normalization processing is carried out on the input initial coding vector through the target normalization network, the dimension influence between the personalized identifier and the numerical value of the object feature can be eliminated, the input vector is simplified, and the weighting processing is carried out on the intermediate vector output by the target normalization network through the first target multi-layer perception network, so that the weight of the numerical value in the intermediate vector is adjusted. Because the weighting processing can play a role in enhancing the characteristics of the corresponding positions through the weights, the information of important parts is enhanced, so that the output target vector is more focused on the information corresponding to the personalized identifier of the object to be recommended, the content conforming to the personalized identifier is recommended, the recommendation requirement of the object to be recommended is met, and the accuracy of pushing the content is improved.
For example, in practical applications, the first target multi-layer sensing network may be a neural network with a unidirectional structure, and may include an input layer, a hidden layer, and an output layer. Wherein, the layers are fully connected, each layer comprises a plurality of neurons, the neurons of the same layer are not connected with each other, and the transmission of interlayer information is only carried out along one direction. Each node of more than one layer of each neuron is output as input, linear transformation (combined with bias) is carried out through a weight coefficient, and nonlinear function activation is carried out, so that data becomes linearly separable at an output layer, and the output of each node is transmitted to the node of the next layer. It should be noted that the input layer does not perform any processing on the input vector. Therefore, through the multi-layer processing of the first target multi-layer perception network, feature extraction can be performed through the linear transformation process of each layer, the function between the personalized identification and the object features is learned, and the input intermediate vector is adjusted to be a feature vector which is more focused on the information corresponding to the personalized identification of the object to be recommended.
For example, in practical application, a network model including multiple multi-head attention networks and multiple target adjustment networks may be set, and the processes of steps 130 to 140 are repeatedly performed on the spliced object feature vectors through the network model until the final first target multi-layer perception network outputs the target vector. For example, each multi-head attention network comprises a coding layer, and a target adjustment network is sequentially connected to the multi-head attention network. After the vector of the object feature after the splicing is input into the network model, the vector is sequentially subjected to coding, normalization processing and weighting processing through a multi-head attention network and a target adjustment network, the processing result is sent to the next multi-head attention network, and the corresponding processing is repeated until all the multi-head attention networks and the target adjustment networks are executed, so that the target vector is obtained. Therefore, through repeated coding and normalization processing and weighting processing of the coding result, attention of information corresponding to the personalized identification of the object to be recommended can be increased through repeated learning and adjustment processes, so that content conforming to the personalized identification is recommended, the recommendation requirement of the object to be recommended is met, and the accuracy of pushing the content is improved.
150. And determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
Wherein the target content is content determined from the target vector. For example, a plurality of recommendation algorithms may be used to determine the content corresponding to the target vector based on the target vector, and the content is recommended to the object to be recommended by the content platform. Different recommendation algorithms can determine the content corresponding to the target vector through corresponding algorithm models. The recommendation algorithm model may include, but is not limited to, a collaborative filtering recommendation algorithm model, a factorizer algorithm model, a matrix decomposition algorithm, or the like.
For example, in practical applications, the input target vector may be processed using a content recommendation algorithm model, and a recommendation sequence may be output, where the recommendation sequence may include a plurality of target contents or target content identifications determined according to the target vector. For example, when the content is a video, the target content may be video identifiers corresponding to a plurality of videos respectively, and the content platform may acquire and display preview interfaces of the plurality of videos on a display interface of the terminal used by the object to be recommended through the video identifiers in the recommendation sequence.
In some embodiments, the foregoing target adjustment network may be trained to adjust parameters in the target adjustment network to target parameters corresponding to the personalized identity by the following steps. Specifically, before the personalized identifier of the object to be recommended is obtained, the method may further include:
Acquiring an initial adjustment network and an initial discrimination network;
and performing countermeasure training on the initial adjustment network and the initial discrimination network to obtain a target adjustment network, wherein the target adjustment network is used for adjusting the initial coding vector through target parameters.
The initial adjustment network may be an adjustment network preset according to an application scenario or experience, and the initial discrimination network may be a discrimination network preset according to an application scenario or experience.
In the training process, the initial adjustment network is used as a generating network, an initial judging network is introduced to judge the output result of the initial adjustment network, and the initial adjustment network and the initial judging network are alternately trained to adjust the parameters of the initial adjustment network to the target adjustment network. Therefore, through the countermeasure training process, the parameters in the initial adjustment network are adjusted to the target parameters corresponding to the personalized identifications, the capability of the initial adjustment network for adjusting the initial coding vector can be improved, and the target parameters can be used for adjusting the initial coding vector, so that the information of important parts is enhanced, the output target vector is more focused on the information corresponding to the personalized identifications of the objects to be recommended, the content conforming to the personalized identifications is recommended, and the recommendation requirement of the objects to be recommended is met. In addition, the method of the embodiment of the application comprises the steps of encoding, adjusting and determining the target content, wherein only the target adjusting network used for the adjusting process is adjusted in the training process, and the network used for encoding and determining the target content is not adjusted, so that the quantity of parameters required to be adjusted in the training process is small, and the training efficiency is improved.
For example, in the countermeasure training process, after the initial adjustment network processes the training samples, the initial adjustment network inputs the adjustment results into the initial discrimination network, and the initial discrimination network can discriminate the training samples, update parameters in the initial adjustment network according to the discrimination results, and continuously perform iterative training until the loss function corresponding to the discrimination results converges, thereby obtaining the target adjustment network.
In some embodiments, obtaining an initial tuning network and an initial discrimination network may include:
constructing an initial adjustment network based on an initial normalization network and a first initial multi-layer perception network, wherein the initial normalization network and the first initial multi-layer perception network are used for adjusting input vectors through initial parameters;
and constructing an initial discrimination network based on a second initial multi-layer perception network, wherein the second initial multi-layer perception network is used for determining a discrimination result of the output result of the target adjustment network.
The initial parameters may be parameters in an initial adjustment network, and may include, but are not limited to, at least one of normalization parameters, weight parameters, bias parameters, residual parameters, activation parameters, and the like. In some implementations, the initial parameters may include initial normalization parameters and initial weight coefficients. Through the countermeasure training process, the initial normalization parameters and the initial weight coefficients in the initial adjustment network can be adjusted to the normalization parameters and the weight coefficients.
For example, in practical applications, the second target multi-layer sensing network may be a neural network with unidirectional structure, and may include an input layer, a hidden layer, and an output layer. The connection relation and the function of each layer of the second target multi-layer perception network can be seen from the first target multi-layer perception network. Therefore, through the multi-layer processing of the second target multi-layer sensing network, the output result of the target adjusting network is classified through the linear transformation process of each layer, and the classification result is obtained and is used as a discrimination result.
The initial adjustment network and the initial discrimination network are simple in structure and only have a small number of parameters, the effect of saving the parameters is achieved, and training efficiency can be improved.
In some embodiments, performing countermeasure training on the initial adjustment network and the initial discrimination network to obtain the target adjustment network may include:
acquiring a preset coding 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 characteristics;
Splicing the initial identification and the sample object characteristics to obtain spliced sample object characteristics;
inputting the characteristics of the spliced sample objects into a preset coding network, and coding the characteristics of the spliced sample objects to obtain sample coding vectors;
inputting the sample coding vector into an initial adjustment network to obtain a training coding vector;
inputting the training coding vector into an initial discrimination network to obtain discrimination results;
based on the discrimination result, the initial adjustment network and the initial discrimination network are trained alternately by adopting a preset loss function, so that a target adjustment network and a personalized identifier are obtained, wherein the personalized identifier is an identifier corresponding to a target scene.
The sample set corresponding to the target scene may be a sample set in which a label corresponding to the target scene is set, so that the sample label may be used as a true value in the training process, the output result of the initial adjustment network is used as a predicted value, and parameters in the initial adjustment network and the output result are corresponding to the target scene by calculating the loss between the true value and the predicted value of the training sample. A sample object may refer to an object that is a training sample. Sample object features may refer to object features of a sample object.
The preset encoding network may be a preset network for encoding, for example, a long short term memory network (LSTM) or an attention network. It should be noted that, the preset encoding network may be a pre-trained network for encoding, and in the countermeasure training process of the embodiment of the present application, the preset encoding network is used for encoding the characteristics of the spliced sample object, and the network parameters are not adjusted along with the iterative training.
The preset loss function refers to a preset function for evaluating whether training is completed, for example, the preset loss function may be used to evaluate the degree of difference between the predicted value and the actual value, and may be any loss function, for example, a log-log loss function, a square loss function, an exponential loss function, or a range loss function, and may be set according to specific needs.
In the process of countermeasure training, the initial mark is added into a training sample to train to obtain the personalized mark, so that the personalized mark also learns and carries the information of the target scene, for example, when the countermeasure training is finished and the target adjustment network is obtained, the value of the position corresponding to the initial mark can be used as the personalized mark from the training coding vector finally output by the target adjustment network. When the spliced object features are encoded by using a long short-term memory network (LSTM) or an attention network and the like, or when an initial encoding vector is adjusted by a target adjustment network, the personalized identifier can increase the attention of attribute information corresponding to the personalized identifier through the learning effect between the personalized identifier and the object attribute information, so that more accurate push content is provided, and the recommendation requirement of an object to be recommended is met. When the content recommendation algorithm model determines target content according to the target vector, the personalized identifier can also increase the attention of the content recommendation algorithm model to the corresponding attribute information, provide more accurate push content and meet the recommendation requirement of the object to be recommended.
For example, in the countermeasure training process, the spliced sample object features can be encoded through a preset encoding network, the obtained sample encoding vector is adjusted through an initial adjustment network to obtain a training encoding vector, the initial judgment network can classify the training encoding vector through a second initial multi-layer perception network, the attribute information of the sample object represented by the training encoding vector is judged according to the classification result to be used as the judgment result of the initial judgment network, the attribute information recorded by the label of the training sample is used as a true value, the attribute information judged by the initial judgment network is used as a predicted value, the loss of the true value and the predicted value of the training sample is calculated, and the parameters in the initial adjustment network are adjusted through gradient descent or other optimization methods in the training process until the loss function converges, so that the target adjustment network is obtained. By adding disturbance to interfere with the training process, the countermeasure training can be realized, and the robustness and generalization of the initial adjustment network can be improved.
In addition, in the countermeasure training process, the sample object features of different scenes can be selected for the countermeasure training, so that the parameters of the initial adjustment network can capture the feature information of the scene in the training process, and the parameters of the initial adjustment network are adjusted to the target parameters corresponding to the scene, so that the obtained target adjustment network can enable the input initial coding vector to learn the information of the target scene, the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved.
It should be noted that, the corresponding target scene can be modified by setting different labels for the sample object features, so that in practical application, different labels can be set for the same sample object features according to different preset scenes, and an adjustment network and an identification corresponding to any preset scene can be obtained through countermeasure training. For example, in the countermeasure training process, tags including different attribute information may be set for training samples for different preset scenes. Because the target scene is a scene related to the attribute of the object, in the countermeasure training process, the discrimination network captures attribute information corresponding to the target scene by calculating the loss between the true value and the predicted value, so that the obtained target adjustment network can enable the input initial coding vector to learn the attribute corresponding to the target scene, the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved.
For example, an object may include attributes for three dimensions, attribute A, attribute B, and attribute C, attribute A may include a 1 And a 2 Two kinds of attribute information, attribute B may include B 1 And b 2 Two kinds of attribute information, attribute C may include C 1 And c 2 Two kinds of attribute information, wherein the attribute information of the corresponding attribute A of the object A (which can be an object to be recommended or a sample object) is a 1 Attribute information corresponding to attribute B is B 1 Attribute information corresponding to attribute C is C 1 . Preset scenes 1 corresponding to the attributes a and B, and preset scenes 2 corresponding to the attributes a and C may be set. Obviously, for preset scene 1, the content that object a expects to be recommended only focuses on its attribute information a 1 And attribute information b 1 The recommended attention attribute information c is not expected 1 I.e. the object to be recommended expects the recommended content not to pay attention to the attribute information of its attribute C); for preset scene 2, object a is expected to be recommended to focus on only its attribute information a 1 And attribute information c 1 Corresponding attribute information b which is not expected to be recommended 1 Is a content of (3). Note that, in the embodiment of the present application, the content of the attention attribute information refers to the content corresponding to the attribute information. For example, if a vector (which may be a target vector or a training encoding vector) output from the network is adjusted to focus on the attribute a and the attribute B of the object a, it is considered that the content corresponding to the vector may be in the dimension of the attribute a and the attribute B, based on the attribute information a of the object a 1 Attribute information b 1 Obtained after screening, namely the obtained content and attribute information a 1 Attribute information b 1 Related to attribute information a 2 Attribute information b 2 Uncorrelated, but not sifted in the dimension of attribute CSelecting the obtained content and attribute information c 1 Attribute information c 2 Related content.
Therefore, in the countermeasure training process, if the target adjustment network and the personalized identifier corresponding to the preset scene 1 are to be trained, the training sample set may be set with the tag as the attribute information c 1 When the discrimination network judges the attribute information of the sample object characterized by the training encoding vector, if the discrimination network cannot recognize the attribute information of the attribute C of the sample object as C through the training sample set 1 The training code vector output by the adjustment network is considered to be incapable of representing the attribute information of the sample object in the attribute C dimension, so that the content corresponding to the training code vector output by the adjustment network is considered to be irrelevant to the attribute C of the sample object, and the condition that the object to be recommended is not recommended to pay attention to the attribute information C of the object to be recommended can be satisfied 1 Is a content of the content management system.
The content recommendation scheme provided by the embodiment of the application can be applied to various content recommendation scenes. For example, taking a content platform as an example, acquiring a personalized identifier of an object to be recommended and object characteristics of the object to be recommended; splicing the personalized identifier and the object characteristics to obtain spliced object characteristics; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector by the target parameter corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
The proposal provided by the embodiment of the application can splice and encode the initial encoding vector according to the personalized identifier and the object characteristics, so that the attention to the personalized identifier is increased in the content recommendation process, and the push content related to the personalized identifier is provided. And then, the initial coding vector is adjusted through the target parameter corresponding to the personalized identifier, so that the initial coding vector can learn the information corresponding to the personalized identifier through the target parameter, the attention to the personalized identifier is further increased, the content conforming to the personalized identifier is recommended, the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved.
The method provided by the embodiment of the application can use the initial discrimination network to conduct countermeasure training on the initial adjustment network, so as to obtain the target adjustment network. Therefore, in the embodiment of the application, only the target adjusting network used for the adjusting process is adjusted in the training process, the network used for encoding and determining the target content process is not adjusted, the parameter quantity required to be adjusted in the training process is small, and the training efficiency is improved.
In addition, the scheme of performing countertraining through the training sample set corresponding to the target scene to obtain the target adjustment network and the personalized identification is combined, so that the parameters of the initial adjustment network capture the attribute information corresponding to the target scene, the obtained target adjustment network can enable the input initial coding vector to learn the attribute corresponding to the target scene, the recommendation requirement of the object to be recommended is met, and the accuracy of the push content is improved. In addition, the personalized identification obtained through training learns and carries information of a target scene, so that the attention of a content recommendation algorithm model to corresponding attribute information of the content recommendation algorithm model can be further increased, more accurate push content is provided, and the recommendation requirement of an object to be recommended is met.
Blockchains are novel application modes of computer technologies such as distributed data storage, point-to-point transmission, consensus mechanisms, encryption algorithms, and the like. The Blockchain (Blockchain), which is essentially a decentralised database, is a string of data blocks that are generated by cryptographic means in association, each data block containing a batch of information of network transactions for verifying the validity of the information (anti-counterfeiting) and generating the next block. The blockchain may include a blockchain underlying platform, a platform product services layer, and an application services layer.
The blockchain underlying platform may include processing modules for object management, basic services, smart contracts, and operation detection. The object management module is responsible for identity information management of all blockchain participants, including maintenance of public and private key generation (account management), key management, maintenance of corresponding relation between real identities of objects and blockchain addresses (authority management), etc., and under the condition of authorization, management and audit of transaction conditions of certain real identities, and provision of rule configuration (wind control audit) of risk control; the basic service module is deployed on all block chain node devices, is used for verifying the validity of a service request, recording the service request on a storage after the effective request is identified, for a new service request, the basic service firstly analyzes interface adaptation and authenticates the interface adaptation, encrypts service information (identification management) through an identification algorithm, and transmits the encrypted service information to a shared account book (network communication) in a complete and consistent manner, and records and stores the service information; the intelligent contract module is responsible for registering and issuing contracts, triggering contracts and executing contracts, a developer can define contract logic through a certain programming language, issue the contract logic to a blockchain (contract registering), invoke keys or other event triggering execution according to the logic of contract clauses to complete the contract logic, and simultaneously provide a function of registering contract upgrading; the operation detection module is mainly responsible for deployment in the product release process, modification of configuration, contract setting, cloud adaptation and visual output of real-time states in product operation, for example: alarms, detecting network conditions, detecting node device health status, etc.
The platform product service layer provides basic capabilities and implementation frameworks of typical applications, and developers can complete the blockchain implementation of business logic based on the basic capabilities and the characteristics of the superposition business. The application service layer provides the application service based on the block chain scheme to the business participants for use.
In one embodiment, the electronic device provided by the application can be used as a node in a blockchain system, after the personalized identifier of the object to be recommended and the object characteristic of the object to be recommended are obtained, the personalized identifier and the object characteristic are spliced, the spliced object characteristic is obtained, the spliced object characteristic is encoded, an initial encoding vector is obtained, the initial encoding vector is adjusted through the target parameter corresponding to the personalized identifier, the target vector is obtained, the target content corresponding to the target vector is determined, the target content is verified, and after verification, the target content is used as a new block and stored in a blockchain, so that the extraction results cannot be tampered. Or after the initial coding vector is adjusted to obtain a target vector, the target vector is verified, and after the verification is passed, the target vector is used as a new block and stored in a block chain, so that the extraction results are ensured not to be tampered.
The method described in the above embodiments will be described in further detail below.
In this embodiment, a method according to an embodiment of the present application will be described in detail by taking an application to a content recommendation model as an example.
As shown in fig. 2a, the content recommendation model may include a splicing module, a preset encoding network, an adjusting network, a discriminating network, and a recommendation algorithm model. It should be noted that, when training the content recommendation model, the content recommendation model in fig. 2a may be a preset content recommendation model in this document, the stitching module is an initial stitching module, the adjustment network is an initial adjustment network, the determination network is an initial determination network, the task special indicator is an initial task special indicator, the personalized indicator is an initial personalized indicator, the object operation feature is an object operation feature for training, and the object feature is a training encoding vector. After training the preset content recommendation model by using a plurality of sample object features applied to the corresponding target scene, the content recommendation model in fig. 2a is a target content recommendation model which can be used as a text, the stitching module is a target stitching module, the adjustment network is a target adjustment network, the judgment network is a target judgment network, the task special prompt is a target task special prompt, the personalized prompt is a target personalized prompt, and the object representation is a target vector.
As shown in fig. 2b, a specific flow of a content recommendation method is as follows:
210. the method comprises the steps of obtaining a preset content recommendation model, wherein the preset content recommendation model comprises an initial splicing module, a preset coding network, an initial adjusting network, an initial judging network and a recommendation algorithm model.
The preset content recommendation model can be a content recommendation model preset according to an application scene or experience, wherein the initial splicing module is used for splicing an initial task special prompt, an initial personalized prompt and sample object characteristics; the preset coding network is used for coding the spliced object characteristics; the initial adjustment network is used for adjusting the coded vector; the initial discrimination network is used for countermeasure training and outputting discrimination results; the recommendation algorithm model is used for determining target content according to the result of the network output adjustment.
For example, after the preset content recommendation model is obtained, one of the plurality of preset scenes may be arbitrarily selected as a target scene, and the sample object features of the corresponding target scene are used to train the preset content recommendation model to obtain the target content recommendation model of the corresponding target scene. For example, an object has three dimensions of attributes, attribute G, attribute A, and attribute C. The preset scenes corresponding to the attribute A and the attribute C are selected as target scenes, namely the sample object in the target scenes has a fair demand on the attribute G, namely the content expected to be recommended does not pay attention to the attribute information of the attribute G, and the sample object features corresponding to the target scenes can be generated by setting the label of the sample object as the attribute information of the sample object attribute G.
It should be noted that, the initial splicing module and the initial adjustment network are fairness modules in the embodiment of the present application, so that in the training process, only the initial splicing module, the initial adjustment network and the initial discrimination network are adjusted, the preset coding network and recommendation algorithm model are not adjusted, and the target splicing module and the target adjustment network corresponding to the target scene are obtained by adjusting the initial splicing module and the initial adjustment network, so that fairness recommendation for the target scene can be realized. According to the embodiment of the application, only part of network structures in the preset content recommendation model are adjusted, so that training efficiency can be greatly improved, other unadjusted network structures can be used for different preset scenes, universality of the preset content recommendation model is improved, and efficiency is improved.
For example, according to the embodiment of the application, on the basis of the preset coding network and the recommendation algorithm model, the fairness module (the splicing module and the adjustment network) capable of being adjusted according to the target scene is added, so that different preset scenes are determined as target scenes, the preset content recommendation model is trained into a plurality of target content recommendation models respectively corresponding to different target scenes, and in practical application, the corresponding target content recommendation model can be selected for accurately recommending the object to be recommended according to different fairness requirements of the object to be recommended (namely, the selection operation of the target scenes), so that the recommended content meets the fairness requirements of the object to be recommended, and the diversified fairness requirements of the object to be recommended are met.
220. And acquiring and inputting the initial task special prompt, the initial personalized prompt and a plurality of sample object features corresponding to the target scene into a preset content recommendation model.
The initial task specific hints (i.e., initial identification), the initial personalized hints (i.e., attribute information of sample objects), and sample object features corresponding to the target scene may be obtained, and these information may be used to train a preset content recommendation model.
230. And acquiring and splicing the initial task special prompt, the initial personalized prompt and the sample object characteristics through a splicing module to obtain spliced sample object characteristics.
For example, the initial task specific hinting may be a character consisting of 10 randomly initialized symbol vectors, and the initial personalized hinting may be a property vector of m sample objects, where m is a positive integer. The stitched sample object features in step 230 may be referred to as object operational features. The spliced sample object features may be represented as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,representing the characteristics of the spliced sample object, +.>Representing an initial task specific reminder, p u Representing an initial personalized prompt +.>Representing sample object features, k represents the kth task (i.e., fairness corresponding to the target scenario Demand), u represents a sample object, |s u The i represents the length of the sample object feature sequence. Therefore, the spliced sample object features can be obtained by splicing the initial task special prompt, the initial personalized prompt and the sample object features through the splicing module.
240. And inputting the characteristics of the spliced sample object into a preset coding network and an initial adjustment network, and obtaining a training coding vector through coding and adjustment.
The preset encoding network can adopt a Transformer Encoder architecture. The transform module is a model framework built depending on the attention mechanism, and the overall architecture can be divided into an input layer, an encoding layer, a decoding layer and an output layer. The coding layer in the transform network may be Transformer Encoder architecture, and is composed of a Multi-head self-attention module (Multi-head self-attention) and a feed-forward network layer (MLP), and a LayerNorm operation is applied before each block, and a residual connection is applied after each block, if the transform network has multiple decoding layers, the spliced sample object features are input into the coding layer, the coding layer performs self-attention calculation on the spliced sample object features, then sends the self-attention calculation result to the feed-forward neural network of the layer, and sends the processing result to the coding layer of the next layer through the feed-forward neural network of the layer, and the corresponding processing is repeated until all the multiple coding layers perform.
In practical applications, an Adapter module (i.e. an initial adjustment network) may be used, and a specific network (Adapter module) with only a small number of parameters is inserted between the Transformer networks to achieve the adaptation effect for a specific task. The process of encoding and tuning using a transducer network with an Adapter module inserted can be represented as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,representing object u inThe output of the first layer with respect to task k represents the first layer, k represents the kth task,/and->To represent a function of the layer i fransformer network with Adapter module,representing the attention layer in the transducer network, and FNN represents the feedforward neural network layer in the transducer network.
It should be noted that a plurality of Adapter modules may be inserted into the transform network to adjust the encoding results of a plurality of encoding layers in the transform network, respectively. In some embodiments, multiple Adapter modules may be inserted in one coding layer of the transducer network, e.g., one Adapter module is inserted after the attention layer and the feedforward neural network layer of one coding layer of the transducer network, respectively, as shown in the above equation.
Wherein, the Adapter module may comprise a LayerNorm layer and two MLP (feedforward neural network) layers, and the adjustment process of the Adapter module may be represented by the following formula:
Wherein X represents the input of an Adapter function, which is a function of the Adapter module, k represents the kth task,and +.>Representing a trainable parameter matrix (i.e., target parameters) in the Adapter module, layerNorm represents the LayerNorm function.
After the Adapter module is added, the fair object representation can be obtained through encoding by a transducer network inserted with the Adapter module. For example, when the characteristics of the sample objects after being spliced are processed by the above formula, the obtained training encoding vector can be expressed as follows:
wherein, the liquid crystal display device comprises a liquid crystal display device,representing the training code vector->Representing the characteristics of the spliced sample object, Θ represents a parameter in the transducer network, fseq () represents the generation sequence using the function seq (), it being noted that Θ does not change during the challenge training process. />The last output of the transducer network in which the Adapter module is inserted is shown (i.e., as a training code vector).
250. And inputting the training coding vector into an initial discrimination network to obtain a discrimination result.
In order to train and verify the output result of the initial adjustment network, the embodiment of the application can take the vector output by the adjustment network in the countermeasure training as the representation of the sample object, and evaluate the adjustment effect of the initial adjustment network 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 discrimination network cannot correctly recognize the attribute information of the sample object recorded in the sample tag according to the vector output by the adjustment network, the result of determining the initial adjustment network is considered to be able to achieve fair recommendation meeting the target scene expectations, and if so, the result of determining the initial adjustment network is considered to be unable to achieve fair recommendation meeting the target scene expectations. For example, the target scene has a fairness requirement for the attribute a, that is, the content that the target scene expects to be recommended does not pay attention to the attribute information of the sample object attribute a, and if the attribute information of the attribute a of the sample object cannot be determined by adjusting the vector output by the network, the result of initially adjusting the network output is considered to be able to realize the fairness recommendation that meets the expectations of the target scene.
260. Based on the discrimination result, the initial adjustment network and the initial splicing module are adjusted to obtain a target adjustment network and a target splicing module so as to obtain a target content recommendation model.
Through the alternate training of the countermeasure and the generator, the countermeasure and the generator are mutually game in the training process, so that a robust fairness module is obtained through training. For example, the target adjustment network may be obtained by calculating the loss of the true value (sample label) and the predicted value (training encoding vector), and adjusting the parameters in the initial adjustment network (adapter module) by gradient descent or other optimization methods during the training process until the loss function converges. As shown in fig. 2c, the target content recommendation model may at least include a target adjustment network, a target stitching module, a preset encoding network, and a recommendation algorithm model.
Specifically, the fairness module may be trained using a method of countermeasure training. Challenge training consists of two modules: (1) a generator (i.e., generating a network, fairness module): the goal of the generator is to generate a representation of the sample object that enables accurate recommendation of the sample object, and the personalized identity in the representation meets the fairness requirements of sample object selection (i.e., meets the requirement that the sample object is not expected to be recommended content and does not pay attention to the attribute information of the corresponding attribute of the target scene). (2) The objective of the challenge (i.e., the discrimination network) is to determine the attribute information of the sample object based on the vector output by the adjustment network. The countermeasure may employ a two-layer MLP (feedforward neural network). For example, in countermeasure training, attribute information of a sample object may be predicted by a countermeasure through a two-layer MLP (feedforward neural network) with attribute information of a target scene corresponding to which attention is not desired as a true value.
In the countermeasure training process, the purpose of the discrimination network is to judge the attribute information of the sample object as much as possible, and the purpose of the adjustment network is to prevent the discrimination network from judging the attribute information of the sample object as much as possible. In this way, a classification loss function for judging the result of the discrimination network classifying the vector output by the adjustment network can be set.
Wherein phi is k Representing parameters of the discrimination network, θ k Indicating that the parameters of the network are adjusted,representing a desire for an object property, B represents a set of sample objects (i.e., a collection of sample objects), a i Attribute representing undesired recommended +.>Representing the training code vector, u representing the sample object, and P representing the probability distribution. When the classification loss function converges, the discrimination network is considered to be unable to judge the attribute information of the sample object according to the vector output by the adjustment network.
In addition, in the countermeasure training process, whether the vector output by the adjustment network can recommend accurate content for the sample object can be judged by calculating the loss of the positive and negative samples. In this way, a recommendation loss function for evaluating whether a vector adjusting the network output can recommend accurate content for a sample object can be set.
Wherein S is + Representing a positive sample, i.e. a real interaction of sample objects, S - Represents a negative set of samples, u represents an object, (u, v) j ) Representing sample object features, B representing a sample object set (i.e., a collection of sample objects), log σ representing a sigmoid function, and selecting object features of a sample object that have not interacted from among the object features of the sample object as a negative sample in the embodiment of the present application.
In summary, during the countermeasure training process, the two loss functions may be combined to obtain the following new loss functions:
where λ represents a weight, the weight λ may be used to adjust the weight between the two loss functions. The judging network can influence the adjusting network to cause the recommended result to be poor, so that whether the judging network can recognize the attribute information of the sample object and whether the vector output by the adjusting network can recommend accurate content for the object in the training process can be judged through the combination of the two loss functions at the same time until the combination of the two loss functions converges to obtain a target content recommendation model.
270. And acquiring and inputting object characteristics of the object to be recommended into a target content recommendation model so as to recommend the target content to the object to be recommended.
After the countermeasure training is received, the obtained target content recommendation model may be used for content recommendation. As shown in fig. 2c and 2d, a specific flow of content recommendation using the target content recommendation model is as follows:
271. And splicing the target task special prompt, the target personalized prompt and the object characteristics of the object to be recommended through the target splicing module to obtain spliced object characteristics.
The target splicing module can store a target task special prompt and a target personalized prompt. For example, the target task special indicator may be a vector corresponding to the initial task special indicator position in the output result of the target coding network when the target content recommendation model is obtained by training the preset content recommendation model using the spliced sample object features, that is, the target task special indicator is obtained after the target task special indicator is subjected to countermeasure training. The target personalized prompter is a vector mapped by attribute information of the object to be recommended, and can be composed of attribute vectors of m objects to be recommended, wherein m is a positive integer. For example, a vector corresponding to the initial personalized prompter position in the result output at the end of the countermeasure training may be used as the corresponding target personalized prompter, that is, the target personalized prompter is obtained after the countermeasure training for the initial personalized prompter. It should be noted that, in step 220, the obtained initial task special prompt and initial personalized prompt may be stored in the initial splicing module as parameters of the initial splicing module, and in the course of countermeasure training, the initial task special prompt and initial personalized prompt in the initial splicing module are continuously adjusted until the training is completed to obtain the target task special prompt and the target personalized prompt.
272. And encoding the spliced object features through a preset encoding network to obtain an initial encoding vector.
When the preset coding network is Transformer Encoder architecture, the spliced object features can be coded through a coding layer in the converter network, so that an initial coding vector is obtained.
273. And adjusting the initial coding vector through a target adjustment network to obtain a target vector.
When the target adjustment network comprises a LayerNorm layer and two MLP (feedforward neural network) layers, layer normalization can be carried out on the hidden layers through the LayerNorm layer, namely, input of all neurons is normalized, and then linear transformation is carried out on target vectors through the two MLP (feedforward neural network) layers, so that the target vectors are obtained. Namely, step 271 to step 273 finish the encoding of the object characteristics of the object to be recommended through the target splicing module, the preset encoding network and the target adjusting network, and obtain the object representation of the corresponding target scene of the object to be recommended.
274. And determining target content corresponding to the target vector through a recommendation algorithm model so as to recommend the target content to the object to be recommended.
The recommendation algorithm model may be a CTR (click-through rate) recommendation algorithm model, and by means of the CTR recommendation algorithm model, a recommendation sequence including a target content identifier may be output by completing feature combination or conversion according to an input target vector, so as to obtain and recommend the target content to an object to be recommended according to the target content identifier in the recommendation sequence.
From the above, in the preset content recommendation model, the recommendation algorithm model is a pre-trained recommendation model, and the recommendation model has no personalized fairness requirement and can recommend the object having no fairness requirement. On the basis, the embodiment of the application further designs a module (namely a fairness module) which enables the preset content recommendation model to fairly recommend different preset scenes. The fairness module may include two parts, one part being a personalized prompter (a prompt, i.e., an initial stitching module), and the initial stitching module may stitch the personalized prompter before the object operation feature; another part is an Adapter module (Adapter module) that can be inserted in the sequence model (i.e. the preset encoding network). The initial splicing module and the adapter module only have a small amount of parameters, so that the effects of effective parameters and saving parameters can be realized. In addition, for different fairness requirements of the object (i.e., fairness requirements corresponding to different preset scenarios), different fairness modules may be obtained using training. Through adding the sequence model of the fairness module (namely the target splicing module and the transducer network inserted with the Adapter module), the fairness object representation (namely the target vector) corresponding to different scenes can be obtained, so that the recommendation algorithm model can recommend the expected content of the object to be recommended for the object to be recommended according to the fairness object representation, and the fairness requirement of individuation to be recommended is met.
In addition, in order to verify the effect of the target content recommendation model in the embodiment of the present application, experiments are performed on data sets acquired from the content platform 1 and the content platform 2, where the experiments assume that an object to be recommended has fairness requirements for the attribute G, the attribute a, and the attribute C, and a single-attribute fairness requirement scene in which the object to be recommended has fairness requirements for the attribute G, the attribute a, and the attribute C, respectively, and a attribute fairness requirement meeting scene in which the object to be recommended has fairness requirements for at least two of the attribute G, the attribute a, and the attribute C at the same time are set. The experimental results are shown in tables 1 to 3 of fig. 2e, 2f and 2 g. Wherein, table 1 is an experimental result of evaluating different model effects of the scenes of the three single-attribute fairness requirements according to the data set of the content platform 1, table 2 is an experimental result of evaluating different model effects of the scenes of the three single-attribute fairness requirements according to the data set of the content platform 2, and table 3 is an experimental result of evaluating different model effects of the scenes of the composite-attribute fairness requirements according to the data sets of the content platform 1 and the content platform 2, respectively.
It should be noted that, the data sets obtained from the content platform 1 and the content platform 2 relate to data related to the object, such as characteristics, operations, attributes, and identifiers of the object, when the embodiments of the present application are applied to specific products or technologies, permission or consent of the object needs to be obtained, and collection, use, and processing of the related data need to comply with relevant laws and regulations and standards of relevant countries and regions.
In tables 1 to 3, model 1 is a SASRec (Self-Attentive Sequential Recommendation, self-attention mechanism based sequence recommendation) model, model 2 is a BERT4Rec (Sequential Recommendation with Bidirectional Encoder Representations from Transformer, sequence recommendation using BERT) model, model 3 is an existing content recommendation model, and the target model is a target content recommendation model according to the embodiment of the present application. F1 represents the harmonic mean of model accuracy and recall, the maximum is 1, the minimum is 0, the experiment uses F1 to evaluate the fairness of the model, and the arrow indicates that the lower the value of F1, the better the effect. Wherein F1-G, F1-A and F1-C represent F1 corresponding to attribute G, attribute A and attribute C.
As can be seen from a combination of tables 1 to 3 in fig. 2e, 2f and 2g, compared with models 1 to 3, the fairness effect of the target content recommendation model according to the embodiment of the application is obviously better than that of other models, and different fairness requirements of the object can be satisfied.
The method described in the above embodiments will be described in further detail below.
In this embodiment, a method according to an embodiment of the present application will be described in detail by taking an application to a content platform as an example.
As shown in fig. 3, a specific flow of a content recommendation method is as follows:
310. and providing a plurality of controls on a display interface of the terminal, wherein each control corresponds to a preset scene.
The terminal may be a terminal of a client running the content platform, through which an object to be recommended may log in to the content platform to perform an interactive action, for example, content may be acquired from the interactive platform and a service using the content. After the object to be transacted logs in the content platform, a plurality of controls can be displayed on a display interface of the terminal. The preset scenes corresponding to any two controls can be preset scenes corresponding to different object attributes.
320. And responding to the selection operation of the object to be recommended on the target scene, acquiring the identification of the corresponding target scene as the personalized identification of the object to be recommended, and acquiring the target content recommendation model corresponding to the target scene.
When an object to be recommended touches any control, the preset scene corresponding to the control is a target scene, and the identification corresponding to the target scene and the target content recommendation model can be obtained. The target recommendation model at least comprises a target splicing module, a preset coding network, a target adjustment network and a recommendation algorithm model.
330. And acquiring and inputting object characteristics of the object to be recommended into a target content recommendation model.
And inputting the object characteristics of the object to be recommended into a target content recommendation model, and processing the object characteristics of the object to be recommended by using a target splicing module, a preset coding network, a target adjustment network and a recommendation algorithm model. The specific processing method may refer to the procedure in the foregoing embodiment, and will not be described herein.
340. The target content recommendation model processes object characteristics of the object to be recommended and outputs a recommendation sequence.
After the object characteristics of the object to be recommended are processed by the target content recommendation model, a recommendation sequence is output, and the recommendation sequence can contain identifiers of a plurality of target contents. The specific processing method may refer to the procedure in the foregoing embodiment, and will not be described herein.
350. And the content platform acquires at least one target content according to the recommendation sequence and recommends the target content to the terminal.
The content platform can acquire corresponding target content according to the identification in the recommendation sequence, and display information of the target content on a display interface of the terminal. For example, when the target content is audio, the name of the audio and the icon may be displayed on the display interface of the terminal.
As can be seen from the above, in the embodiment of the present application, the object to be recommended may determine the recommendation requirement for the target scene by selecting any preset scene as the target scene, and the focus of the encoded vector on the target scene feature may be enhanced by the personalized identifier corresponding to the target scene and the target adjustment network, so that the recommendation algorithm model may determine the recommendation sequence with higher relevance to the target scene feature, provide more accurate push content, and satisfy the recommendation requirement of the object to be recommended. Therefore, by setting fairness option switches (namely a plurality of controls) aiming at different preset scenes in the content platform, fair content such as commodities or articles and the like can be recommended according to the needs of the objects to be recommended according to the selection of the objects to be recommended.
In order to better implement the method, the embodiment of the application also provides a content recommendation device, which can be integrated in an electronic device, wherein the electronic device can be a terminal, a server and other devices. The terminal can be a mobile phone, a tablet personal computer, an intelligent Bluetooth device, a notebook computer, a personal computer and other devices; the server may be a single server or a server cluster composed of a plurality of servers.
For example, in the present embodiment, a method according to an embodiment of the present application will be described in detail by taking a specific integration of a content recommendation device in a terminal as an example.
For example, as shown in fig. 4, the content recommendation apparatus may include an acquisition unit 410, a splicing unit 420, an encoding unit 430, an adjusting unit 440, and a recommendation unit 450, as follows:
first acquisition unit 410
The method is used for acquiring the personalized identification of the object to be recommended and the object characteristics of the object to be recommended.
In some embodiments, the obtaining unit 410 may specifically be configured to:
and responding to the selection operation of the object to be recommended on the target scene, and acquiring the identification of the corresponding target scene as the personalized identification of the object to be recommended.
(II) splicing Unit 420
And the method is used for splicing the personalized identification and the object characteristics to obtain spliced object characteristics.
(III) encoding unit 430
And the method is used for coding the spliced object features to obtain an initial coding vector.
(IV) adjustment Unit 440
And the method is used for adjusting the initial coding vector through the target parameters corresponding to the personalized identification to obtain a target vector.
In some embodiments, the target parameters include normalization parameters and weight coefficients, and the adjusting unit 440 may specifically be configured to:
Normalizing the initial coding vector by the normalization parameter to obtain an intermediate vector;
and weighting the intermediate vector by the weight coefficient to obtain a target vector.
(fifth) recommendation unit 450
And the method is used for determining target content corresponding to the target vector and recommending the target content to the object to be recommended.
In some embodiments, the content recommendation device may further include a training unit, where the training unit may be configured to obtain an initial adjustment network and an initial discrimination network, and perform countermeasure training on the initial adjustment network and the initial discrimination network to obtain a target adjustment network, where the target adjustment network is configured to adjust the initial encoding vector through the target parameter.
In some embodiments, obtaining an initial tuning network and an initial discrimination network may include:
constructing an initial adjustment network based on an initial normalization network and a first initial multi-layer perception network, wherein the initial normalization network and the first initial multi-layer perception network are used for adjusting input vectors through initial parameters;
and constructing an initial discrimination network based on a second initial multi-layer perception network, wherein the second initial multi-layer perception network is used for determining a discrimination result of the output result of the target adjustment network.
In some embodiments, performing countermeasure training on the initial adjustment network and the initial discrimination network to obtain the target adjustment network may include:
acquiring a preset coding 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 characteristics;
splicing the initial identification and the sample object characteristics to obtain spliced sample object characteristics;
inputting the characteristics of the spliced sample objects into a preset coding network, and coding the characteristics of the spliced sample objects to obtain sample coding vectors;
inputting the sample coding vector into an initial adjustment network to obtain a training coding vector;
inputting the training coding vector into an initial discrimination network to obtain discrimination results;
based on the discrimination result, the initial adjustment network and the initial discrimination network are trained alternately by adopting a preset loss function, so that a target adjustment network and a personalized identifier are obtained, wherein the personalized identifier is an identifier corresponding to a target scene.
In the implementation, each unit may be implemented as an independent entity, or may be implemented as the same entity or several entities in any combination, and the implementation of each unit may be referred to the foregoing method embodiment, which is not described herein again.
Therefore, in the content recommendation process, the embodiment of the application can increase the attention to the personalized identifier, provide the push content related to the personalized identifier, meet the recommendation requirement of the object to be recommended, and improve the accuracy of the push content.
The embodiment of the application also provides electronic equipment which can be a terminal, a server and other equipment. The terminal can be a mobile phone, a tablet computer, an intelligent Bluetooth device, a notebook computer, a personal computer and the like; the server may be a single server, a server cluster composed of a plurality of servers, or the like.
In some embodiments, the content recommendation device may also be integrated in a plurality of electronic devices, for example, the content recommendation device may be integrated in a plurality of servers, and the content recommendation method of the present application is implemented by the plurality of servers.
In this embodiment, a detailed description will be given taking an electronic device of this embodiment as an example of a terminal, for example, as shown in fig. 5, which shows a schematic structure of the terminal according to an embodiment of the present application, specifically:
the terminal may include one or more processing cores 'processors 510, one or more computer-readable storage media's memory 520, a power supply 530, an input module 540, and a communication module 550, among other components. It will be appreciated by those skilled in the art that the terminal structure shown in fig. 5 is not limiting of the terminal and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The processor 510 is a control center of the terminal, connects various parts of the entire terminal using various interfaces and lines, and performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 520, and calling data stored in the memory 520. In some embodiments, processor 510 may include one or more processing cores; in some embodiments, processor 510 may integrate an application processor that primarily processes operating systems, display interfaces, applications, and the like, with a modem processor that primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 510.
The memory 520 may be used to store software programs and modules, and the processor 510 performs various functional applications and data processing by executing the software programs and modules stored in the memory 520. The memory 520 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the terminal, etc. In addition, memory 520 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 520 may also include a memory controller to provide processor 510 with access to memory 520.
The terminal also includes a power supply 530 for powering the various components, and in some embodiments, the power supply 530 may be logically connected to the processor 510 via a power management system, such that charge, discharge, and power consumption management functions are performed by the power management system. The power supply 530 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The terminal may also include an input module 540, which input module 540 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to object settings and function control.
The terminal may also include a communication module 550, and in some embodiments the communication module 550 may include a wireless module through which the terminal may wirelessly transmit over a short distance, thereby providing wireless broadband internet access to the object. For example, the communication module 550 may be used to assist objects in e-mail, browsing web pages, accessing streaming media, and the like.
Although not shown, the terminal may further include a display unit or the like, which is not described herein. In this embodiment, the processor 510 in the terminal loads executable files corresponding to the processes of one or more application programs into the memory 520 according to the following instructions, and the processor 510 executes the application programs stored in the memory 520, so as to implement various functions as follows:
Acquiring personalized identification of an object to be recommended and object characteristics of the object to be recommended; splicing the personalized identifier and the object characteristics to obtain spliced object characteristics; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector by the target parameter corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
The specific implementation of each operation above may be referred to the previous embodiments, and will not be described herein.
From the above, the embodiment of the application can increase the attention to the personalized identifier in the content recommendation process, provide the push content related to the personalized identifier, meet the recommendation requirement of the object to be recommended, and improve the accuracy of the push content.
Those of ordinary skill in the art will appreciate that all or a portion of the steps of the various methods of the above embodiments may be performed by instructions, or by instructions controlling associated hardware, which may be stored in a computer-readable storage medium and loaded and executed by a processor.
To this end, an embodiment of the present application provides a computer readable storage medium having stored therein a plurality of instructions capable of being loaded by a processor to perform the steps of any of the content recommendation methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
Acquiring personalized identification of an object to be recommended and object characteristics of the object to be recommended; splicing the personalized identifier and the object characteristics to obtain spliced object characteristics; coding the spliced object features to obtain an initial coding vector; adjusting the initial coding vector by the target parameter corresponding to the personalized identifier to obtain a target vector; and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
Wherein the storage medium may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like.
According to one aspect of the present application, there is provided a computer program product or computer program comprising computer programs/instructions stored in a computer readable storage medium. The processor of the electronic device reads the computer program/instructions from the computer-readable storage medium, and the processor executes the computer program/instructions to cause the electronic device to perform the methods provided in the various alternative implementations provided in the above-described embodiments.
The instructions stored in the storage medium may perform steps in any content recommendation method provided by the embodiments of the present application, so that the beneficial effects that any content recommendation method provided by the embodiments of the present application can be achieved are detailed in the previous embodiments, and are not repeated here.
The foregoing has described in detail a content recommendation method, apparatus, electronic device, storage medium and program product provided by the embodiments of the present application, and specific examples are applied herein to illustrate the principles and embodiments of the present application, and the above description of the embodiments is only for aiding in understanding the method and core idea of the present application; meanwhile, as those skilled in the art will vary in the specific embodiments and application scope according to the ideas of the present application, the present description should not be construed as limiting the present application in summary.

Claims (10)

1. A content recommendation method, comprising:
acquiring a personalized identifier of an object to be recommended and object characteristics of the object to be recommended;
splicing the personalized identifier and the object feature to obtain a spliced object feature;
coding the spliced object features to obtain an initial coding vector;
adjusting the initial coding vector through the target parameters corresponding to the personalized identifier to obtain a target vector;
and determining target content corresponding to the target vector, and recommending the target content to the object to be recommended.
2. The content recommendation method of claim 1, wherein the obtaining the personalized identifier of the object to be recommended comprises:
and responding to the selection operation of the object to be recommended on the target scene, and acquiring the identification corresponding to the target scene as the personalized identification of the object to be recommended.
3. The content recommendation method according to claim 1, wherein the target parameters include normalized parameters and weight coefficients, the adjusting the initial encoding vector by the target parameters corresponding to the personalized identifier to obtain a target vector includes:
normalizing the initial coding vector through the normalization parameter to obtain an intermediate vector;
and weighting the intermediate vector through the weight coefficient to obtain a target vector.
4. The content recommendation method of claim 1, further comprising, prior to the obtaining the personalized identity of the object to be recommended and the object characteristics of the object to be recommended:
acquiring an initial adjustment network and an initial discrimination network;
and performing countermeasure training on the initial adjustment network and the initial discrimination network to obtain a target adjustment network, wherein the target adjustment network is used for adjusting the initial coding vector through target parameters.
5. The content recommendation method according to claim 4, wherein the acquiring an initial adjustment network and an initial discrimination network comprises:
constructing an initial adjustment network based on an initial normalization network and a first initial multi-layer perception network, wherein the initial normalization network and the first initial multi-layer perception network are used for adjusting input vectors through initial parameters;
and constructing an initial discrimination network based on a second initial multi-layer perception network, wherein the second initial multi-layer perception network is used for determining a discrimination result of the output result of the target adjustment network.
6. The content recommendation method according to claim 4, wherein the performing countermeasure training on the initial adjustment network and the initial discrimination network to obtain a target adjustment network comprises:
acquiring a preset coding 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 characteristics;
splicing the initial identifier and the sample object characteristics to obtain spliced sample object characteristics;
inputting the spliced sample object characteristics into the preset coding network, and coding the spliced sample object characteristics to obtain sample coding vectors;
Inputting the sample coding vector into the initial adjustment network to obtain a training coding vector;
inputting the training coding vector into an initial discrimination network to obtain discrimination results;
based on the discrimination result, the initial adjustment network and the initial discrimination network are alternately trained by adopting a preset loss function, so that a target adjustment network and a personalized identifier are obtained, wherein the personalized identifier is an identifier corresponding to a target scene.
7. A content recommendation device, comprising:
the acquisition unit is used for acquiring the personalized identification of the object to be recommended and the object characteristics of the object to be recommended;
the splicing unit is used for splicing the personalized identifier and the object characteristics to obtain spliced object characteristics;
the coding unit is used for coding the spliced object features to obtain an initial coding vector;
the adjusting unit is used for adjusting the initial coding vector through the target parameters corresponding to the personalized identifier to obtain a target vector;
and the recommending unit is used for determining target content corresponding to the target vector and recommending the target content to the object to be recommended.
8. An electronic device comprising a processor and a memory, the memory storing a plurality of instructions; the processor loads instructions from the memory to perform the steps in the content recommendation method according to any of claims 1 to 6.
9. A computer readable storage medium storing a plurality of instructions adapted to be loaded by a processor to perform the steps of the content recommendation method of any one of claims 1 to 6.
10. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps in the content recommendation method of any one of claims 1 to 6.
CN202210359744.7A 2022-04-06 2022-04-06 Content recommendation method, device, electronic equipment, storage medium and program product Pending CN116932878A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210359744.7A CN116932878A (en) 2022-04-06 2022-04-06 Content recommendation method, device, electronic equipment, storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210359744.7A CN116932878A (en) 2022-04-06 2022-04-06 Content recommendation method, device, electronic equipment, storage medium and program product

Publications (1)

Publication Number Publication Date
CN116932878A true CN116932878A (en) 2023-10-24

Family

ID=88390193

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210359744.7A Pending CN116932878A (en) 2022-04-06 2022-04-06 Content recommendation method, device, electronic equipment, storage medium and program product

Country Status (1)

Country Link
CN (1) CN116932878A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893538A (en) * 2024-03-15 2024-04-16 成都方昇科技有限公司 Semiconductor device quality detection method, device and system based on machine vision

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117893538A (en) * 2024-03-15 2024-04-16 成都方昇科技有限公司 Semiconductor device quality detection method, device and system based on machine vision
CN117893538B (en) * 2024-03-15 2024-05-31 成都方昇科技有限公司 Semiconductor device quality detection method, device and system based on machine vision

Similar Documents

Publication Publication Date Title
CN113011646B (en) Data processing method, device and readable storage medium
JP2022529863A (en) Identity verification methods, identity verification devices, computer equipment, and computer programs
KR102470154B1 (en) Method, device and system for providing medical equipment trading and sharing platform service based on blockchain
CN113761359B (en) Data packet recommendation method, device, electronic equipment and storage medium
CN114707513A (en) Text semantic recognition method and device, electronic equipment and storage medium
Alhamdani et al. Recommender system for global terrorist database based on deep learning
CN115204886A (en) Account identification method and device, electronic equipment and storage medium
CN116932878A (en) Content recommendation method, device, electronic equipment, storage medium and program product
CN116861258B (en) Model processing method, device, equipment and storage medium
Gan et al. GANs with multiple constraints for image translation
CN115328786A (en) Automatic testing method and device based on block chain and storage medium
CN115423016A (en) Training method of multi-task prediction model, multi-task prediction method and device
Liang et al. Soft multimedia anomaly detection based on neural network and optimization driven support vector machine
Lin et al. Spatial commonsense reasoning for machine reading comprehension
CN113010772A (en) Data processing method, related equipment and computer readable storage medium
CN116521972B (en) Information prediction method, device, electronic equipment and storage medium
KR102513420B1 (en) Method, device and system for providing artificial intelligence model recommendation platform based on user intention analysis
CN116628236B (en) Method and device for delivering multimedia information, electronic equipment and storage medium
CN117711001B (en) Image processing method, device, equipment and medium
US20230418837A1 (en) System for Providing Data
CN117171562A (en) Training method and device of intent prediction model, electronic equipment and storage medium
CN117216361A (en) Recommendation method, recommendation device, electronic equipment and computer readable storage medium
CN114119997A (en) Training method and device for image feature extraction model, server and storage medium
CN116662845A (en) Behavior recognition method and device based on artificial intelligence, server and storage medium
CN116976309A (en) Data analysis method, device, computer, readable storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination