Product recommendation method, training method, device, electronic device, and medium

By processing user data through an intent classification layer and an attention mechanism layer, and combining this with an output layer for personalized product recommendations, this technology solves the problem of inaccurate recommendations in existing technologies and achieves product recommendations that better meet user needs.

CN116308641BActive Publication Date: 2025-12-26INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310195325.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-24
Publication Date
2025-12-26
Estimated Expiration
2043-02-24

AI Technical Summary

Technical Problem

Existing e-commerce platforms' product recommendation methods fail to effectively consider users' interests and behavioral intentions, and cannot recommend products to meet the personalized needs of different users.

Method used

User data is processed through an intent classification layer, and user behavioral intent and product interest feature vectors are extracted using an attention mechanism layer. These are then combined with the output layer for personalized recommendations.

Benefits of technology

It enables more accurate product recommendations based on user behavior and interests, thus meeting users' personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116308641B_ABST
    Figure CN116308641B_ABST
Patent Text Reader

Abstract

The present disclosure provides a product recommendation method, relates to the technical field of computers, and can be used in the field of financial technology. The method comprises the following steps: acquiring a user data set of a user; inputting the user data set into a pre-trained trained product recommendation model to obtain a target recommended product, wherein the product recommendation model comprises an intention classification layer, an attention mechanism layer, and an output layer; inputting the user data set into the trained product recommendation model to obtain the target recommended product, which comprises the following steps: processing the user data set by using the intention classification layer to obtain a first feature vector set corresponding to the behavior intention of the user; processing the first feature vector set and the user data set by using the attention mechanism layer to obtain a second feature vector set corresponding to the product of interest of the user; and inputting the second feature vector set, a user feature vector set, and a product feature vector set into the output layer to obtain the target recommended product. The present disclosure also provides a training method and device, an electronic device, and a medium.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computers, which can be used in the financial field, and in particular to a product recommendation method, a training method, an apparatus, an electronic device and a medium. BACKGROUND

[0002] In the existing e-commerce field, there are various product recommendation methods. An e-commerce platform can recommend products consistent with the categories of historical purchase products of a user to the user according to the historical purchase products of the user. The inventors have found that the related art has the following problems: related product recommendations are mostly based on the subjective intentions of a research and development team or classify products based on the attributes of products in an e-commerce platform, and the classification standards established according to the subjective ideas of a single person or team are used to recommend goods to users, without considering the interest degrees of users in all product categories and the behavior intentions of users when purchasing products, and cannot make personalized recommendations based on user needs. SUMMARY

[0003] In view of the above problems, the present disclosure provides a product recommendation method, a training method, an apparatus, an electronic device, a medium and a computer program product.

[0004] According to one aspect of the present disclosure, a product recommendation method is provided, comprising:

[0005] obtaining a user data set of a user; and

[0006] inputting the user data set into a trained product recommendation model to obtain a target recommended product,

[0007] wherein the product recommendation model comprises an intention classification layer, an attention mechanism layer and an output layer;

[0008] The above inputting the user data set into the trained product recommendation model to obtain the target recommended product comprises:

[0009] processing the user data set using the intention classification layer to obtain a first feature vector set corresponding to the behavior intention of the user;

[0010] processing the first feature vector set and the user data set using the attention mechanism layer to obtain a second feature vector set corresponding to the product of interest of the user;

[0011] inputting the second feature vector set, a user feature vector set and a product feature vector set into the output layer to obtain the target recommended product,

[0012] wherein the user feature vector set and the product feature vector set are obtained according to the user data set.

[0013] According to an embodiment of the present disclosure, the processing of the user data set by the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user comprises:

[0014] According to the user data set, a user historical data set is obtained; and

[0015] The user historical data set is processed by the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user.

[0016] According to an embodiment of the present disclosure, the processing of the user historical data set by the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user comprises:

[0017] The historical data matrix corresponding to the user is determined according to the user historical data set by the intention classification layer;

[0018] According to the historical data matrix, a first interest degree matrix and a second interest degree matrix are obtained; and

[0019] According to the first interest degree matrix, the second interest degree matrix and the user data set, the first feature vector set corresponding to the behavior intention of the user is obtained.

[0020] According to an embodiment of the present disclosure, the processing of the first feature vector set and the user data set by the attention mechanism layer to obtain the second feature vector set corresponding to the product of interest of the user comprises:

[0021] According to the user data set, a historical behavior sequence of the user is obtained;

[0022] According to the first feature vector set, a weight factor corresponding to the historical behavior sequence is obtained; and

[0023] According to the weight factor and the historical behavior sequence, the second feature vector set corresponding to the product of interest of the user is obtained.

[0024] According to an embodiment of the present disclosure, the product recommendation method further comprises:

[0025] According to the user data set, a historical behavior sequence of the user is obtained; and

[0026] The historical behavior sequence is divided into the product feature vector set according to a preset time interval.

[0027] According to another aspect of the present disclosure, a training method of a product recommendation model is provided, comprising:

[0028] A training sample data set is obtained;

[0029] inputting the training sample set into the product recommendation model to be trained, and outputting a recommended product.

[0030] According to an embodiment of the present disclosure, the obtaining of the training sample data set comprises:

[0031] obtaining a sample historical behavior sequence according to the user sample data set;

[0032] dividing the sample historical behavior sequence according to a preset time interval to obtain a sample product feature vector set, wherein the sample product feature vector set comprises a sample historical data product feature vector set and a sample historical data product feature vector set; and

[0033] obtaining the training sample data set based on the sample historical data product feature vector set and the sample historical data product feature vector set.

[0034] According to an embodiment of the present disclosure, the training method of the product recommendation model further comprises:

[0035] inputting the training sample set into the product recommendation model to be trained to obtain a sample historical data matrix, a first sample interest degree matrix and a second sample interest degree matrix;

[0036] inputting the sample historical data matrix, the first sample interest degree matrix and the second sample interest degree matrix into a loss function to output a loss result;

[0037] iteratively adjusting network parameters of the product recommendation model to be trained according to the loss result until an iterative convergence condition is met; and

[0038] generating the product recommendation model trained according to the network parameters of the product recommendation model to be trained under the condition that the iterative convergence condition is met.

[0039] According to another aspect of the present disclosure, a product recommendation device is provided, comprising:

[0040] a first obtaining module configured to obtain a user data set of a user; and

[0041] a first output module configured to input the user data set into a trained product recommendation model to obtain a target recommended product, wherein the product recommendation model comprises an intention classification layer, an attention mechanism layer and an output layer;

[0042] the first output module comprises a first processing submodule, a second processing submodule and a first output submodule;

[0043] The first processing submodule is configured to process the user data set by using the intention classification layer to obtain a first feature vector set corresponding to the behavior intention of the user.

[0044] The second processing submodule is configured to process the first feature vector set and the user data set by using the attention mechanism layer to obtain a second feature vector set corresponding to the product of interest of the user.

[0045] The first output submodule is configured to input the second feature vector set, the user feature vector set and the product feature vector set into the output layer to obtain a target recommended product.

[0046] The user feature vector set and the product feature vector set are obtained according to the user data set.

[0047] According to another aspect of the present disclosure, a product recommendation model training device is provided, comprising:

[0048] The second acquisition module is configured to acquire a training sample data set.

[0049] The second output module is configured to input the training sample set into a product recommendation model to be trained to output a recommended product.

[0050] According to another aspect of the present disclosure, an electronic device is provided, comprising:

[0051] One or more processors;

[0052] A memory configured to store one or more instructions,

[0053] When the one or more instructions are executed by the one or more processors, the one or more processors implement the method as described above.

