CN115659036A - Product recommendation method and device and electronic equipment - Google Patents

Product recommendation method and device and electronic equipment Download PDF

Info

Publication number
CN115659036A
CN115659036A CN202211379000.8A CN202211379000A CN115659036A CN 115659036 A CN115659036 A CN 115659036A CN 202211379000 A CN202211379000 A CN 202211379000A CN 115659036 A CN115659036 A CN 115659036A
Authority
CN
China
Prior art keywords
product
sample
user
target
degree
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
CN202211379000.8A
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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202211379000.8A priority Critical patent/CN115659036A/en
Publication of CN115659036A publication Critical patent/CN115659036A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a product recommendation method and device and electronic equipment, relates to the technical field of computers, and particularly relates to the technical fields of machine learning, intelligent recommendation and the like. The specific implementation scheme is as follows: determining a target recommendation user; inputting the user characteristics of the target recommended user into a product recommendation model to obtain the interest degree of the target recommended user output by the product recommendation model to each candidate recommended product, wherein the product recommendation model is obtained by sample data training in advance, and the sample data comprises the user characteristics of the sample user, a positive sample product owned by the sample user in the candidate recommended products, and a negative sample product which is the same as the positive sample product in type and not owned by the sample user; determining a target recommended product from the candidate recommended products according to the interest degree; and recommending the target recommended product to the target recommending user. Therefore, the target recommendation user obtains reasonable product recommendation, and user experience is improved.

Description

