Commodity recommendation method and device, electronic equipment and storage medium
By building a product recommendation network model and integrating user data from multiple shopping channels, the problem of incoherence of multi-channel recommendation strategies is solved, cross-channel product recommendation is achieved, and recommendation effect and efficiency are improved.
Patent Information
- Application Number
- CN202411139846.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-19
- Publication Date
- 2024-11-15
AI Technical Summary
Under multiple shopping channels, the lack of unity and coordination of recommendation strategies and product selection, resulting in unsatisfactory recommendations, wasting resources and costs, and product recommendations can only be recommended in a single channel.
By obtaining the historical interaction data of users in different channels, building a product recommendation network model, integrating user collections and interactive products from multiple channels, determining the products to be recommended, and recommending them to users under the original channels.
Cross-channel product recommendations have been achieved, the unity and synergy of recommendations have been improved, the recommendation effect has been improved, and resources and costs have been saved.
Smart Images

Figure CN118967267A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electronic equipment, and in particular to a product recommendation method, device, electronic equipment and storage medium. Background Art
[0002] With the continuous development of Internet technology, electronic devices can provide target objects with a variety of applications such as videos, songs, games, reading, shopping, etc. Taking shopping applications as an example, users can purchase goods through shopping applications to use the goods.
[0003] In the related art, in a single purchase channel, such as a single shopping application, the shopping application can recommend products to users based on the products purchased or browsed by the user in the channel. However, in multiple purchase channels, the recommendation strategies and product selections between different channels lack uniformity and coordination, resulting in unsatisfactory recommendation results. For example, when channels such as SMS and smart TVs operate independently, the recommendation algorithm and product selection are not fully coordinated and optimized, which not only wastes resources and costs, but also can only recommend products to users in a single channel. Summary of the invention
[0004] The embodiments of the present application provide a product recommendation method, device, electronic device and storage medium, which can realize cross-channel product recommendation.
[0005] In a first aspect, an embodiment of the present application provides a product recommendation method, the method comprising:
[0006] Obtaining a first product that a user to be recommended has historically interacted with in a first product recommendation channel, a user set corresponding to at least one second product recommendation channel, and a second product that each user in the user set has historically interacted with in the second product recommendation channel;
[0007] Inputting the first commodity, the user set, and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended, where the commodity to be recommended is a commodity among the plurality of the second commodities;
[0008] The commodity to be recommended is recommended to the user to be recommended through the first commodity recommendation channel.
[0009] In a second aspect, an embodiment of the present application provides a method for training a product recommendation network model applied to the product recommendation method as described above, the method comprising:
[0010] Acquire an observation sample data set, the observation sample data set including user sets corresponding to at least two product recommendation channels, and products historically interacted by users in each of the user sets under the corresponding product recommendation channels;
[0011] Build a product recommendation network model to be trained;
[0012] Inputting the user set and the products in the observed sample data set into the product recommendation network model to be trained to obtain the target recommended product corresponding to each user;
[0013] The product recommendation network model to be trained is trained based on the target product to be recommended, and the model parameters of the product recommendation network model to be trained are iteratively updated until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
[0014] In a third aspect, an embodiment of the present application provides a product recommendation device, the device comprising:
[0015] A first acquisition unit is used to acquire a first product that a user to be recommended has historically interacted with in a first product recommendation channel, a user set corresponding to at least one second product recommendation channel, and a second product that each user in the user set has historically interacted with in the second product recommendation channel;
[0016] A first input unit is used to input the first commodity, the user set and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended, where the commodity to be recommended is a commodity among the plurality of the second commodities;
[0017] A recommendation unit is used to recommend the commodity to be recommended to the user to be recommended under the first commodity recommendation channel.
[0018] In a fourth aspect, an embodiment of the present application provides a training device for a product recommendation network model applied to the product recommendation method as described above, the device comprising:
[0019] A second acquisition unit is used to acquire an observation sample data set, wherein the observation sample data set includes user sets corresponding to at least two product recommendation channels, and products historically interacted by users in each user set under the corresponding product recommendation channel;
[0020] A construction unit, used to construct a product recommendation network model to be trained;
[0021] A second input unit is used to input the user set and the products in the observation sample data set into the product recommendation network model to be trained to obtain the target product to be recommended corresponding to each user;
[0022] The training unit is used to train the product recommendation network model to be trained based on the target product to be recommended and iteratively update the model parameters of the product recommendation network model to be trained until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
[0023] In a fifth aspect, an embodiment of the present application provides an electronic device, comprising: a memory for storing executable program code; and a processor for calling and running the executable program code from the memory, so that the electronic device executes any of the methods described above.
[0024] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed, the method as described in any one of the above items is implemented.
[0025] In an embodiment of the present application, the first product that the user to be recommended has historically interacted with under the first product recommendation channel, the user set corresponding to at least one second product recommendation channel, and the second product that each user in the user set has historically interacted with under the second product recommendation channel are obtained; the first product, the user set, and the second product are input into the product recommendation network model to obtain the product to be recommended, and the product to be recommended is a product among the multiple second products; the product to be recommended is recommended to the user to be recommended under the first product recommendation channel. By integrating the user sets and interacted products under other second product recommendation channels, the product to be recommended for recommendation to the user to be recommended is determined from the second product recommendation channel, and is recommended to the user to be recommended under the first product recommendation channel, thereby achieving the effect of cross-channel product recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0027] Figure 1 This is a flow chart of a product recommendation method provided in an embodiment of the present application;
[0028] Figure 2 It is a flowchart of a method for training a commodity recommendation network model of a commodity recommendation method provided in an embodiment of the present application;
[0029] Figure 3 A schematic diagram of a scenario in which an error model is used to calculate a preference degree according to an embodiment of the present application;
[0030] Figure 4 is a structural schematic diagram of a commodity recommendation device provided in an embodiment of the present application;
[0031] Figure 5 It is a structural schematic diagram of a training device for a commodity recommendation network model provided in an embodiment of the present application;
[0032] Figure 6 This is a schematic diagram of the first structure of an electronic device provided in an embodiment of the present application;
[0033] Figure 7 This is a second structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In order to make the features and advantages of this specification more obvious and easy to understand, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0035] In the description of this specification, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of this specification, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in this specification can be understood in specific circumstances. In addition, in the description of this specification, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.
[0036] In the related art, in a single purchase channel, such as a single shopping application, the shopping application can recommend products to users based on the products purchased or browsed by the user in the channel. However, in multiple purchase channels, the recommendation strategies and product selections between different channels lack uniformity and coordination, resulting in unsatisfactory recommendation results. For example, when channels such as SMS and smart TVs operate independently, the recommendation algorithm and product selection are not fully coordinated and optimized, which not only wastes resources and costs, but also can only recommend products to users in a single channel.
[0037] In order to achieve the effect of recommending products to users across channels, an embodiment of the present application provides a product recommendation method, and the executor of the product recommendation method can be an electronic device, specifically including but not limited to servers, tablet computers, laptop computers and other electronic devices.
[0038] The following is a detailed description of the product recommendation method provided in this specification in conjunction with specific embodiments. Figure 1 , Figure 1 This is a schematic diagram of the first flow chart of the commodity recommendation method provided in the embodiment of the present application. Figure 1 As shown, this embodiment describes the specific process of the product recommendation method from the electronic device end, and the method may include the following steps:
[0039] S101, obtaining a first product that a user to be recommended has historically interacted with in a first product recommendation channel, a user set corresponding to at least one second product recommendation channel, and a second product that each user in the user set has historically interacted with in the second product recommendation channel.
[0040] The first product recommendation channel is the product recommendation channel browsed by the user to be recommended, that is, the channel that recommends products to the user to be recommended during the browsing process. The second product recommendation channel is the product browsing channel controlled by the development platform, which can be a product recommendation channel that the user to be recommended has browsed or has not browsed, and is not limited here.
[0041] For example, the first product recommendation channel is a text message recommendation channel, and the second product recommendation channel is a smart TV recommendation channel; or the first product recommendation channel is A shopping application channel, and the second product recommendation channel is B shopping application channel.
[0042] Specifically, since the second product recommendation channel is controlled by the development platform, the first product that the recommended user has historically interacted with under the first product recommendation channel, as well as the user set that has historically used the second product recommendation channel, and the second product that each user in the user set has historically interacted with under the second product recommendation channel can be obtained, with the user's consent to obtain user-related information. Interactions include viewing operations, purchasing operations, and other operations on a certain product.
[0043] S102, inputting the first product, the user set and the second product into a product recommendation network model to obtain a product to be recommended, where the product to be recommended is a product among the plurality of second products.
[0044] Among them, the embodiment of the present application provides a product recommendation model, which can determine the product to be recommended for the user to be recommended from multiple second products based on the first product of the user to be recommended and the second product corresponding to the user set under other second product recommendation channels. That is, the first product, the user set and the second product are used as inputs of the product recommendation network model to determine the product to be recommended from multiple second products through the product recommendation network model.
[0045] S103: recommending the commodity to be recommended to the user to be recommended through the first commodity recommendation channel.
[0046] Among them, after the recommended products are determined in step S102, since the user to be recommended is browsing under the first product recommendation channel, it is necessary to recommend the recommended products to the user to be recommended under the first product recommendation channel, so as to recommend the recommended products that the user is interested in, improve user stickiness, and achieve the effect of cross-channel product recommendation.
[0047] As can be seen from the above, in the embodiment of the present application, by obtaining the first product that the user to be recommended has historically interacted with under the first product recommendation channel, the user set corresponding to at least one second product recommendation channel, and the second product that each user in the user set has historically interacted with under the second product recommendation channel; the first product, the user set, and the second product are input into the product recommendation network model to obtain the product to be recommended, and the product to be recommended is a product among the multiple second products; and the product to be recommended is recommended to the user to be recommended under the first product recommendation channel. By integrating the user sets and interacted products under other second product recommendation channels, the product to be recommended for recommendation to the user to be recommended is determined from the second product recommendation channel, and is recommended to the user to be recommended under the first product recommendation channel, so as to achieve the effect of cross-channel product recommendation.
[0048] In some implementations, inputting the first product, the user set, and the second product into a product recommendation network model to obtain a product to be recommended includes:
[0049] Step S201: based on the first commodity and the plurality of the second commodities, a target user is screened out from the user set, wherein the target user is a user having similar commodity interaction interests as the user to be recommended.
[0050] Among them, since the user to be recommended may not have browsed under the second product recommendation channel, in order to recommend the products that the user is interested in under the second product recommendation channel to the user to be recommended, it is necessary to screen out target users who have similar product interaction interests as the user to be recommended from the user set based on the first product and the second product.
[0051] For example, the product that the user to be recommended has historically interacted with in the first product recommendation channel is "shampoo", and the user set includes user A, user B, and user C. The second product corresponding to user A is "shower gel", the second product corresponding to user B is "car toy", and the second product corresponding to user C is "pants". Since "shampoo" and "shower gel" are both products that may be used in the process of washing, and "car toy" and "pants" have no correlation with "shampoo", user A is determined as a target user with similar product interaction interests as the user to be recommended.
[0052] Step S202, integrating the target product corresponding to the target user and the first product, and performing feature extraction to obtain the potential interest feature of the user to be recommended.
[0053] After determining the target user who has similar commodity interaction interest with the user to be recommended in step S201, the target user and the user to be recommended can be constructed into an interest group, that is, users in the same interest group have similar commodity interests.
[0054] Specifically, the fusion process can be implemented by referring to the following formula:
[0055]
[0056] in, Refers to the user and Transmit cross-domain information between ip Refers to the network matrix, the subscript ip is the number parameter, indicating the user Deliver to If the two form an interest group, then aij=1, and the target product corresponding to the target user uj in the second product recommendation channel is transmitted.
[0057] Specifically, the second products of the remaining target users in the interest group are delivered to the users to be recommended, so that the interest products of the users to be recommended include the target products corresponding to each target user, thereby achieving the effect of integrating the target products corresponding to the target users and the first products.
[0058] Among them, feature extraction is performed to obtain the potential interest features of the user to be recommended, which can be implemented by referring to the following formula:
[0059]
[0060] Among them, concat() means concatenation, squeeze() means the compression dimension is 1, Indicates that the delivered product information has been received. represents the fused sequence representation of all features, W C and W F The meaning of is the matrix used for calculation, which can be understood as parameters.
[0061] Step S203: determining the product to be recommended according to the potential interest feature and the target product.
[0062] Among them, after determining the potential interest characteristics of the user to be recommended in step S202, since there is a situation where the target user buys multiple different types of goods, in order to determine the recommended goods that need to be recommended to the user to be recommended from the numerous target goods, it is necessary to combine the potential interest characteristics to determine the recommended goods from the target goods.
[0063] For example, the first product to be recommended to the user is "shampoo", and the target products of target user A are "shower gel" and "car toys". "Shower gel", which is the same toiletries as "shampoo", will be determined as the product to be recommended, and "car toys", which have no relevance to "shampoo", will not be determined as the product to be recommended.
[0064] In some implementations, the step of selecting a target user from the user set based on the first commodity and the second commodity includes:
[0065] Step S301: determining the degree of association between each of the second commodities and the first commodities.
[0066] The degree of association can be achieved through the following formula:
[0067]
[0068] Among them, a'ij represents the calculation of whether each user has similar interactive interests in commodities, that is, the degree of association between commodities between two users, and W1 and W2 are matrices used for calculation.
[0069] Step S302: Determine the user in the user set who corresponds to the second commodity and whose correlation degree is greater than or equal to a preset correlation degree as the target user.
[0070] The target user can be determined based on the degree of association by referring to the following formula:
[0071]
[0072] Among them, k is the preset correlation degree, when the correlation degree a′ ij When a is greater than or equal to the preset correlation degree k, ij is 1, that is, the user corresponding to the second commodity in the user set whose correlation degree is greater than or equal to the preset correlation degree is determined as the target user; when the correlation degree a′ ijWhen it is less than the preset correlation degree k, it means that the user and the user to be recommended do not have similar interactive interests in products.
[0073] In some implementations, determining the product to be recommended based on the potential interest feature and the target product includes:
[0074] Step S401, extracting product features of each target product to obtain multiple product features.
[0075] After acquiring each target product, it is necessary to perform feature extraction on each target product, extract the product features corresponding to each target product, and obtain multiple product features.
[0076] Step S402, matching the potential interest feature with each of the product features, determining the user's preference for each target product, and determining the product whose preference reaches a preference threshold as a product to be recommended.
[0077] The method for determining the degree of preference can be implemented by referring to the following formula:
[0078]
[0079] Among them, MLPS represents the fully connected layer, II represents contact, that is, the connection between the previous and next parameters, that is, the degree of preference, and the Mean() function represents the average along the time dimension. One-dimensional representation of It is the kth product in product recommendation channel Z. r represents relation, that is, the relationship between user ui and product Vk in domain Z. The higher the value, the deeper the relationship.
[0080] Specifically, after calculating the preference degree between each target product and the potential interest characteristics of the user to be recommended, the product that reaches a preset preference degree threshold is determined as the product to be recommended, and then the product to be recommended is recommended to the user to be recommended under the first product recommendation channel.
[0081] In an embodiment of the present application, the first product that the user to be recommended has historically interacted with under the first product recommendation channel, the user set corresponding to at least one second product recommendation channel, and the second product that each user in the user set has historically interacted with under the second product recommendation channel are obtained; the first product, the user set, and the second product are input into the product recommendation network model to obtain the product to be recommended, and the product to be recommended is a product among the multiple second products; the product to be recommended is recommended to the user to be recommended under the first product recommendation channel. By integrating the user sets and interacted products under other second product recommendation channels, the product to be recommended for recommendation to the user to be recommended is determined from the second product recommendation channel, and is recommended to the user to be recommended under the first product recommendation channel, thereby achieving the effect of cross-channel product recommendation.
[0082] See also Figure 2 , Figure 2 1 is a flow chart of a method for training a commodity recommendation network model of a commodity recommendation method provided in an embodiment of the present application. Figure 2 As shown, this embodiment describes the specific process of the training method of the commodity recommendation network model from the electronic device end. The method may include the following steps:
[0083] S501, obtaining an observed sample data set, wherein the observed sample data set includes user sets corresponding to at least two product recommendation channels, and products historically interacted with by users in each of the user sets under the corresponding product recommendation channels.
[0084] Among them, observation samples usually refer to sample data used in statistics and data analysis. In statistics and data analysis, researchers usually collect a certain number of data samples to infer or analyze the characteristics of the overall population. Each data point in these data samples is called an observation sample. Observation samples can be various types of data, such as numerical data, categorical data, text data, etc. By analyzing the observation samples, researchers can draw inferences about the overall characteristics, such as mean, variance, distribution shape, etc. In practical applications, observation samples are usually obtained through field surveys, experiments, observations, or extraction from existing data sets. Analysis and inference of observation samples are important contents of statistics and data analysis. They can help network models understand the characteristics and laws of data, so as to make corresponding decisions or predictions.
[0085] Specifically, the observed sample data set includes user sets corresponding to at least two product recommendation channels, and products historically interacted with by users in each of the user sets under the corresponding product recommendation channels.
[0086] S502: construct a product recommendation network model to be trained.
[0087] In some embodiments, before training the product recommendation network model to be trained, it is necessary to construct a product recommendation network model to be trained that has the ability to perform cross-channel product recommendations.
[0088] S503, inputting the user set and the commodities in the observed sample data set into the commodity recommendation network model to be trained, and obtaining the target commodity to be recommended corresponding to each user.
[0089] Among them, the way in which the product recommendation network model to be trained predicts the target product to be recommended corresponding to each user is similar to the actual application process of the product recommendation network model. It is also necessary to determine the interest group that can be constructed, and transfer the products corresponding to other users in the interest group to a certain user so that the user carries the products of other users, and then calculate the preference degree of the user and each product he carries, so as to determine the product whose preference degree reaches the preference degree threshold as the target product to be recommended for the user.
[0090] S504: Train the product recommendation network model to be trained based on the target product to be recommended and iteratively update the model parameters of the product recommendation network model to be trained until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
[0091] Among them, after determining the target recommended products corresponding to each user in step S503, it is necessary to train the product recommendation network model to be trained according to the target recommended products and iteratively update the model parameters of the product recommendation network model to be trained until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
[0092] In some implementations, the training of the product recommendation network model to be trained based on the target product to be recommended and iteratively updating the model parameters of the product recommendation network model to be trained includes:
[0093] S601, determining a first propensity score based on the potential interest feature of each of the users, the corresponding target product to be recommended, and a first model parameter of the propensity model to be trained.
[0094] The specific method for determining the propensity score can be achieved by referring to the following formula:
[0095]
[0096] in, is the propensity score, g is the model parameter of the propensity model, v Zis the target product to be recommended on the product recommendation channel Z. At the current time, according to the above formula, the first propensity score calculated by the first model parameter of the propensity model to be trained, the user's potential interest characteristics and the corresponding target product to be recommended can be obtained.
[0097] S602, inputting the target product to be recommended corresponding to each user into the error model to be trained, and obtaining a first preference degree between each user and the corresponding target product to be recommended.
[0098] Among them, see Figure 3 , Figure 3 A schematic diagram of a scenario in which an error model is used to calculate a preference level according to an embodiment of the present application. The difference between the error model and the product recommendation network model in terms of model structure is that the output layer is different.
[0099] Specifically, Figure 3 G1 to G j They are interest communities 1 to interest groups j, u1 to u7 are users 1 to 7, and products 1 to r under the first product recommendation channel and the second product recommendation channel are encoded, and interest groups are constructed. It can be seen that users 1, 3, 6 and 7 are in interest group 1, users 4, 5, 6 and 7 are in interest group i, and users 2, 5 and 6 are in interest group j. Taking interest group 1 as an example, the products corresponding to user 1 and user 3 in interest group 1 are transferred to user 6, so that user 6 carries the products corresponding to user 1 and user 3. After calculation by the fully connected layer, the deviation degree corresponding to the first product recommendation channel and the deviation degree corresponding to the second product recommendation channel are obtained.
[0100] Specifically, since the data exposed by users is selected by the algorithm during the model training process, that is, the sample selection is not random, the sample cannot reflect certain characteristics of the population, which causes the estimator to be biased, that is, selection bias. In order to eliminate this selection bias, an embodiment of the present application provides an error model to learn errors, which consists of a multi-interest information module and a dual robust estimator. The multi-interest information module transmits cross-domain information for overlapping and non-overlapping users, and the dual robust estimator eliminates selection bias and popularity bias to obtain unbiased performance estimates.
[0101] S603, obtaining a second preference degree between each user and the corresponding target commodity to be recommended calculated by the commodity recommendation network model to be trained.
[0102] In the process of using the product recommendation network model to be trained to determine the target product to be recommended corresponding to each target user, the inference layer of the product recommendation network model to be trained will also calculate the second preference degree between each user and the corresponding product, and determine the target product to be recommended based on the second preference degree of each product. Therefore, the second preference degree between each user and the corresponding target product to be recommended calculated by the product recommendation network model to be trained can be obtained.
[0103] S604: Based on the first preference level, the second preference level, and the first propensity score, the product recommendation network model to be trained is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
[0104] After determining the first preference degree, the second preference degree and the first propensity score, the product recommendation network model to be trained is trained based on the three parameters and the model parameters of the product recommendation network model to be trained are iteratively updated.
[0105] In some implementations, the training of the product recommendation network model to be trained and iteratively updating the model parameters of the product recommendation network model to be trained based on the first preference degree, the second preference degree, and the first propensity score includes:
[0106] S701, obtaining an estimated preference degree estimated for each user and the corresponding target product to be recommended.
[0107] Among them, the estimated preference It is the pre-estimated preference degree between the target recommended product and the potential interest characteristics corresponding to the user.
[0108] S702, calculating the difference between the estimated preference level and the first preference level to obtain a first prediction error predicted by the error model to be trained.
[0109] The first prediction error is It refers to the difference between the first preference level calculated by the error model and the estimated preference level.
[0110] S703, calculating the difference between the estimated preference level and the second preference level to obtain a second prediction error predicted by the product recommendation network model to be trained.
[0111] Among them, the second prediction error is the estimated relationship Relationship with measured The difference between them can be realized by referring to the following formula:
[0112]
[0113] in, is the second prediction error, due to the estimated relationship May be greater or less than the measured relationship Therefore, it is necessary to obtain the difference value by calculating the absolute value of the difference between the two.
[0114] S704: Based on the first prediction error, the second prediction error, and the first propensity score, the product recommendation network model to be trained is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
[0115] After calculating the first prediction error, the second prediction error and the first propensity score, the product recommendation network model to be trained is trained based on these three parameters and the model parameters of the product recommendation network model to be trained are iteratively updated.
[0116] In some implementations, the training of the product recommendation network model to be trained and iteratively updating the model parameters of the product recommendation network model to be trained based on the first prediction error, the second prediction error, and the first propensity score includes:
[0117] S801, based on the first prediction deviation, the second prediction deviation and the first propensity score, the propensity model to be trained, the error model to be trained and the product recommendation network model to be trained are trained to obtain a trained propensity model, a trained error model and a trained product recommendation network model.
[0118] In the embodiment of the present application, when training the commodity recommendation network model to be trained, there are two stages of training, wherein the training method of the first stage can be implemented with reference to the following formula:
[0119]
[0120] Among them, θ is the network parameter of the product recommendation network model to be trained, φ is the network parameter of the tendency model to be trained, ψ is the network parameter of the error model to be trained, O Z is the observed sample data set, λ1, λ2, λ3 and λ4 are all coefficients. The network parameters of the product recommendation network model to be trained, the network parameters of the tendency model to be trained and the network parameters of the error model to be trained under the observed sample data set are trained respectively through the loss function of the first stage, and the trained tendency model, the trained error model and the trained product recommendation network model are obtained.
[0121] S802, obtaining a whole sample data set, and using the trained propensity model to calculate a second propensity score of the whole sample data set.
[0122] Among them, the training method of the second stage can be implemented according to the following formula:
[0123]
[0124] Among them, D Z is the entire sample data set, which includes the observed sample data set and the unobserved sample data set. λ5 is the coefficient. The second-stage training of the trained product recommendation network model is carried out by combining the entire sample data set, the trained tendency model and the trained error model through the second-stage loss function.
[0125] The second propensity score of the entire sample data set is calculated by using the trained propensity model.
[0126] Specifically, the second propensity score is also calculated using the following formula:
[0127]
[0128] The difference is that the second propensity score is calculated for the entire sample data set.
[0129] S803: Calculate the third preference degree between each user and the corresponding recommended product in the entire sample data set using the trained error model.
[0130] The third preference degree between each user and the corresponding recommended product in the entire sample data set is calculated by using the trained error model.
[0131] Specifically, the third preference degree is calculated using the following formula:
[0132]
[0133] The difference is that the third preference level is calculated based on the potential interest characteristics of each user in the entire sample data set and the corresponding target product to be recommended.
[0134] S804: Based on the second tendency score and the third preference degree, train the trained product recommendation network model and iteratively update the model parameters of the product recommendation network model to be trained.
[0135] According to the second propensity score and the third preference degree, the trained product recommendation network model is trained and the model parameters of the product recommendation network model to be trained are iteratively updated. Through the two-stage training process, selection bias and popularity bias are eliminated to obtain unbiased performance estimation.
[0136] As can be seen from the above, in the embodiment of the present application, by obtaining the first product that the user to be recommended has historically interacted with under the first product recommendation channel, the user set corresponding to at least one second product recommendation channel, and the second product that each user in the user set has historically interacted with under the second product recommendation channel; the first product, the user set, and the second product are input into the product recommendation network model to obtain the product to be recommended, and the product to be recommended is a product among the multiple second products; and the product to be recommended is recommended to the user to be recommended under the first product recommendation channel. By integrating the user sets and interacted products under other second product recommendation channels, the product to be recommended for recommendation to the user to be recommended is determined from the second product recommendation channel, and is recommended to the user to be recommended under the first product recommendation channel, so as to achieve the effect of cross-channel product recommendation.
[0137] In addition, the present application also provides a product recommendation device, see Figure 4 , Figure 4 Schematic diagram of a product recommendation device provided in an embodiment of the present application. Figure 4 As shown, the product recommendation device 70 can be implemented as all or part of the device through software, hardware or a combination of both, and the product recommendation device is applied to electronic devices. The product recommendation device 70 may include a first acquisition unit 71, a first input unit 72 and a recommendation unit 73, as follows:
[0138] The first acquisition unit 71 is used to acquire the first product that the user to be recommended has historically interacted with in the first product recommendation channel, the user set corresponding to at least one second product recommendation channel, and the second product that each user in the user set has historically interacted with in the second product recommendation channel;
[0139] A first input unit 72 is used to input the first commodity, the user set and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended, where the commodity to be recommended is a commodity among the plurality of the second commodities;
[0140] The recommendation unit 73 is used to recommend the commodity to be recommended to the user to be recommended in the first commodity recommendation channel.
[0141] According to some embodiments, the first input unit 72 is specifically used for:
[0142] Based on the first commodity and the plurality of the second commodities, a target user is screened out from the user set, wherein the target user is a user who has a similar commodity interaction interest as the user to be recommended;
[0143] The target product corresponding to the target user and the first product are integrated, and feature extraction is performed to obtain potential interest features of the user to be recommended;
[0144] Determine a product to be recommended based on the potential interest feature and the target product.
[0145] According to some embodiments, the first input unit 72 is specifically used for:
[0146] determining a correlation degree between each of the second commodities and the first commodity;
[0147] The user corresponding to the second commodity whose correlation degree is greater than or equal to the preset correlation degree in the user set is determined as the target user.
[0148] According to some embodiments, the first input unit 72 is specifically used for:
[0149] Extracting product features of each of the target products to obtain multiple product features;
[0150] The potential interest feature is matched with each of the product features to determine the user's preference for each target product, and the product whose preference reaches a preference threshold is determined as a product to be recommended.
[0151] It should be noted that the product recommendation device provided in the embodiment of the present application belongs to the same concept as the product recommendation method in the above embodiment. Any method provided in the product recommendation method embodiment can be run on the product recommendation device. The specific implementation process is detailed in the product recommendation method embodiment, which will not be repeated here.
[0152] In the embodiment of the present application, the first acquisition unit 71 acquires the first product that the user to be recommended has historically interacted with under the first product recommendation channel, the user set corresponding to at least one second product recommendation channel, and the second product that each user in the user set has historically interacted with under the second product recommendation channel; the first input unit 72 inputs the first product, the user set, and the second product into the product recommendation network model to obtain the product to be recommended, which is one of the multiple second products; the recommendation unit 73 recommends the product to be recommended to the user to be recommended under the first product recommendation channel. By integrating the user sets and interacted products under other second product recommendation channels, the product to be recommended for the user to be recommended is determined from the second product recommendation channel, and is recommended to the user to be recommended under the first product recommendation channel, thereby achieving the effect of cross-channel product recommendation.
[0153] In addition, the present application embodiment also provides another training device for a product recommendation network model, see Figure 5 , Figure 5 Schematic diagram of a training device for a commodity recommendation network model provided in an embodiment of the present application. Figure 5 As shown, the training device 80 of the product recommendation network model can be implemented as all or part of the device through software, hardware or a combination of both, and the product recommendation device is applied to electronic devices. Among them, the training device 80 of the product recommendation network model can include a second acquisition unit 81, a construction unit 82, a second input unit 83 and a training unit 84, which are as follows:
[0154] The second acquisition unit 81 is used to acquire an observed sample data set, wherein the observed sample data set includes user sets corresponding to at least two product recommendation channels, and products historically interacted by users in each user set under the corresponding product recommendation channel;
[0155] A construction unit 82, used to construct a commodity recommendation network model to be trained;
[0156] The second input unit 83 is used to input the user set and the products in the observed sample data set into the product recommendation network model to be trained to obtain the target recommended product corresponding to each user;
[0157] The training unit 84 is used to train the product recommendation network model to be trained based on the target product to be recommended and iteratively update the model parameters of the product recommendation network model to be trained until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
[0158] According to some embodiments, the training unit 84 is specifically configured to:
[0159] Determining a first propensity score based on the potential interest feature of each of the users, the corresponding target product to be recommended, and the first model parameter of the propensity model to be trained;
[0160] Inputting the target recommended product corresponding to each user into the error model to be trained to obtain a first preference degree between each user and the corresponding target recommended product;
[0161] Obtaining a second preference degree between each user and the corresponding target commodity to be recommended calculated by the commodity recommendation network model to be trained;
[0162] Based on the first preference degree, the second preference degree and the first propensity score, the product recommendation network model to be trained is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
[0163] According to some embodiments, the training unit 84 is specifically configured to:
[0164] Obtaining an estimated preference degree for each user and the corresponding target product to be recommended;
[0165] Calculating a difference between the estimated preference level and the first preference level to obtain a first prediction error predicted by the error model to be trained;
[0166] Calculating a difference between the estimated preference level and the second preference level to obtain a second prediction error predicted by the product recommendation network model to be trained;
[0167] Based on the first prediction error, the second prediction error and the first propensity score, the product recommendation network model to be trained is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
[0168] According to some embodiments, the training unit 84 is specifically configured to:
[0169] Based on the first prediction deviation, the second prediction deviation and the first propensity score, the propensity model to be trained, the error model to be trained and the product recommendation network model to be trained are trained to obtain a trained propensity model, a trained error model and a trained product recommendation network model;
[0170] Acquire a whole sample data set, and use the trained propensity model to calculate a second propensity score of the whole sample data set;
[0171] The trained error model is used to calculate the third preference degree between each user and the corresponding recommended product in the entire sample data set;
[0172] Based on the second propensity score and the third preference degree, the trained product recommendation network model is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
[0173] It should be noted that the training device for the product recommendation network model provided in the embodiment of the present application and the training method for the product recommendation network model in the above embodiment belong to the same concept. Any method provided in the training method embodiment for the product recommendation network model can be run on the training device for the product recommendation network model. The specific implementation process is detailed in the training method embodiment for the product recommendation network model, which will not be repeated here.
[0174] Accordingly, the embodiment of the present application also provides an electronic device 10, such as a server, a tablet computer, a notebook computer, or the like. Figure 6 , Figure 6 1 is a schematic diagram of the first structure of the electronic device provided in the embodiment of the present application. Figure 6 As shown, the electronic device 10 includes a processor 11 and a memory 12. The processor 11 is electrically connected to the memory 12.
[0175] The processor 11 is the control center of the electronic device 10 and may include one or more processing cores. The processor 11 uses various interfaces and lines to connect various parts of the entire electronic device, and executes various functions of the electronic device and processes data by running or calling computer programs stored in the memory 12, and calling data stored in the memory 12, so as to control the electronic device as a whole. Optionally, the processor 11 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 11 can integrate one or a combination of CPU, graphics processing unit (GPU), modem, etc. Among them, the CPU mainly processes the operating system, user pages, and applications; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 11, but may be implemented separately through a communication chip.
[0176] The memory 12 can be used to store software programs and modules, and the processor 11 executes various functional applications and data processing by running computer programs and modules stored in the memory 12. The memory 12 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, a computer program required for at least one function, etc.; the data storage area can store data created according to the use of the electronic device, etc.
[0177] In addition, the memory 12 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 12 may also include a memory controller to provide the processor 11 with access to the memory 12.
[0178] In this embodiment, the processor 11 in the electronic device 10 loads instructions corresponding to the processes of one or more computer programs into the memory 12 according to the following steps, and the processor 11 runs the computer programs stored in the memory 12 to implement various functions, as follows:
[0179] Obtaining a first product that a user to be recommended has historically interacted with in a first product recommendation channel, a user set corresponding to at least one second product recommendation channel, and a second product that each user in the user set has historically interacted with in the second product recommendation channel;
[0180] Inputting the first commodity, the user set, and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended, where the commodity to be recommended is a commodity among the plurality of the second commodities;
[0181] The commodity to be recommended is recommended to the user to be recommended through the first commodity recommendation channel.
[0182] In addition, the memory can also realize the following functions:
[0183] Acquire an observation sample data set, the observation sample data set including user sets corresponding to at least two product recommendation channels, and products historically interacted by users in each of the user sets under the corresponding product recommendation channels;
[0184] Build a product recommendation network model to be trained;
[0185] Inputting the user set and the products in the observed sample data set into the product recommendation network model to be trained to obtain the target recommended product corresponding to each user;
[0186] The product recommendation network model to be trained is trained based on the target product to be recommended, and the model parameters of the product recommendation network model to be trained are iteratively updated until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
[0187] In some embodiments, see Figure 7 , Figure 7 is a second structural diagram of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device 10 may include: a processor 11, a memory 12, a display screen 13, a camera component 14, an audio circuit 15, a sensor 16, and a power supply 17. The processor 11 is electrically connected to the display 13, the camera component 14, the audio circuit 15, the sensor 16, and the power supply 17, respectively.
[0188] The display screen 13 may be used to display information input by a user or information provided to a user and various graphical user interfaces of the electronic device. These graphical user interfaces may be composed of images, texts, icons, videos and any combination thereof.
[0189] The camera assembly 14 may include an image processing circuit, which may be implemented using hardware and / or software components and may include various processing units that define an image signal processing pipeline. The image processing circuit may include at least: multiple cameras, an image signal processor (ISP processor), a control logic, and an image memory, etc. Each camera may include at least one or more lenses and an image sensor. The image sensor may include a color filter array (such as a Bayer filter). The image sensor may obtain light intensity and wavelength information captured by each imaging pixel of the image sensor, and provide a set of raw image data that can be processed by an image signal processor.
[0190] The audio circuit 15 can be used to provide an audio interface between a user and an electronic device through a speaker and a microphone. The audio circuit 15 includes a microphone. The microphone is electrically connected to the processor 11. The microphone is used to receive voice information input by the user.
[0191] The sensor 16 is used to collect information of the electronic device itself, the user's information, or the external environment information. For example, the sensor 16 may include one or more sensors such as a vibration sensor, a temperature sensor, a distance sensor, a magnetic field sensor, a light sensor, an acceleration sensor, a fingerprint sensor, a Hall sensor, a position sensor, a gyroscope, an inertial sensor, a posture sensor, a barometer, and a heart rate sensor.
[0192] The power supply 17 is used to supply power to various components of the electronic device 10. In some embodiments, the power supply 17 may be logically connected to the processor 11 through a power management system, so that the power management system can manage charging, discharging, power consumption, and other functions.
[0193] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement any one of the product recommendation methods provided in the above-mentioned embodiments.
[0194] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0195] Since the instructions stored in the storage medium can execute the steps in any one of the product recommendation methods provided in the embodiments of the present application, the beneficial effects that can be achieved by any one of the product recommendation methods provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0196] In the embodiments provided in this specification, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0197] For the commodity recommendation device of the embodiment of the present application, each functional module can be integrated into a processing chip, or each module can exist physically separately, or two or more modules can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0198] The above disclosure is only the preferred embodiment of this specification, which certainly cannot be used to limit the scope of rights of this specification. Therefore, equivalent changes made according to the claims of this specification are still within the scope covered by this specification.
[0199] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Claims
1. A product recommendation method, characterized in that: The method comprises: Obtaining a first product that a user to be recommended has historically interacted with in a first product recommendation channel, a user set corresponding to at least one second product recommendation channel, and a second product that each user in the user set has historically interacted with in the second product recommendation channel; Inputting the first commodity, the user set, and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended, where the commodity to be recommended is a commodity among the plurality of the second commodities; The commodity to be recommended is recommended to the user to be recommended through the first commodity recommendation channel.
2. The method according to claim 1, characterized in that: The step of inputting the first commodity, the user set, and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended includes: Based on the first commodity and the plurality of the second commodities, a target user is screened out from the user set, wherein the target user is a user who has a similar commodity interaction interest as the user to be recommended; The target product corresponding to the target user and the first product are integrated, and feature extraction is performed to obtain potential interest features of the user to be recommended; Determine a product to be recommended based on the potential interest feature and the target product.
3. The method according to claim 2, characterized in that: The step of selecting a target user from the user set based on the first commodity and the second commodity includes: determining a correlation degree between each of the second commodities and the first commodity; The user corresponding to the second commodity whose correlation degree is greater than or equal to the preset correlation degree in the user set is determined as the target user.
4. The method according to claim 2, characterized in that: The determining of the product to be recommended according to the potential interest feature and the target product includes: Extracting product features of each of the target products to obtain multiple product features; The potential interest feature is matched with each of the product features to determine the user's preference for each target product, and the product whose preference reaches a preference threshold is determined as a product to be recommended.
5. A method for training a commodity recommendation network model applied to the commodity recommendation method according to any one of claims 1 to 4, characterized in that: The method comprises: Acquire an observation sample data set, the observation sample data set including user sets corresponding to at least two product recommendation channels, and products historically interacted by users in each of the user sets under the corresponding product recommendation channels; Build a product recommendation network model to be trained; Inputting the user set and the products in the observed sample data set into the product recommendation network model to be trained to obtain the target recommended product corresponding to each user; The product recommendation network model to be trained is trained based on the target product to be recommended, and the model parameters of the product recommendation network model to be trained are iteratively updated until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
6. The method according to claim 5, characterized in that The step of training the commodity recommendation network model to be trained based on the target commodity to be recommended and iteratively updating the model parameters of the commodity recommendation network model to be trained includes: Determining a first propensity score based on the potential interest feature of each of the users, the corresponding target product to be recommended, and the first model parameter of the propensity model to be trained; Inputting the target recommended product corresponding to each user into the error model to be trained to obtain a first preference degree between each user and the corresponding target recommended product; Obtaining a second preference degree between each user and the corresponding target commodity to be recommended calculated by the commodity recommendation network model to be trained; Based on the first preference degree, the second preference degree and the first propensity score, the product recommendation network model to be trained is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
7. The method according to claim 6, characterized in that The step of training the product recommendation network model to be trained and iteratively updating the model parameters of the product recommendation network model to be trained based on the first preference degree, the second preference degree and the first propensity score includes: Obtaining an estimated preference degree for each user and the corresponding target product to be recommended; Calculating a difference between the estimated preference level and the first preference level to obtain a first prediction error predicted by the error model to be trained; Calculating a difference between the estimated preference level and the second preference level to obtain a second prediction error predicted by the product recommendation network model to be trained; Based on the first prediction error, the second prediction error and the first propensity score, the product recommendation network model to be trained is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
8. The method according to claim 7, characterized in that The step of training the product recommendation network model to be trained and iteratively updating the model parameters of the product recommendation network model to be trained based on the first prediction error, the second prediction error, and the first propensity score includes: Based on the first prediction deviation, the second prediction deviation and the first propensity score, the propensity model to be trained, the error model to be trained and the product recommendation network model to be trained are trained to obtain a trained propensity model, a trained error model and a trained product recommendation network model; Acquire a whole sample data set, and use the trained propensity model to calculate a second propensity score of the whole sample data set; The trained error model is used to calculate the third preference degree between each user and the corresponding recommended product in the entire sample data set; Based on the second propensity score and the third preference degree, the trained product recommendation network model is trained and model parameters of the product recommendation network model to be trained are iteratively updated.
9. A commodity recommendation device, characterized in that: The device comprises: A first acquisition unit is used to acquire a first product that a user to be recommended has historically interacted with in a first product recommendation channel, a user set corresponding to at least one second product recommendation channel, and a second product that each user in the user set has historically interacted with in the second product recommendation channel; A first input unit is used to input the first commodity, the user set and the second commodity into a commodity recommendation network model to obtain a commodity to be recommended, where the commodity to be recommended is a commodity among the plurality of the second commodities; A recommendation unit is used to recommend the commodity to be recommended to the user to be recommended under the first commodity recommendation channel.
10. A training device for a commodity recommendation network model applied to the commodity recommendation method according to any one of claims 1 to 4, characterized in that: The method comprises: A second acquisition unit is used to acquire an observation sample data set, wherein the observation sample data set includes user sets corresponding to at least two product recommendation channels, and products historically interacted by users in each user set under the corresponding product recommendation channel; A construction unit, used to construct a product recommendation network model to be trained; A second input unit is used to input the user set and the products in the observation sample data set into the product recommendation network model to be trained to obtain the target product to be recommended corresponding to each user; The training unit is used to train the product recommendation network model to be trained based on the target product to be recommended and iteratively update the model parameters of the product recommendation network model to be trained until the product recommendation network model to be trained converges to obtain a trained product recommendation network model.
11. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable program codes; A processor, configured to call and run the executable program code from the memory, so that the electronic device executes the method as claimed in any one of claims 1 to 8.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 8 is implemented.