[0054] According to another aspect of the present disclosure, a computer readable storage medium is provided, which stores executable instructions, and the executable instructions are executed by a processor to implement the method as described above.

[0055] According to another aspect of the present disclosure, a computer program product is provided, which comprises computer executable instructions, and the computer executable instructions are executed to implement the method as described above.

[0056] The product recommendation method, the training method, the device, the electronic device, the medium and the computer program product provided according to the present disclosure, the user data set is processed through the intention classification layer to obtain a first feature vector set, the first feature vector set and the user data set are processed through the attention mechanism layer to obtain a second feature vector set, and then a target recommended product is obtained. Since the first feature vector set is related to the behavior intention of the user, when the second feature vector set corresponding to the product of interest of the user is obtained, the operation of classifying the product of interest of the user is associated with the behavior intention of the user. Since the behavior intention of the user can reflect the demand of the user, the target recommended product obtained through the second feature vector set is more in line with the use demand of the user. Based on the above technical means, at least part of the technical problems that the related art cannot accurately recommend products for users are overcome, so as to realize personalized recommendation for different users. BRIEF DESCRIPTION OF DRAWINGS

[0057] The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments of the present disclosure, taken in conjunction with the accompanying drawings, in which:

[0058] Figure 1 The system architecture of the product recommendation method and the training method of the product recommendation model according to an embodiment of the present disclosure is schematically shown.

[0059] Figure 2 The flowchart of the product recommendation method according to an embodiment of the present disclosure is schematically shown.

[0060] Figure 3 The flowchart of obtaining the first feature vector set corresponding to the behavior intention of the user according to an embodiment of the present disclosure is schematically shown.

[0061] Figure 4 The flowchart of the product recommendation method according to another embodiment of the present disclosure is schematically shown.

[0062] Figure 5 The flowchart of the training method of the product recommendation model according to an embodiment of the present disclosure is schematically shown.

[0063] Figure 6 The block diagram of the product recommendation device according to an embodiment of the present disclosure is schematically shown.

[0064] Figure 7 The block diagram of the training device of the product recommendation model according to an embodiment of the present disclosure is schematically shown.

[0065] Figure 8 The block diagram of the electronic device suitable for implementing the product recommendation method and the training method of the product recommendation model according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0066] Embodiments of the present disclosure will be described below with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present disclosure. In the following detailed description, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. However, it will be apparent to one skilled in the art that one or more embodiments can be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques have been omitted to avoid unnecessarily obscuring the concepts of the present disclosure.

[0067] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used herein, the term "includes" and tautological expressions thereof, such as "including," "includes," "include," "contains," "containing," and so on, mean the presence of zero, one or more of a feature, step, operation, and / or component, but do not exclude the presence or addition of one or more other features, steps, operations, or components.

[0068] All terms used herein, including technical and scientific terms, have the meanings commonly understood by one of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having meanings consistent with the context of the specification, and should not be interpreted in an idealized or overly formal manner.

[0069] In the case of using expressions similar to "at least one of A, B, and C, etc.", it should generally be interpreted that the meaning of the expression is at least one of the items listed before the conjunction, and pluralities thereof (e.g., "a system having at least one of A, B, and C" should include but not be limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.). In the case of using expressions similar to "at least one of A, B, or C, etc.", it should generally be interpreted that the meaning of the expression is at least one of the items listed after the conjunction (e.g., "a system having at least one of A, B, or C" should include but not be limited to a system having A alone, a system having B alone, a system having C alone, a system having both A and B, a system having both A and C, a system having both B and C, and / or a system having A, B, and C, etc.).

[0070] In the technical solutions of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure, and application of data (such as including but not limited to user personal information) involved in the technical solutions comply with the relevant legal regulations, necessary security measures are taken, and do not violate public order and good customs.

[0071] In the technical solutions of the present disclosure, the authorization or consent of the user is obtained before the user's personal information is acquired or collected.

[0072] In the process of implementing the concept of the present disclosure, it can be found that:

[0073] For a plurality of products included in an e-commerce platform, different classifications can be made according to different standards. Taking financial products as an example, financial products can be classified into two categories: underlying securities (such as stocks, bonds) and derivative securities (such as futures, options). However, financial products can also be classified into non-fixed income products (such as stocks, funds, options) and fixed products (such as bonds and credit products) according to expected returns.

[0074] For users, when recommending products to users, classifying products according to different interests of users and then recommending products in the category that the user is interested in to the user are more likely to meet the needs of the user. For example, user historical data shows that user A purchases more high-risk financial products, and user B purchases more low-risk financial products; recommending products to user A and user B according to the risk level of financial products, recommending products in the same high-risk product category to user A is more likely to be accepted by user A, and recommending products in the same high-risk product category to user B is more likely to be rejected by user B. If user C prefers to choose fixed products managed by professionals, it is not suitable to recommend products to user C according to the risk level of financial products.

[0075] The related recommendation method does not consider the interest degree of the user in all categories and the behavior intention, and in the case that the product classification angles of a plurality of users correspond to different tendencies, the standardized classification established by the subjective ideas of a single person or team classifies the goods according to the subjective or artificial intention, and the classification standard established by the subjective ideas of a single person or team standardizes the preferences of all users on the platform, which cannot well meet the personalized needs of the users.

[0076] In addition, it is also necessary to understand the interest degree of the user in all categories, and it is not necessarily true that the user only likes n categories after n categories are obtained based on the visible user purchase product classification, and the user has no interest in other categories of products. Similarly, for the intention of behavior, the behavior intention of the user cannot be standardized by the subjective ideas of a single person. The present application attempts to make more personalized recall in the granularity of behavior, comprehensively considers the user attributes, the behavior intention, the connection between the purchased products and other factors, and recommends products to the user that are strongly related to the behavior of the user.

[0077] Therefore, the present disclosure considers the behavior intention factor that general recommendation methods do not consider when classifying products, obtains the interest degree of the user in the click or purchase scenario of the specific product, and then can obtain a more accurate behavior intention of the user, classifies the granularity of the product more personalized in combination with the behavior intention of the user, so as to realize the recommendation of the product that meets the intention of the user to the user.

[0078] According to embodiments of this disclosure, the product recommendation method includes: acquiring a user data set; inputting the user data set into a trained product recommendation model to obtain a target recommended product, wherein the product recommendation model includes: an intent classification layer, an attention mechanism layer, and an output layer; inputting the user data set into the trained product recommendation model to obtain the target recommended product includes: processing the user data set using the intent classification layer to obtain a first feature vector set corresponding to the user's behavioral intent; processing the first feature vector set and the user data set using the attention mechanism layer to obtain a second feature vector set corresponding to the user's products of interest; inputting the second feature vector set, the user feature vector set, and the product feature vector set into the output layer to obtain the target recommended product, wherein the user feature vector set and the product feature vector set are obtained based on the user data set.

[0079] It should be noted that the product recommendation method, product recommendation model training method, product recommendation device, and product recommendation model training device provided in this disclosure can be used in the fields of computer technology and fintech, such as for financial product recommendation. The product recommendation method, product recommendation model training method, product recommendation device, and product recommendation model training device provided in this disclosure can also be used in any field other than computer technology and fintech, such as for recommending other types of products. The application areas of the product recommendation method, product recommendation model training method, product recommendation device, and product recommendation model training device provided in this disclosure are not limited.

[0080] Figure 1 The system architecture of the product recommendation method and the training method of the product recommendation model according to embodiments of the present disclosure is illustrated schematically.

[0081] like Figure 1 As shown, network 104 is a medium used to provide a communication link between terminal devices 101, 102, 103 and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0082] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social media platform software, etc. (for example only).