Product recommendation method and device and electronic equipment
Technical Field
The present disclosure relates to the field of computer technology, and more particularly, to the field of machine learning and intelligent recommendation.
Background
In the related art, a product company generally needs to recommend a suitable product for a user who wants to purchase the product.
Disclosure of Invention
The disclosure provides a product recommendation method, device, equipment and storage medium.
According to a first aspect of the present disclosure, there is provided a product recommendation method including:
determining a target recommendation user;
inputting the user characteristics of the target recommended user into a product recommendation model to obtain the interest degree of the target recommended user in each candidate recommended product output by the product recommendation model, wherein the product recommendation model is obtained by training sample data in advance, and the sample data comprises the user characteristics of a sample user, a positive sample product owned by the sample user in the candidate recommended products, and a negative sample product which is the same as the positive sample product in category and is not owned by the sample user;
determining a target recommended product from the candidate recommended products according to the interest degree;
and recommending the target recommended product to the target recommending user.
According to a second aspect of the present disclosure, there is provided a training method of a product recommendation model, including:
the method comprises the steps of obtaining user characteristics of sample users, positive sample products owned by the sample users in candidate recommended products, and negative sample products which are the same as the positive sample products in category and not owned by the sample users;
inputting the user characteristics into an original training model to obtain the interest degree of each sample user in each candidate recommended product output by the original training model;
constructing a training loss according to the interest degree, wherein the training loss is in negative correlation with the interest degree of the sample user for the positive sample product and is in positive correlation with the interest degree of the sample user for the negative sample product;
and adjusting the original training model according to the training loss to obtain a product recommendation model.
According to a third aspect of the present disclosure, there is provided a product recommendation device comprising:
the user determination module is used for determining a target recommendation user;
the interest output module is used for inputting the user characteristics of the target recommending user into a product recommending model to obtain the interest degree of the target recommending user in each candidate recommending product output by the product recommending model, wherein the product recommending model is obtained by training sample data in advance, and the sample data comprises the user characteristics of a sample user, a positive sample product owned by the sample user in the candidate recommending products and a negative sample product which has the same category as the positive sample product and is not owned by the sample user;
the target determining module is used for determining a target recommended product from the candidate recommended products according to the interest degree;
and the product recommending module is used for recommending the target recommended product to the target recommending user.
According to a fourth aspect of the present disclosure, there is provided a training apparatus for a product recommendation model, comprising:
the characteristic obtaining module is used for obtaining user characteristics of sample users, positive sample products owned by the sample users in the candidate recommended products, and negative sample products which are the same as the positive sample products in category and not owned by the sample users;
the interest output module is used for inputting the user characteristics into an original training model to obtain the interest degree of each sample user in each candidate recommended product output by the original training model;
a loss establishing module for establishing a training loss according to the interest degree, wherein the training loss is negatively correlated with the interest degree of the sample user for the positive sample product and positively correlated with the interest degree of the sample user for the negative sample product;
and the model determining module is used for adjusting the original training model according to the training loss to obtain a product recommendation model.
According to a fifth aspect of the present disclosure, there is provided an electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of the first and second aspects.
According to a sixth aspect of the present disclosure, there is provided a non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method according to any one of the first and second aspects.
According to a seventh aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of the first and second aspects.
It should be understood that the statements in this section are not intended to identify key or critical features of the embodiments of the present disclosure, nor are they intended to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic flow diagram of a product recommendation method according to the present disclosure;
FIG. 2 is another flow diagram of a product recommendation method according to the present disclosure;
FIG. 3 is a flow diagram of a method of training a product recommendation model according to the present disclosure;
FIG. 4 is another flow diagram of a method of training a product recommendation model according to the present disclosure;
FIG. 5 is another flow diagram of a method of training a product recommendation model according to the present disclosure;
FIG. 6 is another flow diagram of a method of training a product recommendation model according to the present disclosure;
FIG. 7 is a schematic diagram of one configuration of a product recommendation device according to the present disclosure;
FIG. 8 is a schematic diagram of an arrangement of a training apparatus for a product recommendation model according to the present disclosure;
FIG. 9 is a block diagram of an electronic device for implementing a product recommendation method and a training method for a product recommendation model according to embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Based on the fact that a product manufacturing or marketing company has a plurality of products, and therefore, a user who needs to purchase a product often recommends a proper product, so that the user can conveniently obtain a product which is interested in the user, and the related art often cannot accurately determine which product the user is interested in and can not recommend the proper product for the user, the present disclosure provides a product recommendation method, as shown in fig. 1, which includes:
s101, determining a target recommendation user.
S102, inputting the user characteristics of the target recommendation user into the product recommendation model to obtain the interest degree of the target recommendation user in each candidate recommendation product output by the product recommendation model.
S103, determining a target recommended product from the candidate recommended products according to the interest degree.
And S104, recommending the target recommended product to the target recommending user.
According to the embodiment, the user characteristics of the target recommending user are input into the product recommending model, so that the product recommending model outputs the interest degree of the target recommending user in each candidate recommending product, the product recommending model is obtained through training of sample data, the sample data comprises the user characteristics of the sample user, a positive sample product owned by the sample user in the candidate recommending products, and a negative sample product which is the same as the positive sample product in type and not owned by the sample user, therefore, the product recommending model obtained through training of the sample data can learn the interest degree of the sample user with different user characteristics in each candidate recommending product, further, the interest degree of the candidate recommending user in the candidate recommending product can be predicted according to the user characteristics of the target recommending user, the target recommending product in the candidate recommending product is determined according to the interest degree, the target recommending product is recommended for the target recommending user, the target recommending user obtains reasonable product recommendation, and user experience is improved.
In S101, the target recommending user is a user with product purchase demand, hereinafter, an insurance product is taken as an example, in this example, the target recommending user is a user with insurance purchase demand. Specifically, users who have viewed product listings in a web page may be periodically obtained and taken as target recommendation users, and it may be understood that if one user has viewed product listings, it is indicated that the user may have a need to purchase some products, and therefore, the user may be taken as a target recommendation user to recommend suitable products to the user. As another example, a database containing marketing information of insurance products, such as hive (a data warehouse tool), may be queried periodically to obtain relevant marketing data of each user, and a target recommended user may be determined according to the marketing data (e.g., frequency of insurance purchases of the user).
In S102, the product recommendation model is obtained by training sample data in advance, where the sample data includes user characteristics of the sample user, a positive sample product owned by the sample user in the candidate recommended products, and a negative sample product that is the same as the positive sample product in category and not owned by the sample user.
It will be appreciated that when a user purchases a type of product, the user may be deemed to have satisfied the need for that type of product, and that, for example, when the user purchases life insurance, the user may be deemed to no longer need to purchase life insurance for a certain period of time, so that if the user purchases a product and does not purchase other products of the same type as the product, that is, the user is not interested in the purchased product and is not interested in other products of the same type as the product for a certain period of time. Illustratively, if a user purchases life insurance and does not purchase life insurance, the user is deemed not to purchase life insurance for a certain period of time, and thus the user is deemed not interested in life insurance.
Therefore, in the sample data, the product purchased by the sample user is marked as a positive sample product, the product which is not purchased by the sample user and is of the same type as the positive sample product is marked as a negative sample product, and the interest degree of the sample user in the candidate recommended product is reflected through the marking of the positive sample product and the negative sample product. And each sample data comprises the user characteristics of each sample user, so that the user characteristics of the user and the interest degree of the user in the candidate recommended products can be associated by using the product recommendation model obtained by training the sample data, and further, after the user characteristics of the target recommended user are input into the product recommendation model in the following process, the interest degree of the target recommended user in each candidate recommended product can be predicted by the product recommendation model.
The user characteristics of the sample user may include the age, income, health condition, and the like of the user, and accordingly, the feature dimension of the obtained user characteristics of the target recommending user should be the same as the feature dimension of the user characteristics of the sample user. In one possible embodiment, the user characteristics of the sample users are generated using expert experience and/or automated feature generation tools based on information about each sample user, which may include product purchase records of the sample users, age, gender, etc.
The interest level output by the product recommendation model may be represented by a score, and a higher score of a candidate recommended product indicates that the target recommended user is more interested in the candidate recommended product, in other examples, the product recommendation model may also be represented by a rating, specifically, a rating 1 and a rating 0 are output, where the rating 1 indicates that the target recommended user is interested in the candidate recommended product, and the rating 0 indicates that the target recommended user is not interested in the candidate recommended product, and so on, and the method for representing the interest level in the present disclosure is not limited.
In one possible embodiment, before the user features are input into the product recommendation model, the user features of the category type may be subjected to label encoder (tag encoder) encoding, where the category type features are features that are not originally represented by numerical values, such as gender: for men and women, to process these features for the product recommendation model, the features need to be numerically coded before being input into the model, for example, if male is coded as 2, female is coded as 3.
In S103, according to the degree of interest, a candidate recommended product with a large degree of interest of the target recommended user is selected as the target recommended product, taking the example that the degree of interest is expressed by a score as an example, if the score of the degree of interest of one candidate recommended product output by the product recommendation model is greater than a preset threshold, the candidate recommended product is taken as the target recommended product, or the score of the degree of interest of one candidate recommended product output by the product recommendation model is in the score ranking of the degree of interest of all candidate recommended products, and the ranking order from large to small is the preset ranking rank, the candidate recommended product is taken as the target recommended product, so that the target recommended product is determined from all candidate recommended products.
In S104, it can be understood that the target recommended product is a candidate recommended product with a larger interest level of the target recommended user, so that the recommendation success rate of recommending the candidate recommended product to the target recommended user is higher, and the target recommended user can conveniently obtain the relevant information of the product in which the target recommended user is interested, thereby improving the user experience.
Based on that, when recommending a product for a target recommending user, only considering the interest level of the user in the product and not considering the quality of the product, a good-quality product may not be recommended for the user, the present disclosure also provides a product recommending method, as shown in fig. 2, the method including:
s201, determining a target recommendation user.
S202, inputting the user characteristics of the target recommendation user into the product recommendation model to obtain the interest degree of the target recommendation user in each candidate recommendation product output by the product recommendation model.
S203, determining the adding probability that the target recommending user will have each candidate recommending product according to each interest degree.
S204, determining adding weight for each candidate recommended product according to the product characteristics of the candidate recommended products.
S205, determining the adding priority of each candidate recommended product according to the adding probability and the adding weight.
And S206, determining a target recommended product from the candidate recommended products according to the adding priority of the candidate recommended products.
And S207, recommending the target recommended product to the target recommending user.
In S201, this step is the same as S101, and reference may be specifically made to the description related to S101, which is not described herein again.
In S202, the step is the same as that in S102, which may specifically refer to the related description of S102, and is not described herein again.
In step S203, the adding probability of the target recommending user to each candidate recommended product to be owned is determined according to the interest degree, wherein the adding probability of each candidate recommended product is the probability that the target recommending user may purchase the candidate recommended product. Specifically, the adding probability is positively correlated with the interest level, that is, the higher the interest level of the target recommending user in a candidate recommended product is, the higher the adding probability that the target recommending user purchases the candidate recommended product is. As an example, if the degree of interest of the a candidate recommended product is 5 points and the degree of interest of the B candidate recommended product is 6 points, the placement probability of the a candidate recommended product may be 50% and the placement probability of the B candidate recommended product may be 60%.
In S204, the product characteristics may include the price, function, expiration date, etc. of the candidate recommended product, and the product characteristics may include the premium, expiration date, insurance range, etc. of the insurance product corresponding to the insurance field, and the quality of the product is determined according to different product characteristics, so as to determine the adding weight for the candidate recommended product according to the product quality. Specifically, the added weight of the candidate recommended product is the weight of the profit obtained by the product company after the target recommended user purchases the candidate recommended product. The high adding weight can be set for the candidate recommended product with high product quality, and the low adding weight is set for the candidate recommended product with the first product quality. In another example, as in the insurance field, a high add weight may be set for products with high premiums and long insurance validity periods, and a low add weight may be set for products with low premiums and long insurance validity periods, it being understood that the higher the premium of an insurance product purchased by a user, the longer the insurance validity period, the higher the profit of the insurance company.
Wherein, in S205, the priority is positively correlated with the plating probability and the plating weight.
The higher the adding probability corresponding to one candidate recommended product is, the higher the interest degree of the target recommended product by the target recommended user is, and the higher the adding weight corresponding to one candidate recommended product is, the higher the quality of the candidate recommended product is, and the adding priority is determined by combining the adding probability and the adding weight, namely the adding priority is determined for the target recommended user by combining the interest degree and the quality, so that the adding priority of one candidate recommended product embodies the interest degree and the quality of the candidate recommended product, and the higher the interest degree of one candidate recommended product is, the higher the quality is, the higher the adding priority corresponding to the candidate recommended product is.
In S206, the candidate recommended product with a higher added priority in the candidate recommended products is taken as the target recommended product. For example, the candidate recommended product with the highest adding priority is used as the target recommended product, or the candidate recommended product with the adding priority higher than the preset number of candidate recommended products is used as the target recommended product. It can be understood that, the higher the adding priority of a candidate recommended product is, the higher the interest level and the higher the quality of the candidate recommended product is, the candidate recommended product is both in line with the interest of the target recommended user and is of good quality, and therefore, the candidate recommended product should be recommended to the target recommended user as the target recommended product. In another example, the candidate recommended products may be ranked from high to low according to the ranking of the added priorities, and a preset number of candidate recommended products ranked in the top may be selected as the target recommended products.
In S206, the step is the same as that in S104, which may specifically refer to the related description of S104, and is not described herein again.
By adopting the embodiment, the interest degree of the target recommending user and the quality of the candidate recommended product can be combined, the target recommending user is determined to recommend the target recommending product which not only meets the interest of the target recommending user, but also has high quality, and the user experience is further improved.
In the foregoing method, a target recommended product is determined based on the interest level output by the product recommendation model, and then the target recommended product is recommended to the target recommended user, it can be understood that the accuracy of the interest level output by the candidate recommended user by the product recommendation model directly affects whether a second product can be recommended to a suitable user, based on which, the present disclosure provides a training method of a product recommendation model to improve the accuracy of the product recommendation model, as shown in fig. 3, the method includes:
s301, obtaining the user characteristics of the sample users, positive sample products owned by the sample users in the candidate recommended products, and negative sample products which are the same as the positive sample products in category and not owned by the sample users.
S302, inputting the user characteristics into the original training model to obtain the interest degree of each candidate recommended product of each sample user output by the original training model.
S303, constructing training loss according to the interest degree.
And S304, adjusting the original training model according to the training loss to obtain a product recommendation model.
In S301, the sample user, the positive sample product, and the negative sample product are already explained in S102, and reference may be made to the related description of S102, which is not repeated herein.
In S302, the original training model is a model that has not been trained yet, and may be an XGBoost (eXtreme Gradient Boosting) model, or may be a Light Gradient Boosting Machine (Light Gradient Boosting frame) model, which is not limited in this disclosure. The user characteristics of the sample user are input into the original training model, so that the original training model outputs the interest degree of the target recommended user in each candidate recommended product, and the interest degree can be expressed in a score or in other forms as described above.
Wherein, in S303, the training loss is negatively correlated with the degree of interest of the sample user for the positive sample product, and positively correlated with the degree of interest of the sample user for the negative sample product.
It can be understood that the positive sample product is a candidate recommended product owned by the sample user, and therefore, it is inevitable that the sample user owns the positive sample product only when the sample user has a greater interest level in the positive sample product, and the negative sample product is a candidate recommended product not owned by the sample user, and thus, the interest level of the sample user in the negative sample product is lower. Therefore, if the original training model is accurate, the user who should output the sample has a greater interest level in the positive sample product and has a lesser interest level in the negative sample product, in other words, if the interest level corresponding to the positive sample user is smaller, the original training model is not accurate enough, the training loss should be larger, and correspondingly, if the interest level corresponding to the negative sample product is larger, the original training model is not accurate enough, the training loss should be larger, and based on this, the training loss is constructed. In particular, the training loss may be represented by a loss function, such as a huber loss function, a softmax loss function, and so on, which is not limited by this disclosure.
In S304, the relevant parameters of the original training model are adjusted according to the training loss until the training loss constructed based on the interest level output by the adjusted original training model is smaller than a certain threshold, for example, the output sample user has a higher interest level in the positive sample product and a lower interest level in the negative sample product, and it can be considered that the adjusted original training model can accurately predict the interest level of the target recommended user in the candidate recommended product, and then the original training model is used as the product recommendation model for subsequent use.
By adopting the embodiment, a loss function can be established for the original training model based on the characteristics of the positive sample products and the negative sample products in the candidate recommended products, the original training model is adjusted according to the loss function, the adjusted original training model is guided to accurately output the interest degrees of the sample users on the positive sample products and the negative sample products, the mapping relation between the user characteristics and the interest degrees of the users on the candidate recommended products is established, and then the product recommendation model capable of accurately predicting the interest degrees of the target recommended users on the candidate recommended products is obtained.
In the training process of the product recommendation model, the determination of the user characteristics is also important, if the user characteristics of the selected sample user change greatly with time, it can be understood that the user characteristics are not stable enough, and the relevant conditions of the user cannot be embodied accurately, and further, the product recommendation model obtained by training according to the user characteristics may not accurately predict the interest degree of the target recommendation user in the candidate recommendation product, based on which, the disclosure also provides a training method of the product recommendation model, as shown in fig. 4, the method comprises:
s401, obtaining sample feature distribution of sample users on each original feature dimension and cross-time feature distribution of cross-time test users on each original feature dimension.
S402, screening out the characteristic dimension of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets the preset condition from the original characteristic dimension to obtain the target characteristic dimension.
S403, obtaining the user characteristics of the sample user in the target characteristic dimension, the positive sample products owned by the sample user in the candidate recommended products, and the negative sample products which have the same category as the positive sample products and are not owned by the sample user.
S404, inputting the user characteristics into the original training model to obtain the interest degree of each candidate recommended product of each sample user output by the original training model.
S405, constructing training loss according to the interest degree.
And S406, adjusting the original training model according to the training loss to obtain a product recommendation model.
In S401, the time-crossing test user is a user who owns the positive sample product within the time-crossing window, the time-crossing window is not overlapped with the historical time window, and the historical time window is a time window during which the sample user owns the positive sample product.
Because the cross-time window is not overlapped with the historical time window, the time when the cross-time testing user owns the positive sample product is not overlapped with the time when the sample user owns the positive sample product, for example, if the historical time window corresponding to the sample user is 1-6 months, the cross-time window corresponding to the cross-time testing user may be a month which is not overlapped with 1-6 months, such as 7 months or 8 months.
The original feature dimension is a feature dimension where all original features of the sample user obtained initially are located, and may include dimensions of age, gender, health condition, income, and the like, and the original features of each sample user in each original feature dimension have a corresponding distribution situation, and the distribution situation is used as a sample feature distribution of the sample user in each original feature dimension. And the cross-time feature distribution is the distribution of the original features of the user in the original feature dimension in the cross-time test.
Here, in S402, it can be understood that since the sample user and the cross-time testing user are not in one time window, the initial possession time of the positive sample product is greatly different between the sample user and the cross-time testing user. And if the characteristic dimension with larger distribution difference exists in the sample characteristic distribution and the cross-time characteristic distribution, the characteristic of the characteristic dimension can be greatly changed along with the change of time, and further the characteristic of the characteristic dimension is not stable enough, so that the characteristic dimension can be screened out. Therefore, the larger the difference between the sample feature distribution and the feature distribution in a certain feature dimension across time is, the more likely the feature dimension meets the preset condition, and for example, the preset condition may be that the distribution difference is greater than a specific threshold. And (4) screening out the feature dimensions meeting preset conditions in the original feature dimensions, namely screening out unstable original features to obtain stable user features on the target feature dimensions capable of reflecting relevant features of sample users.
In one possible embodiment, the feature dimension satisfying the preset condition may be determined and screened by the following method:
s4021, evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the original characteristic dimension through the stability index to obtain a first evaluation result.
S4022, screening out the characteristic dimensionality of which the difference between the sample characteristic distribution and the cross-time characteristic distribution in the original characteristic dimensionality meets a first preset condition according to the first evaluation result to obtain a first characteristic dimensionality.
S4023, evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the first characteristic dimension by a countercheck verification mode to obtain a second evaluation result.
S4024, screening out the characteristic dimensions of which the difference between the sample characteristic distribution and the cross-time characteristic distribution in the first characteristic dimensions meets a second preset condition according to the second evaluation result, and obtaining target characteristic dimensions.
In S4021, the Stability indicator may reflect the Stability of the distribution of the sample feature distribution in each fractional segment (each feature dimension) and the distribution of the cross-time feature distribution, and the Stability indicator may be a PSI (placement Stability Index) indicator, and the Stability indicator may be used to evaluate the distribution difference between the sample feature distribution and the cross-time feature distribution in the original feature dimension, so as to obtain a first evaluation result of the distribution difference of the feature distributions of each feature dimension.
In S4022, according to the first evaluation result, the feature dimensions that satisfy the first preset condition in the original feature dimensions are determined to be screened, so as to obtain a first feature dimension. The first preset condition may be that the difference of the feature distribution on the original feature dimension is greater than a preset threshold, and it can be understood that the larger the difference of the distribution of the sample feature distribution and the distribution of the cross-time feature distribution on a certain original feature dimension is, the more likely the original feature dimension meets the first preset condition.
In S4023, the countermeasure verification mode (adaptive verification) is a method for determining whether the distributions of the training set (sample feature distribution) and the test set (cross-time feature distribution) are consistent, and when the countermeasure verification is used as a feature screening method, the features with obvious timing fluctuation can be found, which helps us quickly find the features of feature dimensions that are unstable in the original feature dimensions. Therefore, the first feature dimension which is already subjected to the stability index evaluation and screening can be evaluated again based on the countermeasure verification mode, and a second evaluation result of the distribution difference of the feature distribution of each feature dimension in the first feature dimension can be obtained.
In S4024, determining, according to the second evaluation result, a feature dimension that satisfies a second preset condition in each first feature dimension, and screening out the feature dimensions to obtain a target feature dimension. The second preset condition may be that the difference of the feature distribution in the first feature dimension is greater than a preset threshold, and it can be understood that the larger the difference between the distribution of the sample feature distribution and the distribution of the cross-time feature distribution in a certain feature dimension is, the more likely the feature dimension satisfies the second preset condition.
By selecting the embodiment, the stability index and the countermeasure verification mode can accurately evaluate the stability of the feature distribution, the distribution difference between the sample feature distribution and the cross-time feature distribution in the original feature dimension is evaluated through the stability index and the countermeasure verification mode, the target feature dimension is screened out according to the evaluation result, and the stability of the user features acquired in the target feature dimension subsequently is further improved.
In S403, it can be understood that the user characteristics of the sample user in the target characteristic dimension are stable, the user characteristics of the relevant characteristics of the sample user can be accurately reflected, and the original recommendation model is trained using the user characteristics, so that the interest level output by the product recommendation model obtained through subsequent training is more accurate.
In S404, the step S302 is the same, which may specifically refer to the related description of S302, and is not described herein again.
In S405, the step S303 is the same, and reference may be specifically made to the related description of S303, which is not described herein again.
In S406, the step S304 is the same, which may specifically refer to the related description of S304, and is not repeated herein.
By selecting the embodiment, the user characteristics stably distributed in the target characteristic dimension are obtained purposefully by screening out the characteristic dimension with unstable characteristics in the original characteristic dimension, so that the product recommendation model obtained by subsequent training according to the user characteristics of the stable sample users is more accurate.
In order to determine the accuracy of the interest degree of the target recommended user predicted by the trained product recommendation model on the candidate recommended product, the product recommendation model can be verified, and based on the verification, the disclosure also provides a verification method of the product recommendation model, as shown in fig. 5, the method includes:
s501, obtaining the user characteristics of the verification sample, a positive sample product owned by the verification sample in the candidate recommended products, and a negative sample product which has the same category as the positive sample product and is not owned by the verification sample.
S502, inputting the user characteristics of the verification samples into the product recommendation model to obtain the interest degree of each verification sample output by the product recommendation model to each candidate recommended product.
And S503, determining the matching degree of the interest degree with the positive sample product and the negative sample product.
And S504, verifying the product recommendation model according to the matching degree to obtain a verification result.
In S501, the verification sample is similar to the sample user and includes a negative sample user who owns the first product and does not own the second product in the historical time window, but specifically, the sample user is a sample for training the product recommendation model, and the verification sample is a sample for verifying the product recommendation model, where the sample user and the verification sample include different specific samples, and if the sample user includes the user a, the verification sample does not include the user a.
In S502, the step is similar to S102, except that the user characteristic of the target recommended user is input in S102, the interest degree of the target recommended user in the candidate recommended product is obtained, and the user characteristic of the verification sample is input in S502, the interest degree of the verification sample in the candidate recommended product is obtained, which may specifically refer to the related description of S102, and details are not repeated here.
In S503, as described above, the negative sample product is a candidate recommended product that is not owned by the verification sample and is of the same category as the positive sample product, and therefore, if the product recommendation model is accurate, the degree of interest of the verification sample in the negative sample product in the candidate recommended product should be output to be lower, and the positive sample product is a candidate recommended product owned by the verification sample, and therefore, if the product recommendation model is accurate, the degree of interest of the verification sample in the positive sample product in the candidate recommended product should be output to be higher. Therefore, whether each interest degree is matched with the characteristics of the negative sample product and the positive sample product can be judged based on the interest degree of the verification sample output by the product recommendation model to the candidate recommended product, namely, if the interest degree of the verification sample output by the product recommendation model to the positive sample product is high, the interest degree is matched with the positive sample product, and if the interest degree of the verification sample output by the product recommendation model to the negative sample product is low, the interest degree is matched with the negative sample product. Based on this, the degree of matching of each of the positive and negative sample products with the degree of interest is determined.
In one possible embodiment, the present disclosure provides a method of determining a degree of interest matching a positive sample product and a negative sample product, the method comprising:
and S5031a, counting AUC and/or KS indexes according to the interest degree of the verification sample for each candidate recommended product.
And S5032a, determining the matching degree of the interest degree with the positive sample product in the candidate recommended products and the negative sample product in the candidate recommended products according to the AUC and/or KS indexes.
In S5031a, AUC (Area under curve) is a model evaluation index in the field of machine learning, and specifically, AUC is an Area under a roc (receiver operating characteristic curve) curve, and is used for evaluating a binary model, which can calculate a degree of interest of a positive sample product and a degree of interest of a negative sample product according to a verification sample output by a product recommendation model.
The KS (Kolmogorov-Smirnov) index is often used to evaluate model discrimination, and tends to measure the difference between positive and negative sample distributions from a probabilistic perspective. The interest degree of the positive sample product and the interest degree of the negative sample product in the verification sample can be calculated according to the verification sample output by the product recommendation model.
In S5032a, the larger the calculated AUC indicator is, the higher the matching degree between the interest degree and the positive sample product in the candidate recommended product and the negative sample product in the candidate recommended product is, and the larger the calculated KS indicator is, the higher the matching degree between the interest degree and the positive sample product in the candidate recommended product and the negative sample product in the candidate recommended product is.
By selecting the embodiment, the matching degree of the interest degree and the positive sample product in the candidate recommended product and the negative sample product in the candidate recommended product is determined by calculating the AUC and/or KS indexes, so that the accuracy of the product recommendation model is determined, and the accuracy of the verification result of the product recommendation model obtained by the method is improved.
In another possible embodiment, the present disclosure also provides a method of determining a degree of interest matching a positive sample product and a negative sample product, the method comprising:
s5031b, performing equal-frequency binning on the candidate recommended products according to the interest degree to obtain each box body.
S5032b, counting the positive sample rate of the positive sample product and/or the negative sample rate of the negative sample product in each box.
S5033b, determining a matching degree of the positive sample rate and/or the negative sample rate with the box as a matching degree of the interest degree with the positive sample product and the negative sample product.
Among them, in S5031b, equal frequency binning, which makes each bin include as many values as there is, is a method of discretizing data. In the present disclosure, the equally frequency binning of the verification samples according to the interest degree may be to bin the verification samples according to the interest degrees corresponding to the verification samples according to the interest degrees, for example, if the interest degrees are expressed by scores, the candidate recommended product with the interest degree of 1 may be placed in one box, the candidate recommended product with the interest degree of 2 may be placed in another box, and so on, and equally frequency binning is performed on each verification sample.
In S5032b, it can be understood that each box may include a positive sample product and/or a negative sample product, and a ratio of the number of the positive sample products to the number of all candidate recommended products in the box is a positive sample rate, and a ratio of the number of the negative sample products to the number of all candidate recommended products in the box is a negative sample rate. For example, if there are 5 candidate recommended products in a bin, of which 1 is a positive sample product and 4 negative sample products, the positive sample rate of the bin is 20% and the negative sample rate is 80%.
In S5033b, the matching degree between the positive sample rate and the negative sample rate and the box is the matching degree between the positive sample rate and the interest degree between the negative sample rate and each positive sample product and each negative sample product in the box, that is, the higher the positive sample rate of one box and the higher the interest degree should be, it indicates that the matching degree between the positive sample rate and the box is high, and correspondingly, the lower the negative sample rate of one box and the lower the interest degree should be, it indicates that the matching degree between the negative sample rate and the box is high.
The boxes are divided according to the interest degrees corresponding to the candidate recommended products, so that one box corresponds to one interest degree. Taking the interesting degree as an example, if the score of the interesting degree corresponding to the box A is 1, that is, the interesting degree is low, it indicates that the product recommendation model predicts that the interesting degree of the verification sample in the box to the candidate recommended product is low, and the score of the interesting degree corresponding to the box B is 6, that is, the interesting degree is high, it indicates that the product recommendation model predicts that the interesting degree of the verification sample in the box to the candidate recommended product is high, it can be understood that the positive sample product in the box A should be less than the box B, that is, the positive sample rate of the box A should be less than the positive sample rate of the box B, and if the positive sample rate in the box A is counted as 60%, the positive sample rate in the box B is counted as 20%, it indicates that the positive sample rates of the box A and the box B are not matched with the box A and the box B. Correspondingly, if the degree of interest corresponding to the box A is high, the degree of interest corresponding to the box B is low, the negative sample rate of the box A is high, and the negative sample rate of the box B is low, it is indicated that theoretically, the verification sample is more interested in the candidate recommended products of the box A, but the verification sample in the box A is more uninterested in the candidate recommended products of the box A, and the verification sample in the box B is less interested in the candidate recommended products, so that the negative sample rates of the box A and the box B are not matched with those of the box A and the box B. Therefore, the matching degree of the box body and the positive sample rate and/or the negative sample rate is used as the matching degree of the interested degree and the positive sample product and the negative sample product, so that the obtained matching degree is more accurately determined.
By adopting the embodiment, the matching degree of the verification sample and the interest degree of the verification sample output by the product recommendation model to the candidate recommended product can be accurately determined through a discrete statistical method, so that whether the product recommendation model is accurate or not is determined according to the matching degree subsequently to obtain the verification result, the accuracy of obtaining the verification result of the product recommendation model through the method is improved, and the recommendation accuracy of the product recommendation method is further improved.
In another embodiment, it may also be counted whether the level of interest of each verification sample output by the product recommendation model is in a pre-preset ranking or a post-preset ranking, for example, if the level of interest of a plurality of positive sample products is greater, the level of interest ranks three times before the level of interest of all candidate recommended products, and if the level of interest of a plurality of negative sample products is less, the level of interest ranks three times after the level of interest of all candidate recommended products, it indicates that the level of interest is higher in match with the positive sample products and the negative sample products.
In S504, it can be understood that, if the degree of interest is more than the case that the positive sample product and the negative sample product are not matched, it indicates that the degree of interest of the verification sample output by the product recommendation model for the candidate recommended product is not accurate, and if the degree of interest is more than the case that the positive sample product and the negative sample product are matched, or both cases are matched, the degree of interest of the verification sample output by the specification product recommendation model for the candidate recommended product is accurate, and based on this, the verification result of the product recommendation model is obtained.
By adopting the embodiment, the accuracy of the product recommendation model is verified through the verification sample to obtain the verification result, so that the product recommendation model can be adjusted and then used according to the verification result, and the recommendation accuracy of the product recommendation method is improved.
In order to better explain the specific implementation process of the training method of the product recommendation model, the present disclosure further provides a flow diagram of the training method of the product recommendation model, as shown in fig. 6, which will be described below with reference to fig. 6:
s601, defining a sample and determining a sample user.
S602, data extraction, wherein the sample user and all the characteristics which can be used by the sample user are led into a modeling environment.
And S603, backtracking and generating the original features, and generating the original features corresponding to each sample user by using expert experience and an automatic feature generation tool.
And S604, screening the characteristics, namely screening the original characteristics to obtain the user characteristics under the target characteristic dimension.
And S605, model training, namely training the original recommendation model through user characteristics to obtain a product recommendation model.
And S606, evaluating the model, namely evaluating the product recommendation model by an evaluation method such as equal frequency binning and the like, and determining the accuracy of the interest degree of the candidate recommended product output by the product recommendation model.
According to an embodiment of the present disclosure, there is also provided a product recommendation device, as shown in fig. 7, including:
a user determining module 701, configured to determine a target recommended user;
an interest output module 702, configured to input the user characteristics of the target recommended user into a product recommendation model, to obtain a degree of interest of the target recommended user in each candidate recommended product, which is output by the product recommendation model, where the product recommendation model is obtained through training of sample data in advance, where the sample data includes user characteristics of a sample user, a positive sample product owned by the sample user in the candidate recommended products, and a negative sample product that is the same as the positive sample product in category and not owned by the sample user;
a target determining module 703, configured to determine a target recommended product from the candidate recommended products according to the interest level;
a product recommending module 704, configured to recommend the target recommended product to the target recommending user.
In a possible embodiment, the goal determining module 703 includes:
a probability determination submodule for determining an adding probability that the target recommended user will have each of the candidate recommended products according to each of the interest degrees;
the weight determining submodule is used for determining adding weight for each candidate recommended product according to the product characteristics of the candidate recommended products;
a priority determination submodule, configured to determine an adding priority of each candidate recommended product according to the adding probability and the adding weight, where the priority is positively correlated with the adding probability and the adding weight;
and the target determination submodule is used for determining a target recommended product from the candidate recommended products according to the adding priority of the candidate recommended products.
According to an embodiment of the present disclosure, there is also provided a training apparatus for a product recommendation model, as shown in fig. 8, including:
a feature obtaining module 801, configured to obtain user features of a sample user, a positive sample product owned by the sample user in candidate recommended products, and a negative sample product that is the same as the positive sample product in category and not owned by the sample user;
an interest output module 802, configured to input the user characteristics into an original training model, to obtain a degree of interest of each sample user in each candidate recommended product output by the original training model;
a loss establishing module 803, configured to establish a training loss according to the interest level, where the training loss is negatively correlated to the interest level of the sample user in the positive sample product and positively correlated to the interest level of the sample user in the negative sample product;
and the model determining module 804 is used for adjusting the original training model according to the training loss to obtain a product recommendation model.
In a possible embodiment, the apparatus further comprises:
the distribution acquisition module is used for acquiring sample feature distribution of a sample user on each original feature dimension and cross-time feature distribution of a cross-time test user on each original feature dimension, wherein the cross-time test user is a user who owns a positive sample product in a cross-time window, the cross-time window is not overlapped with a historical time window, and the historical time window is a time window for the sample user to own the positive sample product;
the characteristic screening module is used for screening out the characteristic dimension of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets a preset condition from the original characteristic dimension to obtain a target characteristic dimension;
the feature obtaining module 801 is specifically configured to obtain a user feature of the sample user in the target feature dimension.
In one possible embodiment, the feature filtering module includes:
the first evaluation submodule is used for evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the original characteristic dimension through a stability index to obtain a first evaluation result;
the first characteristic submodule is used for screening out characteristic dimensions, in the original characteristic dimensions, of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets a first preset condition according to the first evaluation result to obtain first characteristic dimensions;
the second evaluation submodule is used for evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the first characteristic dimension in a countermeasure verification mode to obtain a second evaluation result;
and the target feature submodule is used for screening out the feature dimension, in the first feature dimension, of which the difference between the sample feature distribution and the cross-time feature distribution meets a second preset condition according to the second evaluation result to obtain a target feature dimension.
In a possible embodiment, further comprising:
the verification obtaining module is used for obtaining user characteristics of a verification sample, a positive sample product owned by the verification sample in candidate recommended products, and a negative sample product which is the same as the positive sample product in category and not owned by the verification sample;
the verification output module is used for inputting the user characteristics of the verification samples into the product recommendation model to obtain the interest degree of each verification sample output by the product recommendation model to each candidate recommended product;
a match determination module for determining a degree of match of the degree of interest with the positive sample product and the negative sample product;
and the verification result module is used for verifying the product recommendation model according to the matching degree to obtain a verification result.
In one possible embodiment, the match determination module includes:
the index calculation submodule is used for counting AUC and/or KS indexes according to the interest degree of the verification sample in each candidate recommended product;
a first match determination sub-module for determining a degree of match of the degree of interest with a positive sample product of the candidate recommended product and a negative sample product of the candidate recommended product based on the AUC and/or KS indices.
In one possible embodiment, the match determination module includes:
the box body distribution submodule is used for performing equal-frequency box separation on the candidate recommended products according to the interest degree to obtain each box body;
the sample rate determining submodule is used for counting the positive sample rate of the positive sample product and/or the negative sample rate of the negative sample product in each box body;
and the second matching determination sub-module is used for determining the matching degree of the positive sample rate and/or the negative sample rate and the box body as the matching degree of the interest degree and the positive sample product and the negative sample product.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to embodiments of the present disclosure.
FIG. 9 illustrates a schematic block diagram of an example electronic device 900 that can be used to implement embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901 which can perform various appropriate actions and processes in accordance with a computer program stored in a Read Only Memory (ROM) 902 or a computer program loaded from a storage unit 908 into a Random Access Memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The calculation unit 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An input/output (I/O) interface 905 is also connected to bus 904.
A number of components in the device 900 are connected to the I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, and the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, optical disk, or the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 901 may be a variety of general and/or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various dedicated Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, and so forth. The computing unit 901 performs various methods and processes described above, such as a product recommendation method and a training method of a product recommendation model. For example, in some embodiments, the product recommendation method and the training method of the product recommendation model may be implemented as a computer software program tangibly embodied in a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 900 via ROM 902 and/or communications unit 909. When loaded into RAM 903 and executed by computing unit 901, may perform one or more steps of the product recommendation methods and training methods of product recommendation models described above. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the product recommendation method and the training method of the product recommendation model in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), system on a chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server may be a cloud server, a server of a distributed system, or a server with a combined blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the scope of protection of the present disclosure.

