CN115129968A - Information recommendation method, device, equipment and storage medium - Google Patents

Information recommendation method, device, equipment and storage medium Download PDF

Info

Publication number
CN115129968A
CN115129968A CN202110322106.3A CN202110322106A CN115129968A CN 115129968 A CN115129968 A CN 115129968A CN 202110322106 A CN202110322106 A CN 202110322106A CN 115129968 A CN115129968 A CN 115129968A
Authority
CN
China
Prior art keywords
data
recommended
operation mode
target
information
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
CN202110322106.3A
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
Original Assignee
Tencent Technology Shenzhen Co Ltd
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 filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110322106.3A priority Critical patent/CN115129968A/en
Publication of CN115129968A publication Critical patent/CN115129968A/en
Pending legal-status Critical Current

Links

Images

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
    • 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/9538Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Medical Informatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the application discloses an information recommendation method, an information recommendation device, information recommendation equipment and a storage medium. The method comprises the following steps: the method comprises the steps of obtaining N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user, processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of the target user executing each operation mode on each data to be recommended in the N data to be recommended, obtaining target weight corresponding to each operation mode according to a weight vector in the preset rule and a loss function corresponding to each operation mode, and recommending the N data to be recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode. By the method, the target user can recommend more accurate data to be recommended to the target user by utilizing the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode.

Description