[0083] Terminal devices 101, 102, and 103 can be various electronic devices with displays and web browsing capabilities, including but not limited to smartphones, tablets, laptops, and desktop computers.

[0084] The server 105 can be a server that provides various services, such as a background management server that provides support for applications used by users using the terminal devices 101, 102, and 103 (as an example). The background management server can perform analysis and the like on received user requests and the like, and feed back the processing results (such as a web page, information, or data obtained or generated according to a user request) to the terminal devices.

[0085] It should be noted that the task scheduling method provided by the embodiments of the present disclosure can generally be executed by the terminal device 101, 102, or 103, or can be executed by other terminal devices different from the terminal device 101, 102, or 103. Accordingly, the task scheduling apparatus provided by the embodiments of the present disclosure can be arranged in the terminal device 101, 102, or 103, or arranged in other terminal devices different from the terminal device 101, 102, or 103.

[0086] Alternatively, the task scheduling method provided by the embodiments of the present disclosure can also be executed by the server 105. Accordingly, the task scheduling apparatus provided by the embodiments of the present disclosure can also be arranged in the server 105. The task scheduling method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal device 101, 102, 103 and / or the server 105. Accordingly, the task scheduling apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the terminal device 101, 102, 103 and / or the server 105.

[0087] It should be noted that the task processing method provided by the embodiments of the present disclosure can generally be executed by the server 105. Accordingly, the task processing apparatus provided by the embodiments of the present disclosure can generally be arranged in the server 105. The task processing method provided by the embodiments of the present disclosure can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal device 101, 102, 103 and / or the server 105. Accordingly, the task processing apparatus provided by the embodiments of the present disclosure can also be arranged in a server or a server cluster different from the server 105 and capable of communicating with the terminal device 101, 102, 103 and / or the server 105.

[0088] Alternatively, the task processing method provided by the embodiments of the present disclosure can also be executed by the terminal device 101, 102, or 103, or by other terminal devices different from the terminal device 101, 102, or 103. Accordingly, the task processing apparatus provided by the embodiments of the present disclosure can also be arranged in the terminal device 101, 102, or 103, or in other terminal devices different from the terminal device 101, 102, or 103.

[0089] It should be understood that Figure 1 The number of terminal devices, networks, and servers in the above scenario is only illustrative. Any number of terminal devices, networks, and servers can be provided according to implementation needs.

[0090] The product recommendation method according to the embodiments of the present disclosure will be described in detail below based on the scenario described above. Figure 1 Figures 2-4 The product recommendation method according to the embodiments of the present disclosure will be described in detail below based on the scenario described above.

[0091] It should be noted that the serial numbers of the various operations in the following method are only used to represent the operations for description, and should not be regarded as representing the execution sequence of the various operations. Unless explicitly indicated, the method does not need to be executed in the order shown.

[0092] Figure 2 A flowchart of the product recommendation method according to the embodiments of the present disclosure is schematically shown.

[0093] As shown in Figure 2 The product recommendation method 200 includes operations S210-S220.

[0094] In operation S210, a user data set of a user is obtained.

[0095] In operation S220, the user data set is input into a trained product recommendation model to obtain a target recommended product, wherein the product recommendation model includes an intention classification layer, an attention mechanism layer, and an output layer; and obtaining the target recommended product by inputting the user data set into the trained product recommendation model includes: processing the user data set by using the intention classification layer to obtain a first feature vector set corresponding to a behavior intention of the user; processing the first feature vector set and the user data set by using the attention mechanism layer to obtain a second feature vector set corresponding to a product of interest of the user; and inputting the second feature vector set, a user feature vector set, and a product feature vector set into the output layer to obtain the target recommended product, wherein the user feature vector set and the product feature vector set are obtained according to the user data set.

[0096] According to the embodiments of the present disclosure, the authorization or consent of the user is obtained before the technical solution of the present disclosure acquires or collects the personal information of the user in order to obtain the user data set. ​

[0097] According to an embodiment of the present disclosure, the user data can include data representing user attributes such as gender, age, label, geographical location of the user, and the like, and can further include data representing user behaviors, but is not limited thereto, and can further include data that can represent the user, and a person skilled in the art can obtain user data according to actual needs, and then obtain a user data set by integrating the user data according to the user data. The user data can be obtained according to actual needs, and the present disclosure does not limit this.

[0098] According to an embodiment of the present disclosure, the trained product recommendation model can obtain product categories that the user can be interested in according to the user data set, and then recommend target recommended products to the user. The trained product recommendation model can classify the products that the user can be interested in according to the user's behavior intention.

[0099] According to an embodiment of the present disclosure, the user's behavior intention can represent the user's behavior tendency for the product of interest when the user performs a behavior related to the product of interest.

[0100] According to an embodiment of the present disclosure, the trained product recommendation model can obtain user behavior data and user behavior corresponding product data that the user can be interested in based on the user data set. By processing the user behavior data and the user behavior corresponding product data that the user can be interested in through the trained product recommendation model, the user's behavior intention can be classified according to the user's behavior intention, and the same type of product can be obtained based on the product category that the user can be interested in, thereby achieving the target recommended product recommendation to the user.

[0101] According to an embodiment of the present disclosure, the intention classification layer can be constructed based on a graph neural network model, and the intention classification layer can cluster the behavior intention corresponding to the user behavior according to the user data set. The clustering of the behavior intention can obtain a first feature vector set corresponding to the user's behavior intention.

[0102] According to an embodiment of the present disclosure, the user behavior data and the user behavior corresponding product data that the user can be interested in obtained from the user data set can be analyzed through the intention classification layer, and the relationship between the user behavior data and the user behavior corresponding product data that the user can be interested in can be analyzed, thereby obtaining a first feature vector set corresponding to the user's behavior intention.

[0103] According to an embodiment of the present disclosure, the first feature vector set obtained through the intention classification layer can be used to filter the user data set through the attention mechanism layer, thereby obtaining a second feature vector set corresponding to the user's behavior intention and the product of interest of the user.

[0104] According to an embodiment of the present disclosure, in the output layer, the second feature vector set can be subjected to similarity calculation with the product feature vector set related to the user to obtain a product feature vector with high relevance to the user, and then a corresponding target recommended product is obtained.

[0105] According to an embodiment of the present disclosure, the user data set is processed by the intention classification layer to obtain the first feature vector set, and the first feature vector set and the user data set are processed by the attention mechanism layer to obtain the second feature vector set, and then the target recommended product is obtained. Since the first feature vector set is related to the behavior intention of the user, when the second feature vector set corresponding to the product of interest of the user is obtained, the operation of classifying the product of interest of the user is associated with the behavior intention of the user. Since the behavior intention of the user can reflect the demand of the user, the target recommended product obtained through the second feature vector set is more in line with the use demand of the user. Based on the above technical means, at least part of the technical problems that the related art cannot accurately recommend products for users are overcome, so as to realize personalized recommendation for different users.

[0106] Figure 3 A flowchart for obtaining the first feature vector set corresponding to the behavior intention of the user according to an embodiment of the present disclosure is schematically shown.

[0107] As shown in Figure 3 In operation S220, the user data set is processed by the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user, which can include operations S310-S320.

[0108] In operation S310, the user historical data set is obtained according to the user data set.

[0109] In operation S320, the user historical data set is processed by the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user.