Claims (19)

1. A method of product recommendation, comprising:
determining a target recommendation user;
inputting the user characteristics of the target recommended user into a product recommendation model to obtain the interest degree of the target recommended user in each candidate recommended product output by the product recommendation model, wherein the product recommendation model is obtained by training sample data in advance, and the sample data comprises the user characteristics of a sample user, a positive sample product owned by the sample user in the candidate recommended products, and a negative sample product which is the same as the positive sample product in category and is not owned by the sample user;
determining a target recommended product from the candidate recommended products according to the interest degree;
and recommending the target recommended product to the target recommending user.
2. The method of claim 1, wherein said determining a target recommended product from the candidate recommended products according to the level of interest comprises:
determining the adding probability that the target recommending user will have each candidate recommending product according to each interest degree;
determining an adding weight for each candidate recommended product according to the product characteristics of the candidate recommended products;
determining an adding priority of each candidate recommended product according to the adding probability and the adding weight, wherein the priority is positively correlated with the adding probability and the adding weight;
and determining a target recommended product from the candidate recommended products according to the adding priority of the candidate recommended products.
3. A method of training a product recommendation model, comprising:
the method comprises the steps of obtaining user characteristics of sample users, positive sample products owned by the sample users in candidate recommended products, and negative sample products which are the same as the positive sample products in category and not owned by the sample users;
inputting the user characteristics into an original training model to obtain the interest degree of each sample user to each candidate recommended product output by the original training model;
constructing a training loss according to the interest degree, wherein the training loss is in negative correlation with the interest degree of the sample user for the positive sample product and is in positive correlation with the interest degree of the sample user for the negative sample product;
and adjusting the original training model according to the training loss to obtain a product recommendation model.
4. The method of claim 3, wherein the method further comprises:
acquiring sample feature distribution of sample users on each original feature dimension and cross-time feature distribution of cross-time test users on each original feature dimension, wherein the cross-time test users are users who own positive sample products in a cross-time window, the cross-time window is not overlapped with a historical time window, and the historical time window is a time window in which the sample users own the positive sample products;
screening out the characteristic dimension of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets a preset condition from the original characteristic dimension to obtain a target characteristic dimension;
the acquiring of the user characteristics of the sample user comprises:
and acquiring the user characteristics of the sample user on the target characteristic dimension.
5. The method of claim 4, wherein the step of screening out the feature dimension, which is different from the sample feature distribution and the cross-time feature distribution by a preset condition, from the original feature dimension to obtain a target feature dimension comprises the steps of:
evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the original characteristic dimension through a stability index to obtain a first evaluation result;
screening out a characteristic dimension, in the original characteristic dimension, of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets a first preset condition according to the first evaluation result to obtain a first characteristic dimension;
evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the first characteristic dimension in a countercheck verification mode to obtain a second evaluation result;
and screening out the characteristic dimension of which the difference between the sample characteristic distribution and the cross-time characteristic distribution in the first characteristic dimension meets a second preset condition according to the second evaluation result to obtain a target characteristic dimension.
6. The method of claim 3, further comprising:
obtaining user characteristics of verification samples, positive sample products owned by the verification samples in candidate recommended products, and negative sample products which are the same as the positive sample products in category and not owned by the verification samples;
inputting the user characteristics of the verification samples into the product recommendation model to obtain the interest degree of each verification sample output by the product recommendation model to each candidate recommended product;
determining a degree of matching of the degree of interest to the positive sample product and the negative sample product;
and verifying the product recommendation model according to the matching degree to obtain a verification result.
7. The method of claim 6, wherein said determining a degree of matching of said degree of interest to said positive sample product and said negative sample product comprises:
calculating an AUC and/or KS index according to the interest degree of each candidate recommended product in the verification sample;
and determining the matching degree of the interest degree with the positive sample product in the candidate recommended product and the negative sample product in the candidate recommended product according to the AUC and/or KS indexes.
8. The method of claim 6, wherein said determining a degree of matching of said degree of interest to said positive sample product and said negative sample product comprises:
carrying out equal-frequency box separation on the candidate recommended products according to the interest degree to obtain each box body;
counting the positive sample rate of the positive sample products and/or the negative sample rate of the negative sample products in each box;
determining a degree of matching of the positive sample rate and/or the negative sample rate with the bin as a degree of matching of the degree of interest with the positive sample product and the negative sample product.
9. A product recommendation device comprising:
the user determination module is used for determining a target recommendation user;
the interest output module is used for inputting the user characteristics of the target recommending user into a product recommending model to obtain the interest degree of the target recommending user in each candidate recommending product output by the product recommending model, wherein the product recommending model is obtained by training sample data in advance, and the sample data comprises the user characteristics of a sample user, a positive sample product owned by the sample user in the candidate recommending products and a negative sample product which has the same category as the positive sample product and is not owned by the sample user;
the target determining module is used for determining a target recommended product from the candidate recommended products according to the interest degree;
and the product recommending module is used for recommending the target recommended product to the target recommending user.
10. The apparatus of claim 9, wherein the goal determination module comprises:
a probability determination submodule, configured to determine, according to each of the interest levels, an adding probability that the target recommending user will have each of the candidate recommending products;
the weight determining submodule is used for determining an adding weight for each candidate recommended product according to the product characteristics of the candidate recommended products;
a priority determination submodule, configured to determine an adding priority of each candidate recommended product according to the adding probability and the adding weight, where the priority is positively correlated with the adding probability and the adding weight;
and the target determination submodule is used for determining a target recommended product from the candidate recommended products according to the adding priority of the candidate recommended products.
11. A training apparatus for a product recommendation model, comprising:
the characteristic obtaining module is used for obtaining user characteristics of sample users, positive sample products owned by the sample users in the candidate recommended products, and negative sample products which are the same as the positive sample products in category and not owned by the sample users;
the interest output module is used for inputting the user characteristics into an original training model to obtain the interest degree of each sample user in each candidate recommended product output by the original training model;
a loss establishing module for establishing a training loss according to the interest degree, wherein the training loss is negatively correlated with the interest degree of the sample user for the positive sample product and positively correlated with the interest degree of the sample user for the negative sample product;
and the model determining module is used for adjusting the original training model according to the training loss to obtain a product recommendation model.
12. The apparatus of claim 11, wherein the apparatus further comprises:
the distribution acquisition module is used for acquiring sample feature distribution of a sample user on each original feature dimension and cross-time feature distribution of a cross-time test user on each original feature dimension, wherein the cross-time test user is a user who owns a positive sample product in a cross-time window, the cross-time window is not overlapped with a historical time window, and the historical time window is a time window for owning the positive sample product by the sample user;
the characteristic screening module is used for screening out the characteristic dimension of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets a preset condition from the original characteristic dimension to obtain a target characteristic dimension;
the feature obtaining module is specifically configured to obtain user features of the sample user in the target feature dimension.
13. The apparatus of claim 12, wherein the feature screening module comprises:
the first evaluation sub-module is used for evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the original characteristic dimension through a stability index to obtain a first evaluation result;
the first characteristic submodule is used for screening out characteristic dimensions, in the original characteristic dimensions, of which the difference between the sample characteristic distribution and the cross-time characteristic distribution meets a first preset condition according to the first evaluation result to obtain first characteristic dimensions;
the second evaluation submodule is used for evaluating the distribution difference of the sample characteristic distribution and the cross-time characteristic distribution on the first characteristic dimension in a countermeasure verification mode to obtain a second evaluation result;
and the target feature submodule is used for screening out the feature dimension, in the first feature dimension, of which the difference between the sample feature distribution and the cross-time feature distribution meets a second preset condition according to the second evaluation result to obtain a target feature dimension.
14. The apparatus of claim 9, further comprising:
the verification obtaining module is used for obtaining user characteristics of a verification sample, a positive sample product owned by the verification sample in candidate recommended products, and a negative sample product which is the same as the positive sample product in category and not owned by the verification sample;
the verification output module is used for inputting the user characteristics of the verification samples into the product recommendation model to obtain the interest degree of each verification sample output by the product recommendation model to each candidate recommended product;
a match determination module for determining a degree of match of the degree of interest with the positive sample product and the negative sample product;
and the verification result module is used for verifying the product recommendation model according to the matching degree to obtain a verification result.
15. The apparatus of claim 14, wherein the match determination module comprises:
the index calculation submodule is used for counting AUC and/or KS indexes according to the interest degree of the verification sample in each candidate recommended product;
a first match determination sub-module for determining a degree of match of the degree of interest to a positive sample product of the candidate recommended products and a negative sample product of the candidate recommended products based on the AUC and/or KS metrics.
16. The apparatus of claim 14, wherein the match determination module comprises:
the box body distribution submodule is used for performing equal-frequency box separation on the candidate recommended products according to the interest degree to obtain each box body;
the sample rate determining submodule is used for counting the positive sample rate of the positive sample product and/or the negative sample rate of the negative sample product in each box body;
and the second matching determination sub-module is used for determining the matching degree of the positive sample rate and/or the negative sample rate and the box body as the matching degree of the interest degree and the positive sample product and the negative sample product.
17. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the first and the second end of the pipe are connected with each other,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
18. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-8.
19. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1-8.
CN202211379000.8A 2022-11-04 2022-11-04 Product recommendation method and device and electronic equipment Pending CN115659036A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211379000.8A CN115659036A (en) 2022-11-04 2022-11-04 Product recommendation method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211379000.8A CN115659036A (en) 2022-11-04 2022-11-04 Product recommendation method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115659036A true CN115659036A (en) 2023-01-31

