Combined commodity recommendation method and device, equipment and medium
By constructing directed weighted graphs and random walk operations, combining multimodal information of text, pictures and node vectors, the problem of insufficient accuracy of product recommendations in the existing technology is solved, and efficient and accurate product recommendations are achieved, improving the improvement of product recommendations. User satisfaction and shopping experience.
Patent Information
- Application Number
- CN202411309720.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-17
AI Technical Summary
The existing product recommendation technology is difficult to accurately reflect the user's preference for different products, and it is difficult for a single modal information to fully express product characteristics, resulting in a decrease in the accuracy of recommendation results and reducing user satisfaction and shopping experience.
By determining the historical behavior of users, the correlation rule indicators between each product in the product dataset are constructed with directed power charts, monitoring the user's interaction behavior determines the starting product node, performing a random walk operation to obtain the product path, and integrating text, pictures and nodes Vector calculation similarity filter combination products.
It realizes efficient and accurate product recommendations, comprehensively expresses product characteristics, improves the accuracy of recommendation results and user satisfaction, and improves shopping experience and sales conversion rate.
Smart Images

Figure CN119151640A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of e-commerce technology, and in particular to a method for recommending combined goods and its device, equipment, and medium. Background Art
[0002] Combination product recommendation is a high-frequency promotion method used in e-commerce platforms, especially in e-commerce platforms based on independent sites, to improve the user shopping experience and recommend corresponding product data sets. Specifically, in the scenario where users click, add to cart, or purchase products, the e-commerce platform server will determine the recommended product combination based on the product currently operated by the user, and display the combined products to the user in order.
[0003] Among the existing product recommendation technologies, association rule mining is a commonly used method. This method mines frequent item sets and association rules between products by analyzing the user's historical behavior data, thereby recommending relevant product combinations to users. However, the existing association rule mining methods usually only consider the co-occurrence frequency of products, ignoring the directionality and weight relationship between products, and it is difficult to accurately reflect the user's preference for different products. Although with the development of deep learning technology, recommendation methods based on graph neural networks have gradually attracted attention. By constructing a directed weighted graph between products, the graph structure is used to capture the complex association relationship between products, and then more accurate combinations of products are recommended to users. However, these existing methods often use single modal information of products, which is difficult to fully express the characteristics of products, resulting in a decrease in the accuracy of recommendation results, reducing user satisfaction and shopping experience. Summary of the invention
[0004] The primary purpose of the present application is to solve at least one of the above problems and provide a method for recommending a combination of goods and its device, equipment, and medium.
[0005] In order to meet the various objectives of this application, this application adopts the following technical solutions:
[0006] A method for recommending a combination of products and a device, equipment, and medium thereof provided to meet one of the purposes of the present application include the following steps:
[0007] Determine an association rule index between each commodity in the user's historical behavior commodity data set, and construct a directed weighted graph with each commodity as a node based on the association rule index;
[0008] Monitor the user's interactive behavior on the terminal device to determine the starting product node in the directed weighted graph;
[0009] Based on the starting commodity node, a random walk operation is performed on the directed weighted graph to obtain a plurality of commodity paths, and commodity nodes in the commodity paths are vectorized to obtain a node vector of each commodity node;
[0010] The text vector, the picture vector and the node vector corresponding to each product in the product path are integrated to obtain a comprehensive vector of each product;
[0011] The similarity between the product corresponding to the starting product node and each other product in its product path is calculated based on the comprehensive vector, and the combination product corresponding to the starting product node is screened out according to the similarity.
[0012] A combined product recommendation device is proposed to meet one of the purposes of the present application, and includes:
[0013] An association rule indicator determination module is configured to determine an association rule indicator between each commodity in a user's historical behavior commodity data set, and construct a directed weighted graph with each commodity as a node based on the association rule indicator;
[0014] A starting commodity node determination module is configured to monitor the user's interactive behavior on the terminal device to determine the starting commodity node in the directed weighted graph;
[0015] A commodity node vector learning module is configured to perform a random walk operation on the directed weighted graph based on the starting commodity node to obtain multiple commodity paths, and vectorize the commodity nodes in the commodity paths to obtain a node vector for each of the commodity nodes;
[0016] a multimodal information fusion module, configured to fuse text vectors, image vectors, and node vectors corresponding to each product in the product path to obtain a comprehensive vector for each product;
[0017] The product recommendation list generation module is configured to calculate the similarity between the product corresponding to the starting product node and each other product in its product path based on the comprehensive vector, and select the combination product corresponding to the starting product node according to the similarity.
[0018] On the other hand, a computer device is provided to meet one of the purposes of the present application, including a central processing unit and a memory, wherein the central processing unit is used to call and run a computer program stored in the memory to execute the steps of the combination product recommendation method described in the present application.
[0019] On the other hand, a computer-readable storage medium is provided to meet another purpose of the present application, which stores a computer program implemented according to the combination product recommendation method in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
[0020] The technical solution of this application has many advantages, including but not limited to the following aspects:
[0021] This application constructs a directed weighted graph by determining the association rule indicators between each commodity in the commodity data set of the user's historical behavior data. This method can capture the complex association relationships between commodities, including directionality and weight relationships, so as to more accurately reflect the user's preference for different commodities. By monitoring the user's interactive behavior to determine the starting commodity node, performing random walk operations to obtain multiple commodity paths and vectorizing them, fusing text, pictures and node vectors to obtain a comprehensive vector, calculating the similarity and screening the combined commodities, efficient and accurate commodity recommendations are achieved. Through the fusion of multimodal information of text, pictures, and node vectors, the characteristics of the commodity are fully expressed, avoiding the limitations of relying solely on a single modal information, and improving the accuracy of the recommendation results. This application can not only capture the complex association relationships between commodities, but also combine multi-dimensional features to improve the accuracy of recommendations and user satisfaction, as well as improve the user's shopping experience and sales conversion rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0023] Figure 1 A flowchart of a typical embodiment of the method for recommending combined commodities of the present application is shown below;
[0024] Figure 2 A schematic diagram of a process for constructing a directed weighted graph in an embodiment of the present application;
[0025] Figure 3 A schematic diagram of a process for determining association rule indicators between commodities in an embodiment of the present application;
[0026] Figure 4 A schematic diagram of a process for obtaining a product path in an embodiment of the present application;
[0027] Figure 5 A schematic diagram of a flow chart for calculating the transition probability between a commodity node and all neighboring commodity nodes in an embodiment of the present application;
[0028] Figure 6 A schematic diagram of a process for obtaining a vector of each commodity node in an embodiment of the present application;
[0029] Figure 7 A schematic diagram of a process for generating a combination product recommendation list in an embodiment of the present application;
[0030] Figure 8 This is a functional block diagram of the combined product recommendation device of the present application;
[0031] Fig. 9 A schematic diagram of the structure of a computer device used in this application. DETAILED DESCRIPTION
[0032] A combined commodity recommendation method of the present application can be programmed as a computer program product, deployed in a client or server for operation and implementation. For example, in the exemplary application scenario of the present application, it can be deployed in the server of an e-commerce platform, wherein the e-commerce platform can be an e-commerce platform that opens independent station services. An independent station refers to a new type of official website (website) established on the SaaS technology platform, which has an independent domain name, private content, data, and rights and interests, independent business sovereignty and business entity responsibilities, supported by social cloud computing capabilities, and can independently and freely connect to third-party software tools, publicity and promotion media and channels. Usually, commodity sellers build and operate online stores on independent stations, so that online stores can display their products on independent stations, and provide e-commerce services such as searching for products, adding shopping carts, settlement, logistics delivery, placing orders, and after-sales services on online stores to commodity buyers (i.e. users). Commodity buyers (users) perform various interactive operations with the e-commerce platform on terminal devices.
[0033] The user's interactive behavior on the e-commerce platform will be monitored, and the historical behavior commodity data set generated by the interactive behavior will be stored in the database (relational database or non-relational database) of the e-commerce platform, wherein the user's interactive behavior includes the user's search behavior, purchase behavior, and purchase-adding behavior on the e-commerce platform. By monitoring these interactive behaviors of the user on the e-commerce platform, the relevant information of the commodity with which the user has interacted is obtained and stored in the commodity data set. In an embodiment of the present application, after obtaining the user's historical behavior commodity data set, the support, confidence, and promotion degree and other association rule indicators between the two commodities in the user's historical behavior commodity data set can be calculated. Using the calculated association rule indicators between the two commodities, a directed weighted graph is constructed, which uses each commodity as a node, and then determines the weight of the directed edge between the two commodity combinations by judging whether the promotion degree between the two commodity combinations is greater than 1. It should be noted that if the directions between the two commodities are different, the corresponding weights may not be the same.
[0034] For ease of understanding, the total number of historical behavior records of all users in the historical behavior product data set is taken as a total transaction. Specifically, a complete historical behavior record of each user (a purchase behavior) can be regarded as a transaction. Furthermore, support refers to the proportion of transactions that contain both product A and product B in all transactions, which reflects the probability that both products A and B are purchased at the same time. Confidence indicates the probability of purchasing product B when product A is purchased. That is, confidence refers to the proportion of product B purchased at the same time in the transaction of purchasing product A. Lift is used to measure the degree to which the appearance of product A in the association rule increases the probability of the appearance of product B. The calculation formula for lift is: lift (A→B) = confidence (A→B) / support (B). The higher the lift, the greater the possibility that product A and product B are purchased together.
[0035] This application not only considers the association rules between commodities, but also considers the multimodal information of commodities, further accurately recommends results, and improves user satisfaction and shopping experience. Specifically, this application performs random walk operations on directed weighted graphs, sets the number of walks and the number of walk steps, for example, if the number of walks is set to 10, 10 commodity paths need to be obtained, and if the number of walk steps is set to 20, there are 20 commodity nodes for each commodity path. By monitoring the user's interactive behavior on the terminal device, when the user interacts when visiting an online store, a combined commodity recommendation event is automatically submitted, and the commodity that the user is paying attention to at this time is submitted to the server. At this time, the server starts running the method of this application to determine the combined commodity recommendation list. Specifically, before the walking operation starts, by monitoring the user's interactive behavior on the terminal device, for example, searching for the target commodity, purchasing the target commodity, adding the target commodity to the shopping cart, etc., the commodity that the user is paying attention to at this time is used as the commodity corresponding to the starting commodity node, and walks in the directed weighted graph to obtain 10 commodity paths with the commodity as the starting commodity node. Then, the 10 obtained commodity paths are vector-learned through the skip-gram model to obtain the vector of each commodity node in the 10 commodity paths; at the same time, the text vector and image vector corresponding to each commodity in the commodity path are obtained, and the node vector, text vector and image vector of each commodity node obtained are combined, and the comprehensive vector can be directly spliced to obtain the comprehensive vector, or the comprehensive vector can be obtained by weighting each vector, which does not affect the embodiment of the creative spirit of this application. Finally, the similarity between the target commodity (i.e., the commodity corresponding to the starting commodity node) and each other commodity in the 10 commodity paths is calculated based on the obtained comprehensive vector, and the combination commodity corresponding to the starting commodity node is screened out according to the similarity. For example, according to the preset commodity recommendation list length threshold, the corresponding number of commodity combination items with the highest similarity value are selected, and displayed on the user's terminal device as a combination commodity recommendation list for the user to browse. Among them, the calculation of similarity can be calculated by Euclidean distance, Manhattan distance, Pearson correlation coefficient, etc., which does not affect the embodiment of the creative spirit of this application.
[0036] See also Figure 1 A method for recommending a combination of commodities in the present application, in a typical embodiment, comprises the following steps:
[0037] Step S5100: determining association rule indicators between various commodities in the user's historical behavior commodity data set, and constructing a directed weighted graph with the various commodities as nodes based on the association rule indicators;
[0038] The user's historical behavior commodity data set is usually stored in the database of the e-commerce platform, including relational databases (MySQL, PostgreSQL, etc.) and non-relational databases (such as MongoDB, Red is, etc.). Among them, the user's historical behavior commodity data set is generated through the interaction between the user and the e-commerce platform, for example, the user adds the product to the shopping cart, the user completes the purchase behavior, etc. That is, the behavior commodity data set includes but is not limited to the purchase product set, the purchase product set, etc. In general, the commodity data set can be a commodity set of a specific behavior, or it can be a collection of multiple commodity sets, which does not affect the embodiment of the creative spirit of this application. The e-commerce platform stores the data generated by these interactive behaviors in the database, which constitutes the user's historical behavior commodity data set.
[0039] Through the user's historical behavior commodity data set stored in the e-commerce platform, the association rule indicators between each commodity in the historical behavior commodity data set, such as confidence, support and promotion, can be calculated. Specifically, by traversing the user's historical behavior commodity data set, the number of transactions in which two commodity combinations appear at the same time in the historical behavior commodity data set is counted, and the number of times counted is divided by the number of transactions in which the previous commodity appears in the corresponding commodity combination, and the confidence of the previous commodity to the next commodity is obtained; then, by counting the number of transactions in which the next commodity appears in the above commodity combination in the historical behavior data set, the number of times counted is divided by the total number of transactions, and the support of the next commodity is obtained; finally, the confidence of the previous commodity to the next commodity in the commodity combination is divided by the support of the next commodity, and the promotion of the previous commodity to the next commodity is obtained. Based on these association rule indicators, each commodity in the user's historical behavior commodity data set can be used as a node of a directed weighted graph. For each combination of the preceding item and the following item, if the calculated lift of the preceding item to the following item is greater than 1, a directed edge from the preceding item to the following item is added, and the weight of the directed edge is recorded as the support of the corresponding following item. If the lift is not greater than 1, the weight of the directed edge from the preceding item to the following item is determined to be 0, and finally a directed weighted graph including all items in the user's historical behavior item dataset (with each item as a node) is formed.
[0040] Step S5200: monitoring the user's interactive behavior on the terminal device to determine the starting commodity node in the directed weighted graph;
[0041] E-commerce platforms usually deploy front-end monitoring scripts on user terminal devices or use back-end log systems to record user interaction behaviors. These monitoring scripts or log systems will capture every click, browse, search and other operations of users, and record the timestamp, user ID, product ID, operation type and other data of these operations. A transaction (a historical behavior record) in the user's historical behavior product data set is stored in the database of the e-commerce platform and transmitted to the server of the e-commerce platform. The e-commerce platform server uses the obtained interactive products (i.e., the products that the user is paying attention to) as the starting product node of the directed weighted graph. Specifically, when users use terminal devices (such as smartphones, tablets or computers) to interact with e-commerce platforms, e-commerce platforms monitor various user behaviors, such as browsing product details pages, clicking on products, adding products to shopping carts, searching, etc. These interactive behaviors will be recorded and analyzed to determine the products that the user is currently paying attention to, and use the products as the corresponding products of the starting product node in the directed weighted graph.
[0042] Step S5300: Based on the starting commodity node, a random walk operation is performed on the directed weighted graph to obtain multiple commodity paths, and commodity nodes in the commodity paths are vectorized to obtain a node vector of each commodity node;
[0043] After determining the starting commodity node in the directed weighted graph, a random walk operation is performed on the directed weighted graph based on the starting commodity node. Random walk is a graph-based traversal algorithm that generates a commodity path by randomly selecting the next node in the graph. In one embodiment, starting from the starting commodity node, the next node is randomly selected for walking according to the weights of each edge in the directed weighted graph. During each walk, the transition probability is calculated based on the outgoing edge weight of the current node, and the next node is selected based on the transition probability. For the calculation of the transition probability, please refer to the subsequent specific implementation methods, which will not be repeated here. For example, if the current commodity node A has two outgoing edges, pointing to commodity node B and commodity node C respectively, and the weight of edge A→B is 0.7, and the weight of edge A→C is 0.3, then node B will be selected with a 70% transfer probability and node C will be selected with a 30% transfer probability. At this time, you can randomly generate any number between 0 and 1, and set it to select commodity node B as the next node of the current commodity node A when the number falls between the range of 0 to 0.7, and select commodity node C as the next node of the current commodity node A when the number falls between the range of 0.7 to 1.
[0044] Through multiple random walk operations, multiple paths from the starting commodity node to other commodity nodes can be generated. Each path represents the order that the user may experience when browsing or purchasing commodities. These paths reflect the relevance between commodities. Then, the commodity nodes in these commodity paths are vector-learned to obtain the node vector of each commodity node. Vector learning is a technique for mapping high-dimensional data to low-dimensional space, and a low-dimensional vector representation is generated for each commodity node by learning the co-occurrence relationship between commodity nodes in the path. In one embodiment, a neural network model of the "skip word model" (Ski p-gram) is used for vector learning. The core idea of the skip word model is to learn the vector representation of each commodity node by maximizing the co-occurrence probability between the central commodity node and its context commodity node. The continuous bag of words model (CBOW), graph embedding model, self-attention mechanism or deep neural network and other methods can also be used to learn the vector representation of each commodity node, which does not affect the embodiment of the creative spirit of this application.
[0045] During the training process, each commodity node in each commodity path is regarded as a central node, and the commodity nodes within a certain range before and after it are regarded as context nodes. For example, if the path is A→B→C→D, and the window size is 1, then when B is regarded as the central node, A and C are regarded as the context nodes of B. In this way, the local relationship between commodity nodes can be captured. In order to improve the efficiency of vector learning, negative sampling technology is usually used. Negative sampling is a method to reduce the amount of calculation. By randomly selecting some commodity nodes that are not in the context as negative samples, the model can be trained faster. Finally, through random walks and vector learning, a low-dimensional vector representation, namely a node vector, can be generated for each commodity node in the directed weighted graph.
[0046] Step S5400: Fusing the text vector, the picture vector, and the node vector corresponding to each product in the product path to obtain a comprehensive vector for each product;
[0047] After obtaining the node vector of each commodity node, the text vector, image vector and node vector corresponding to each commodity in the commodity path will be further integrated to obtain the comprehensive vector of each commodity. The comprehensive vector is the result of integrating the multi-dimensional features of the commodity, which can more comprehensively reflect the characteristics of the commodity and the user's interest in it. Among them, the text information and image information of the commodity can be associated with the commodity ID and stored in the commodity information database of the e-commerce platform.
[0048] In one embodiment, the text information of each product in the product path is extracted, such as product title, description, user comments, etc. These text information will be converted into text vectors. The generation of text vectors usually uses word embedding technology, such as Word2Vec, G loVe or BERT. These technologies can map each word in the text to a low-dimensional vector space, that is, by converting the text information of the product into a text vector, the semantic relationship between words is captured. At the same time, the product image of each product in the product path is extracted. Product images usually contain rich visual features, such as color, shape, texture, etc. In order to convert these visual features into image vector representations, deep learning models such as convolutional neural networks (CNNs) can be used to extract features from product images. CNN can extract high-level visual features from images and map them to a low-dimensional vector space to generate image vectors.
[0049] Finally, the text vector, picture vector and node vector of the product are fused to obtain a comprehensive vector for each product. The fusion method can be a simple vector splicing or vector weighted summation, or a more complex neural network model, such as a multimodal fusion network. None of them affect the embodiment of the creative spirit of this application. In the process of vector weighted summation, different weights are assigned according to the importance of different features (text vector, picture vector, node vector). The comprehensive vector of each product captures the multi-dimensional characteristics of the product and provides a more comprehensive data basis for subsequent product recommendations.
[0050] Step S5500: Calculate the similarity between the product corresponding to the starting product node and each other product in its product path based on the comprehensive vector, and select the combination product corresponding to the starting product node according to the similarity.
[0051] After obtaining the comprehensive vector of each product, the similarity between the product corresponding to the starting product node and each other product in its product path is calculated based on the comprehensive vector of each product. By comparing the similarities between products, other products most related to the starting product node can be identified, so as to recommend suitable combination products to users.
[0052] Specifically, one or more similarity measurement methods are used to calculate the similarity between products. Common similarity measurement methods include cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. Cosine similarity is a commonly used similarity measurement method, which measures the similarity of two vectors by calculating the cosine value of the angle between them. Euclidean distance measures the similarity of two vectors by calculating the spatial distance between them. Pearson correlation coefficient measures the similarity of two vectors by calculating the linear correlation between them.
[0053] In one embodiment, when calculating the similarity, the comprehensive vector of the starting commodity node is compared with the comprehensive vector of each other commodity in the commodity path. For example, if the starting commodity node is commodity A, and the commodity path contains commodities B, C, and D, then the similarity between commodity A and commodities B, C, and D is calculated respectively. In this way, a similarity matrix can be obtained, which records the similarity between the starting commodity node and each other commodity in the commodity path. They will be sorted in order from high to low in similarity. Then, according to the commodity recommendation list length threshold set by the user, the commodity combination with the highest number of similarities (i.e., the commodity combination at the top of the sorted list) is selected. For example, if the length of the recommendation list set by the user is 3, then the three commodities with the highest similarity are selected as the combination commodity (the commodity combination ranked in the top 3 in the sorted list). Among them, the commodity recommendation list length threshold is set by a technician in this field as needed.
[0054] It can be known from the typical embodiments of the present application that the technical solution of the present application has many advantages, including but not limited to the following aspects:
[0055] This application constructs a directed weighted graph by determining the association rule indicators between each commodity in the commodity data set of the user's historical behavior data. This method can capture the complex association relationships between commodities, including directionality and weight relationships, so as to more accurately reflect the user's preference for different commodities. By monitoring the user's interactive behavior to determine the starting commodity node, performing random walk operations to obtain multiple commodity paths and vectorizing them, fusing text, pictures and node vectors to obtain a comprehensive vector, calculating the similarity and screening the combined commodities, efficient and accurate commodity recommendations are achieved. Through the fusion of multimodal information of text, pictures, and node vectors, the characteristics of the commodity are fully expressed, avoiding the limitations of relying solely on a single modal information, and improving the accuracy of the recommendation results. This application can not only capture the complex association relationships between commodities, but also combine multi-dimensional features to improve the accuracy of recommendations and user satisfaction, as well as improve the user's shopping experience and sales conversion rate.
[0056] Based on any embodiment of the method of this application, please refer to Figure 2 , determining the association rule index between each commodity in the user's historical behavior commodity data set, and constructing a directed weighted graph with each commodity as a node based on the association rule index, including:
[0057] Step S5110: taking each product in the user's historical behavior product data set as a node of a directed weighted graph;
[0058] After determining the user's historical behavior product data set, each product in the historical behavior product data set is used as a node of a directed weighted graph. A directed weighted graph is a graph structure in which each node represents a product, each edge represents the association between products, and each edge has a weight, indicating the strength of the association.
[0059] In one embodiment, by traversing the user's historical behavior product data set, all different product IDs are extracted. Each product ID corresponds to a product, and then these product IDs are used as nodes of a directed weighted graph. For example, if the user's historical behavior product data set contains product A, product B, product C, and product D, these four products are used as nodes of a directed weighted graph. When constructing a directed weighted graph, each node is usually assigned a unique identifier, usually a product ID. In addition, some basic information is stored for each node, such as product title, category, product image, price, etc., to provide a data basis for subsequent embodiments.
[0060] Step S5120: Based on the historical behavior commodity data set of users on the e-commerce platform, calculate the association rule indicators between the two commodities in the directed weighted graph, wherein the association rule indicators include support, confidence and lift. The support is used to evaluate the prevalence of the combination of the preceding commodity and the succeeding commodity in user behavior, the confidence is used to evaluate the strength of the association between the preceding commodity and the succeeding commodity, and the lift is used to evaluate the degree to which the appearance of the preceding commodity increases the probability of the appearance of the succeeding commodity.
[0061] Based on the product data set, the association rule indicators between two products in the directed weighted graph are calculated. The association rule indicators include support, confidence and lift. By calculating these association rule indicators, the association relationship between products can be quantified, and data support can be provided for the subsequent construction of the directed weighted graph. Specifically, by traversing the user's historical behavior product data set, the number of transactions in which two product combinations appear at the same time in the historical behavior product data set is counted, and the number of times counted is divided by the number of transactions in which the previous product appears in the corresponding product combination, and the confidence of the previous product to the next product is obtained; then, by counting the number of transactions in which the next product appears in the above product combination in the historical behavior data set, the number of times counted is divided by the total number of transactions, and the support of the next product is obtained; finally, the confidence of the previous product to the next product in the product combination is divided by the support of the next product, and the lift of the previous product to the next product is obtained.
[0062] Step S5130: For the combination of two products, if the promotion degree of the preceding product to the succeeding product is greater than 1, add a directed edge from the preceding product to the succeeding product, and record the weight of the directed edge as the support degree of the corresponding succeeding product;
[0063] After calculating the association rule indicators between two items in the directed weighted graph, it is decided whether to add directed edges in the directed weighted graph based on these association rule indicators. Specifically, by traversing all the combinations of two items, the lift of each preceding item on the succeeding item is checked. The lift is an indicator to measure the association effect of the preceding item on the succeeding item. A lift greater than 1 indicates that the preceding item has a positive association effect on the succeeding item. For each combination of two items, if the lift of the preceding item on the succeeding item is greater than 1, a directed edge from the preceding item to the succeeding item is added to the directed weighted graph. The weight of this directed edge is set to the support of the corresponding succeeding item. For example, if the lift of item A on item B is greater than 1, and the support of item B is 0.2, then a directed edge from item A to item B is added to the directed weighted graph, and the weight of the directed edge is set to 0.2. In this way, a directed weighted graph can be constructed, which not only reflects the association relationship between items, but also reflects the strength of the association between items through weights.
[0064] Step S5140: If the lift is not greater than 1, it is determined that the weight of the directed edge from the preceding item to the succeeding item is 0.
[0065] If the degree of improvement of the preceding commodity to the succeeding commodity is not greater than 1, the weight of the directed edge is determined to be 0. This approach is based on an assumption: there is no significant correlation between commodity combinations with a degree of improvement of no greater than 1. In one embodiment, if the degree of improvement of the preceding commodity to the succeeding commodity is no greater than 1, the directed edge will not be added to the directed weighted graph. This approach can reduce the complexity of the directed weighted graph and avoid unnecessary edges and nodes. That is, there is no need to represent this association in the directed weighted graph. In this way, a concise and effective directed weighted graph can be constructed, which only contains commodity nodes and edges with significant correlations, thereby reducing the complexity of the graph.
[0066] In this embodiment, by using each product in the user history behavior product data set as a node of a directed weighted graph, basic data is provided for the subsequent construction of a directed weighted graph structure; by calculating association rule indicators such as support, confidence and lift, the association relationship between products is quantified, providing data support for the construction of a directed weighted graph; according to the condition that the lift is greater than 1, directed edges are added and weights are set, and a directed weighted graph reflecting the association relationship between products is constructed, thereby enhancing the expressive power of the graph structure; by not adding directed edges between product combinations with a lift not greater than 1, the complexity of the graph is reduced, making the graph structure more concise and efficient.
[0067] Based on any embodiment of the method of this application, please refer to Figure 3 , calculating the association rule index between two commodities in the directed weighted graph, including:
[0068] Step S5121, traverse the user's historical behavior product data set, count the number of transactions in which two product combinations appear simultaneously in the historical behavior product data set, divide the number of transactions obtained by the number of transactions in which the previous product appears in the product combination, and obtain the confidence of the previous product to the next product, wherein the transaction describes a complete historical behavior record of the user on the e-commerce platform;
[0069] The total number of historical behavior records of all users in the historical behavior commodity data set is regarded as a total transaction. Specifically, a complete historical behavior record of each user (a purchase behavior) can be regarded as a transaction.
[0070] When calculating the association rule index between two items in a directed weighted graph, it is first necessary to traverse the user's historical behavior item data set and count the number of transactions in which two item combinations appear simultaneously in the historical behavior item data set. Specifically, read the transactions in the user's historical behavior item data set one by one, and record the item combinations contained in each transaction. For example, count the number of times each pair of items (such as item A and item B) appears simultaneously in the same transaction. After counting the number of transactions in which two item combinations appear simultaneously, further count the number of transactions in which the preceding item appears in the item combination. The preceding item refers to the item that serves as a condition in the association rule, and the succeeding item refers to the item that serves as a result in the association rule. For example, if item A and item B appear simultaneously in 150 transactions, and item A appears in a total of 300 transactions, then item A is the preceding item and item B is the succeeding item.
[0071] Then divide the number of transactions in which the two combinations of products appear at the same time by the number of transactions in which the previous product appears to obtain the confidence of the previous product to the next product. Confidence is an indicator to measure the strength of the association between the previous product and the next product. The higher the confidence, the stronger the association between the previous product and the next product. For example, if product A and product B appear in 150 transactions at the same time, and product A appears in 300 transactions in total, then the confidence of product A to product B is 150 / 300=0.5. In this way, the confidence between two products in a directed weighted graph can be calculated, thereby quantifying the association between products.
[0072] Step S5122: Count the number of transactions in which the subsequent product appears, and divide the counted number by the total number of transactions to obtain the support degree of the subsequent product. The total number of transactions is the total number of all the historical behavior records in the user's historical behavior product data set;
[0073] The number of occurrences of the subsequent commodity in the commodity combination in the previous step in all transactions is counted, and then the number of transactions obtained by counting is divided by the total number of transactions to obtain the support of the subsequent commodity. Support is an indicator to measure the frequency of occurrence of the subsequent commodity in the entire data set. The higher the support, the more popular the subsequent commodity is among users. Specifically, by traversing the user's historical behavior commodity data set, the number of transactions in which the subsequent commodity appears is counted. For example, the number of transactions in which the subsequent commodity (such as commodity B) appears is counted by traversing the user's historical behavior commodity data set. Assume that commodity B appears in 200 transactions in total. After counting the number of transactions in which the subsequent commodity appears, the number obtained by counting is divided by the total number of transactions to obtain the support of the subsequent commodity. For example, if commodity B appears in 200 transactions in total and the total number of transactions is 1000, then the support of commodity B is 200 / 1000=0.2.
[0074] Step S5123: Divide the confidence of the preceding item on the succeeding item by the support of the succeeding item to obtain the promotion degree of the preceding item on the succeeding item.
[0075] After calculating the confidence of the preceding item on the following item and the support of the following item, the confidence of the preceding item on the following item is divided by the support of the following item to obtain the lift of the preceding item on the following item. The lift is an indicator to measure the association effect of the preceding item on the following item. A lift greater than 1 indicates that the preceding item has a positive association effect on the following item. The higher the lift, the stronger the association effect. Specifically, the confidence of the preceding item on the following item is divided by the support of the following item to obtain the lift of the preceding item on the following item. For example, if the confidence of item A on item B is 0.5 and the support of item B is 0.2, then the lift of item A on item B is 0.5 / 0.2=2.5. A lift greater than 1 indicates that item A has a positive association effect on item B. The higher the lift, the stronger the association effect.
[0076] In this way, the lift between two items in the directed weighted graph can be calculated, thereby quantifying the association effect between items. These lift data will provide important data support for the subsequent construction of the directed weighted graph, helping to build a directed weighted graph that reflects the association relationship between items.
[0077] In this embodiment, by traversing the user's historical behavior commodity data set, counting the number of transactions that occur simultaneously in the commodity combination, and calculating the confidence of the previous commodity to the next commodity, then counting the number of transactions that occur in the next commodity in the commodity combination, and calculating the support of the next commodity, important support data is provided for subsequent lift calculations. By dividing the confidence by the support, the lift of the previous commodity to the next commodity is calculated, the association effect between commodities is quantified, and important data support is provided for the construction of directed weighted graphs.
[0078] Based on any embodiment of the method of this application, please refer to Figure 4 , based on the starting commodity node, performing a random walk operation on the directed weighted graph to obtain multiple commodity paths, including:
[0079] Step S5310: Create a weight matrix based on the commodity nodes in the directed weighted graph and the directed edge weights between the commodity nodes;
[0080] Based on the commodity nodes in the directed weighted graph and the weights of the directed edges between commodity nodes, a weight matrix is created. The weight matrix is a two-dimensional matrix that represents the connection relationship between commodity nodes and the weights of the edges in the directed weighted graph.
[0081] Specifically, the rows and columns of the weight matrix correspond to the commodity nodes in the directed weighted graph. Each element in the matrix represents the weight of the directed edge between the commodity nodes in the corresponding row and column. If there is a directed edge between two commodity nodes, the element value at the corresponding position in the matrix is the weight of the directed edge; if there is no directed edge between two commodity nodes, the element value at the corresponding position in the matrix is 0.
[0082] For example, suppose there are four commodity nodes A, B, C, and D in a directed weighted graph, and there are the following directed edges and their weights: the weight of A→B is 0.7, the weight of A→C is 0.3, the weight of B→D is 0.5, and the weight of C→D is 0.6. Then, the weight matrix can be expressed as:
[0083] A B C D A 0 0.7 0.3 0 B 0 0 0 0.5 C 0 0 0 0.6 D 0 0 0 0
[0084] In this weight matrix, the rows and columns of the matrix correspond to commodity nodes A, B, C, and D. The elements in the matrix represent the weights of the directed edges between the commodity nodes in the corresponding rows and columns. For example, the element value of the first row and second column in the matrix is 0.7, which means that the weight of the directed edge from commodity node A to commodity node B is 0.7.
[0085] By creating a weight matrix, the connection relationship and edge weights between commodity nodes in a directed weighted graph can be easily represented, thereby providing data support for subsequent random walk operations. The weight matrix not only reflects the association relationship between commodity nodes, but also reflects the strength of the association between commodity nodes through weights, providing an important data basis for random walk operations.
[0086] Step S5320: Calculate the transition probability between the current commodity node and all neighboring commodity nodes according to the weight matrix, where the transition probability is the sum of the directed edge weight and the directed edge weights of all outgoing edges of the current commodity node.
[0087] After creating the weight matrix, the transition probability between the current commodity node and all neighbor commodity nodes is calculated based on the weight matrix. The transition probability refers to the probability of transferring from the current commodity node to its neighbor commodity node during the random walk process.
[0088] In one embodiment, the directed edge weight between the current commodity node and each neighboring commodity node is divided by the sum of the directed edge weights of all outgoing edges of the current commodity node to obtain the transition probability between the current commodity node and each neighboring commodity node. For example, assume that the current commodity node is A, its neighboring commodity nodes are B and C, and the directed edge weight of A→B is 0.7, and the directed edge weight of A→C is 0.3. Then, the sum of the directed edge weights of all outgoing edges of the current commodity node A is 0.7+0.3=1.0. Divide the directed edge weight of A→B, 0.7, by 1.0, and obtain a transition probability of 0.7 from A to B; divide the directed edge weight of A→C, 0.3, by 1.0, and obtain a transition probability of 0.3 from A to C.
[0089] In this way, the transition probability between the current commodity node and all its neighboring commodity nodes can be calculated, thus providing data support for the random walk operation. The transition probability reflects the strength of the association between commodity nodes. The higher the transition probability, the greater the possibility of transferring from the current commodity node to the target neighboring commodity node.
[0090] Step S5330: randomly generate a number within the transition probability threshold range, and select a corresponding neighbor node as the next node of the current node based on the generated number and the transition probability;
[0091] In one embodiment, the transition probability threshold range is determined by the sum of the directed edge weights of all outgoing edges of the current commodity node, that is, the transition probability threshold range is 0 to the sum of the directed edge weights of all outgoing edges of the current commodity node. After calculating the transition probability between the current commodity node and all neighboring commodity nodes, a number is randomly generated within the transition probability threshold range, and based on the generated number and the transition probability, the corresponding neighbor node is selected as the next node of the current node.
[0092] For example, suppose the current commodity node is A, its neighboring commodity nodes are B and C, and the transition probability from A to B is 0.7, and the transition probability from A to C is 0.3. Then determine the transition probability threshold range between 0 and 1, where the transition probability from A to B is 0.7, and the transition probability from A to C is 0.3. Then, a number is randomly generated between 0 and 1, assuming that the generated number is 0.5. Since 0.5 falls within the transition probability range from A to B (between 0 and 0.7), commodity node B is selected as the next node of the current commodity node A.
[0093] Step S5340: monitor the number of nodes in real time. If the number of nodes reaches a preset threshold, generate a corresponding number of commodity paths from the starting commodity node to other commodity nodes. Repeat the above steps multiple times to generate multiple different commodity paths.
[0094] When performing a random walk operation, the number of nodes being walked is monitored in real time. When the number of nodes being walked reaches a preset number threshold, a commodity path is generated from the starting commodity node to other commodity nodes. The preset number threshold is set by a technician in this field as needed, indicating the length of the path generated by each random walk. For example, assuming that the preset number threshold is 5, starting from the starting commodity node, the next node is selected in turn for walking until the number of nodes being walked reaches 5. At this point, a commodity path is generated from the starting commodity node to other commodity nodes, such as A→B→C→D→E.
[0095] To generate multiple different product paths, repeat the above random walk operation multiple times. Each random walk operation generates a new product path because the next node randomly selected each time may be different. By repeating the random walk operation multiple times, multiple different product paths are generated, each of which represents the sequence that a user may experience when browsing or purchasing products.
[0096] In this embodiment, by creating a weight matrix, the connection relationship and edge weights between each commodity node in the directed weighted graph are conveniently represented, thereby providing data support for subsequent random walk operations; by calculating the transition probability between the current commodity node and all neighbor commodity nodes, and then randomly generating a number within the transition probability threshold range, and based on the generated number and the transition probability, selecting the corresponding neighbor node as the next node of the current node, so as to generate multiple commodity paths; by real-time monitoring the number of wandering nodes, and generating a commodity path when a preset number threshold is reached, and repeatedly generating multiple different commodity paths, a variety of associations between commodity nodes are captured, providing rich data support for subsequent vector learning and commodity recommendation.
[0097] Based on any embodiment of the method of this application, please refer to Figure 5, according to the weight matrix, calculate the transition probability between the current commodity node and all neighboring commodity nodes, the transition probability being the sum of the directed edge weight and the directed edge weights of all outgoing edges of the current commodity node, including:
[0098] Step S5321, traverse the weight matrix to obtain the weight of the directed edge from the current commodity node to the target neighbor commodity node;
[0099] In this step, the weight matrix is traversed row by row to find the row corresponding to the current product node, and then the column corresponding to the target neighbor product node is found in the row to obtain the weight of the directed edge from the current product node to the target neighbor product node.
[0100] For example, assuming that the current commodity node is A and the target neighbor commodity node is B, the weight matrix is as follows:
[0101] A B C D A 0 0.7 0.3 0 B 0 0 0 0.5 C 0 0 0 0.6 D 0 0 0 0
[0102] Find the row corresponding to the current product node A (row 1), then find the column corresponding to the target neighbor product node B in the row (column 2), and obtain the directed edge weight of the current product node A pointing to the target neighbor product node B as 0.7.
[0103] Step S5322: Divide the obtained directed edge weight by the sum of the directed edge weights of all outgoing edges of the current commodity node to obtain the transition probability between the current commodity node and the target neighbor commodity node.
[0104] After obtaining the weight of the directed edge from the current commodity node to the target neighbor commodity node, the directed edge weight is divided by the sum of the directed edge weights of all outgoing edges of the current commodity node to obtain the transition probability between the current commodity node and the target neighbor commodity node. The transition probability refers to the probability of transferring from the current commodity node to its neighbor commodity node during the random walk. For example, suppose the current commodity node is A, its neighbor commodity nodes are B and C, and the directed edge weight of A→B is 0.7, and the directed edge weight of A→C is 0.3. Then, the sum of the directed edge weights of all outgoing edges of the current commodity node A is 0.7+0.3=1.0. Divide the directed edge weight of A→B 0.7 by 1.0, and the transition probability from A to B is 0.7; divide the directed edge weight of A→C 0.3 by 1.0, and the transition probability from A to C is 0.3.
[0105] In this embodiment, the weight matrix is traversed to obtain the weight of the directed edge from the current commodity node to the target neighbor commodity node. The transition probability between the current commodity node and the target neighbor commodity node is calculated by dividing the obtained directed edge weight by the sum of the directed edge weights of all outgoing edges of the current commodity node. The association strength between the commodity nodes is quantified, providing data support for the random walk operation.
[0106] Based on any embodiment of the method of this application, please refer to Figure 6 , vectorizing the commodity nodes in the commodity path to obtain a node vector of each commodity node, including:
[0107] Step S5350: Initialize the word skipping model and set the window size, where the window size is used to frame each commodity node and its neighboring commodity nodes;
[0108] After the product path is determined, the product path is preprocessed, including word segmentation, removal of stop words, etc., and a random initialization vector is assigned to each word. Initialize the skip-word model and set the window size. The skip-word model is a neural network model for learning product node vectors. Its core idea is to learn the vector representation of each product node by maximizing the co-occurrence probability between the central product node and its context product nodes. The window size refers to the framed product node and its neighboring product nodes in the product path. For example, if the window size is 1, then for the product path A→B→C→D, when B is the central product node, A and C are regarded as the context product nodes of B. By setting the window size, the context product node range of each central product node can be determined, thereby providing data support for subsequent vector learning.
[0109] The choice of window size affects the accuracy and efficiency of vector learning. A smaller window size can capture the local relationship between commodity nodes, but may ignore long-distance associations; a larger window size can capture a wider range of associations, but may increase computational complexity. Therefore, the choice of window size needs to be weighed according to the specific application scenario and data characteristics, and can be set by technicians in this field as needed.
[0110] Step S5360: For each commodity node, take it as the central commodity node, and take the neighboring commodity nodes in its window as the context commodity nodes based on the window size.
[0111] After initializing the skip-word model and setting the window size, traverse each commodity node in the commodity path, take it as the central commodity node, and take the neighbor commodity nodes in its window as the context commodity nodes based on the set window size. For example, assume that the commodity path is A→B→C→D, and the window size is 1. Then, when B is the central commodity node, A and C are regarded as the context commodity nodes of B. Similarly, when C is the central commodity node, B and D are regarded as the context commodity nodes of C. In this way, the context commodity nodes can be determined for each central commodity node, thereby providing data support for subsequent vector learning. By taking each commodity node as the central commodity node and determining its context commodity nodes based on the window size, the local relationship between commodity nodes can be captured, thereby better learning the vector representation of each commodity node.
[0112] Step S5370: Generate negative samples corresponding to each central commodity node based on the commodity nodes not in the window;
[0113] In one embodiment, after the context commodity nodes of each central commodity node are determined, negative sampling technology is generally used to generate negative sample commodity nodes for each central commodity node. Negative sampling is a method to reduce the amount of computation. By randomly selecting some commodity nodes that are not in the context as negative samples, the model can be trained faster. Specifically, by randomly selecting some commodity nodes that are not in its window for each central commodity node as negative sample commodity nodes. For example, assume that the central commodity node is B, its context commodity nodes are A and C, and the commodity path is A→B→C→D. At this time, some commodity nodes that are not within the range of A and C are randomly selected as negative sample commodity nodes of B, such as D. In this way, negative sample commodity nodes can be generated for each central commodity node, thereby providing data support for subsequent vector learning.
[0114] Step S5380: Maximize the co-occurrence probability between the central product node and its context product nodes, and minimize the co-occurrence probability between the central product node and the negative sample product nodes to train the skip-word model, thereby obtaining a node vector corresponding to each product node.
[0115] When training the word skipping model, an objective function is first defined, which aims to maximize the co-occurrence probability between the central product node and its context product nodes, while minimizing the co-occurrence probability between the central product node and the negative sample product nodes. Specifically, for each central product node, the co-occurrence probability with the context product node is calculated, and the co-occurrence probability with the negative sample product node is calculated. The calculation of the co-occurrence probability usually uses the softmax function, which converts the vector inner product of the central product node and the context product node or the negative sample product node into a probability value. By maximizing the co-occurrence probability between the central product node and the context product node, the correlation between the central product node and the context product node can be enhanced; by minimizing the co-occurrence probability between the central product node and the negative sample product node, the correlation between the central product node and the product nodes that are not in its context can be reduced. During the training process, the gradient descent method or other optimization algorithms are used to update the vector of each product node so that the objective function reaches the optimal value. Through multiple iterative training, the word skipping model can learn the vector representation of each product node, which captures the local and global relationships between product nodes, thereby providing data support for subsequent product recommendations.
[0116] In this embodiment, by initializing the word-skipping model and setting the window size, the number of neighboring commodity nodes considered before and after each commodity node can be determined, thereby providing data support for subsequent vector learning. Then each commodity node is taken as the central commodity node, and its context commodity node is determined based on the set window size. The setting of the window size helps to capture the local and global relationships between commodity nodes, and improve the accuracy and efficiency of vector learning. Using negative sampling technology to generate negative sample commodity nodes for each central commodity node can reduce the amount of calculation, speed up the model training speed, and at the same time, by introducing negative samples, enhance the model's ability to distinguish non-context commodity nodes and improve the accuracy of vector learning. When training the word-skipping model, by maximizing the co-occurrence probability of the central commodity node and its context commodity node, and minimizing the co-occurrence probability of the central commodity node and the negative sample commodity node, the correlation between the central commodity node and its context commodity node can be enhanced, and the correlation with the non-context commodity node can be reduced, thereby learning the vector representation of each commodity node, capturing the local and global relationships between commodity nodes, and providing data support for subsequent commodity recommendations.
[0117] Based on any embodiment of the method of this application, please refer to Figure 7 , calculating the similarity between the product corresponding to the starting product node and each other product in its product path based on the comprehensive vector, and selecting the combination product corresponding to the starting product node according to the similarity, including:
[0118] Step S5510: For the product corresponding to the starting product node, a preset similarity measurement algorithm is applied to calculate the similarity between the product and each other product in the product path;
[0119] After obtaining the comprehensive vector of each product, the similarity between the product corresponding to the starting product node and each other product in its product path is calculated based on these comprehensive vectors. Similarity measurement methods are used to measure the similarity between two products. Common similarity measurement methods include cosine similarity, Euclidean distance, Pearson correlation coefficient, etc. Specifically, one or more similarity measurement methods are used to calculate the similarity between the product corresponding to the starting product node and each other product in its product path. For example, if the starting product node is product A, and the product path contains products B, C, and D, the similarity between product A and product B, product C, and product D is calculated respectively.
[0120] Cosine similarity is a commonly used similarity measurement method, which measures the similarity of two vectors by calculating the cosine value of the angle between them. Euclidean distance measures the similarity of two vectors by calculating the spatial distance between them. Pearson correlation coefficient measures the similarity of two vectors by calculating the linear correlation between them. In one embodiment, the similarity between the product corresponding to the starting product node and each other product in its product path is calculated by Euclidean distance. The specific steps are as follows: first, the total vector of the product corresponding to the starting node of the product is subtracted from the total vector of other products to obtain the difference of each component in the total vector, and then the difference of each component is squared respectively, and the square results are summed up, and finally the result of the summation is squared to obtain the Euclidean distance, which represents the similarity between the product corresponding to the starting node of the product and other products.
[0121] By using the similarity measurement method, the similarity between the product corresponding to the starting product node and each other product in its product path can be quantified, thereby providing data support for subsequent product recommendations. The higher the similarity, the stronger the association between the two products, and the greater the possibility of recommendation. By calculating the similarity, other products that are most relevant to the starting product node can be identified, so as to recommend suitable combination products to users.
[0122] Step S5520: Select the corresponding number of product combinations with the highest similarity according to the product recommendation list length threshold set by the user;
[0123] After calculating the similarity between the product corresponding to the starting product node and each other product in its product path, the corresponding number of product combinations with the highest similarity are selected according to the product recommendation list length threshold set by the user. The product recommendation list length threshold is set by those skilled in the art as needed.
[0124] In one embodiment, the calculated similarity matrix is sorted in order of similarity from high to low. Then, according to the length threshold of the recommended product list set by the user, a combination of products with the highest similarity of the corresponding number is selected. For example, if the length of the recommendation list set by the user is 3, the three products with the highest similarity are selected as the combination products. For example, suppose the starting product node is product A, and the product path contains product B, product C, and product D. The similarities between product A and product B, product C, and product D are calculated to be 0.8, 0.6, and 0.7, respectively. Sort in order of similarity from high to low to obtain product B, product D, and product C. If the length of the recommendation list set by the user is 2, the two products with the highest similarity, namely product B and product D, are selected as the combination product.
[0125] Step S5530: Arrange the selected product combinations in descending order according to similarity, generate a recommended list of combined products, and display it on the user terminal interface for the user to browse and purchase.
[0126] After selecting the corresponding number of product combinations with the highest similarity according to the product recommendation list length threshold set by the user, a combination product recommendation list is generated by arranging these product combinations in order of similarity from high to low. Then, the generated combination product recommendation list is displayed on the user terminal interface for users to browse and purchase. The generated combination product recommendation list is displayed on the user terminal interface. The display method can be to present the recommendation list to the user in a list, card or other form through the front-end interface of the e-commerce platform. The display content may include information such as pictures, titles, descriptions, prices, etc. of the product, so that users can better understand and select products. Users can quickly find products of interest and purchase them by browsing the recommendation list, thereby enhancing the user's shopping experience.
[0127] In this embodiment, by using similarity measurement methods (such as cosine similarity, Euclidean distance, etc.), the similarity between the commodity corresponding to the starting commodity node and each other commodity in its commodity path can be quantified, thereby providing data support for subsequent commodity recommendations. The higher the similarity, the stronger the association between the two commodities, and the greater the possibility of recommendation, which helps to identify other commodities that are most relevant to the starting commodity node and recommend suitable combination commodities to users. According to the length threshold of the commodity recommendation list set by the user, the corresponding number of commodity combinations with the highest similarity are selected to ensure that the length of the recommendation list meets the user's expectations. At the same time, by selecting the commodity combination with the highest similarity, the relevance and user satisfaction of the recommended commodities can be maximized, and the user's shopping experience can be improved. The selected commodity combinations are arranged in order from high to low similarity, and a combination commodity recommendation list is generated and displayed on the user terminal interface, so that users can intuitively browse and select highly relevant commodities, simplify the user's shopping decision-making process, and improve the purchase conversion rate. At the same time, through a clear display method, the user's shopping experience and satisfaction are enhanced.
[0128] See also Figure 8 , a combination product recommendation device provided to meet one of the purposes of the present application is a functional embodiment of the combination product recommendation method of the present application. On the other hand, the device is a combination product recommendation device provided to meet one of the purposes of the present application, including an association rule indicator determination module 5100, a starting product node determination module 5200, a product node vector learning module 5300, a multimodal information fusion module 5400 and a product recommendation list generation module 5500, wherein the association rule indicator determination module 5100 is configured to determine the association rule indicators between each product in the user's historical behavior product data set, and construct a directed weighted graph with each product as a node based on the association rule indicators; the starting product node determination module 5200 is configured to monitor the user's behavior on the terminal device , so as to determine the starting product node in the directed weighted graph; a product node vector learning module 5300 is configured to perform a random walk operation on the directed weighted graph based on the starting product node to obtain multiple product paths, and vectorize the product nodes in the product path to obtain a node vector of each of the product nodes; a multimodal information fusion module 5400 is configured to fuse the text vector, image vector and node vector corresponding to each product in the product path to obtain a comprehensive vector of each product; a product recommendation list generation module 5500 is configured to calculate the similarity between the product corresponding to the starting product node and each other product in its product path based on the comprehensive vector, and screen out the combination product corresponding to the starting product node according to the similarity.
[0129] On the basis of any embodiment of the device of the present application, the association rule index determination module 5100 includes: a product node determination submodule, which is configured to use each product in the user's historical behavior product data set as a node of a directed weighted graph; an association rule index calculation submodule, which is configured to calculate the association rule index between each product in the directed weighted graph based on the user's historical behavior product data set of the e-commerce platform, wherein the association rule index includes support, confidence and lift, wherein the support is used to evaluate the prevalence of the combination of the preceding product and the succeeding product in the user's behavior, the confidence is used to evaluate the strength of the association between the preceding product and the succeeding product, and the lift is used to evaluate the degree to which the appearance of the preceding product increases the probability of the appearance of the succeeding product; a directed edge adding submodule, which is configured to add a directed edge from the preceding product to the succeeding product for the combination of the two products, if the lift of the preceding product to the succeeding product is greater than 1, and record the weight of the directed edge as the support of the corresponding succeeding product; a directed edge filtering submodule, which is configured to determine that the weight of the directed edge from the preceding product to the succeeding product is 0 if the lift is not greater than 1.
[0130] Based on any embodiment of the device of the present application, the association rule indicator calculation submodule includes: a confidence calculation submodule, which is configured to traverse the user's historical behavior product data set, count the number of transactions in which two product combinations appear simultaneously in the historical behavior product data set, divide the counted number of transactions by the number of transactions in which the previous product appears in the product combination, and obtain the confidence of the previous product to the next product, wherein the transaction describes a complete historical behavior record of the user on the e-commerce platform; a support calculation submodule, which is configured to count the number of transactions in which the next product appears, divide the counted number by the total number of transactions, and obtain the support of the next product, wherein the total number of transactions is the total number of all the historical behavior records in the user's historical behavior product data set; a lift calculation submodule, which is configured to divide the confidence of the previous product to the next product by the support of the next product, and obtain the lift of the previous product to the next product.
[0131] Based on any embodiment of the device of the present application, the commodity node vector learning module 5300 includes: a weight matrix creation submodule, which is configured to create a weight matrix based on the commodity nodes in the directed weighted graph and the directed edge weights between the commodity nodes; a transition probability calculation submodule, which is configured to calculate the transition probability between the current commodity node and all neighbor commodity nodes according to the weight matrix, and the transition probability is the sum of the directed edge weight and the directed edge weights of all outgoing edges of the current commodity node; a node determination submodule, which is configured to randomly generate a number within the transition probability threshold range, and select the corresponding neighbor node as the next node of the current node based on the generated number and the transition probability; a commodity path generation submodule, which is configured to monitor the number of wandering nodes in real time, and if the number of nodes reaches a preset number threshold, generate a corresponding number of commodity paths from the starting commodity node to other commodity nodes, and repeat the above steps multiple times to generate multiple different commodity paths.
[0132] Based on any embodiment of the device of the present application, the transition probability calculation submodule includes: a directed edge weight acquisition submodule, which is configured to traverse the weight matrix to obtain the directed edge weight of the current product node pointing to the target neighbor product node; a transition probability determination submodule, which is configured to divide the obtained directed edge weight by the sum of the directed edge weights of all outgoing edges of the current product node to obtain the transition probability between the current product node and the target neighbor product node.
[0133] Based on any embodiment of the device of the present application, the commodity node vector learning module 5300 further includes: a skip-word model initialization submodule, configured to initialize the skip-word model and set a window size, wherein the window size is used to frame each commodity node and its neighbor commodity nodes; a context commodity node determination submodule, configured to take each commodity node as a central commodity node and, based on the window size, take the neighbor commodity nodes within its window as context commodity nodes; a negative sample commodity node generation submodule, configured to generate negative samples corresponding to each central commodity node based on commodity nodes not within the window; and a node vector determination submodule, configured to maximize the co-occurrence probability of the central commodity node and its context commodity nodes, and minimize the co-occurrence probability of the central commodity node and the negative sample commodity nodes, to train the skip-word model, thereby obtaining a node vector corresponding to each commodity node.
[0134] Based on any embodiment of the device of the present application, the product recommendation list generation module 5500 includes: a similarity calculation submodule, which is configured to apply a preset similarity measurement algorithm to the product corresponding to the starting product node to calculate the similarity between it and each other product in the product path; a product combination determination submodule, which is configured to select a corresponding number of product combinations with the highest similarity based on a product recommendation list length threshold set by a user; a combination product list generation submodule, which is configured to arrange the selected product combinations in order of similarity from high to low, generate a combination product recommendation list, and display it on the user terminal interface for the user to browse and purchase.
[0135] In order to solve the above technical problems, the present application also provides a computer device. Fig. 9 As shown, a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database may store a control information sequence. When the computer-readable instructions are executed by the processor, the processor may implement a combination product recommendation method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor may execute the combination product recommendation method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0136] In this embodiment, the processor is used to execute Figure 8 The memory stores the program code and various data required to execute the above modules or submodules. The network interface is used to transmit data between user terminals or servers. The memory in this embodiment stores the program code and data required to execute all modules / submodules in the combination product recommendation device of this application, and the server can call the program code and data of the server to execute the functions of all submodules.
[0137] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the combination product recommendation method of any embodiment of the present application.
[0138] A person skilled in the art can understand that all or part of the processes in the above-mentioned embodiments of the present application can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0139] It will be understood by those skilled in the art that the various operations, methods, steps, measures, and schemes in the processes discussed in this application may be alternated, changed, combined, or deleted. Furthermore, other steps, measures, and schemes in the various operations, methods, and processes discussed in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted. Furthermore, the steps, measures, and schemes in the various operations, methods, and processes in the prior art that are open source and in this application may also be alternated, changed, rearranged, decomposed, combined, or deleted.
[0140] The above description is only a partial implementation method of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for recommending a combination of products, characterized in that: include: Determine an association rule index between each commodity in the user's historical behavior commodity data set, and construct a directed weighted graph with each commodity as a node based on the association rule index; Monitor the user's interactive behavior on the terminal device to determine the starting product node in the directed weighted graph; Based on the starting commodity node, a random walk operation is performed on the directed weighted graph to obtain a plurality of commodity paths, and commodity nodes in the commodity paths are vectorized to obtain a node vector of each commodity node; The text vector, the picture vector and the node vector corresponding to each product in the product path are integrated to obtain a comprehensive vector of each product; The similarity between the product corresponding to the starting product node and each other product in its product path is calculated based on the comprehensive vector, and the combination product corresponding to the starting product node is screened out according to the similarity.
2. The method for recommending combined products according to claim 1, characterized in that: Determine the association rule index between each commodity in the user's historical behavior commodity data set, and construct a directed weighted graph with each commodity as a node based on the association rule index, including: Each product in the user's historical behavior product data set is used as a node of a directed weighted graph; Based on the historical behavior commodity data set of users on the e-commerce platform, the association rule indicators between the two commodities in the directed weighted graph are calculated. The association rule indicators include support, confidence and lift. The support is used to evaluate the prevalence of the combination of the preceding commodity and the succeeding commodity in user behavior, the confidence is used to evaluate the strength of the association between the preceding commodity and the succeeding commodity, and the lift is used to evaluate the degree to which the appearance of the preceding commodity increases the probability of the appearance of the succeeding commodity; For the combination of two items, if the degree of improvement of the preceding item on the succeeding item is greater than 1, a directed edge from the preceding item to the succeeding item is added, and the weight of the directed edge is recorded as the support degree of the corresponding succeeding item; If the lift is not greater than 1, the weight of the directed edge from the preceding item to the succeeding item is determined to be 0.
3. The method for recommending combined products according to claim 2, characterized in that: Calculating the association rule index between two commodities in the directed weighted graph includes: Traverse the user's historical behavior product data set, count the number of transactions in which two product combinations appear simultaneously in the historical behavior product data set, divide the number of transactions obtained by the number of transactions in which the previous product appears in the product combination, and obtain the confidence of the previous product to the next product, wherein the transaction describes a complete historical behavior record of the user on the e-commerce platform; Count the number of transactions in which the subsequent product appears, and divide the counted number by the total number of transactions to obtain the support degree of the subsequent product. The total number of transactions is the total number of all the historical behavior records in the user's historical behavior product data set; Divide the confidence of the previous item on the next item by the support of the next item to get the lift of the previous item on the next item.
4. The method for recommending combined products according to claim 1, characterized in that: Based on the starting commodity node, a random walk operation is performed on the directed weighted graph to obtain multiple commodity paths, including: Create a weight matrix based on the product nodes in the directed weighted graph and the directed edge weights between the product nodes; According to the weight matrix, the transition probability between the current commodity node and all neighboring commodity nodes is calculated, where the transition probability is the sum of the directed edge weight and the directed edge weights of all outgoing edges of the current commodity node; Randomly generate a number within a transition probability threshold range, and select a corresponding neighbor node as the next node of the current node based on the generated number and the transition probability; The number of nodes being roamed is monitored in real time. If the number of nodes reaches a preset threshold, a commodity path with a corresponding number of nodes from the starting commodity node to other commodity nodes is generated. The above steps are repeated multiple times to generate multiple different commodity paths.
5. The method for recommending combined products according to claim 4, characterized in that: According to the weight matrix, the transition probability between the current commodity node and all neighboring commodity nodes is calculated, where the transition probability is the sum of the directed edge weight and the directed edge weights of all outgoing edges of the current commodity node, including: Traversing the weight matrix, obtaining the weight of the directed edge from the current commodity node to the target neighbor commodity node; The obtained directed edge weight is divided by the sum of the directed edge weights of all outgoing edges of the current commodity node to obtain the transition probability between the current commodity node and the target neighbor commodity node.
6. The method for recommending combined products according to claim 1, characterized in that: Vectorizing the commodity nodes in the commodity path to obtain a node vector of each commodity node includes: Initialize the word skipping model and set the window size, where the window size is used to frame each commodity node and its neighboring commodity nodes; For each commodity node, take it as the central commodity node, and take its neighboring commodity nodes in the window as the context commodity nodes based on the window size; Generate negative samples corresponding to each central product node based on the product nodes not in the window; The skip-gram model is trained by maximizing the co-occurrence probability between the central product node and its context product nodes, while minimizing the co-occurrence probability between the central product node and the negative sample product nodes, so as to obtain the node vector corresponding to each product node.
7. The method for recommending combined products according to claim 1, characterized in that: Calculating the similarity between the product corresponding to the starting product node and each other product in the product path based on the comprehensive vector, and selecting the combination product corresponding to the starting product node according to the similarity, including: For the product corresponding to the starting product node, a preset similarity measurement algorithm is applied to calculate the similarity between the product and each other product in the product path; According to the product recommendation list length threshold set by the user, select the corresponding number of product combinations with the highest similarity; Arrange the selected product combinations in descending order of similarity to generate a recommended list of combined products.
8. A device for recommending combination products, characterized in that: include: An association rule indicator determination module is configured to determine an association rule indicator between each commodity in a user's historical behavior commodity data set, and construct a directed weighted graph with each commodity as a node based on the association rule indicator; A starting commodity node determination module is configured to monitor the user's interactive behavior on the terminal device to determine the starting commodity node in the directed weighted graph; A commodity node vector learning module is configured to perform a random walk operation on the directed weighted graph based on the starting commodity node to obtain multiple commodity paths, and vectorize the commodity nodes in the commodity paths to obtain a node vector for each of the commodity nodes; a multimodal information fusion module, configured to fuse text vectors, image vectors, and node vectors corresponding to each product in the product path to obtain a comprehensive vector for each product; The product recommendation list generation module is configured to calculate the similarity between the product corresponding to the starting product node and each other product in its product path based on the comprehensive vector, and select the combination product corresponding to the starting product node according to the similarity.
9. A computer device comprising a central processing unit and a memory, characterized in that: The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: It stores a computer program implemented according to the method described in any one of claims 1 to 7 in the form of computer-readable instructions, and when the computer program is called and executed by a computer, the steps included in the corresponding method are executed.
Citation Information
Cited By
E-commerce product recommendation method and system based on artificial intelligence algorithm
CN120634680A
An e-commerce product recommendation method and system based on an artificial intelligence algorithm
CN120634680B