[0110] According to an embodiment of the present disclosure, the user historical data set can include data representing user behavior. The data of user behavior includes but is not limited to data of the user browsing products in the page, data of the user clicking products in the page, and data of the user purchasing products in the page. The user historical data set reflects the user's preference for products to some extent. Since the purchase behavior of the user can reflect the user's preference for products to a large extent and more truly reflect the demand of the user, the user historical data set including the purchase behavior of the user can be taken as input, and the intention classification layer is used to process the user historical data set to obtain the first feature vector set corresponding to the behavior intention of the user.

[0111] According to an embodiment of the present disclosure, in order to realize personalized recommendation for different users, the purchase behavior of a user can be associated with the user attribute, for example, the attribute data of the user (which can be inherent attribute data of the user including gender, age, etc., and can also be social attribute data of the user including identity tags, geographic location, etc.) can be associated with the purchase behavior data of the user, to obtain a user purchase behavior vector associated with the user attribute, and a user historical data set is obtained based on the user purchase behavior vector associated with the user attribute.

[0112] According to an embodiment of the present disclosure, the embedding vector is a set of language modeling and feature learning techniques in word embedding natural language processing (NLP), in which a word or phrase from a vocabulary is mapped to a vector of real numbers, which involves mathematical embedding from a multi-dimensional space of each word to a continuous vector space with lower dimension.

[0113] According to an embodiment of the present disclosure, in the case of obtaining a user historical data set based on a user purchase behavior vector associated with a user attribute, the user purchase behavior vector associated with the user attribute can be processed to obtain a user behavior embedding vector. Based on the user behavior embedding vector, a more fine-grained behavior intention category based on user behavior is classified, and a first feature vector set is obtained, wherein the first feature vector set can be a vector in the form of an embedding vector.

[0114] According to an embodiment of the present disclosure, when the user historical data set is processed by the intention classification layer to obtain a first feature vector set, the embedding vector set of the user's purchase behavior is processed, which can reduce the processing time while retaining the association between the user's purchase behavior and the user himself, and further realizing personalized recommendation for different users.

[0115] According to an embodiment of the present disclosure, in operation S320, processing the user historical data set by the intention classification layer to obtain a first feature vector set corresponding to the behavior intention of the user can include the following operations.

[0116] Using the intention classification layer, a historical data matrix corresponding to the user is determined according to the user historical data set. According to the historical data matrix, a first interest degree matrix and a second interest degree matrix are obtained. According to the first interest degree matrix, the second interest degree matrix and the user data set, a first feature vector set corresponding to the behavior intention of the user is obtained.

[0117] According to an embodiment of the present disclosure, the user behavior embedding vector can be processed by using an intention classification layer, and a history data matrix corresponding to the behavior of the user and the purchased product of the user can be constructed by using the user behavior embedding vector. The intention classification layer can further cluster the behavior intention corresponding to the behavior of the user according to the history data matrix, and obtain a behavior intention vector. Based on the behavior intention vector and the history data matrix, a first interest degree matrix and a second interest degree matrix can be obtained.

[0118] According to an embodiment of the present disclosure, the first interest degree matrix includes an interest degree between the user and the corresponding behavior intention. The second interest degree matrix includes an interest degree between the behavior of the user and the corresponding behavior intention. According to the first interest degree matrix and the second interest degree matrix, a probability that the behavior of the user belongs to each behavior intention in the behavior intention vector can be calculated, the behavior of the user can be classified into the behavior intention corresponding to the maximum probability, and a first feature vector set can be obtained based on the behavior of the user and the corresponding behavior intention.

[0119] According to an embodiment of the present disclosure, the clustering of the behavior intention realized by the intention classification layer is based on statistical analysis of the user behavior and then automatically clustered, and does not need to be classified by the individual subjective idea of the behavior intention. The first feature vector set obtained includes the data related to the behavior of the user, and a more accurate behavior intention of the user can be obtained.

[0120] According to an embodiment of the present disclosure, in operation S320, processing the first feature vector set and the user data set by using the attention mechanism layer to obtain the second feature vector set corresponding to the product of interest of the user can include the following operations.

[0121] According to the user data set, a historical behavior sequence of the user is obtained. According to the first feature vector set, a weight factor corresponding to the historical behavior sequence is obtained. According to the weight factor and the historical behavior sequence, the second feature vector set corresponding to the product of interest of the user is obtained.

[0122] According to an embodiment of the present disclosure, the attention mechanism layer can be obtained based on a deep learning model.

[0123] According to an embodiment of the present disclosure, by using the attention mechanism layer, the first feature vector set is used for attention operation on the historical behavior sequence of the user, that is, the first feature vector set is used as a weight factor in the attention mechanism, so that the attention mechanism layer identifies the key behavior of the user in the historical behavior sequence based on the weight factor. The key behavior can be an embedding vector of the product of interest of the user in a short period of time, so as to determine the second feature vector set corresponding to the product of interest of the user.

[0124] According to an embodiment of the present disclosure, the Q, K, and V of the attention mechanism can follow the concept of information retrieval, Q is the information to be queried, K is the vector to be queried, and V is the value obtained by querying (i.e., the matching result). V can be regarded as a vector representing a single input feature. In the case of directly inputting a group of V into a deep learning model for training, the deep learning model does not introduce an attention mechanism, and cannot perform weighted processing on a specific vector in the group of V. However, the deep learning model with the introduced attention mechanism can multiply the group of V by a group of weights, so as to achieve a focused attention on the input features.

[0125] According to an embodiment of the present disclosure, the product recommendation model to be trained performs attention operation on the historical behavior sequence of the user by using the first feature vector set, that is, uses the first feature vector set as Query (Q) in the attention mechanism, and the key behavior of the user in the historical behavior sequence. The key behavior can be the embedding vector of the product of interest of the user in the short term, so as to determine the second feature vector set (V) corresponding to the product of interest of the user. Then, the second feature vector set, the user feature vector set, and the product feature vector set are input into the output layer to obtain the target recommended product.

[0126] According to an embodiment of the present disclosure, by using the attention mechanism layer, the data related to the purchase behavior of the user in the historical behavior sequence of the user is strengthened according to the first feature vector set corresponding to the behavior intention of the user, and the product of interest of the user is extracted, and then the embedding vector of the product of interest of the user in the short term is obtained. Based on the embedding vector of the product of interest of the user in the short term, the second feature vector set corresponding to the product of interest of the user can be determined. After processing the first feature vector set corresponding to the behavior intention of the user and the historical behavior sequence of the user, the classification of the obtained product is related to the behavior intention of the user, so that the vector data included in the second feature vector set more accurately reflects the product of interest of the user.

[0127] According to an embodiment of the present disclosure, the product recommendation method further comprises:

[0128] The historical behavior sequence of the user is obtained according to the user data set. The historical behavior sequence is divided according to a preset time interval to obtain the product feature vector set.

[0129] According to an embodiment of the present disclosure, product data browsed by a user can be obtained from a user data set, and product data that the user can be interested in can be obtained. In the product data browsed by the user, actual purchase is a low-frequency behavior. If only the data of products purchased by the user is focused on from more browsing data, the product data that the user can be interested in obtained therefrom can be insufficient, and cannot well reflect the actual demand of the user. Therefore, the data of products clicked by the user can be obtained at the same time as the data of products purchased by the user, so that more data related to the user can be obtained.

[0130] According to an embodiment of the present disclosure, the session sequence data related to the user interest product can be obtained by dividing the time interval of the data of products purchased by the user and the data of products clicked by the user.

[0131] According to an embodiment of the present disclosure, obtaining the session sequence data based on the click behavior can include the following operations: sorting the click behavior of the user into a long sequence in ascending order of time information. Removing the click behavior in the long sequence with a page stay time less than a first preset time interval, so as to remove the noise of the browsing behavior. Dividing the long sequence after noise removal according to a second preset time interval to obtain a plurality of session sequences. It can be considered that the correlation between the click behaviors of the user in the same second preset time interval is greater than the correlation between the click behaviors of the user not in the same second preset time interval.