Family

ID=85015140

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211379000.8A Pending CN115659036A (en) 2022-11-04 2022-11-04 Product recommendation method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115659036A (en)

Similar Documents

Publication Publication Date Title
CN110995459B (en) Abnormal object identification method, device, medium and electronic equipment
US20170262275A1 (en) System and method for run-time update of predictive analytics system
CN115082920B (en) Deep learning model training method, image processing method and device
JP7294369B2 (en) Methods, devices, electronic devices and programs used for information processing
CN111797320B (en) Data processing method, device, equipment and storage medium
CN112860769A (en) Energy planning data management system
CN111178537A (en) Feature extraction model training method and device
CN115795144A (en) Product recommendation method and device and electronic equipment
US20210027320A1 (en) Method and system for generating return forecasts and portfolio construction
CN117593142A (en) Financial risk assessment management method and system
CN112860672A (en) Method and device for determining label weight
CN107644042B (en) Software program click rate pre-estimation sorting method and server
US20190205341A1 (en) Systems and methods for measuring collected content significance
EP4258193A1 (en) Method and apparatus for predicting risk, electronic device, computer readable storage medium
CN116561134A (en) Business rule processing method, device, equipment and storage medium
CN115601071A (en) Marketing strategy optimization method, device, equipment and medium for product
CN115659036A (en) Product recommendation method and device and electronic equipment
CN109523296A (en) User behavior probability analysis method and device, electronic equipment, storage medium
CN114925275A (en) Product recommendation method and device, computer equipment and storage medium
CN115062687A (en) Enterprise credit monitoring method, device, equipment and storage medium
CN114036391A (en) Data pushing method and device, electronic equipment and storage medium
CN114756764A (en) Enterprise-based content information stream recommendation method and device, electronic equipment and storage medium
CN114139798A (en) Enterprise risk prediction method and device and electronic equipment
CN113421014A (en) Target enterprise determination method, device, equipment and storage medium
US20140214695A1 (en) System and method to valuate intangible asset

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