Disclosure of Invention
The application provides a recommendation method to solve the problem that recommendation accuracy is reduced along with increase of page numbers in the prior art. The application further provides a recommendation device, a model processing method and device and an electronic device.
The application provides a recommendation method, which comprises the following steps:
acquiring target page number information and characteristics of a trigger object aiming at a recommendation information acquisition request based on the trigger object;
acquiring first instant interest strength of a user on a trigger object according to the target page number information and the characteristics of the trigger object;
and acquiring the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select the target object corresponding to the target page number from the candidate object set.
Optionally, the obtaining a first instant interest strength of the user for the trigger object according to the target page number information and the characteristics of the trigger object includes:
and acquiring the first instant interest strength according to the target page number information and the characteristics of the trigger object, and at least one of the characteristics of the historical interaction object and the user characteristics, wherein the historical interaction object has the same target attribute with the trigger object.
Optionally, the obtaining the first instant interest strength according to the target page number information and the feature of the trigger object, and at least one of the feature of the historical interaction object having the same target attribute as the trigger object and the user feature includes:
acquiring the overall characteristics of a plurality of historical interactive objects which have the same target attributes with the trigger object according to the characteristics of the historical interactive objects;
and acquiring the first instant interest strength according to the target page number information, the characteristics of the trigger object, the user characteristics and the overall characteristics.
Optionally, the obtaining the interest level of the user in the candidate object according to the first instant interest strength, the feature of the trigger object, and the feature of the candidate object includes:
acquiring the characteristics of a historical interaction object of a user;
acquiring a first interest characteristic related to a trigger object according to the characteristics of a historical interaction object of a user and the characteristics of the trigger object;
acquiring a second interest characteristic related to the candidate object according to the characteristics of the historical interaction object of the user and the characteristics of the candidate object;
acquiring a second instant interest strength of the candidate object by the user according to the first instant interest strength;
taking the first instant interest strength as the weight of the first interest characteristic, taking the second instant interest strength as the weight of the first interest characteristic, and obtaining a mixed interest characteristic in a weighted summation mode;
and acquiring the interest degree of the user on the candidate object at least according to the mixed interest characteristics.
Optionally, the method further includes:
acquiring a third interest characteristic according to the characteristics of the historical interaction object of the user, wherein the historical interaction object has the same attribute as the trigger object;
the obtaining of the interest degree of the user on the candidate object at least according to the mixed interest features comprises:
and acquiring the interest degree of the user on the candidate object according to the mixed interest feature and the third interest feature.
Optionally, the method further includes:
acquiring the interaction time of a user on a historical interaction object;
and acquiring at least one of the first interest characteristic, the second interest characteristic and the third interest characteristic according to the interaction time and the characteristics of the historical interaction objects.
Optionally, the method further includes:
acquiring a characteristic interaction relation between the candidate object and the trigger object according to the characteristics of the candidate object and the characteristics of the trigger object;
the obtaining of the interest degree of the user on the candidate object at least according to the mixed interest features comprises:
and acquiring the interest degree of the user on the candidate object according to the mixed interest feature and the feature interaction relation.
Optionally, the obtaining a feature interaction relationship between the candidate object and the target object according to the feature of the candidate object and the feature of the trigger object includes:
and taking the cross product, the Hadamard product and/or the difference value between the characteristics of the candidate object and the characteristics of the trigger object as the characteristic interaction relation.
Optionally, a first instant interest strength of the user on the trigger object is obtained in a machine learning manner according to the target page number information and the characteristics of the trigger object; and acquiring the interest degree of the user on the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object.
The application also provides a model processing method, which comprises the following steps:
obtaining a training data set, the training data comprising: target page number information, characteristics of the trigger object, characteristics of the candidate object and labeling data of whether the user takes the candidate object as a recommendation object or not;
constructing a network structure of an interest degree prediction model, wherein the model comprises a user instant interest network and a prediction network; the user instant interest network acquires a first instant interest strength of a user on a trigger object according to the target page number information and the characteristics of the trigger object; the prediction network acquires the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select a target object corresponding to the target page number from the candidate object set;
network parameters of the model are trained according to a training data set.
The present application further provides a recommendation device, including:
an information acquisition unit configured to acquire target page number information and a feature of a trigger object for a recommendation information acquisition request based on the trigger object;
the first instant interest strength acquisition unit is used for acquiring the first instant interest strength of the user on the trigger object according to the target page number information and the characteristics of the trigger object;
and the interest degree acquisition unit is used for acquiring the interest degree of the user on the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select the target object corresponding to the target page number from the candidate object set.
The present application also provides a model processing apparatus, comprising:
a training data acquisition unit configured to acquire a training data set, the training data including: target page number information, characteristics of the trigger object, characteristics of the candidate object and labeling data of whether the user takes the candidate object as a recommendation object or not;
the network structure construction unit is used for constructing a network structure of an interest degree prediction model, and the model comprises a user instant interest network and a prediction network; the user instant interest network acquires a first instant interest strength of a user on a trigger object according to the target page number information and the characteristics of the trigger object; the prediction network acquires the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select a target object corresponding to the target page number from the candidate object set;
and the model training unit is used for training the network parameters of the model according to the training data set.
The present application further provides an electronic device, comprising:
a processor and a memory;
a memory for storing a program for implementing the above method, the apparatus being powered on and the program for executing the method by the processor.
The present application also provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the various methods described above.
The present application also provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the various methods described above.
Compared with the prior art, the method has the following advantages:
the recommendation method provided by the embodiment of the application aims at the recommendation information acquisition request based on the trigger object and acquires the target page number information and the characteristics of the trigger object; acquiring first instant interest strength of a user on a trigger object according to the target page number information and the characteristics of the trigger object; and acquiring the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select the target object corresponding to the target page number from the candidate object set. By adopting the processing mode, the dynamic change process of the instant interest intensity of the user to the trigger object can be captured according to the change of the page number in the process of page-down turning of the user, so that the preference degree of the user to the trigger object is more accurate, and the recommendation information which is more interesting to the user is obtained; therefore, the accuracy of recommending the content under a larger page number can be effectively ensured.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit and scope of this application, and thus this application is not limited to the specific implementations disclosed below.
In the application, a recommendation method and device, a model processing method and device and an electronic device are provided. Each of the solutions is described in detail in the following examples.
First embodiment
Please refer to fig. 1, which is a flowchart illustrating an embodiment of a recommendation method according to the present application. In this embodiment, the method may include the steps of:
step S101: and acquiring target page number information and characteristics of the trigger object aiming at the recommendation information acquisition request based on the trigger object.
The method provided by the embodiment of the application is suitable for triggering the recommendation scene. For example, as shown in fig. 2, in the double 11, there are leaderboards or different meeting places, some recommended commodities in the traditional recommendation mode are shown in the leaderboards, and after clicking the commodity, the user jumps to a page, and the same kind of or related commodities in the trigger recommendation mode are shown on the page. In this embodiment, a commodity clicked by a user is called a trigger, that is, a trigger object, and a page is skipped after the trigger.
The trigger objects include, but are not limited to: a commodity object (a commodity triggered recommendation scene), a news object (a news triggered recommendation scene), a video object (a video triggered recommendation scene), and an advertisement object (an advertisement triggered recommendation scene).
The request can carry the identification of the trigger object, and can also carry information such as user identification, target page number identification and the like.
The execution subject of the method may be a server, and the request may be initiated by a client. For example, in a trigger recommendation system of an e-commerce website, when a user clicks a certain mobile phone through a terminal of the user, the user terminal sends a recommendation information acquisition request for the mobile phone to a server; correspondingly, the server side carries out related recommendation according to the mobile phone, and the recommended goods are related or similar to the mobile phone in general, for example, the recommended goods comprise accessories of the mobile phone and can also comprise other mobile phones and the like.
Multiple objects can be recommended based on the trigger object, and the recommended objects are usually displayed in a paging manner, for example, 10 recommended objects are displayed in each page, and a user can browse the 10 recommended objects in the next page by turning the page. In the method provided by the embodiment of the application, in the case of continuous pull-down recommendation, to capture a dynamic change process of the instant interest strength of a user in a trigger object, the inventor finds that the dynamic change process is related to page numbers, and therefore target page number information needs to be acquired. The target page number information is a page number of a recommended page to be displayed. For example, when the user currently views the 5 th page and clicks the next page button, the target page number information is the 6 th page.
The feature of the trigger object can comprise a multi-dimensional feature of the trigger object, and the feature dimension can be determined according to application requirements. Taking a commodity as an example, the characteristics of the trigger may include commodity category, number of good reviews, number of clicks in the last 7 days, number of purchases made, number of collections, number of transactions, and the like.
In specific implementation, the characteristics of the trigger object can be obtained by counting the raw data in the log file. With respect to abstract features obtained by neural network learning, features obtained by statistics may be referred to as raw features. Since the feature of the trigger object obtained by the statistical method belongs to the mature prior art, it is not described herein again.
Step S103: and acquiring the first instant interest strength of the user on the trigger object according to the target page number information and the characteristics of the trigger object.
In a trigger recommendation scenario, the user may express his immediate interest explicitly through a trigger object. The instant interest strength is a specific index of a trigger recommendation scene, and means that user preference information mainly depends on a current trigger object. Whereas in traditional recommendation scenarios, the user preference information is mainly dependent on the user's historical interaction behavior. However, as the user looks back at the page, the strength of their immediate interest in the trigger object tends to diminish. In order to accurately capture the dynamic change process of the instant interest strength of the user on the trigger object, the method provided by the embodiment of the application not only considers the characteristics of the trigger object, but also considers the target page number in the pull-down browsing of the user, and integrates the two aspects of information to more accurately obtain the instant interest of the user on the trigger object.
For example, the more times the trigger object is clicked, collected, purchased, and transacted historically, the greater the strength of the instant interest of the user in the trigger object may be, and if the page number of the recommended page is not considered, the instant interest of the user in the trigger object remains unchanged regardless of whether the user browses the recommended content of page 1 or the recommended content of page 10. After the page number is considered, the instant interest of the user on the same trigger object is gradually reduced along with the backward page turned over by the user, which embodies the dynamic change process of the instant interest intensity of the user on the trigger object.
In one example, if the user is really interested in the trigger object and the trigger object is triggered without error, the first instant interest strength of the user in the trigger object can be acquired more accurately only according to the target page number information and the characteristics of the trigger object.
In practical applications, the immediate interest the user arouses from the trigger object is often noisy, since there are some situations in the user behavior where the wrong object is accidentally clicked. To illustrate the real intention of the user to trigger the object, step S103 can be implemented as follows: and acquiring a first instant interest strength according to the target page number information and the characteristics of the trigger object, and at least one of the characteristics of the historical interaction object and the user characteristics, wherein the historical interaction object has the same target attribute as the trigger object. The target attribute may be an attribute capable of dividing the object into groups, such as an attribute of the item class, the place of production, and the like of the commodity object. The user characteristics may include an age characteristic, an educational level characteristic, a region of interest, etc. of the user. By adopting the processing mode, the interest of the user in the trigger object is estimated by utilizing one or both of the user portrait and the user behavior as well as the trigger object and the target page number, wherein the real interest of the user in the trigger object is captured by selecting the object which has historically interacted with the user and has the same attribute with the trigger object, so as to avoid being interfered by the accidental clicking error of the user, and the real intention of the user in the trigger object can be obtained even if the user accidentally clicks the wrong object (such as a commodity).
In one example, obtaining the instant interest strength according to the target page number information and the characteristics of the trigger object, and at least one of the characteristics of the historical interaction object and the user characteristics having the same target attribute as the trigger object may include the following sub-steps: 1) Acquiring the overall characteristics of a plurality of historical interaction objects according to the characteristics of the historical interaction objects with the same target attributes as the trigger object; 2) And acquiring the instant interest strength according to the target page number information, the characteristics of the trigger object, the user characteristics and the overall characteristics.
The overall characteristics can be obtained by performing summation pooling on characteristics of a plurality of historical interaction objects having the same target attribute as the trigger object. For example, the historical interaction objects of the user, which have the same target attribute with the trigger object, include 10, and the average values of the sum of the clicked times, the buyback times, the collection times and the transaction times of the last 7 days of the 10 objects are all lower, which indicates that the probability that the user mistakenly triggers the object is higher.
In specific implementation, the step of obtaining the instant interest strength according to the target page number information, the characteristics of the trigger object, the user characteristics, and the overall characteristics may be implemented in the following manner: acquiring a first characteristic according to the target page number information, the characteristics of the trigger object, the user characteristics and the overall characteristics; according to the first characteristic, a first instant interest strength is obtained. The first feature may be a feature obtained by merging and leveling the target page number information, the feature of the trigger object, the user feature, and the overall feature.
Step S105: and acquiring the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select the target object corresponding to the target page number from the candidate object set.
The step is to adaptively fuse the characteristics of the trigger object and the characteristics of the candidate object based on the first instant interest strength to obtain the interest degree of the user on the candidate object. If the first instant interest strength of the user in the trigger object is gradually reduced, the interest degree of the candidate object which is determined to be less similar to the trigger object according to the object characteristics is higher.
In one example, step S105 can be implemented as follows: acquiring mixed interest characteristics according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object; and acquiring the interest degree of the user on the candidate object according to the mixed interest characteristics. The mixed interest feature refers to an overall interest feature of the user for both the trigger object and the candidate object. The first instant interest strength represents the instant interest strength of the user on the trigger object, and the second instant interest strength represents the instant interest strength of the user on the candidate object. In particular, the sum of the first immediate interest strength and the second immediate interest strength, which is 1 minus the first immediate interest strength, may be set to 1. In specific implementation, the first immediate interest strength may be used as a weight of a feature of the trigger object, the second immediate interest strength may be used as a weight of a feature of the candidate object, and the mixed interest feature may be obtained through a weighted summation manner.
In another example, step S105 may be implemented as follows: and acquiring the interest degree of the user on the candidate object according to the first instant interest strength, the characteristics of the historical interaction object of the user, the characteristics of the trigger object and the characteristics of the candidate object.
The historical interaction object of the user refers to an object which generates interaction behaviors historically by the user. The objects which the user has historically generated interactive behaviors comprise a plurality of objects, wherein the objects can comprise objects with the same attributes as the trigger object, and can also comprise objects with different attributes from the trigger object, for example, the commodity triggered by the user is a certain type of mobile phone, and the objects which the user has historically generated interactive behaviors can comprise mobile phones, clothes, food and the like. The interaction behaviors include, but are not limited to: browsing, clicking, purchasing, collecting and trading.
The historical interaction objects of the user may be read from a log file. In specific implementation, historical interactive objects of the user in a recent period (such as the last three months or the last seven days) can be obtained, so that more accurate user preference information can be obtained.
The candidate object may be determined from a trigger object. In specific implementation, the obtaining rule of the candidate object may be determined according to application requirements, and the obtaining rule of the candidate object belongs to a mature prior art, so that details are not repeated here.
The candidate object may have features of the same dimension as the features of the trigger object and the historical interaction objects of the user. Taking the commodity as an example, the commodity characteristics may include commodity category, number of clicks in the last 7 days, number of purchases made, and the like. Based on the object features, relationships between objects can be obtained.
In one example, step S105 may include the following sub-steps:
step S1051: and acquiring a first interest characteristic related to the trigger object according to the characteristics of the historical interaction object of the user and the characteristics of the trigger object.
The first interest feature refers to a feature related to the trigger object determined from the user's historical behavior. The method is related to a plurality of historical interaction objects and trigger objects of the user and can be specifically obtained according to the characteristics of the plurality of historical interaction objects and the characteristics of the trigger objects of the user.
In specific implementation, the characteristics of a plurality of historical interactive objects of a user can be used as input, and better characteristics of the historical interactive objects of the user can be learned in different representation spaces through a multi-head self-attention system (MHSA); and then, taking the trigger object as a query item to perform attention operation on the better characteristics of the historical interaction objects of the users learned in the previous layer, and obtaining a first interest characteristic related to the trigger object.
Step S1053: and acquiring a second interest characteristic related to the candidate object according to the characteristics of the historical interaction object of the user and the characteristics of the candidate object.
The second interest feature is also associated with a plurality of historical interaction objects of the user and also associated with the candidate object, independent of the trigger object. The second interest feature refers to a feature related to the candidate object determined from the user's historical behavior. The second interest feature may be specifically obtained according to features of a plurality of historical interaction objects of the user and features of the candidate object.
In specific implementation, the candidate object is used as a query item to perform attention operation on the learned better features of the historical interaction object of the user, and a second interest feature related to the candidate object is obtained.
Step S1054: and acquiring a second instant interest strength of the candidate object by the user according to the first instant interest strength.
Step S1055: and taking the first instant interest strength as the weight of the first interest characteristic, taking the second instant interest strength as the weight of the first interest characteristic, and acquiring the mixed interest characteristic in a weighted summation mode.
The mixed interest feature refers to the overall interest feature of the user for both the trigger object and the candidate object.
Step S1057: and acquiring the interest degree of the user on the candidate object at least according to the mixed interest characteristics.
Due to the fact that page information is considered, the instant interest intensity of the user on the trigger object is more accurate, so that more accurate mixed interest characteristics are obtained, and the more accurate interest degree of the user on the candidate object is obtained.
According to the method provided by the embodiment of the application, the interest degree of the user on the candidate object is obtained according to the first instant interest strength, the characteristics of the historical interaction object of the user, the characteristics of the trigger object and the characteristics of the candidate object, so that the exact interest of the user can be effectively highlighted from the historical behaviors of the user under the condition that the instant interest strength of the user on the trigger object is gradually reduced.
In one example, the method may further comprise the steps of: and acquiring a third interest characteristic according to the characteristics of the historical interaction object of the user, which has the same attribute with the trigger object. The third interest feature is an interest feature obtained based on a feature of a historical interaction object of the user having the same attribute as the trigger object. The historical interaction objects of the user include historical interaction objects having the same attributes as the trigger object. For example, the commodity triggered by the user is a certain type of mobile phone, the commodities which are recently bought, collected and added into a shopping cart by the user include mobile phones, clothes, food and the like, and the historical interactive objects which have the same category as the mobile phone triggered by the user do not include the commodities which are irrelevant to the mobile phone, such as clothes, food and the like.
Accordingly, step S1057 can be implemented as follows: and acquiring the interest degree of the user on the candidate object according to the mixed interest feature and the third interest feature. By adopting the processing mode, the interest degree of the candidate object by the user can be more accurately acquired based on the mixed interest feature and the third interest feature.
In one example, the method may further comprise the steps of: acquiring the interaction time of a user on a historical interaction object; correspondingly, at least one of the first interest feature, the second interest feature and the third interest feature can be obtained according to the interaction time and the feature of the historical interaction object. By adopting the processing mode, the time interactive characteristics of the historical behaviors of the user are introduced, the time coding is added and the attention mechanism is combined to obtain the weight of each historical interactive object in consideration of the change of the interest along with the time, then the sequence representation of the historical interactive objects can be obtained by weighting and summing, and therefore the accuracy of the interest of the user can be effectively improved.
In one example, the method may further comprise the steps of: and acquiring the characteristic interaction relation between the candidate object and the trigger object according to the characteristics of the candidate object and the characteristics of the trigger object. Accordingly, step S1057 can be implemented as follows: and acquiring the interest degree of the user on the candidate object according to the mixed interest feature and the feature interaction relation. In particular, the feature interaction relationship may be obtained according to at least one of a cross product, a hadamard product, and a difference between the feature of the candidate object and the feature of the trigger object. By adopting the processing mode, the corresponding interest of the user can be captured based on the mixed interest features and the feature interaction relationship, and the accuracy of the user for modeling the interest can be further improved.
In specific implementation, the interest degree of the user on the candidate object can be obtained according to the mixed interest feature, the third interest feature and the feature interaction relationship and by combining with the user feature. Because the interestingness is determined based on more aspect features, the accuracy of the interestingness can be effectively improved.
In one example, the method provided by the embodiment of the present application may be implemented by a machine learning manner. The machine learning manner includes, but is not limited to, deep neural network learning. For example, the step S103 and the step S105 may be implemented by using an interestingness prediction model based on deep neural network learning. The neural network model comprises: the user's immediate interest network and the predicted network. And the user instant interest network is used for acquiring the first instant interest strength of the user on the trigger object according to the page number information and the characteristics of the trigger object. And the prediction network is used for acquiring the interest degree of the user on the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object.
As shown in fig. 3, in one example, the model includes: the system comprises an embedding layer, a user instant interest modeling layer, a user soft sequence modeling layer, a user hard sequence modeling layer, a mixed interest extraction layer and an interaction layer. The following describes a processing method of each network layer by taking product recommendation as an example.
1) Embedded Layer (Embedded Layer) features of the historical interaction object first to the user
User characteristics e
u Candidate commodity feature e
ta And contextual characteristics e
c (including target page number information) is embedded to reduce high dimensionSparse features are converted into low-dimensional dense features. The original features are coded into dense embedding through an embedding layer, and the original one-hot vectors are respectively expressed as
X
u ,X
ta ,X
tr ,X
c The coded character is
e
u ,e
ta ,e
tr ,e
c Wherein the user's historical sequence of interaction objects is
After being coded into
2) User Instant Interest Modeling Layer (UI 2M) for User characteristics e
u User history interactive object subsequence of the same kind of purpose as trigger
(also called hard sequence) summation pooling results, trigger characteristics e
tr And contextual characteristics e of the user
c (e.g. the number of the page currently browsed by the user, e.g. assuming that 8 commodities are taken as one page, and the page number indicates that the user currently browses to the page) as input, and outputting the first instant interest strength e of the user in the trigger through a multi-layer perceptron network (mlp)
u And a second instant interest strength of the user's interest in the historical behavior, the sum of the two interest strengths being one.
3) The User Soft Interest Modeling Layer (User Soft Interest Modeling Layer) extracts the characteristics of the historical interactive objects of the User and obtains the characteristics after passing through the characteristic embedding Layer
First pass through a layer of Multi-head self-attention network (Multi-head)self-attribute) can learn better commodity vector characterization in different characterization spaces
Then, the candidate object and the trigger object are respectively used as query items to do attention operation to obtain two interest characterization vectors (first interest characteristics) of the soft sequence characterization
And a second interest feature
). The historical interaction time characteristic E of the user and the behavioral commodities when performing attention operation
ti One copy of the feature of the historical interactive object sequence is acquired separately to participate in attention operation; the attentional manipulation is a feature of interacting with the merchandise in the user's history
Features e of candidate objects
ta (or characteristics e of the trigger object)
tr ) And vector characterization of interaction time features E
ti As an input, obtaining an interest aggregation vector (first interest characteristic) of the user on the historical interactive commodity after passing through the attention network
And a second interest feature
)。
4) User Hard Interest Modeling layer (User Hard Interest Modeling layer), taking a commodity triggering recommendation scene as an example, the layer firstly carries out historical interaction on a User according to the category of a trigger
Filtering, and extracting historical interactive commodities with the same kind of purposes as the trigger product to construct the trigger product through a trigger-related sub-sequence network (trigger-related sub-sequence)Related subsequences
Then, the candidate is taken as a query item to carry out attention operation to obtain an interest characterization vector (third interest characteristic) of the hard sequence characterization
) Like the soft sequence modeling layer, the attention of this layer may also use historical interaction time characteristics of the user with the good.
5) Hybrid Interest extraction Layer (fused Interest Extract Layer) using the instant Interest intensity e extracted by the user instant Interest modeling Layer (UI 2M network)
u (including a first instant interest strength and a second instant interest strength, the sum of which is 1) as weights respectively corresponding to two interest aggregation vectors (first interest characteristics) extracted by the user soft sequence modeling layer
And a second interest feature
) Performing weighted summation pooling operation to obtain mixed interest characteristics
6) Interaction Layer (Interaction Layer) this Layer is to trigger the object
And candidate object
Performing interactive operation (such as cross product, hadamard product, subtraction, etc.) to learn feature interactive relationship e
i . In this embodiment, the interaction layer first pairs the trigger objects
And candidate object
And performing cross product and Hadamard product operations, combining and merging the two operations, and acquiring a feature interaction relation based on the merged features through a multilayer perceptron.
7) The plurality of interest characteristics (third interest characteristics) of the user obtained in the above steps
Mixed interest features
) With some other feature (feature interaction e)
i User characteristics e
u ) And combined together and input into a multi-layer neural network (MLP) for final interestingness prediction.
As can be seen from the foregoing embodiments, the recommendation method provided in the embodiments of the present application obtains, for a recommendation information acquisition request based on a trigger object, target page number information and characteristics of the trigger object; acquiring first instant interest strength of a user on a trigger object according to the target page number information and the characteristics of the trigger object; and acquiring the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select the target object corresponding to the target page number from the candidate object set. By adopting the processing mode, the dynamic change process of the instant interest intensity of the user on the trigger object can be captured according to the change of the page number in the process of page-down turning by the user, so that the preference degree of the user on the trigger object is more accurate, and the recommendation information which is more interesting to the user is obtained; therefore, the accuracy of recommending contents under a larger page number can be effectively ensured.
Second embodiment
In the above embodiment, a recommendation method is provided, and correspondingly, the present application further provides a recommendation apparatus. The apparatus corresponds to an embodiment of the method described above. Parts of this embodiment that are the same as the first embodiment are not described again, please refer to corresponding parts in the first embodiment.
The application provides a recommendation device includes: the system comprises an information acquisition unit, a first instant interest strength acquisition unit and an interest degree acquisition unit.
An information acquisition unit configured to acquire target page number information and a feature of a trigger object for a recommendation information acquisition request based on the trigger object; the first instant interest strength acquisition unit is used for acquiring the first instant interest strength of the user on the trigger object according to the target page number information and the characteristics of the trigger object; and the interest degree acquisition unit is used for acquiring the interest degree of the user on the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select the target object corresponding to the target page number from the candidate object set.
In an example, the first instant interest strength obtaining unit is specifically configured to obtain the first instant interest strength according to the target page number information and the feature of the trigger object, and at least one of the feature of the historical interaction object and the user feature that have the same target attribute as the trigger object.
In an example, the first instant interest strength obtaining unit is specifically configured to obtain, according to features of a plurality of historical interaction objects having the same target attribute as the trigger object, overall features of the plurality of historical interaction objects; and acquiring the first instant interest strength according to the target page number information, the characteristics of the trigger object, the user characteristics and the overall characteristics.
In an example, the interestingness obtaining unit is specifically configured to obtain features of a historical interaction object of a user; acquiring a first interest characteristic related to a trigger object according to the characteristics of the historical interaction object of the user and the characteristics of the trigger object; acquiring a second interest characteristic related to the candidate object according to the characteristics of the historical interactive object of the user and the characteristics of the candidate object; acquiring second instant interest strength of the candidate object by the user according to the first instant interest strength; taking the first instant interest intensity as the weight of the first interest characteristic, taking the second instant interest intensity as the weight of the first interest characteristic, and obtaining mixed interest characteristics in a weighted summation mode; and acquiring the interest degree of the user on the candidate object at least according to the mixed interest characteristics.
In an example, the interestingness obtaining unit is further configured to obtain a third interest feature according to a feature of a historical interaction object of the user, where the historical interaction object has the same attribute as the trigger object; and acquiring the interest degree of the user on the candidate object according to the mixed interest feature and the third interest feature.
In one example, the apparatus further comprises: the interactive time acquisition unit is used for acquiring the interactive time of the user on the historical interactive object; the interestingness obtaining unit is specifically configured to obtain at least one of the first interest feature, the second interest feature, and the third interest feature according to the interaction time and the feature of the historical interaction object.
In one example, the apparatus further comprises: the characteristic interaction relation obtaining unit is used for obtaining the characteristic interaction relation between the candidate object and the trigger object according to the characteristics of the candidate object and the characteristics of the trigger object; the interestingness obtaining unit is specifically configured to obtain the interestingness of the candidate object by the user according to the mixed interest feature and the feature interaction relationship.
In an example, the feature interaction relationship obtaining unit is specifically configured to use a cross product, a hadamard product, and/or a difference between the feature of the candidate object and the feature of the trigger object as the feature interaction relationship.
In one example, a first instant interest strength of a user on a trigger object is obtained in a machine learning mode according to target page number information and characteristics of the trigger object; and acquiring the interest degree of the user on the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object.
Third embodiment
In the above embodiment, a recommendation method is provided, and correspondingly, the application further provides a model processing method. The method corresponds to the embodiment of the method described above. Parts of this embodiment that are the same as the first embodiment are not described again, please refer to corresponding parts in the first embodiment.
The model processing method provided by the application comprises the following steps:
step S401: a training data set is obtained.
The training data set comprises a plurality of pieces of training data (training samples). The training data includes: target page number information, characteristics of the trigger object, characteristics of the candidate object and annotation data of whether the user takes the candidate object as a recommended object.
Step S403: and constructing a network structure of the interestingness prediction model.
The model includes a user immediate interest network and a prediction network. The user instant interest network acquires a first instant interest strength of the user on the trigger object according to the target page number information and the characteristics of the trigger object. The prediction network acquires the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select a target object corresponding to the target page number from the candidate object set;
step S405: and training the network parameters of the model according to the training data set.
In specific implementation, the target page number information, the characteristics of the trigger object and the characteristics of the candidate object can be used as input data of the model, the interestingness is predicted through the model, whether the target page number information, the characteristics of the trigger object and the characteristics of the candidate object are used as recommendation objects is determined according to the interestingness, the result and the labeled data of whether the candidate object is used as the recommendation object by a user are compared, and the loss value is calculated to adjust the model parameters.
In an example, the model is shown in fig. 3, and for a specific processing procedure of the model, please refer to relevant parts of the first embodiment, which is not described herein again.
As can be seen from the above embodiments, the model processing method provided in the embodiments of the present application enables the model to capture the dynamic change process of the instant interest strength of the user on the trigger object according to the change of the page number in the user pull-down and page-turning process, so as to obtain a more accurate preference degree of the user on the trigger object, and further obtain recommendation information more interested by the user; therefore, the accuracy of recommending the content under a larger page number can be effectively ensured.
Fourth embodiment
In the foregoing embodiment, a model processing method is provided, and correspondingly, the present application also provides a model processing apparatus. The device corresponds to the embodiment of the method. Parts of this embodiment that are the same as the first embodiment are not repeated, and please refer to corresponding parts in the first embodiment.
The application provides a model processing apparatus including: the system comprises a training data acquisition unit, a network structure construction unit and a model training unit.
A training data acquisition unit configured to acquire a training data set, the training data including: target page number information, characteristics of the trigger object, characteristics of the candidate object and label data indicating whether the candidate object is used as a recommended object by a user or not; the network structure construction unit is used for constructing a network structure of an interest degree prediction model, and the model comprises a user instant interest network and a prediction network; the user instant interest network acquires a first instant interest strength of a user on a trigger object according to the target page number information and the characteristics of the trigger object; the prediction network acquires the interest degree of the user for the candidate object according to the first instant interest strength, the characteristics of the trigger object and the characteristics of the candidate object so as to select a target object corresponding to the target page number from the candidate object set; and the model training unit is used for training the network parameters of the model according to the training data set.
Fifth embodiment
The application also provides an electronic device. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the description of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
An electronic device of the present embodiment includes: a processor and a memory; and a memory for storing a program for implementing the model processing method or the recommended method, the apparatus being powered on and running the program of the corresponding method through the processor.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and so forth) having computer-usable program code embodied therein.