Information recommendation method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information recommendation method, apparatus, device, and storage medium.
Background
The information recommendation refers to a process of recommending contents which may be interested by a user for the user according to historical browsing records of the user on various types of information. Generally, an information recommendation model is used to analyze information in a history browsing record of a user, find out information contents that may be interested by the user from an information base, and display the contents that may be interested by the user on an interface of a terminal of the user.
When the information recommendation model is used to find out the content that may be of interest to the user, a method that is generally adopted is to find out and recommend the content with a high user viewing probability from the information base by using the information recommendation model. However, information recommendation is performed only by using the user viewing probability, the information recommendation dimension is single, and the accuracy of information recommendation performed for the user is low.
Disclosure of Invention
In view of this, the embodiments of the present application provide an information recommendation method, apparatus, device and storage medium, which can improve accuracy of information recommendation.
In a first aspect, an embodiment of the present application provides an information recommendation method, including: acquiring N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user; processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of each operation mode executed by the target user on each data to be recommended in the N data to be recommended; acquiring a target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode; and obtaining the score of each piece of data to be recommended according to the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode, and recommending the N pieces of data to be recommended according to the score of each piece of data to be recommended.
In a second aspect, an embodiment of the present application provides an information recommendation apparatus, including: the system comprises an information acquisition module, an information processing module, a weight acquisition module and a data recommendation module. The information acquisition module is used for acquiring N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user, wherein N and M are integers larger than 1 respectively; the information processing module is used for processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of each operation mode executed by the target user on each data to be recommended in the N data to be recommended; the weight obtaining module is used for obtaining a target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode; and the data recommendation module is used for acquiring the score of each data to be recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode, and recommending the N data to be recommended according to the score of each data to be recommended.
In one possible implementation, the weight acquisition module includes a pareto frontier acquisition sub-module and a weight acquisition sub-module. The pareto frontier acquisition submodule: the method comprises the steps of obtaining a pareto optimal leading edge according to an initial weight threshold range corresponding to each operation mode, a weight vector in a preset rule and a loss function, wherein coordinates of points on the pareto optimal leading edge are M-dimensional, and each dimension of the M-dimensional coordinates corresponds to the weight of each operation mode in the M operation modes one to one. The weight obtaining submodule is used for determining a target point from the pareto optimal front edge and obtaining target weight corresponding to each operation mode according to the coordinates of the target point.
In one possible implementation, the pareto front obtaining sub-module includes: a calculation formula construction unit and a pareto frontier obtaining unit. And the calculation formula construction unit is used for constructing a constrained calculation formula which takes the target weight corresponding to each operation mode as a decision variable according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule and the loss function. The pareto leading edge obtaining unit is used for obtaining the pareto optimal leading edge according to the band constraint calculation formula.
In one possible embodiment of the method according to the invention,the band constraint calculation formula comprises
Figure BDA0002993279390000021
Figure BDA0002993279390000022
Wherein, W i To execute the target weight corresponding to the ith operation mode on the data to be recommended, C i Is the initial weight threshold range of the ith operation mode, theta is the weight vector in the preset rule, L i (θ) is a loss function with respect to θ in the i-th mode of operation.
In a possible implementation manner, the pareto obtaining unit 432b is specifically configured to perform solution calculation on the band constraint calculation formula by using an interior point method, an active set method, a lagrange multiplier method, or an alternate direction multiplier method, so as to obtain the pareto optimal leading edge.
In a possible implementation manner, the data recommendation module 440 is specifically configured to calculate, by using a score calculation formula, a probability of executing each operation manner on each to-be-recommended data and a target weight corresponding to each operation manner, and obtain a score of each to-be-recommended data, where the score calculation formula includes:
Figure BDA0002993279390000031
s is the score of the data to be recommended, P i Probability of carrying out i-th operation mode for data to be recommended, W i And executing the target weight corresponding to the ith operation mode for the data to be recommended.
In a possible implementation manner, when the preset rule includes a multitask prediction model, the information recommendation device further includes a sample obtaining module and a model training module. The sample acquisition module is used for acquiring a plurality of sample data, and each sample data comprises user characteristic information of a sample user, attribute information of sample recommended data and an operation mode of the sample user on the sample recommended data; the model training module is used for training the plurality of sample data by utilizing a multi-task learning model to obtain the multi-task prediction model, wherein the multi-task prediction model comprises weight parameters and loss functions corresponding to each operation mode, the weight parameters are used for forming the weight vectors, and the loss functions are obtained by training according to initial loss functions.
In a possible implementation manner, the recommending module is further configured to sort the N data to be recommended according to scores corresponding to each data to be recommended, and obtain a sorting order according to a descending order of the scores; and selecting the target data to be recommended which are sorted into a preset number from the sorting sequence for recommendation.
In one possible implementation, the information obtaining module includes: the system comprises a historical data acquisition sub-module, a category acquisition sub-module and a to-be-recommended data acquisition sub-module. The historical data acquisition submodule is used for responding to the information browsing request to acquire the historical data of the target user; the category acquisition submodule is used for acquiring information categories which are interesting to a target user according to the historical data; and the data to be recommended acquisition sub-module is used for acquiring N data to be recommended corresponding to the information category from the database according to the information category in which the user is interested.
In a possible implementation manner, the data to be recommended includes at least one of a text to be recommended, a video to be recommended, and a picture to be recommended.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory; one or more programs are stored in the memory and configured to be executed by the processor to implement the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, wherein the program code performs the above-mentioned method when executed by a processor.
In a fifth aspect, embodiments of the present application provide a computer program product or a computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device obtains the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method described above.
According to the information recommendation method, the information recommendation device, the information recommendation equipment and the information recommendation storage medium, the N kinds of data to be recommended, the M kinds of operation modes and the user characteristic information are processed according to the preset rule, the probability that a target user executes each operation mode on each data to be recommended in the N kinds of data to be recommended is obtained, and the target weight corresponding to each operation mode is obtained according to the weight vector in the preset rule and the loss function corresponding to each operation mode; when a plurality of data to be recommended are recommended, the score of each data to be recommended is obtained according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode, and N data to be recommended are recommended according to the score of each data to be recommended. The gradient of the loss function corresponding to each operation mode to the weight vector represents the confidence of the operation mode, that is, the target weight of the operation mode represents the confidence of the operation mode. Therefore, after the probability of executing each operation mode on the data to be recommended by the target user is obtained, more accurate data to be recommended can be recommended to the target user based on the probability and the confidence of each operation mode.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic structural diagram illustrating an information recommendation system according to an embodiment of the present application;
fig. 2 is a flowchart illustrating an information recommendation method according to an embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a video display interface provided by an embodiment of the present application;
FIG. 4 is another schematic diagram of a video display interface provided by an embodiment of the present application;
FIG. 5 is a further schematic diagram of a video display interface provided by an embodiment of the present application;
fig. 6 shows another flow chart of an information recommendation method proposed in the embodiment of the present application;
fig. 7 shows a further flowchart of an information recommendation method according to an embodiment of the present application;
FIG. 8 is a diagram illustrating a multi-tasking predictive model provided by an embodiment of the application;
fig. 9 is a connection block diagram of an information recommendation device according to an embodiment of the present application;
fig. 10 shows a connection block diagram of a weight obtaining module provided in an embodiment of the present application;
fig. 11 illustrates a connection block diagram of a pareto front edge obtaining sub-module provided in an embodiment of the present application;
fig. 12 is a block diagram illustrating another connection of an information recommendation device according to an embodiment of the present application;
fig. 13 shows a block diagram of an electronic device for executing the method of the embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the research and progress of artificial intelligence technology, the artificial intelligence technology develops research and application in a plurality of fields and plays more and more important value.
Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Taking artificial intelligence application as an example in information recommendation:
people generally recommend information for users by using multiple independent models or by using a multitask model. The information recommendation process is a process of analyzing various operations of different information by different users, searching data which may be interested by a target user from a plurality of recommended data, and displaying the data.
The recommendation for the user by utilizing the multiple independent models is as follows: the method comprises the steps of respectively establishing models for operations of playing, praise, commenting and the like of information of a user, then respectively predicting the probability of the operations of playing, praise, commenting and the like of the information in an information base by the user by using the established models, finally combining the probabilities of the operations, and realizing the sequencing of the information in the information base by using the combined probability. However, in this method, modeling is performed separately with a single operation as a target, and there is a high possibility that there is a deviation between the training samples and the samples to be predicted, for example, when modeling is performed with the playing completion degree as a target, the training samples are playing samples, and prediction is performed on the entire samples at the time of prediction, so that the prediction accuracy is low. In this way, even if information recommendation is performed by using multiple recommendation dimensions, the accuracy of information recommendation is low because the result of predicting a sample to be predicted by using multiple independent models is not ideal.
The recommendation of the user by using the multitask model means that loss functions of different targets are weighted to obtain an overall loss function of the fixed weight multitask model. And during prediction, predicting the occurrence probability of each operation of the user by using the multitask model so as to realize information recommendation. However, since the weight of the penalty function of the fixed-weight multitask model is a hyper-parameter, it needs to be set before training starts, and the weight does not change once training starts, and the set weight is usually set based on manual experience, the set weight is not necessarily optimal. In addition, when a level or a dependency relationship exists between targets, different weights need to be used in different training states, so that the fixed weight multitask model cannot achieve an optimal training effect, an accurate prediction result cannot be obtained for various operations, and the accuracy of information recommendation cannot be improved even if information recommendation is performed by using multiple recommendation dimensions.
The inventor provides an information recommendation method through research, in the method, the probability of each operation mode executed by a target user on each data to be recommended in N data to be recommended is obtained by processing N data to be recommended, M operation modes and user characteristic information according to a preset rule, the target weight corresponding to each operation mode is obtained according to a weight vector in the preset rule and a loss function corresponding to each operation mode, and the N data to be recommended are recommended based on the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode. In the recommendation process, the gradient of the loss function corresponding to each operation mode to the weight vector represents the confidence of the operation mode, that is, the target weight of the operation mode represents the confidence of the operation mode. Therefore, after the probability of executing each operation mode on the data to be recommended by the target user is obtained, information recommendation is performed on the target user based on the weight vector of each operation mode and the probability of executing each operation mode on the data to be recommended by the target user, and more accurate recommended data can be obtained.
Hereinafter, technical terms related to the present application will be described first.
Pareto optima, also known as Pareto efficiency (Pareto efficiency), refers to an ideal state of resource allocation, and is called Pareto improvement or Pareto optimization, assuming an inherent population of people and allocable resources, in a change from one allocation state to another, such that at least one person becomes better without deteriorating any person's situation.
The pareto optimal leading edge refers to solving all pareto optimal solutions for functions respectively corresponding to at least two targets in a problem, and all the pareto optimal solutions jointly form the pareto optimal leading edge of the problem. Wherein, when the two targets in the problem are two, the corresponding pareto front is a curve segment; when the number of the objects in the problem is three, the corresponding pareto front is a curved surface (three-dimensional curved surface) in space, and when the number of the objects in the problem is plural, the corresponding pareto front is a hypersurface (for example, when the number of the objects in the problem is i, the corresponding pareto front is an n-dimensional hypersurface).
The data to be recommended refers to data which may need to be presented when the interface or the page of the device is refreshed. Such as merchandise information, software information, news advisories, etc., are typically presented in the form of data such as pictures, text, or video. The scoring of the data to be recommended represents the interest degree of the user in the recommended data, and can be used as a basis for sorting the data to be recommended and selecting target data to be recommended displayed to the user from a plurality of data to be recommended.
The operation mode refers to an operation that the user may perform on the data to be recommended. For example, the data to be recommended includes text information, and the possible operation modes for the recommended data include operations such as a play operation, a like operation, a comment operation, and a focus operation. For another example, the data to be recommended includes a video, and the possible operation modes of the data to be recommended include operations such as a play operation, a like operation, a comment operation, a focus operation, and a play-out operation. The play-out operation refers to that the proportion of the total length of the target information, which is browsed by the target user, to the target information reaches a preset play-out degree threshold, for example, when the total length reaches ninety percent, the user can be considered to have performed the play-out operation on the target information. For another example, the data to be recommended is commodity information, and the possible operations to be performed on the data to be recommended include a viewing operation, a shopping cart adding operation, a purchasing operation, a paying attention operation, and the like.
An exemplary application of the device for executing the information recommendation method according to the embodiment of the present invention is described below, and the information recommendation method according to the embodiment of the present invention may be applied to a server or a terminal, and may also be applied to an application environment as shown in fig. 1.
In the application environment shown in fig. 1, the terminal 20 is communicatively connected to the server 10 via a network.
The server 10 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a network service, cloud communication, middleware service, a domain name service, a security service, a CDN, and a big data and artificial intelligence platform.
The terminal 20 may be a smart phone, a smart television, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, or the like. The terminal 20 may be provided with a client for displaying data to be recommended, such as a browser client, an instant messaging client, an education client, a social network client, a shopping client, an audio/video playing client, and the like.
The terminal 20 and the server 10 may be directly or indirectly connected through wired or wireless communication, and the present application is not limited thereto.
If the terminal 20 and the server 10 in fig. 1 are used to perform data recommendation, the specific process may include: after the target user wakes up the terminal 20, the target user can enter the client through the graphical interface of the terminal 20, and the terminal 20 responds to the refresh control triggered by the target user at the client to generate an information browsing request and sends the information browsing request to the server 10 through the network. When the server 10 receives an information browsing request sent by the terminal 20, the N data to be recommended, the M operation modes of the N data to be recommended, and the characteristics of a target user may be processed according to a preset rule to obtain a probability that the target user executes each operation mode on each data to be recommended, a target weight corresponding to each operation mode is obtained according to a weight vector in the preset rule and a loss function corresponding to each operation mode, a score of each data to be recommended is obtained according to the probability that each operation mode is executed on each data to be recommended and the target weight corresponding to each operation mode, and the N data to be recommended is recommended according to the score of each data to be recommended. And feeds the recommendation result back to the terminal 20, and the terminal 20 can display the recommendation result on the interface to complete the recommendation. It is understood that the recommendation method can also be performed by the terminal.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 shows an information recommendation method according to an embodiment of the present application, where the method may be applied to an electronic device (for example, the terminal or the server in fig. 1), and the method includes:
step S110: n data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user are obtained, wherein N and M are integers larger than 1.
The manner of obtaining the data to be recommended may be various.
As an implementation manner, when an information browsing request of a user is obtained, obtaining historical data of a target user in response to the information browsing request, obtaining an information category in which the target user is interested according to the historical data, and obtaining a plurality of data to be recommended corresponding to the information category from a database according to the information category in which the user is interested. The historical data of the user can be historical browsing data or historical playing data.
It should be understood that a plurality of information categories and data corresponding to each information category may be stored in the database, where the number of data corresponding to each information category is usually multiple, and when N pieces of data to be recommended need to be obtained, the N pieces of data to be recommended may be randomly obtained from the data corresponding to the information category that the target user is interested in. Or according to the frequency of executing a certain operation mode on each data corresponding to the information category interested by the target user, sorting each data, and then selecting the data sorted to the top N as the data to be recommended, thereby obtaining a plurality of data to be recommended.
In this way, the information browsing request may be generated when the electronic device runs the content distribution platform and the corresponding display interface of the electronic device receives a screen refresh operation of the user, where the screen refresh operation may be a pull-down operation, a double-click operation, and the like. The information browsing request can also be generated when a content distribution platform (such as an information interaction platform or an application program like a browser) in the electronic device is started. The information browsing request can also be generated every preset time interval when the electronic equipment runs the content publishing platform.
As another embodiment, the data to be recommended may be randomly acquired from data stored in a database or a memory associated with the electronic device, it should be understood that there are usually a plurality of data stored in the database or the memory, and when there are N data to be recommended that need to be acquired, N data may be randomly selected from the data stored in the database or the memory as the data to be recommended, for example, at least two data are selected as the data to be recommended.
As another implementation manner, the method may further include acquiring a request to be recommended, which carries identification information, and acquiring data to be recommended, which corresponds to the identification information, from the database according to the identification information, where the identification information may be information such as a type, a name, a keyword, and the like of the data to be recommended.
It should be understood that the data to be recommended obtained as described above may have attribute information, and the attribute information may include the type of the data to be recommended, such as a text type, a picture type, a video type, an audio type, and the like; keywords of data to be recommended, such as name, function, effect, and the like; classification of the data to be recommended may also be included, for example: entertainment, military, animation, emotion, story, etc.; statistical class characteristics of the data to be recommended, such as exposure, praise amount, comment amount, broadcast completion amount and the like of the application program for about 1/3/7/15/30/90 days, can also be included.
The mode of acquiring the operation mode of the data to be recommended may be to acquire the operation mode of the target user on the historical data, and use the acquired operation mode as the operation mode of the data to be recommended. The operation mode may be executable by obtaining the data to be recommended from a database or a memory associated with the electronic device.
The user characteristics of the target user may be obtained by receiving user characteristic information input by the target user. Or when the recommendation request is received, the user identifier included in the recommendation request is obtained, and the user characteristic information of the target user corresponding to the user identifier is obtained from a database or a memory associated with the electronic device based on the user identifier.
The user characteristic information may include basic portrait-like characteristics of the user, such as the age, sex, constellation, occupation, education level, and the like of the user; the wealth characteristics of the user, such as income, purchasing power, the probability of having a room, the probability of having a car and the like of the user; location characteristics of the user, such as the user's place of birth, place of employment, place of home, and premise, etc.; user behavior characteristics, such as browsing, approval, attention, etc. of the user to the data displayed by the client; interest preference characteristics of the user, liveness characteristics of the user and the like.
Step S120: and processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of executing each operation mode on each data to be recommended in the N data to be recommended by the target user.
The preset rule may include N types of data to be recommended, M types of operation modes, and a correspondence between the user characteristic information and a probability that the target user executes each operation mode on each type of data to be recommended.
The preset rule can be obtained by training the multi-task learning model by using sample data.
As an embodiment, S120 in the present embodiment may be performed by a trained multi-task prediction model. In the training process of the multi-task prediction model, the adopted sample data can comprise user characteristic information of the sample user, attribute information of the sample recommended data and an operation mode of the sample user on the sample recommended data, so that the multi-task prediction model obtained through training can predict the probability that the target user performs each operation on each data to be recommended.
Step S130: and acquiring the target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode.
In one embodiment, the preset rule includes a multitask prediction model, and the weight vector in the preset rule refers to a vector formed by a plurality of weights in the multitask prediction model together. The loss function is a function which maps the random event or the value of the random variable related to the random event into a nonnegative real number in the multi-task prediction model to represent the risk or the loss of the random event, and each loss function corresponds to one operation mode.
The types of the loss functions included in the multitask prediction model may be one or more of a hinge loss function, a cross entropy loss function, an exponential loss function, a check value loss function, a log logarithmic loss function, a square loss function, a perceptual loss function, and the like, that is, the types of the loss functions included in the multitask prediction model may be the same or different. As an embodiment, the type of the loss function corresponding to each operation mode may be the same.
There are various ways to obtain the target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode.
As an embodiment, it may be: and acquiring the pareto optimal leading edge according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule and the loss function. And determining a target point from the pareto optimal leading edge, and obtaining the target weight corresponding to each operation mode according to the coordinates of the target point.
The pareto optimal front edge obtained by the method comprises a plurality of pareto optimal solutions, values of the pareto optimal solutions on different coordinate axes respectively correspond to the target weights corresponding to various operation modes, so that multiple targets (namely, multiple operation modes) to be considered can be optimized to the maximum extent, and any point on the pareto front edge can be used for obtaining the target weight corresponding to each operation mode.
As another embodiment, the weight vector in the preset rule may be multiplied by the loss function corresponding to each operation manner to obtain the target weight corresponding to each operation manner.
The target weight may be used to characterize the confidence of each operation manner, where the confidence is also referred to as reliability, or a confidence level and a confidence coefficient, that is, the larger the target weight is, the higher the confidence of the corresponding operation manner is; the smaller the target weight, the lower the confidence of its corresponding operating mode.
Step S140: and obtaining the score of each piece of data to be recommended according to the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode, and recommending the N pieces of data to be recommended according to the score of each piece of data to be recommended.
The method for specifically obtaining the score of each piece of data to be recommended may be various.
As an embodiment, for each type of data to be recommended, the probability of performing each operation on the data to be recommended and the target weight corresponding to each operation mode may be calculated by a weighted summation method to obtain the score of each type of data to be recommended, for example, by using
Figure BDA0002993279390000111
And calculating the score of each kind of data to be recommended, wherein,
Figure BDA0002993279390000112
for scoring of data to be recommended, W i Executing the target weight, P, corresponding to the ith operation mode on the data to be recommended i Is the probability of performing the operation of the ith kind.
As another embodiment, for each type of data to be recommended, a score calculation formula may be used to calculate the probability of executing each operation mode on the data to be recommended and the target weight corresponding to each operation mode, so as to obtain a score corresponding to each type of data to be recommended, where the score calculation formula includes:
Figure BDA0002993279390000113
wherein the content of the first and second substances,
Figure BDA0002993279390000114
for scoring of data to be recommended, W i Executing the target weight, P, corresponding to the ith operation mode for the data to be recommended i Is the probability of performing the operation of the ith kind.
As another embodiment, for each type of data to be recommended, the following calculation formula may be used to calculate the probability of executing each operation mode on the data to be recommended and the target weight corresponding to each operation mode, and the calculation formula includes:
Figure BDA0002993279390000115
wherein the content of the first and second substances,
Figure BDA0002993279390000116
for scoring of data to be recommended, W i Executing the target weight, P, corresponding to the ith operation mode on the data to be recommended i Is the probability of performing the operation of the ith kind.
There are various ways of recommending the N data to be recommended by using the score of each data to be recommended.
As an implementation manner, the N data to be recommended may be sorted according to the score corresponding to each data to be recommended from the largest score to the smallest score to obtain a sorting order, and the target data to be recommended sorted to the top set number may be selected from the sorting order for recommendation.
As another implementation manner, target data to be recommended with a score larger than a preset score threshold may be selected from the N data to be recommended, and the target data to be recommended is recommended. It should be noted that, if the electronic device has a display function, the electronic device may display the target data to be recommended on a display interface of the electronic device. If the electronic equipment is associated with a terminal with a display function, the electronic equipment can also send target data to be recommended to the terminal, so that the terminal displays the target data to be recommended on a display interface of the terminal. It should be understood that when the terminal displays the target data to be recommended in the interface, the terminal may only display information such as a title, a cover page, or an abstract of the target data to be recommended, and if the user needs to view the complete target data to be recommended, the terminal may touch a position in the display interface corresponding to the title, the cover page, or the abstract, so that the terminal may completely display or play the selected target data to be recommended in the corresponding display interface.
Referring to fig. 3, fig. 4 and fig. 5, the following describes an example in which the electronic device is a server, the data to be recommended is a short video, and the operation modes of various data to be recommended include click play, praise, attention, comment and finish play.
When a user views a video to be recommended, any one of a plurality of short videos displayed on a client shown in fig. 3 (that is, any one of the recommended video 1, the recommended video 2, and the recommended video 3 shown in fig. 3) may be clicked and played, and operations such as approval, comment, attention, and completion of playing are performed in the process of playing the short video, if the user needs to view other videos, a manner shown in fig. 4 may also be used, where the user triggers a refresh control to generate an information browsing request including a target user identifier at a client corresponding to the short video in a manner of pulling down a page, and sends the information browsing request including the target user identifier to a server through a network.
When receiving an information browsing request comprising a target user identifier, a server can acquire historical browsing data corresponding to the user identifier, acquire user characteristic information of the target user based on the historical browsing data, acquire a plurality of videos to be recommended corresponding to the information categories interested by the user from a database corresponding to the short videos when the user characteristic information comprises the information categories interested by the user, and acquire a plurality of operation modes of clicking playing, agreeing, paying attention to, commenting and playing of the videos to be recommended from the database.
After the server obtains a plurality of data to be recommended, operation modes of the data to be recommended and user characteristic information, a plurality of videos to be recommended, a plurality of operation modes and user characteristics are obtained by using a multi-task prediction modelAnd processing the information to obtain the probability of clicking and playing, the probability of praise, the probability of attention and the probability of playing completion of each video to be recommended by the target user. And obtaining target weights respectively corresponding to the operation modes of click play, click approval, attention, comment and broadcasting completion according to a weight vector formed by a plurality of weights and a loss function respectively corresponding to the operation modes of click play, click approval, attention, comment and broadcasting completion in the multi-task prediction model. Calculating the probability of clicking and playing, the probability of liking, the probability of paying attention and the probability of playing completion of each video to be recommended by a target user and target weights respectively corresponding to the operation modes of clicking and playing, liking, paying attention, commenting and playing completion to obtain the score of each data to be recommended by adopting a scoring calculation formula, wherein the scoring calculation formula comprises the following steps:
Figure BDA0002993279390000121
wherein S is the score of the data to be recommended, P 1 Probability corresponding to the operation mode of click-to-play, P 2 Probability corresponding to the operation mode of praise, P 3 Probability corresponding to the mode of operation of interest, P 4 Probability corresponding to the mode of operation of the comment, P 5 Probability corresponding to the operation mode of broadcasting, W 1 Target weight corresponding to operation mode of click-to-play, W 2 Target weight, W, for complimentary operation 3 Target weight for the operation mode of interest, W 4 For the target weight corresponding to the operation mode of the comment, W 5 And the target weight corresponding to the operation mode of playing is finished.
After the server obtains the scores corresponding to the data to be recommended, the server can sort the data to be recommended according to the scores corresponding to the data to be recommended from large to small, and push the target data to be recommended with the sorting result of a preset number to the client of the target user, so as to display the target data to be recommended (such as the recommended video 11, the recommended video 12 and the recommended video 13 shown in fig. 5) shown in fig. 5 at the client of the target user, and the user can play the target video to be recommended by clicking any target video to be recommended in the display interface of the terminal, and can approve, pay attention to, comment, complete playing and the like in the playing process.
The data recommendation method includes the steps of obtaining N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user, processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain probability of the target user executing each operation mode on each data to be recommended, obtaining target weight corresponding to each operation mode according to a weight vector in the preset rule and a loss function corresponding to each operation mode, and recommending the N data to be recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode. In the recommendation process, the confidence of each operation mode is characterized by the gradient of the loss function corresponding to each operation mode to the weight vector, namely the target weight of the operation mode characterizes the confidence of the operation mode. Therefore, after the probability of executing each operation mode on the data to be recommended by the target user is obtained, more accurate data to be recommended can be recommended to the target user based on the weight vector of each operation mode and the probability of executing each operation mode on the data to be recommended by the target user.
As shown in fig. 6, another embodiment of the present application provides an information recommendation method, including:
step S210: n data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user are obtained, wherein N and M are integers larger than 1.
Step S220: and processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of executing each operation mode on each data to be recommended in the N data to be recommended by the target user.
Step S230: and acquiring a pareto optimal front edge according to the initial weight threshold range corresponding to each operation mode, the weight vector and the loss function in a preset rule, wherein the coordinate of a point on the pareto optimal front edge is M-dimensional, and each dimension of the M-dimensional coordinate is in one-to-one correspondence with the weight of each operation mode in the M operation modes.
The initial weight threshold range corresponding to each operation mode refers to a predefined importance degree for evaluating each operation mode relative to the data to be recommended, which is different from a general proportion, and is reflected by not only the percentage of each operation mode, but also the emphasis on the relative importance degree of each operation mode, which is prone to contribution degree or importance. The initial weight threshold range corresponding to each operation mode may be the same or different.
The method for obtaining the pareto optimal leading edge according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule, and the loss function may include: and constructing a calculation formula according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule and the loss function, and solving the calculation formula to obtain the pareto optimal frontier.
The pareto optimal leading edge obtained in step S130 includes a plurality of pareto optimal solutions, and values of the pareto optimal solutions on different coordinate axes respectively correspond to target weights corresponding to various operation modes, so that multiple targets (i.e., multiple operation modes) to be considered can be optimized to the greatest extent.
The above-described calculation formula may be a calculation formula with constraints or may be a general calculation formula (calculation formula without constraints).
If the calculation formula is a calculation formula with constraint, a plurality of pareto optimal solutions are correspondingly arranged on the pareto optimal front edge obtained according to the calculation formula; and if the calculation formula is not a calculation formula with constraint, a pareto optimal solution is correspondingly arranged on the pareto optimal front edge obtained according to the calculation formula.
As an embodiment, the step S230 may be: and constructing a constrained calculation formula taking the target weight corresponding to each operation mode as a decision variable according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule and the loss function.
The constraint is a condition that needs to be satisfied in mathematical computation to provide a solution to the optimization problem. Constraints can be divided into equality constraints and inequality constraints. The set of solutions that meet all constraints is called a feasible set (feasible set) or a candidate solution. In mathematical planning, constraints often appear in the form of inequalities or equations for the constraints of a decision-making scheme.
The constraint in the calculation formula with constraint may be an inequality, an equation, or an equation, and the constraint included in the calculation formula with constraint may be one or more.
As an embodiment, the constraint included in the calculation formula with constraints of the present application is one, and the constraint of the calculation formula with constraints includes an equation.
In this manner, the band constraint calculation formula may include
Figure BDA0002993279390000151
Figure BDA0002993279390000152
Wherein, W i Executing the target weight corresponding to the ith operation mode for the data to be recommended, C i Is the initial weight threshold range of the ith operation mode, theta is the weight vector in the preset rule, L i (θ) is a loss function with respect to θ in the i-th mode of operation.
The method of obtaining the pareto optimal leading edge according to the calculation formula with constraint may be various, and for example, the calculation formula with constraint may be solved by any one of a grid method, a complex form method, a random trial method, a random direction method, a variable tolerance method, a feasible direction method, an interior point method, a penalty function method, a constraint variable scale method, an active set method, a lagrange multiplier method, an alternate direction multiplier method, and the like.
As an embodiment, the pareto optimal leading edge may be obtained by solving and calculating the constraint calculation formula by any one of an interior point method, an active set method, a lagrange multiplier method, and an alternate direction multiplier method.
Step S240: and determining a target point from the pareto optimal leading edge, and obtaining the target weight corresponding to each operation mode according to the coordinates of the target point.
The manner in which a target point is determined from the first leading edge of pareto can be varied.
As an embodiment, the initial weight corresponding to each operation mode may be selected from the range of initial weight threshold corresponding to each operation mode. Substituting the initial weight corresponding to each operation mode into the band constraint calculation formula in step S230, solving and calculating the target point by using an interior point method, an active set method, a lagrangian multiplier method or an alternate direction multiplier method for the band constraint calculation formula with the initial weight, and obtaining the target weight corresponding to each operation mode according to the coordinates of the target point.
As another mode, at least one initial weight may be selected from at least one weight value range of the initial weights corresponding to each operation mode, a pareto candidate set may be determined from pareto frontiers by using the initial weight, and a target point may be arbitrarily selected from the pareto candidate set.
In this manner, at least one weight selected from at least one weight range may be substituted into the band constraint calculation formula in step 230, and any one of an interior point method, an active set method, a lagrange multiplier method, and an alternative direction multiplier method is used to perform solution calculation to obtain a pareto candidate set, where the pareto candidate set includes points corresponding to a plurality of pareto optimal solutions.
As yet another way, it is also possible to arbitrarily select a point from the pareto frontier as the target point.
It should be noted that any point on the pareto frontier (any one pareto optimal solution) can be used to obtain the target weight corresponding to each operation mode, so that by using the above-mentioned embodiment, a long data accumulation process required when the weight of the loss function in the multitask learning model is optimized can be performed, and the efficiency of obtaining the target weight corresponding to each operation mode is further improved.
Step S250: and obtaining the score of each piece of data to be recommended according to the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode, and recommending the N pieces of data to be recommended according to the score of each piece of data to be recommended.
According to the information recommendation method provided by the application, N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user are obtained, the N data to be recommended, the M operation modes and the user characteristic information are processed according to a preset rule, the probability of the target user executing each operation mode on each data to be recommended is obtained, the pareto optimal front edge is obtained according to an initial weight threshold range corresponding to each operation mode, a weight vector and a loss function in the preset rule, a target point is determined from the pareto optimal front edge, a target weight corresponding to each operation mode is obtained according to coordinates of the target point, and the N data to be recommended are recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode. By adopting the recommendation method, the probability of executing each operation mode on each type of data to be recommended by the target user and the target weight corresponding to each operation mode are utilized, and more accurate data to be recommended are recommended to the target user. In addition, because the pareto optimal leading edge comprises a plurality of pareto optimal solutions, the values of the pareto optimal solutions on different coordinate axes respectively correspond to the target weights corresponding to various operation modes, and therefore multiple targets (namely, multiple operation modes) can be optimized to the maximum extent. Any pareto optimal solution included in the pareto frontier can be used for obtaining the target weight corresponding to each operation mode, so that a long data accumulation process required when the weight of the loss function in the multitask learning model is adjusted and optimized can be avoided, and the efficiency of obtaining the target weight corresponding to each operation mode is improved.
As shown in fig. 7, another embodiment of the present application provides an information recommendation method, including:
step S310: and acquiring a plurality of sample data, wherein each sample data comprises the user characteristic information of the sample user, the attribute information of the sample recommended data and the operation mode of the sample user on the sample recommended data.
In order to improve the reliability of the acquired sample data, user feature information of a sample user for 60 days, attribute information of sample recommendation data, and multiple operation modes of the sample user for the sample recommendation data may be acquired, and then a sample set including multiple sample data may be formed according to the user feature of the sample user and the attribute information of the sample recommendation data, where each sample data in the sample set may be represented as < user _ feature, < item _ feature, < label (1), < label (2), < … >, and < label (m >), where user _ feature is used to represent the user feature information, item _ feature is used to represent the attribute information of the sample recommendation data, and label (i) is used to represent the i-th operation mode of the sample user in the sample recommendation data.
It should be understood that, when the foregoing label (i) is used to characterize the ith operation mode of the sample user in the sample data, a value of label (i) may be "0" or "1", where if the value of label (i) is "1", the ith operation mode may be characterized by the user, and if the value of label (i) is "0", the ith operation mode may be used to characterize that the ith operation mode is not executed by the sample user. For example, when the sample recommendation data is a video and the operation mode indicated by label (i) is an operation mode in which the sample user plays the video, if label (i) is equal to 1, it indicates that the sample user has executed the operation mode in which the video is played, and if label (i) is equal to 0, it indicates that the user has not executed the operation mode in which the video is played.
Step S320: and training a plurality of sample data by using a multi-task learning model to obtain a multi-task prediction model, wherein the multi-task prediction model comprises weight parameters and loss functions corresponding to each operation mode, the weight parameters are used for forming weight vectors, and the loss functions are obtained by training according to the initial loss functions.
The multi-task learning model is a derivation transfer learning method, and the main task uses domain-related information possessed by training signals of related tasks as a machine learning method for deriving deviation to improve the generalization effect of the main task. The multi-task learning model relates to simultaneous parallel learning of a plurality of related tasks, gradient simultaneous backward propagation, mutual learning assistance of the plurality of tasks through shared representation of a bottom layer, and generalization effect is improved.
The multitask learning model can include but is not limited to a deep fm multitask learning model, and in the embodiment of the application, the recommendation model is taken as the deep fm multitask learning model for example, and introduction is performed.
The deep FM multi-task learning model is to apply the multi-task learning MTL to the deep FM model, wherein the deep FM model combines the advantages of DNN and FM and can simultaneously extract the combined features of low order and high order. Wherein, the FM part extracts low order combination features, including: linear combination of first-order features (weight and feature dot product), second-order cross features (implicit vector inner product). The Deep part extracts high-order combination characteristics. Meanwhile, FM and Deep share the input and embedding vectors (embedding).
As shown in fig. 8, the network structure of the Deep FM model provided in this embodiment of the present application is that, first, the Deep FM model is divided into a Deep neural network part and an FM factorizer part, the Deep neural network part may adopt a fully-connected feedforward neural network DNN, the DNN and the FM divide the input user features and the attribute features of the data to be recommended into a plurality of feature groups, each feature group corresponds to one vector (embedding), wherein, a feature splicing layer (concat) of the Deep neural network part splices all the embedding vectors, and then a fully-connected layer (fc relu) of two layers is added to realize the combination of high-order features; the FM factorization machine carries out weighted summation (addition) on input original feature input such as user features and attribute features, extracts feature combinations through an embedding vector inner product of each operation mode, and realizes combination of low-order features, so that probability prediction is carried out on each operation mode in the application.
Step S330: n data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user are obtained, wherein N and M are integers larger than 1.
Step S340: and processing the N data to be recommended, the M operation modes and the user characteristic information according to the multi-task prediction model to obtain the probability of executing each operation mode on each data to be recommended in the N data to be recommended by the target user.
Step S350: and acquiring the target weight corresponding to each operation mode according to the weight vector in the multi-task prediction model and the loss function corresponding to each operation mode.
Step S360: and obtaining the score of each piece of data to be recommended according to the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode, and recommending the N pieces of data to be recommended according to the score of each piece of data to be recommended.
According to the information recommendation method provided by the embodiment of the application, a plurality of sample data are obtained, and each sample data comprises user characteristic information of a sample user, attribute information of sample recommendation data and an operation mode of the sample user on the sample recommendation data; and training a plurality of sample data by using the multi-task learning model to obtain a multi-task prediction model. Processing N kinds of data to be recommended, M kinds of operation modes and user characteristic information by using a multi-task prediction model to obtain the probability of executing each operation mode on each data to be recommended by a target user; acquiring a target weight corresponding to each operation mode according to a weight vector in a preset rule and a loss function corresponding to each operation mode; and obtaining the score of each data to be recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode, and recommending the N data to be recommended according to the score of each data to be recommended. The method and the device realize that more accurate data to be recommended are recommended to the target user by utilizing the probability of executing each operation mode on each data to be recommended by the target user and the target weight corresponding to each operation mode.
Taking an application scenario of the information recommendation method as a scenario shown in fig. 1, and taking a client installed on the mobile terminal as a content publishing platform as an example, the content publishing platform may be used to show one or more of picture information, text information, video information, and the like to a user. When entering a content distribution platform for the first time, user characteristic information (such as interest, hobbies, user portrait information and the like) of a user needs to be selected and sent to a server, so that the server obtains corresponding data from a database according to the user characteristic information, selects one or more of picture information, text information and video information related to the interest and hobbies from the data and sends the one or more of the picture information, the text information and the video information related to the interest and hobbies to a client, and the user can check one or more of the picture information, the text information and the video information related to the interest and hobbies of the user, which are received by the client installed on a mobile terminal. The user can like and comment on the viewing information in the viewing process. After the user enters the content publishing platform again, video promotion can be performed according to the operations of clicking, praise, commenting, playing the picture information, the text information or the video information and the like of the user, specifically, description is given by taking cartoon recommendation as an example, and a specific recommendation process is as follows:
the server can obtain a plurality of sample data before the user enters the content publishing platform again and receives an information browsing request sent by the user to recommend the cartoon, wherein each sample data comprises user characteristic information of the sample user, attribute information of the sample cartoon and an operation mode of the sample user on the sample cartoon data. Training a plurality of sample data by using a multi-task learning model to obtain a multi-task prediction model, wherein the multi-task prediction model comprises weight parameters and loss functions corresponding to each operation mode, the weight parameters are used for forming weight vectors, and the loss functions are obtained by training according to initial loss functions.
After model training is completed, a target user can send an information browsing request including a target user identifier through a client installed on a mobile terminal, a server can select N cartoons to be recommended, M operation modes for the N cartoons to be recommended and user feature information of the target user from a database corresponding to a content publishing platform based on user feature information corresponding to user representation, and the N cartoons to be recommended, the M operation modes and the user feature information are processed by using a multi-task prediction model to obtain the probability of the target user executing each operation mode for each cartoon to be recommended.
Constructing a band constraint calculation formula by taking the target weight corresponding to each operation mode as a decision variable according to the initial weight threshold range corresponding to each operation mode, the weight vector in a preset rule and the loss function corresponding to each operation mode, wherein the band constraint calculation formula comprises
Figure BDA0002993279390000191
Figure BDA0002993279390000192
Wherein, W i Executing the target weight corresponding to the ith operation mode for the cartoon to be recommended, C i Is the initial weight threshold range of the ith operation mode, theta is the weight vector in the preset rule, L i (θ) is a loss function with respect to θ in the i-th mode of operation.
And solving and calculating the constraint calculation formula by adopting any one of an interior point method, an active set method, a Lagrange multiplier method and an alternate direction multiplier method to obtain the pareto optimal leading edge.
Randomly selecting a target point from the pareto frontier, obtaining a target weight corresponding to each operation mode according to the coordinates of the target point, and calculating the probability of executing each operation mode on each cartoon to be recommended and the target weight corresponding to each operation mode by using a score calculation formula to obtain the score of each cartoon to be recommended, wherein the score calculation formula comprises the following steps:
Figure BDA0002993279390000201
s is the score of the cartoon to be recommended, P i Probability of executing the ith operation mode for the cartoon to be recommended, W i And executing the target weight corresponding to the ith operation mode for the cartoon to be recommended. The N cartoons to be recommended are sorted according to the score corresponding to each cartoon to be recommended from large to small, the cartoons to be recommended which are sorted into the front set numerical value are used as target cartoons to be recommended, and the target cartoons to be recommended are sent to a client of a target user, so that the user can check the target cartoons to be recommended by operating the client of the mobile terminal.
Referring to fig. 9, the present application provides an information recommendation apparatus 400, which includes an information obtaining module 410, an information processing module 420, a weight obtaining module 430, and a data recommendation module 440.
The information obtaining module 410 is configured to obtain N data to be recommended, M operation modes for the N data to be recommended, and user characteristic information of a target user, where N and M are integers greater than 1, respectively.
It should be understood that the data to be recommended may be at least one of a text to be recommended, a video to be recommended, a picture to be recommended, and the like.
By one way, the information obtaining module 410 includes a historical data obtaining sub-module, an information category obtaining sub-module, and a data to be recommended obtaining sub-module.
And the historical data acquisition submodule is used for responding to the information browsing request to acquire the historical data of the target user.
And the category acquisition submodule is used for acquiring the information category interested by the target user according to the historical data.
And the data to be recommended acquisition submodule is used for acquiring N data to be recommended corresponding to the information category from the database according to the information category in which the user is interested.
The information processing module 420 is configured to process the N data to be recommended, the M operation manners, and the user characteristic information according to a preset rule, so as to obtain a probability that a target user executes each operation manner on each data to be recommended of the N data to be recommended.
The weight obtaining module 430 is configured to obtain a target weight corresponding to each operation mode according to a weight vector in a preset rule and a loss function corresponding to each operation mode.
Referring to fig. 10, as one way, the weight obtaining module 430 includes: a pareto front obtaining sub-module 432 and a weight obtaining sub-module 434.
Pareto front edge acquisition submodule 432: the method is used for obtaining the pareto optimal front edge according to the initial weight threshold range corresponding to each operation mode, the weight vector and the loss function in the preset rule, the coordinate of a point on the pareto optimal front edge is M-dimensional, and each dimension of the M-dimensional coordinate corresponds to the weight of each operation mode in the M operation modes one to one.
The weight obtaining sub-module 434 is configured to determine a target point from the pareto optimal leading edge, and obtain a target weight corresponding to each operation mode according to coordinates of the target point.
Referring to fig. 11, in this manner, the pareto front edge obtaining sub-module 432 includes: a calculation formula construction unit 432a and a pareto leading edge obtaining unit 432 b.
The calculation formula building unit 432a is configured to build a constrained calculation formula using the target weight corresponding to each operation manner as a decision variable according to the initial weight threshold range corresponding to each operation manner, the weight vector in the preset rule, and the loss function corresponding to each operation manner.
As one embodiment, the band constraint calculation includes
Figure BDA0002993279390000211
Figure BDA0002993279390000212
Wherein, W i Executing the target weight corresponding to the ith operation mode for the data to be recommended, C i Is the initial weight threshold range of the ith operation mode, theta is the weight vector in the preset rule, L i (θ) is a loss function with respect to θ in the i-th mode of operation.
The pareto leading edge obtaining unit 432b is configured to obtain a pareto optimal leading edge according to the band constraint calculation formula.
As one mode, the pareto obtaining unit 432b is specifically configured to perform solution calculation on the band constraint calculation formula by using an interior point method, an active set method, a lagrange multiplier method, or an alternate direction multiplier method, so as to obtain the pareto optimal leading edge.
The data recommendation module 440 is configured to obtain a score of each data to be recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode, and recommend the N data to be recommended according to the score of each data to be recommended.
As an embodiment, the data recommendation module 440 is specifically configured to calculate, by using a score calculation formula, a probability of executing each operation manner on each to-be-recommended data and a target weight corresponding to each operation manner, and obtain a score of each to-be-recommended data, where the score calculation formula includes:
Figure BDA0002993279390000213
s is the score of the data to be recommended, P i Probability of carrying out the i-th operation mode for the data to be recommended, W i And executing the target weight corresponding to the ith operation mode for the data to be recommended.
In this way, the data recommendation module is further configured to sort the N data to be recommended according to the scores corresponding to each data to be recommended, the N data to be recommended are sorted from the scores according to a descending order to obtain a sorting order, and the target data to be recommended, which are sorted into the preset number, are selected from the sorting order to be recommended.
Referring to fig. 12, as an embodiment, when the preset rule includes a multitask prediction model, the information recommendation apparatus further includes:
the sample obtaining module 450 is configured to obtain a plurality of sample data, where each sample data includes user characteristic information of a sample user, attribute information of sample recommended data, and an operation mode of the sample user on the sample recommended data.
And a model training module 460, configured to train multiple sample data by using a multi-task learning model to obtain a multi-task prediction model, where the multi-task prediction model includes weight parameters and a loss function corresponding to each operation mode, the weight parameters are used to form weight vectors, and the loss function is obtained by training according to an initial loss function.
It should be noted that the apparatus embodiment in the present application corresponds to the foregoing method embodiment, and specific principles in the apparatus embodiment may refer to the contents in the foregoing method embodiment, which is not described herein again.
An electronic device provided by the present application will be described below with reference to fig. 13.
Referring to fig. 13, based on the information recommendation method provided in the foregoing embodiment, another electronic device 100 including a processor 102 capable of executing the foregoing method is provided in an embodiment of the present application, where the electronic device 100 may be a server or a terminal device, and the terminal device may be a device such as a smart phone, a tablet computer, a computer, or a portable computer.
The electronic device 100 also includes a memory 104. The memory 104 stores programs that can execute the content of the foregoing embodiments, and the processor 102 can execute the programs stored in the memory 104.
Processor 102 may include, among other things, one or more cores for processing data and a message matrix unit. The processor 102 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 104 and invoking data stored in the memory 104. Alternatively, the processor 102 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 102 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 102, but may be implemented by a communication chip.
The Memory 104 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 104 may be used to store instructions, programs, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function, instructions for implementing the various method embodiments described below, and the like. The storage data area may also store data (e.g., data to be recommended and operating mode) obtained by the electronic device 100 during use, and the like.
The electronic device 100 may further include a network module for receiving and transmitting electromagnetic waves, and implementing interconversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices, for example, an audio playing device. The network module may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. The network module may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices via a wireless network. The wireless network may comprise a cellular telephone network, a wireless local area network, or a metropolitan area network. The screen can display the interface content and perform data interaction.
In some embodiments, the electronic device 100 may further include: a peripheral interface and at least one peripheral device. The processor 102, memory 104, and peripheral interface 106 may be connected by bus or signal lines. Each peripheral device may interface with the peripheral devices through a bus, signal line, or circuit board. Specifically, the peripheral device includes: at least one of a radio frequency component 108, a positioning component 112, a camera 114, an audio component 116, a display screen 118, and a power supply 122, among others
Peripheral interface 106 may be used to connect at least one peripheral device associated with I/O (Input/Output) to processor 102 and memory 104. In some embodiments, the processor 102, memory 104, and peripheral interface 106 are integrated on the same chip or circuit board; in some other embodiments, any one or both of the processor 102, the memory 104, and the peripheral interface 106 may be implemented on a single chip or circuit board, which is not limited in this application.
The Radio Frequency assembly 108 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency assembly 108 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency assembly 108 converts electrical signals to electromagnetic signals for transmission, or converts received electromagnetic signals to electrical signals. Optionally, the radio frequency assembly 108 comprises: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a subscriber identity module card, and so forth. The radio frequency component 108 may communicate with other terminals via at least one wireless communication protocol. The wireless communication protocols include, but are not limited to: the world wide web, metropolitan area networks, intranets, generations of mobile communication networks (2G, 3G, 4G, and 5G), Wireless local area networks, and/or WiFi (Wireless Fidelity) networks. In some embodiments, the radio frequency component 108 may further include NFC (Near Field Communication) related circuitry, which is not limited in this application.
The positioning component 112 is used to locate a current geographic location of the electronic device to implement navigation or LBS (location based Service). The positioning component 112 can be a positioning component based on the Global Positioning System (GPS) in the united states, the beidou System in china, or the galileo System in russia.
The camera 114 is used to capture images or video. Optionally, the cameras 114 include front and rear cameras. Generally, the front camera is disposed on the front panel of the electronic apparatus 100, and the rear camera is disposed on the rear surface of the electronic apparatus 100. In some embodiments, the number of the rear cameras is at least two, and each rear camera is any one of a main camera, a depth-of-field camera, a wide-angle camera and a telephoto camera, so that the main camera and the depth-of-field camera are fused to realize a background blurring function, the main camera and the wide-angle camera are fused to realize panoramic shooting and a VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, camera 114 may also include a flash. The flash lamp can be a single-color temperature flash lamp or a double-color temperature flash lamp. The double-color-temperature flash lamp is a combination of a warm-light flash lamp and a cold-light flash lamp, and can be used for light compensation at different color temperatures.
The audio components 116 may include a microphone and a speaker. The microphone is used for collecting sound waves of a user and the environment, converting the sound waves into electric signals, and inputting the electric signals to the processor 102 for processing or inputting the electric signals to the radio frequency assembly 108 to realize voice communication. For the purpose of stereo sound collection or noise reduction, a plurality of microphones may be provided at different portions of the electronic device 100. The microphone may also be an array microphone or an omni-directional pick-up microphone. The speaker is used to convert electrical signals from the processor 102 or the radio frequency components 108 into sound waves. The loudspeaker can be a traditional film loudspeaker or a piezoelectric ceramic loudspeaker. When the speaker is a piezoelectric ceramic speaker, the speaker can be used for purposes such as converting an electric signal into a sound wave audible to a human being, or converting an electric signal into a sound wave inaudible to a human being to measure a distance. In some embodiments, audio component 114 may also include a headphone jack.
The display screen 118 is used to display a UI (User Interface). The UI may include graphics, text, icons, video, and any combination thereof. When the display screen 118 is a touch display screen, the display screen 118 also has the ability to capture touch signals on or over the surface of the display screen 118. The touch signal may be input to the processor 102 as a control signal for processing. At this point, the display screen 118 may also be used to provide virtual buttons and/or a virtual keyboard, also referred to as soft buttons and/or a soft keyboard. In some embodiments, the display screen 118 may be one, providing the front panel of the electronic device 100; in other embodiments, the display screens 118 may be at least two, respectively disposed on different surfaces of the electronic device 100 or in a folded design; in still other embodiments, the display 118 may be a flexible display disposed on a curved surface or on a folded surface of the electronic device 100. Even further, the display screen 118 may be arranged in a non-rectangular irregular pattern, i.e., a shaped screen. The Display screen 118 may be made of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), and the like.
The power supply 122 is used to supply power to various components in the electronic device 100. The power source 122 may be alternating current, direct current, disposable or rechargeable. When the power source 122 includes a rechargeable battery, the rechargeable battery may be a wired rechargeable battery or a wireless rechargeable battery. The wired rechargeable battery is a battery charged through a wired line, and the wireless rechargeable battery is a battery charged through a wireless coil. The rechargeable battery may also be used to support fast charge technology.
The embodiment of the application also provides a computer readable storage medium. The computer readable medium has stored therein a program code which can be called by a processor to execute the method described in the above method embodiments.
The computer-readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium includes a non-volatile computer-readable storage medium. The computer readable storage medium has a storage space for program code for performing any of the method steps of the above-described method. The program code can be read from and written to one or more computer program products. The program code may be compressed, for example, in a suitable form.
Embodiments of the present application also provide a computer program product or computer program comprising computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method described in the various alternative implementations described above.
In summary, according to the information recommendation method, apparatus, device, and storage medium provided by the present application, the scheme obtains the probability of the target user performing each operation mode on each data to be recommended by obtaining N data to be recommended, M operation modes on the N data to be recommended, and user characteristic information of the target user according to a preset rule, and obtains a target weight corresponding to each operation mode according to a weight vector in the preset rule and a loss function corresponding to each operation mode, and recommends the N data to be recommended according to the probability of performing each operation mode on each data to be recommended and the target weight corresponding to each operation mode. By adopting the recommendation method, the probability of executing each operation mode on each type of data to be recommended by the target user and the target weight corresponding to each operation mode are utilized, and more accurate data to be recommended are recommended to the target user.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. An information recommendation method, characterized in that the method comprises:
acquiring N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user, wherein N and M are integers larger than 1 respectively;
processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of each operation mode executed by the target user on each data to be recommended in the N data to be recommended;
acquiring a target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode;
and obtaining the score of each piece of data to be recommended according to the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode, and recommending the N pieces of data to be recommended according to the score of each piece of data to be recommended.
2. The information recommendation method according to claim 1, wherein the obtaining of the target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode comprises:
acquiring a pareto optimal front edge according to an initial weight threshold range corresponding to each operation mode, a weight vector and a loss function in a preset rule, wherein coordinates of points on the pareto optimal front edge are M-dimensional, and each dimension of the M-dimensional coordinates is in one-to-one correspondence with the weight of each operation mode in the M operation modes;
and determining a target point from the pareto optimal leading edge, and obtaining the target weight corresponding to each operation mode according to the coordinates of the target point.
3. The information recommendation method according to claim 2, wherein the obtaining of the pareto optimal leading edge according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule, and the loss function comprises:
constructing a constrained calculation formula taking the target weight corresponding to each operation mode as a decision variable according to the initial weight threshold range corresponding to each operation mode, the weight vector in the preset rule and the loss function;
and obtaining the pareto optimal leading edge according to the band constraint calculation formula.
4. The information recommendation method according to claim 3, wherein the calculation formula with constraint includes
Figure FDA0002993279380000021
Wherein, W i To execute the target weight corresponding to the ith operation mode on the data to be recommended, C i Is the initial weight threshold range of the ith operation mode, theta is the weight vector in the preset rule, L i (θ) in the i-th mode of operationA loss function of theta.
5. The information recommendation method according to claim 3, wherein said deriving a pareto optimal leading edge according to said band-constrained computation comprises:
and solving and calculating the band constraint calculation formula by adopting any one of an interior point method, an active set method, a Lagrange multiplier method and an alternate direction multiplier method to obtain the pareto optimal leading edge.
6. The information recommendation method according to claim 1, wherein the obtaining the score of each data to be recommended according to the probability of executing each operation mode on each data to be recommended and the target weight corresponding to each operation mode comprises:
calculating the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode by using a scoring calculation formula to obtain the score of each piece of data to be recommended, wherein the scoring calculation formula comprises:
Figure FDA0002993279380000022
s is the score of the data to be recommended, P i Probability of executing the ith operation mode on the data to be recommended, W i And executing target weight corresponding to the ith operation mode on the data to be recommended.
7. The information recommendation method according to any one of claims 1-6, wherein the preset rule comprises a multitask prediction model obtained by:
obtaining a plurality of sample data, wherein each sample data comprises user characteristic information of a sample user, attribute information of sample recommended data and an operation mode of the sample user on the sample recommended data;
and training the plurality of sample data by utilizing a multitask learning model to obtain the multitask prediction model, wherein the multitask prediction model comprises weight parameters and loss functions corresponding to each operation mode, the weight parameters are used for forming the weight vectors, and the loss functions are obtained by training according to initial loss functions.
8. The information recommendation method according to claim 1, wherein recommending the N data to be recommended according to the score of each data to be recommended comprises:
according to the score corresponding to each data to be recommended, sorting the N data to be recommended according to the order of scores from large to small to obtain a sorting order;
and selecting the target data to be recommended which are sorted into a preset number from the sorting sequence for recommendation.
9. The information recommendation method according to claim 1, wherein the obtaining N data to be recommended includes:
responding to the information browsing request to acquire historical data of a target user;
obtaining information categories in which the target user is interested according to the historical data;
and acquiring N data to be recommended corresponding to the information category from a database according to the information category in which the user is interested.
10. The information recommendation method according to any one of claims 1 to 9, wherein the data to be recommended includes at least one of a text to be recommended, a video to be recommended, and a picture to be recommended.
11. An information recommendation apparatus, comprising:
the information acquisition module is used for acquiring N data to be recommended, M operation modes of the N data to be recommended and user characteristic information of a target user, wherein N and M are integers larger than 1 respectively;
the information processing module is used for processing the N data to be recommended, the M operation modes and the user characteristic information according to a preset rule to obtain the probability of each operation mode executed by the target user on each data to be recommended in the N data to be recommended;
the weight obtaining module is used for obtaining a target weight corresponding to each operation mode according to the weight vector in the preset rule and the loss function corresponding to each operation mode;
and the data recommendation module is used for acquiring the score of each piece of data to be recommended according to the probability of executing each operation mode on each piece of data to be recommended and the target weight corresponding to each operation mode, and recommending the N pieces of data to be recommended according to the score of each piece of data to be recommended.
12. An electronic device comprising a processor and a memory; one or more programs stored in the memory and configured to be executed by the processor to implement the method of any of claims 1-9.
13. A computer-readable storage medium, having program code stored therein, wherein the program code when executed by a processor performs the method of any one of claims 1-9.
CN202110322106.3A 2021-03-25 2021-03-25 Information recommendation method, device, equipment and storage medium Pending CN115129968A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110322106.3A CN115129968A (en) 2021-03-25 2021-03-25 Information recommendation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110322106.3A CN115129968A (en) 2021-03-25 2021-03-25 Information recommendation method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115129968A true CN115129968A (en) 2022-09-30