[0132] According to an embodiment of the present disclosure, the first preset time interval can be set to 30 seconds, and the second preset time interval can be set to 30 minutes. However, the specific values of the first preset time interval and the second preset time interval can be changed according to actual needs by those skilled in the art, so that the plurality of session sequences obtained are more in line with the actual needs of the user, and the present disclosure is not limited thereto.

[0133] According to an embodiment of the present disclosure, the session sequence can include the product (item) clicked by the user corresponding to the purchase behavior and the item clicked by the user without the purchase behavior. The embedding vector of the product purchased by the user and the embedding vector of the user interest product can be obtained according to the plurality of session sequences.

[0134] Figure 4 A flowchart of a product recommendation method according to another embodiment of the present disclosure is schematically shown.

[0135] As Figure 4As shown, the product recommendation method can include operations S410-S450.

[0136] In operation S410, a user data set of a user is acquired.

[0137] In operation S420, a user data vector set is acquired from the user data set by using a feature extraction layer.

[0138] In operation S430, a first feature vector set is determined from the user data vector set by using an intention classification layer.

[0139] In operation S440, a second feature vector set is determined from the user data vector set and the first feature vector set by using an attention mechanism layer.

[0140] In operation S450, a target recommended product is determined from the user data vector set and the second feature vector set by using an output layer.

[0141] According to an embodiment of the present disclosure, in operation S420, the feature extraction layer can be constructed by a Skip-gram model in Word2vec, and the user data vector set is acquired by using the feature extraction layer. The user data vector set can include at least one of the following vector sets: a user feature vector set and a user behavior embedding vector. The user behavior embedding vector can further include an embedding vector corresponding to a product on which the user has generated a purchase behavior and an embedding vector corresponding to a product of interest of the user.

[0142] According to an embodiment of the present disclosure, a user behavior data set needs to be obtained. The user behavior data set that best reflects the user's intention should be the goods that the user has purchased, and therefore, this data is used to construct a historical data matrix of the user (user) and the product (item) in this paper. i ) in this paper.

[0143] According to an embodiment of the present disclosure, the intention classification layer can be constructed by a Latent factor model (LFM). By analyzing the vector data, a historical data matrix is obtained, and the historical data matrix is processed based on the LFM. The first feature vector set can be determined by classifying the user behavior data included in the historical data matrix.

[0144] According to an embodiment of the present disclosure, the LFM algorithm extracts several scenarios (which can be defined as behavior intentions) from the data set as a bridge connecting the user (user) and the behavior (behavior). i j

[0145] ​​According to embodiments of this disclosure, the historical data matrix can be as shown in formula (1).

[0146]

[0147] In the formula, R UB It is a historical data matrix, obtained based on user-behavior relationships, in R. UB The matrix value R included in ij It is user i behavior j interest level; P U This is the first interest matrix, which is a matrix obtained based on the user-scenario relationship, P U The matrix value P included ij It is user i For scenario j interest level; Q B This is the second interest matrix, which is a matrix obtained based on the scenario-behavior relationship, Q. B The matrix value Q included ij It is behavior i In scenario j The weight in the class indicates that the higher the weight, the more representative the class is.

[0148] According to embodiments of this disclosure, using LFM eliminates the need for technicians to design the classification perspective; the classification results are automatically clustered by LFM based on user behavior datasets. Since the classification granularity is not a concern, it can be controlled by setting the final number of LFM categories (the number of scenarios, referred to as 's' in Table 1 below). A larger number of categories results in finer granularity.

[0149] According to embodiments of this disclosure, for a behavior, it is not explicitly categorized into a specific behavioral intent, but rather its probability of belonging to each category is calculated. The more representative the scenario of the behavior, the higher its weight value. For a user, their interest in each behavioral intent can be obtained, thus leading to a more accurate understanding of the user's behavioral intent.

[0150] According to an embodiment of this disclosure, for example, a user data vector set can be set to have 3 users and 4 behaviors. After modeling the user behavior dataset using LFM, we can obtain the historical data matrix shown in Table 1 below.

[0151] Table 1

[0152]

[0153] According to the embodiments of the present disclosure, the first interest degree matrix and the second interest degree matrix after iteration can be obtained, the scenario with the highest score corresponding to each behavior is extracted, and the intention classification data set of the most possible user behavior is obtained. The user behavior and the corresponding intention classification are shown in Table 2.

[0154] Table 2

[0155] user behavior scenario user1 behavior1 scenario1 user1 behavior2 Scenario3 user2 behavior1 Scenario3

[0156] According to the embodiments of the present disclosure, for each behavior of each user, the abbreviation and the number representing each attribute of the user behavior and the corresponding behavior intention Id can be spliced as a unique identifier, and then the identifier is subjected to embedding operation to obtain a first feature vector set. In the case of determining the first feature vector set, the first feature vector set can be used as a weight factor (query) required by the attention mechanism layer, and the first feature vector set is used for attention operation on the data related to the purchase behavior of the user in the historical behavior sequence of the user, so that the attention mechanism layer identifies the key behavior of the user in the historical behavior sequence based on the weight factor. The key behavior can be the embedding vector of the interested product of the user in the short term, so as to determine a second feature vector set corresponding to the product interested by the user.

[0157] According to the embodiments of the present disclosure, the output layer can be constructed based on the trained neural network model, the embedding vector of the interested product of the user in the short term identified is input into the neural network model for calculation, and the final output of the determined target recommended product is obtained through the softmax function.

[0158] According to the embodiments of the present disclosure, the trained neural network model can include a feature fusion layer (concat layer), a multilayer perception layer (MLP layer), and an inner product layer (inner layer). The second feature vector set, the user feature vector set, and the product feature vector set are processed based on the feature fusion layer and the multilayer perception layer to obtain a recommended product vector set, so that the recommended product vector set calculated has a strong correlation with the user features and the user behavior intention. Based on the similarity between the user feature vector in the user feature vector set and the recommended product vector in the recommended product vector set in the calculation inner product layer, the similarity between the user feature vector and the recommended product vector can be obtained by performing inner product calculation or Euclidean distance calculation. After the softmax function, the product corresponding to the recommended product vector with the highest similarity is determined as the target recommended product most matched with the user.

[0159] According to an embodiment of the present disclosure, in the process of outputting the target recommended product, the second feature vector set, the user feature vector set and the product feature vector set can be processed through a feature fusion layer (concat layer), a multilayer perceptron layer (MLP layer) and an inner product layer (inner layer) to obtain the target recommended product, but the present disclosure is not limited thereto, and a person skilled in the art can perform feature fusion of vectors, feature extraction of vectors and similarity calculation of vectors according to actual needs, and then obtain the target recommended product according to the target recommended product. The present disclosure does not limit the specific method of feature fusion of vectors, feature extraction of vectors and similarity calculation of vectors.

[0160] According to an embodiment of the present disclosure, the user behavior data set is processed through an intent classification layer to construct a historical data matrix, and then a first feature vector set is obtained. The user data set is processed through an attention mechanism layer, the first feature vector set is used as a weight factor of the attention mechanism layer to obtain the key behavior of the user in the user data set, a second feature vector set is obtained, and then a target recommended product is obtained in an output layer. Since the first feature vector set is related to the behavior intention of the user, when the second feature vector set corresponding to the product of interest of the user is obtained, the operation of classifying the product of interest of the user is associated with the behavior intention of the user. Since the behavior intention of the user can reflect the demand of the user, the target recommended product obtained through the second feature vector set is more in line with the use demand of the user. Based on the above technical means, at least part of the technical problems that the related art cannot accurately recommend products for users are overcome, thereby realizing personalized recommendation for different users.