Family

ID=83374191

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110322106.3A Pending CN115129968A (en) 2021-03-25 2021-03-25 Information recommendation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115129968A (en)

Similar Documents

Publication Publication Date Title
CN111552888A (en) Content recommendation method, device, equipment and storage medium
CN111897996B (en) Topic label recommendation method, device, equipment and storage medium
CN114036398B (en) Content recommendation and ranking model training method, device, equipment and storage medium
CN112069414A (en) Recommendation model training method and device, computer equipment and storage medium
WO2021155691A1 (en) User portrait generating method and apparatus, storage medium, and device
CN114282681A (en) Multitask processing and model training method, device, medium and equipment
CN113254684B (en) Content aging determination method, related device, equipment and storage medium
CN112528164B (en) User collaborative filtering recall method and device
US11763204B2 (en) Method and apparatus for training item coding model
CN111831917A (en) Content recommendation method, device, equipment and medium
CN112149699A (en) Method and device for generating model and method and device for recognizing image
CN116775915A (en) Resource recommendation method, recommendation prediction model training method, device and equipment
CN114281936A (en) Classification method and device, computer equipment and storage medium
CN117217839A (en) Method, device, equipment and storage medium for issuing media resources
CN117453933A (en) Multimedia data recommendation method and device, electronic equipment and storage medium
CN112418442A (en) Data processing method, device, equipment and storage medium for federal transfer learning
CN111931075A (en) Content recommendation method and device, computer equipment and storage medium
CN112749329A (en) Content search method, content search device, computer equipment and storage medium
CN114430504B (en) Recommendation method and related device for media content
CN115129968A (en) Information recommendation method, device, equipment and storage medium
CN110704679B (en) Video classification method and device and electronic equipment
CN114969493A (en) Content recommendation method and related device
CN112860999A (en) Information recommendation method, device, equipment and storage medium
CN113283115B (en) Image model generation method and device and electronic equipment
CN113888291B (en) Virtual space processing method and device, electronic equipment and storage medium

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