[0161] Figure 5 A flowchart of a training method of a product recommendation model according to an embodiment of the present disclosure is schematically shown.

[0162] As shown in Figure 5 , the training method of the product recommendation model includes operations S510-S520.

[0163] In operation S510, a training sample data set is obtained.

[0164] In operation S520, the training sample set is input into the product recommendation model to be trained, and a recommended product is output.

[0165] According to an embodiment of the present disclosure, before the technical solution of the present disclosure obtains or collects user personal information to obtain a user data set, the authorization or consent of the user is obtained.

[0166] According to an embodiment of the present disclosure, the user data set can include all user data and behaviors corresponding to the user, and all behaviors constitute a user behavior data set. Based on the user behavior data set, a training positive sample of the user is obtained, the positive sample including data representing the user and the behaviors corresponding to the user, and the interest degree R UB of the training positive sample is set to 1. In addition, a training negative sample of the user can be obtained based on the user behavior data set, the training negative sample of the user being constructed by selecting the user and data not corresponding to the behaviors of the user from the user behavior data set, and the interest degree R UB of the training negative sample being set to 0. Therefore, the value range of the interest degree is [0, 1].

[0167] According to an embodiment of the present disclosure, obtaining the training sample data set includes:

[0168] According to the user sample data set, a sample historical behavior sequence is obtained.

[0169] The sample historical behavior sequence is divided according to a preset time interval to obtain a sample product feature vector set, wherein the sample product feature vector set includes a sample historical data product feature vector set and a sample historical data product feature vector set.

[0170] Based on the sample historical data product feature vector set and the sample historical data product feature vector set, the training sample data set is obtained.

[0171] According to an embodiment of the present disclosure, generating the trained product recommendation model according to the sample historical data matrix, the first sample interest degree matrix and the second sample interest degree matrix includes:

[0172] The sample historical data matrix, the first sample interest degree matrix and the second sample interest degree matrix are input into a loss function, and a loss result is output.

[0173] The network parameters of the product recommendation model to be trained are iteratively adjusted according to the loss result until an iterative convergence condition is met.

[0174] The trained product recommendation model is generated according to the network parameters of the product recommendation model to be trained under the condition that the iterative convergence condition is met.

[0175] According to an embodiment of the present disclosure, after obtaining the training positive sample of the user and the training negative sample of the user, the original user data set is expanded, and based on the new user data set, a new user-behavior set (user-behavior set) can be constructed, and the user-behavior set is represented as S={(U, B)}, and a new historical data matrix can be obtained based on the user-behavior set, wherein if (U, B) is a positive sample, R UB =1, otherwise R UB= 0. The new historical data matrix is processed by the product recommendation model to be trained, and the network parameters of the product recommendation model to be trained are iteratively adjusted by using the optimization loss function in the process of calculating the sample first interest degree matrix and the sample second interest degree matrix parameter values, until the iterative convergence condition is met.

[0176] According to an embodiment of the present disclosure, the network parameters of the product recommendation model to be trained can be iteratively adjusted by using the optimization loss function, which can be represented by the following formula (2).

[0177]

[0178] In the formula, C is the loss function; λ||P U || 2 + λ||Q B || 2 is a regularization term used to prevent overfitting, and λ can be obtained through repeated experiments according to specific application scenarios.

[0179] According to an embodiment of the present disclosure, the optimization of the loss function can use a stochastic gradient descent algorithm, determine the fastest descent direction by taking the partial derivative of the parameters P U,s and Q s,B , iteratively calculate and continuously optimize the matrix values (the number of iterations can be set based on actual needs), and until the parameters converge.

[0180] According to an embodiment of the present disclosure, the iteration of the matrix values of the first interest degree matrix and the second interest degree matrix can be represented by the following formula (3) and formula (4).

[0181]

[0182]

[0183] In the formula, α is the learning rate, the larger α is, the faster the iterative descent is, and α and λ can also be obtained through repeated experiments according to actual application scenarios.

[0184] According to an embodiment of the present disclosure, after each iteration is completed, the learning rate can be reduced. At the beginning of training, since there is a large difference from the optimal value, the loss function value can be allowed to quickly decrease to speed up the training process, and when the optimization reaches a certain degree, the learning rate needs to be slowed down to slow down the change of the loss function, so as to slowly approach the optimal value of the network parameters.

[0185] According to an embodiment of the present disclosure, the user sample data set can also be updated regularly, so that the product recommendation model trained by the updated user sample data set can be generated, and products more in line with the latest needs of the user can be recommended to the user.

[0186] Figure 6 A block diagram of a product recommendation apparatus is shown.

[0187] As shown in Figure 6 , the product recommendation apparatus 600 can include a first obtaining module 610 and a first output module 620.

[0188] The first obtaining module 610 is configured to obtain a user data set of a user. According to an embodiment of the present disclosure, the first obtaining module 610 may, for example, perform operation S210 described above with reference to Figure 2 , and details are not repeated here.

[0189] The first output module 620 is configured to input the user data set into a trained product recommendation model to obtain a target recommended product. According to an embodiment of the present disclosure, the first output module 620 may, for example, perform operation S220 described above with reference to Figure 2 , and details are not repeated here. The product recommendation model includes an intent classification layer, an attention mechanism layer, and an output layer. The first output module 620 includes a first processing submodule 621, a second processing submodule 622, and a first output submodule 623.

[0190] The first processing submodule 621 is configured to process the user data set by using the intent classification layer to obtain a first feature vector set corresponding to a behavior intention of the user.

[0191] The second processing submodule 622 is configured to process the first feature vector set and the user data set by using the attention mechanism layer to obtain a second feature vector set corresponding to a product of interest of the user.

[0192] The first output submodule 623 is configured to input the second feature vector set, a user feature vector set, and a product feature vector set into the output layer to obtain the target recommended product, wherein the user feature vector set and the product feature vector set are obtained according to the user data set.

[0193] According to an embodiment of the present disclosure, the first processing submodule 621 can include a first processing unit and a second processing unit.

[0194] The first processing unit is configured to obtain a user historical data set according to the user data set. According to an embodiment of the present disclosure, the first processing unit may, for example, perform operation S310 described above with reference to Figure 3 , and details are not repeated here.

[0195] The second processing unit is configured to process the user historical data set by using the intent classification layer to obtain the first feature vector set corresponding to the behavior intention of the user. According to an embodiment of the present disclosure, the second processing unit may, for example, perform operation S320 described above with reference to Figure 3The operation S320 described is not repeated here.

[0196] According to an embodiment of the present disclosure, the second processing unit can comprise: a first determining subunit, a first processing subunit and a second processing subunit.

[0197] The first determining subunit is configured to determine a historical data matrix corresponding to the user according to the user historical data set by using the intent classification layer.

[0198] The first processing subunit is configured to obtain a first interest degree matrix and a second interest degree matrix according to the historical data matrix.

[0199] The second processing subunit is configured to obtain a first feature vector set corresponding to the behavior intent of the user according to the first interest degree matrix, the second interest degree matrix and the user data set.

[0200] According to an embodiment of the present disclosure, the second processing sub-module 622 can comprise: a third processing unit, a fourth processing unit and a fifth processing unit.

[0201] The third processing unit is configured to obtain a historical behavior sequence of the user according to the user data set.

[0202] The fourth processing unit is configured to obtain a weight factor corresponding to the historical behavior sequence according to the first feature vector set.

[0203] The fifth processing unit is configured to obtain a second feature vector set corresponding to the product of interest of the user according to the weight factor and the historical behavior sequence.

[0204] According to an embodiment of the present disclosure, the product recommendation device 600 can further comprise: a first processing module and a second processing module.

[0205] The first processing module is configured to obtain a historical behavior sequence of the user according to the user data set.

[0206] The second processing module is configured to divide the historical behavior sequence according to a preset time interval to obtain a product feature vector set.

[0207] Figure 7 A block diagram of a product recommendation model training device according to an embodiment of the present disclosure is schematically shown.

[0208] As shown in Figure 7 The product recommendation model training device 700 can comprise a second acquisition module 710 and a second output module 720.

[0209] The second acquisition module 710 is configured to acquire a training sample data set. According to an embodiment of the present disclosure, the second acquisition module 710 may, for example, perform the operation S310 described above. Figure 5The described operation S510 will not be repeated here.

[0210] The second output module 720 is configured to input the training sample set into the product recommendation model to be trained, and output a recommended product. According to an embodiment of the present disclosure, the second output module 720 may, for example, perform the operations described above with reference to Figure 5 The described operation S520 will not be repeated here.

[0211] According to an embodiment of the present disclosure, the second acquisition module 710 may include a first determination sub-module, a second determination sub-module, and a first acquisition sub-module.

[0212] The first determination sub-module is configured to obtain a sample historical behavior sequence according to the user sample data set.

[0213] The second determination sub-module is configured to divide the sample historical behavior sequence according to a preset time interval to obtain a sample product feature vector set, wherein the sample product feature vector set includes a sample historical data product feature vector set and a sample historical data product feature vector set.

[0214] The first acquisition sub-module is configured to acquire a training sample data set based on the sample historical data product feature vector set and the sample historical data product feature vector set.

[0215] According to an embodiment of the present disclosure, the product recommendation model training apparatus 700 may further include a third acquisition module, a first determination module, a first adjustment module, and a first generation module.

[0216] The third acquisition module is configured to input the training sample set into the product recommendation model to be trained to obtain a sample historical data matrix, a first sample interest degree matrix, and a second sample interest degree matrix.

[0217] The first determination module is configured to input the sample historical data matrix, the first sample interest degree matrix, and the second sample interest degree matrix into a loss function to output a loss result.

[0218] The first adjustment module is configured to iteratively adjust network parameters of the product recommendation model to be trained according to the loss result until an iterative convergence condition is met.

[0219] The first generation module is configured to generate a trained product recommendation model according to the network parameters of the product recommendation model to be trained under the condition that the iterative convergence condition is met.

[0220] Any of the modules, sub-modules, units, sub-units, or at least part of any of them according to the embodiments of the present disclosure can be implemented in one module. Any of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be split into multiple modules. Any of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be implemented at least in part as a hardware circuit, for example, a field-programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application-specific integrated circuit (ASIC), or any other reasonable way of hardware or firmware by integrating or packaging circuits, or in any one of software, hardware, and firmware, or in a proper combination of any of them. Alternatively, one or more of the modules, sub-modules, units, sub-units according to the embodiments of the present disclosure can be implemented at least in part as computer program modules, which can perform corresponding functions when the computer program modules are run.

[0221] For example, any of the first obtaining module 610, the first output module 620, the second obtaining module 710, and the second output module 720 can be combined in one module / unit / sub-unit, or any of them can be split into multiple modules / units / sub-units. Alternatively, at least part of the functions of one or more of the modules / units / sub-units can be combined with at least part of the functions of other modules / units / sub-units, and implemented in one module / unit / sub-unit. According to the embodiments of the present disclosure, at least one of the first obtaining module 610, the first output module 620, the second obtaining module 710, and the second output module 720 can be implemented at least in part as a hardware circuit, for example, a field-programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on board, a system on package, an application-specific integrated circuit (ASIC), or any other reasonable way of hardware or firmware by integrating or packaging circuits, or in any one of software, hardware, and firmware, or in a proper combination of any of them. Alternatively, at least one of the first obtaining module 610, the first output module 620, the second obtaining module 710, and the second output module 720 can be implemented at least in part as computer program modules, which can perform corresponding functions when the computer program modules are run.

[0222] It should be noted that the task scheduling device part in the embodiments of the present disclosure corresponds to the task scheduling method part in the embodiments of the present disclosure, and the description of the task scheduling device part is specifically referred to the task scheduling method part, which will not be repeated here. The task processing device part in the embodiments of the present disclosure corresponds to the task processing method part in the embodiments of the present disclosure, and the description of the task processing device part is specifically referred to the task processing method part, which will not be repeated here.

[0223] Figure 7 A block diagram of an electronic device according to embodiments of the present disclosure is shown schematically, which is suitable for implementing the product recommendation method and the training method of the product recommendation model.

[0224] As shown in Figure 7 The electronic device 800 according to embodiments of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to programs stored in a read-only memory (ROM) 02 or loaded into a random access memory (RAM) 803 from a storage part 808. The processor 801 may, for example, include a general-purpose microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a special-purpose microprocessor (such as an application-specific integrated circuit (ASIC)), and the like. The processor 801 can also include on-board memory for cache use. The processor 801 can include a single processing unit or multiple processing units for performing different actions of the method processes according to embodiments of the present disclosure.

[0225] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. The processor 801 performs various operations of the method processes according to embodiments of the present disclosure by executing programs in the ROM 802 and / or the RAM 803. It should be noted that the programs can also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 can also perform various operations of the method processes according to embodiments of the present disclosure by executing programs stored in one or more memories.

[0226] According to an embodiment of the present application, the electronic device 800 can further include an input / output (I / O) interface 805 also connected to the bus 804. The electronic device 800 can further include one or more of the following components connected to the I / O interface 805: an input part 806 including, for example, a keyboard and a mouse; an output part 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage part 808 including, for example, a hard disk; and a communication part 809 including, for example, a LAN card, a modem, and the like. The communication part 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as necessary. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 810 as necessary, so that a computer program read therefrom is installed into the storage part 808 as necessary.

[0227] The present application also provides a computer readable storage medium, which can be included in the device / apparatus / system described in the above embodiments, or can exist separately without being assembled into the device / apparatus / system. The above computer readable storage medium carries one or more programs, which, when executed, implement the method according to the embodiments of the present application.

[0228] According to an embodiment of the present application, the computer readable storage medium can be a non-volatile computer readable storage medium, which can include, but is not limited to, 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), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination thereof. In the present application, the computer readable storage medium can be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer readable storage medium can include the ROM 802 and / or the RAM 803 described above, and / or one or more memory other than the ROM 802 and the RAM 803.

[0229] The embodiments of the present application also include a computer program product, which includes a computer program containing program codes for executing the method shown in the flow chart. When the computer program product is run in a computer system, the program codes are used to make the computer system implement the item recommendation method provided in the embodiments of the present application.

[0230] The above-described functions of the system / apparatus defined in the embodiments of the present application are performed when the computer program is executed by the processor 801. According to the embodiments of the present application, the system, apparatus, module, unit, etc. described above can be implemented by the computer program modules.

[0231] In one embodiment, the computer program can be stored in a tangible storage medium, such as an optical, magnetic, or other memory on a hard disk or solid state drive. In another embodiment, the computer program can be transmitted over a network, using any available network medium, including wireless, wired, etc., or any suitable combination of the above. The computer program comprises program code, which can be executed by the processor 801.

[0232] In such an embodiment, the computer program can be downloaded and installed from a network, using the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above-described functions of the system defined in the embodiments of the present application are performed. According to the embodiments of the present application, the system, apparatus, device, module, unit, etc. described above can be implemented by the computer program modules.

[0233] According to the embodiments of the present application, the program code for carrying out the computer program provided in the embodiments of the present application can be written in any combination of one or more programming languages, and can be implemented using high-level procedural and / or object-oriented programming language, and / or assembly / machine language. The programming language includes, but is not limited to, such as Java, C++, python, "C" language, or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case involving a remote computing device, the remote computing device can be connected to the user computing device through any kind of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, connected through the Internet using an Internet service provider).

[0234] The computer program product of the present application can be a computer program product, which is a machine-readable medium (media) having exact sequences of instructions, program, code segments, routines, subroutines, programs, functions, objects, processing tasks, proceedings, or the like, for instructing or instructing processing devices to perform the implementation of the present application. The computer program product includes transportation or transmission media carrying data streams encoding the instructions, program codes, code segments, routines, programs, functions, objects, processing tasks, proceedings, or the like. Examples of transport or transmission media include for example, for example, electronic, electromagnetic, optical, infrared, or other communication signals; for example, a computer readable medium. For example, a computer readable medium includes a tangible medium such as a portable memory stick, a hard drive, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), or a similar memory. Computer program product also includes for example a propagated signal.

[0235] Those skilled in the art can understand that the features described in various embodiments and / or claims of the present application can be combined or / and integrated, even if such combinations or integrations are not explicitly described in the present application. In particular, the features described in various embodiments and / or claims of the present application can be combined and / or integrated in various combinations, without departing from the spirit and teachings of the present application. All these combinations and / or integrations fall within the scope of the present application.

[0236] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are contained in at least one embodiment or example of the present application. In the present application, the illustrative description of the above terms does not necessarily mean the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0237] The embodiments of the present application are described above. However, these embodiments are only for illustrative purposes, and are not intended to limit the scope of the present application. Although each embodiment is described above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present application is defined by the appended claims and their equivalents. Without departing from the scope of the present application, those skilled in the art can make various alternatives and modifications, which should fall within the scope of the present application.

Claims

1. A product recommendation method, comprising: obtaining a user data set of a user; and inputting the user data set into a trained product recommendation model to obtain a target recommended product, wherein the product recommendation model comprises an intention classification layer, an attention mechanism layer, and an output layer; inputting the user data set into the trained product recommendation model to obtain the target recommended product comprises: processing the user data set using the intention classification layer to obtain a first feature vector set corresponding to a behavior intention of the user, including, obtaining a user historical data set according to the user data set; determining a historical data matrix corresponding to the user using the intention classification layer according to the user historical data set; clustering the behavior intention corresponding to the user's behavior using the intention classification layer according to the historical data matrix to obtain a behavior intention vector; obtaining a first interest degree matrix and a second interest degree matrix of the user based on the behavior intention vector and the historical data matrix; determining the behavior intention corresponding to the user from the behavior intention vector according to the first interest degree matrix and the second interest degree matrix; obtaining a first feature vector set based on the behavior of the user and the behavior intention corresponding thereto; processing the first feature vector set and the user data set using the attention mechanism layer to obtain a second feature vector set corresponding to a product of interest of the user; inputting the second feature vector set, a user feature vector set, and a product feature vector set into the output layer to obtain the target recommended product, wherein the user feature vector set and the product feature vector set are obtained according to the user data set. The processing of the user data set using the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user comprises:

2. The method of claim 1, wherein, obtaining a user historical data set according to the user data set; and processing the user historical data set using the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user. The processing of the user historical data set using the intention classification layer to obtain the first feature vector set corresponding to the behavior intention of the user comprises:

3. The method of claim 2, wherein, determining a historical data matrix corresponding to the user using the intention classification layer according to the user historical data set; obtaining a first interest degree matrix and a second interest degree matrix according to the historical data matrix; and obtaining the first feature vector set corresponding to the behavior intention of the user according to the first interest degree matrix, the second interest degree matrix, and the user data set. The processing of the first feature vector set and the user data set using the attention mechanism layer to obtain the second feature vector set corresponding to the product of interest of the user comprises:

4. The method of claim 1, wherein, obtaining a historical behavior sequence of the user according to the user data set; obtaining a weight factor corresponding to the historical behavior sequence according to the first feature vector set; and obtaining the second feature vector set corresponding to the product of interest of the user according to the weight factor and the historical behavior sequence.

5. The method of claim 1, further comprising: ​ obtaining a historical behavior sequence of the user according to the user data set; and dividing the historical behavior sequence according to a preset time interval to obtain the product feature vector set.

6. The method of claim 1, further comprising a training method of a product recommendation model, the training method comprising: obtaining a training sample data set; and inputting the training sample set into a product recommendation model to be trained to output a recommended product; inputting the training sample set into the product recommendation model to be trained to obtain a sample historical data matrix, a first sample interest degree matrix, and a second sample interest degree matrix; inputting the sample historical data matrix, the first sample interest degree matrix, and the second sample interest degree matrix into a loss function to output a loss result; iteratively adjusting network parameters of the product recommendation model to be trained according to the loss result until an iterative convergence condition is met; and generating the product recommendation model trained according to the network parameters of the product recommendation model to be trained under the condition that the iterative convergence condition is met. The obtaining of the training sample data set comprises:

7. The method of claim 6, wherein, obtaining a sample historical behavior sequence according to a user sample data set; dividing the sample historical behavior sequence according to a preset time interval to obtain a sample product feature vector set, wherein the sample product feature vector set comprises a sample historical data product feature vector set and a sample historical data product feature vector set; and obtaining the training sample data set based on the sample historical data product feature vector set and the sample historical data product feature vector set.

8. A product recommendation device, comprising: a first obtaining module configured to obtain a user data set of a user; and a first output module configured to input the user data set into a trained product recommendation model to obtain a target recommended product, wherein the product recommendation model comprises an intention classification layer, an attention mechanism layer, and an output layer; the first output module comprises a first processing submodule, a second processing submodule, and a first output submodule; the first processing submodule is configured to process the user data set by using the intention classification layer to obtain a first feature vector set corresponding to a behavior intention of the user, comprising: obtaining a user historical data set according to the user data set; determining a historical data matrix corresponding to the user by using the intention classification layer according to the user historical data set; clustering the behavior intention corresponding to the user's behavior by using the intention classification layer according to the historical data matrix to obtain a behavior intention vector; obtaining a first interest degree matrix and a second interest degree matrix of the user based on the behavior intention vector and the historical data matrix; determining the behavior intention corresponding to the user from the behavior intention vector according to the first interest degree matrix and the second interest degree matrix; and obtaining the first feature vector set based on the behavior of the user and the behavior intention corresponding thereto; the second processing submodule is configured to process the first feature vector set and the user data set by using the attention mechanism layer to obtain a second feature vector set corresponding to a product of interest of the user; and the first output submodule is configured to output the target recommended product according to the second feature vector set. The first output sub-module is configured to input the second feature vector set, the user feature vector set and the product feature vector set into the output layer to obtain a target recommended product. The user feature vector set and the product feature vector set are obtained according to the user data set. 9.An electronic device, comprising: one or more processors; a memory for storing one or more instructions, wherein when the one or more instructions are executed by the one or more processors, the one or more processors are caused to implement the method of any one of claims 1 to 7. 10.A computer-readable storage medium having stored thereon executable instructions that, when executed by a processor, cause the processor to implement the method of any one of claims 1 to 7. 11.A computer program product, comprising computer executable instructions that, when executed by a computer, cause the computer to implement the method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • A recommendation system and a recommendation method based on attention mechanism

    CN109087130A