A user-product similarity learning method and system based on optimal transmission
By constructing a user-product relationship graph, using graph convolution neural network to extract feature vectors, and mapping them to a consistent distribution space through the optimal transmission algorithm, the problem of inconsistent feature distribution in user product similarity learning is solved, and more accurate product recommendations are achieved.
Patent Information
- Application Number
- CN202411773039.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-04-08
AI Technical Summary
In Internet e-commerce, how to improve the accuracy and practical significance of user product similarity learning based on the optimal transmission method, and thus achieve more accurate product recommendations.
By constructing user relationship diagrams and product relationship diagrams, the graph convolution neural network is used to extract user feature vectors and product feature vectors, and map them to spaces with consistent distributions, optimizing the transmission matrix to obtain the optimal similarity matrix.
The distribution consistency of user characteristics and product characteristics is achieved, the accuracy and practical significance of the similarity matrix are improved, and the accuracy and conversion rate of product recommendations are improved.
Smart Images

Figure CN119784464A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, in particular to the field of Internet e-commerce technology, and in particular to a user-product similarity learning method, system, electronic device and storage medium based on optimal transmission. Background Art
[0002] In the application scenario of recommending products to users, the user's characteristics are constructed by obtaining the user's personal attributes and personal preferences. For products, product characteristics are constructed based on the product's multiple attribute information. How to recommend items that different users are really interested in? The probability value of each user's interest in each product can be obtained by constructing a similarity matrix between user characteristics and product characteristics. The larger the value, the more interested the user is in the product, and the more it needs to be recommended.
[0003] Therefore, how to provide a user-product similarity learning method, system, electronic device and storage medium based on optimal transmission has become a technical problem that urgently needs to be solved in this field. Summary of the invention
[0004] The purpose of the present invention is to provide a user-product similarity learning method, system, electronic device and storage medium based on optimal transmission.
[0005] According to a first aspect of the present invention, there is provided a user-item similarity learning method based on optimal transmission, comprising:
[0006] Step S1: construct a user relationship graph with users as nodes based on user attribute characteristics and the associations between different users;
[0007] Step S2: construct a commodity relationship graph with commodities as nodes based on commodity attribute characteristics and the associations between different commodities;
[0008] Step S3: applying a graph convolutional neural network to extract a user feature vector from the user relationship graph; applying a graph convolutional neural network to extract a product feature vector from the product relationship graph;
[0009] Step S4: Map the user feature vector and the product feature vector to obtain the mapped user feature vector and product feature vector, and a similarity matrix.
[0010] According to the method of the first aspect of the present invention, in step S3, the graph convolutional neural network uses two graph convolutional layers to extract user feature vectors and product feature vectors.
[0011] According to the method of the first aspect of the present invention, in step S4, mapping the user feature vector and the product feature vector to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and the similarity matrix includes:
[0012] Define the marginal probability distribution representing all user samples and the marginal probability distribution representing all product samples;
[0013] Based on the marginal probability distribution of the user samples and the marginal probability distribution of the product samples, a transmission matrix between the user set and the product set is calculated;
[0014] Based on the transmission distance between the user and the product, the transmission matrix is optimized to obtain an optimized similarity matrix;
[0015] Based on the transmission distance and the optimized transmission matrix, the user feature vector and the product feature vector are optimized to obtain a mapped user feature vector and a product feature vector;
[0016] The transmission matrix and the user feature vector and the product feature vector are optimized repeatedly, and the optimal transmission matrix, user feature vector and product feature vector are obtained through cyclic iteration until the algorithm converges.
[0017] According to the method of the first aspect of the present invention, in step S4, defining the marginal probability distribution representing all user samples and the marginal probability distribution representing all commodity samples includes:
[0018] There are n user samples and m product samples, p is an n×1 vector and each element p i The value of indicates the importance of the sample to the user, and is set to The importance of each user sample; q is an m×1 vector and each element q j The values are set to p i The amount of transported material at the starting point, q j The amount of material at the endpoint.
[0019] According to the method of the first aspect of the present invention, in step S4, the step of obtaining a transmission matrix between a user set and a commodity set based on the marginal probability distribution of the user sample and the marginal probability distribution of the commodity sample includes:
[0020] According to the constraints of the transmission matrix γ, the transmission matrix between the user set and the product set is calculated:
[0021] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n=q}
[0022] Where B represents the set of transmission matrices that satisfy the constraints; 1 m represents a vector of size m×1 consisting of 1s; 1 n represents an n-by-1 vector of 1s.
[0023] According to the method of the first aspect of the present invention, in step S4, the transmission distance between the application user and the commodity is used to optimize the transmission matrix, and the optimized transmission matrix, i.e., the similarity matrix, includes:
[0024] When the transmission matrix satisfies the constraints, the transmission cost is minimized:
[0025]
[0026] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}
[0027] Among them, γ * represents the optimized transmission matrix; <.,.> represents the inner product of the matrix, D represents the transmission distance between the user and the product, and <γ, D) represents the total transmission overhead.
[0028] According to the method of the first aspect of the present invention, in step S4, applying the transmission distance and the optimized transmission matrix to optimize the user feature vector and the product feature vector to obtain the mapped user feature vector and product feature vector comprises:
[0029] Optimize the user feature vector and the product feature vector so that the user feature vector and the product feature vector are mapped to a space with consistent distribution, that is,
[0030]
[0031] in, represents the optimized user feature vector; Represents the optimized product feature vector.
[0032] The second aspect of the present invention discloses a user-product similarity learning system based on optimal transmission; the system comprises:
[0033] A first processing module is configured to construct a user relationship graph with users as nodes based on user attribute characteristics and associations between different users;
[0034] The second processing module is configured to construct a commodity relationship graph with commodities as nodes based on commodity attribute characteristics and associations between different commodities;
[0035] A third processing module is configured to apply a graph convolutional neural network to extract a user feature vector from the user relationship graph; and apply a graph convolutional neural network to extract a product feature vector from the product relationship graph;
[0036] The fourth processing module is configured to map the user feature vector and the product feature vector to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and a similarity matrix.
[0037] According to the system of the second aspect of the present invention, the third processing module is configured such that the graph convolutional neural network uses two graph convolutional layers to extract user feature vectors and product feature vectors.
[0038] According to the system of the second aspect of the present invention, the fourth processing module is configured to map the user feature vector and the product feature vector to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and the similarity matrix includes:
[0039] Define the marginal probability distribution representing all user samples and the marginal probability distribution representing all product samples;
[0040] Based on the marginal probability distribution of the user samples and the marginal probability distribution of the product samples, a transmission matrix between the user set and the product set is calculated;
[0041] Based on the transmission distance between the user and the product, the transmission matrix is optimized to obtain an optimized similarity matrix;
[0042] Based on the transmission distance and the optimized transmission matrix, the user feature vector and the product feature vector are optimized to obtain a mapped user feature vector and a product feature vector;
[0043] The transmission matrix and the user feature vector and the product feature vector are optimized repeatedly, and the optimal transmission matrix, user feature vector and product feature vector are obtained through cyclic iteration until the algorithm converges.
[0044] According to the system of the second aspect of the present invention, the fourth processing module is configured such that the definition of the marginal probability distribution representing all user samples and the marginal probability distribution representing all commodity samples comprises:
[0045] There are n user samples and m product samples, p is an n×1 vector and each element p i The value of indicates the importance of the sample to the user, and is set to The importance of each user sample; q is an m×1 vector and each element q j The values are set to pi The amount of transported material at the starting point, q j The amount of material at the endpoint.
[0046] According to the system of the second aspect of the present invention, the fourth processing module is configured to: based on the marginal probability distribution of the user sample and the marginal probability distribution of the commodity sample, obtain the transmission matrix between the user set and the commodity set, including:
[0047] According to the constraints of the transmission matrix γ, the transmission matrix between the user set and the product set is calculated:
[0048] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}
[0049] Where B represents the set of transmission matrices that satisfy the constraints; 1 m represents a vector of size m×1 consisting of 1s; 1 n represents an n-by-1 vector of 1s.
[0050] According to the system of the second aspect of the present invention, the fourth processing module is configured to optimize the transmission matrix based on the transmission distance between the application user and the commodity to obtain an optimized transmission matrix, that is, a similarity matrix including:
[0051] When the transmission matrix satisfies the constraints, the transmission cost is minimized:
[0052]
[0053] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}
[0054] Among them, γ * represents the optimized transmission matrix; <.,.> represents the inner product of the matrix, D represents the transmission distance between the user and the product, <γ, D ) represents the total transmission overhead.
[0055] According to the system of the second aspect of the present invention, the fourth processing module is configured to apply the transmission distance and the optimized transmission matrix to optimize the user feature vector and the product feature vector to obtain the mapped user feature vector and product feature vector, including:
[0056] Optimize the user feature vector and the product feature vector so that the user feature vector and the product feature vector are mapped to a space with consistent distribution, that is,
[0057]
[0058] in, represents the optimized user feature vector; Represents the optimized product feature vector.
[0059] The third aspect of the present invention discloses an electronic device. The electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps in any one of the user-product similarity learning methods based on optimal transmission in the first aspect of the present disclosure are implemented.
[0060] The fourth aspect of the present invention discloses a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any one of the user-product similarity learning methods based on optimal transmission in the first aspect of the present disclosure are implemented.
[0061] In a fifth aspect, the present application illustrates a computer program product. When instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the method described in any of the above aspects.
[0062] The technical solution provided by this application may have the following beneficial effects:
[0063] In the calculation of user and product similarity, it is believed that the inconsistency of the distribution space of user features and product features leads to inaccurate and meaningless calculated similarity. To this end, based on the optimal transmission algorithm, user features and product features are mapped to a shared embedding space to make their distribution consistent. Through iterative optimization, the user and product feature matrix and similarity matrix after mapping are finally obtained. This similarity matrix is optimal and has practical significance. Based on this similarity matrix, the corresponding products of interest can be recommended to different users.
[0064] In the extraction of user features and product features, we did not use a simple multi-layer perceptron network to extract them. Instead, we constructed a user relationship graph based on the relationship between users and a product relationship graph based on the relationship between products. We used the GCN network to extract feature vectors for the relationship graph. GCN can capture the global information of the entire graph, thus better representing the features of the nodes (users / products). The GCN network makes the feature vectors we finally extract more complete and accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A flowchart of a user-product similarity learning method based on optimal transmission according to an embodiment;
[0066] Figure 2A flowchart of a user-product similarity learning method based on optimal transmission provided according to an embodiment;
[0067] Figure 3 is a structural diagram of a user-product similarity learning system based on optimal transmission according to an embodiment of the present invention;
[0068] Figure 4 A block diagram of an electronic device according to an embodiment of the present invention;
[0069] Figure 5 A block diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0070] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0071] Glossary:
[0072] embedding: hidden vector, feature vector extracted by neural network.
[0073] GCN (Graph Convolutional Network): Graph Convolutional Neural Network.
[0074] Optimal transport: optimal transmission algorithm.
[0075] The present application provides a user-product similarity learning method based on optimal transmission. Based on user attribute characteristics and the association between different users, a user relationship graph is constructed with users as nodes; based on product attribute characteristics and the association between different products, a product relationship graph is constructed with products as nodes; user feature vectors (embedding) are extracted from the user relationship graph through GCN, represented by U; product feature vectors (embedding) are extracted from the product relationship graph through GCN, represented by V; and the user feature vector U and the product feature vector V are finally mapped to a consistent distribution using the optimal transmission method to obtain and And the similarity matrix T; through the similarity matrix T, we can know the probability value of the user's interest in each product, and thus get the final recommendation plan.
[0076] This technical solution targets the recommendation system scenario and recommends the products that different users are most interested in, thereby improving the product conversion rate. By solving the problem of inconsistent distribution of user characteristics and product characteristics, it improves the accuracy and practical significance of similarity matrix calculation, thereby making product recommendations more accurate and valuable.
[0077] Embodiment 1:
[0078] According to a first aspect of the present invention, the present invention discloses a user-product similarity learning method based on optimal transmission. Figure 1 FIG. 1 is a flow chart of a user-product similarity learning method based on optimal transmission according to an embodiment of the present invention. Figure 1 As shown, the method includes:
[0079] Step S1: Based on user attribute features and the associations between different users, a user relationship graph is constructed with users as nodes; a user relationship graph is constructed with each user as a node and the relationship between users as an edge; Figure 2 As shown in the user-graph.
[0080] Step S2: Based on the commodity attribute characteristics and the association between different commodities, a commodity relationship graph is constructed with commodities as nodes; a commodity relationship graph is constructed with each commodity as a node and the relationship between commodities as an edge; Figure 2 As shown in the item-graph.
[0081] Step S3: applying a graph convolutional neural network to extract a user feature vector from the user relationship graph; applying a graph convolutional neural network to extract a product feature vector from the product relationship graph;
[0082] In some embodiments, in step S3, the graph convolutional neural network uses two graph convolutional layers to extract user feature vectors and product feature vectors.
[0083] Specifically, the graph convolutional neural network (GCN) uses a proximity matrix to model the similarity information of samples, thereby improving the performance of cross-edge diffusion of knowledge on all GCN layers. In this embodiment, GCN is used to extract user and item feature vector embeddings from the user-graph and item-graph. The calculation of a layer of graph convolution is expressed in mathematical form as follows:
[0084]
[0085] Among them, H (l) represents the feature matrix obtained by the l-th layer of graph convolution, H (0) It is the input data of the network, i.e. the initial features of user / product information. (l)represents the parameters of the l-th layer graph convolution, and σ(·) is the activation function, such as ReLu. is the user / item relationship matrix. Assuming there are n users, then is a relationship matrix of size n×n; assuming there are m products, then is a relationship matrix of size m×m.
[0086] We choose to use two layers of graph convolutional layers to extract user features and product features, namely Figure 2 In the GCN module, the input of each layer is the feature representation learned in the previous layer, and the output is a new feature representation, as shown in the following formula:
[0087]
[0088] Where X is the network input sample, W = {W (0) , W (1) )} are the graph convolution layer parameters that need to be trained and learned. Finally, we will get a user feature embedding of size n×k, denoted by U, and a product feature embedding of size m×k, denoted by v.
[0089] Step S4: Map the user feature vector and the product feature vector to obtain the mapped user feature vector and product feature vector, and a similarity matrix. Map the user feature vector and product feature vector to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and a similarity matrix.
[0090] In some embodiments, in step S4, mapping the user feature vector and the product feature vector to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and the similarity matrix includes:
[0091] Define the marginal probability distribution representing all user samples and the marginal probability distribution representing all product samples;
[0092] Based on the marginal probability distribution of the user samples and the marginal probability distribution of the product samples, a transmission matrix between the user set and the product set is calculated;
[0093] The transmission matrix is optimized by applying the transmission distance between the user and the product to obtain an optimized transmission matrix, i.e., a similarity matrix;
[0094] Applying the transmission distance and the optimized transmission matrix to optimize the user feature vector and the product feature vector, to obtain a mapped user feature vector and a product feature vector;
[0095] The transmission matrix and the user feature vector and the product feature vector are optimized repeatedly, and the optimal transmission matrix, user feature vector and product feature vector are obtained through cyclic iteration until the algorithm converges.
[0096] The definition represents the marginal probability distribution of all user samples and the marginal probability distribution of all commodity samples includes:
[0097] There are n user samples and m product samples, p is an n×1 vector and each element p i The value of indicates the importance of the sample to the user, and is set to It is assumed that the importance of each user sample is consistent, and it can also be set to other values based on prior knowledge; q is an m×1 vector and each element q j The values are set to p i describes the amount of transported material at the starting point, q j The amount of substance that describes the endpoint.
[0098] The obtaining of the transmission matrix between the user set and the commodity set based on the marginal probability distribution of the user sample and the marginal probability distribution of the commodity sample comprises:
[0099] The sum of the elements in the i-th row of the transmission matrix γ is equal to the value of the i-th element of the transmission starting point p, that is,
[0100] The sum of the elements in the jth column of the transmission matrix γ is equal to the value of the transmission destination q in the jth element, that is,
[0101] Therefore, the constraints on the transfer matrix γ are:
[0102] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}(3)
[0103] Where B represents the set of transmission matrices that satisfy the constraints; 1 m represents a vector of size m×1 consisting of 1s; 1 n represents an n-by-1 vector of 1s.
[0104] The transmission distance between the application user and the commodity is optimized to obtain an optimized transmission matrix, that is, a similarity matrix including:
[0105] When the transmission matrix satisfies the constraints, the transmission cost is minimized, that is,
[0106]
[0107] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}
[0108] Among them, γ * represents the optimized transmission matrix; where <.,.> represents the inner product of the matrix, D represents the transmission distance between the user and the product, and <γ, D> represents the total transmission overhead; As the distance metric formula, where u i represents the i-th user, v j represents the jth commodity; the optimal transmission matrix γ can be obtained by minimizing the transmission cost * .
[0109] The applying the transmission distance and the optimized transmission matrix to optimize the user feature vector and the commodity feature vector to obtain the mapped user feature vector and the commodity feature vector comprises:
[0110] Optimize the user feature vector and the product feature vector so that the user feature vector and the product feature vector are mapped to a space with consistent distribution, that is,
[0111]
[0112] in, represents the optimized user feature vector; Represents the optimized product feature vector.
[0113] The above formula (5) is used to minimize the transmission distance D to make the distribution of the two feature vectors as similar as possible, thereby obtaining the mapped feature vector and
[0114] The final result is a similarity matrix γ of size n×m * ,in Indicates the interest level between user sample i and product sample j. For the i-th row in the matrix, it indicates the interest level of user i in all products. The products corresponding to the top k values can be sorted according to the interest value to recommend to the user.
[0115] The pseudo code of the entire algorithm flow is shown in Table 1:
[0116] Table 1
[0117]
[0118] In terms of user and product similarity calculation, we believe that the inconsistency in the distribution space of user features and product features leads to inaccurate and meaningless calculated similarity. To this end, we map user features and product features to a shared embedding space based on the optimal transmission algorithm to make their distribution consistent. Through iterative optimization, we finally obtain the user and product feature matrix and similarity matrix after mapping. This similarity matrix is optimal and has practical significance. We can recommend corresponding products of interest to different users based on this similarity matrix. In terms of user feature and product feature extraction, we do not use a simple multi-layer perceptron network to extract, but construct a user relationship graph through the relationship between users, and construct a product relationship graph through the relationship between products. For the relationship graph, we use the GCN network to extract feature vectors. GCN can capture the global information of the entire graph, so as to better represent the characteristics of the node (user / product). The GCN network makes the information represented by the feature vector we finally extract more complete and accurate.
[0119] In summary, the solution proposed in the present invention can recommend the most interesting products to different users in the recommendation system scenario, thereby improving the product conversion rate. By solving the problem of inconsistent distribution of user characteristics and product characteristics, the accuracy and practical significance of similarity matrix calculation can be improved, thereby achieving more accurate and valuable product recommendations.
[0120] Embodiment 2:
[0121] The invention discloses a user-product similarity learning system based on optimal transmission. Figure 3 is a structural diagram of a user-product similarity learning system based on optimal transmission according to an embodiment of the present invention; Figure 3 As shown, the system 100 includes:
[0122] The second aspect of the present invention discloses a user-product similarity learning system based on optimal transmission; the system comprises:
[0123] The first processing module 101 is configured to construct a user relationship graph with users as nodes based on user attribute characteristics and associations between different users;
[0124] The second processing module 102 is configured to construct a commodity relationship graph with commodities as nodes based on commodity attribute characteristics and associations between different commodities;
[0125] The third processing module 103 is configured to apply a graph convolutional neural network to extract a user feature vector from the user relationship graph; apply a graph convolutional neural network to extract a product feature vector from the product relationship graph;
[0126] The fourth processing module 104 is configured to map the user feature vector and the product feature vector to a space with consistent distribution, and obtain the mapped user feature vector and product feature vector, and a similarity matrix.
[0127] According to the system of the second aspect of the present invention, the third processing module 103 is configured such that the graph convolutional neural network uses two graph convolutional layers to extract user feature vectors and product feature vectors.
[0128] According to the system of the second aspect of the present invention, the fourth processing module 104 is configured to map the user feature vector and the product feature vector to a space with consistent distribution, and obtain the mapped user feature vector and product feature vector, and the similarity matrix includes:
[0129] Define the marginal probability distribution representing all user samples and the marginal probability distribution representing all product samples;
[0130] Based on the marginal probability distribution of the user samples and the marginal probability distribution of the product samples, a transmission matrix between the user set and the product set is calculated;
[0131] Based on the transmission distance between the user and the product, the transmission matrix is optimized to obtain an optimized similarity matrix;
[0132] Based on the transmission distance and the optimized transmission matrix, the user feature vector and the product feature vector are optimized to obtain a mapped user feature vector and a product feature vector;
[0133] The transmission matrix and the user feature vector and the product feature vector are optimized repeatedly, and the optimal transmission matrix, user feature vector and product feature vector are obtained through cyclic iteration until the algorithm converges.
[0134] According to the system of the second aspect of the present invention, the fourth processing module 104 is configured such that the definition of the marginal probability distribution representing all user samples and the marginal probability distribution representing all commodity samples includes:
[0135] There are n user samples and m product samples, p is an n×1 vector and each element p i The value of indicates the importance of the sample to the user, and is set to The importance of each user sample; q is an m×1 vector and each element q j The values are set to p i The amount of transported material at the starting point, q j The amount of material at the endpoint.
[0136] According to the system of the second aspect of the present invention, the fourth processing module 104 is configured to calculate the transmission matrix between the user set and the commodity set based on the marginal probability distribution of the user sample and the marginal probability distribution of the commodity sample, including:
[0137] According to the constraints of the transmission matrix γ, the transmission matrix between the user set and the product set is calculated:
[0138] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}
[0139] Where B represents the set of transmission matrices that satisfy the constraints; 1 m represents a vector of size m×1 consisting of 1s; 1 n represents an n-by-1 vector of 1s.
[0140] According to the system of the second aspect of the present invention, the fourth processing module 104 is configured to optimize the transmission matrix based on the transmission distance between the application user and the commodity, and obtain an optimized transmission matrix, that is, a similarity matrix including:
[0141] When the transmission matrix satisfies the constraints, the transmission cost is minimized:
[0142]
[0143] B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q}
[0144] Among them, γ * represents the optimized transmission matrix; <.,.> represents the matrix inner product, D represents the transmission distance between the user and the product, and <γ, D> represents the total transmission overhead.
[0145] According to the system of the second aspect of the present invention, the fourth processing module 104 is configured to apply the transmission distance and the optimized transmission matrix to optimize the user feature vector and the product feature vector to obtain the mapped user feature vector and product feature vector, including:
[0146] Optimize the user feature vector and the product feature vector so that the user feature vector and the product feature vector are mapped to a space with consistent distribution, that is,
[0147]
[0148] in, represents the optimized user feature vector; Represents the optimized product feature vector.
[0149] It should be noted that, for the method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the order of the actions described, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions involved are not necessarily required by the present application.
[0150] As for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0151] Embodiment 3:
[0152] Optionally, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, the various processes of the above-mentioned method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0153] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, each process of the above method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0154] Figure 4 The present application shows a block diagram of an electronic device 800. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0155] Reference Figure 4 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .
[0156] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0157] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, images, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0158] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0159] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0160] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0161] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0162] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0163] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast operation information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0164] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0165] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0166] Embodiment 4:
[0167] Figure 5 19 is a block diagram of a computer-readable storage medium 1900 shown in the present application. For example, the computer-readable storage medium 1900 may be provided as a server.
[0168] Reference Figure 5 , the computer-readable storage medium 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions, such as an application, that can be executed by the processing component 1922. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0169] The computer readable storage medium 1900 may also include a power supply component 1926 configured to perform power management of the computer readable storage medium 1900, a wired or wireless network interface 1950 configured to connect the computer readable storage medium 1900 to a network, and an input / output (I / O) interface 1958. The computer readable storage medium 1900 may operate based on an operating system stored in the memory 1932, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0170] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0171] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0172] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0173] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0174] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0175] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0176] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0177] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0178] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0179] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A user-item similarity learning method based on optimal transmission, characterized in that: include: Step S1: construct a user relationship graph with users as nodes based on user attribute characteristics and the associations between different users; Step S2: construct a product relationship graph with the products as nodes based on product attribute characteristics and the associations between different products; Step S3: applying a graph convolutional neural network to extract a user feature vector from the user relationship graph; applying a graph convolutional neural network to extract a product feature vector from the product relationship graph; Step S4: Map the user feature vector and the product feature vector to obtain the mapped user feature vector and product feature vector, and a similarity matrix.
2. The user-product similarity learning method based on optimal transmission according to claim 1, characterized in that: In step S3, the graph convolutional neural network uses two graph convolutional layers to extract user feature vectors and product feature vectors.
3. The user-product similarity learning method based on optimal transmission according to claim 1 is characterized in that: In the step S4, the user feature vector and the product feature vector are mapped to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and the similarity matrix includes: Define the marginal probability distribution representing all user samples and the marginal probability distribution representing all product samples; Based on the marginal probability distribution of the user samples and the marginal probability distribution of the product samples, a transmission matrix between the user set and the product set is calculated; Based on the transmission distance between the user and the product, the transmission matrix is optimized to obtain an optimized similarity matrix; Based on the transmission distance and the optimized transmission matrix, the user feature vector and the product feature vector are optimized to obtain a mapped user feature vector and a product feature vector; The transmission matrix and the user feature vector and the product feature vector are optimized repeatedly, and the optimal transmission matrix, user feature vector and product feature vector are obtained through cyclic iteration until the algorithm converges.
4. The user-product similarity learning method based on optimal transmission according to claim 3 is characterized in that: In step S4, the definition of the marginal probability distribution representing all user samples and the marginal probability distribution representing all commodity samples includes: There are n user samples and m product samples, p is an n×1 vector and each element p i The value of indicates the importance of the sample to the user, and is set to The importance of each user sample; q is an m×1 vector and each element q j The values are set to p i The amount of transported material at the starting point, q j The amount of material at the endpoint.
5. The user-product similarity learning method based on optimal transmission according to claim 4 is characterized in that: In the step S4, the step of obtaining the transmission matrix between the user set and the commodity set based on the marginal probability distribution of the user sample and the marginal probability distribution of the commodity sample includes: According to the constraints of the transmission matrix γ, the transmission matrix between the user set and the product set is calculated: B={γ∈(R + ) n×m |γ1 m =p,γ T 1 n =q} Where B represents the set of transmission matrices that satisfy the constraints; 1 m represents a vector of size m×1 consisting of 1s; 1 n represents an n-by-1 vector of 1s.
6. The user-product similarity learning method based on optimal transmission according to claim 5 is characterized in that: In the step S4, the transmission distance between the application user and the commodity is used to optimize the transmission matrix, and an optimized transmission matrix is obtained, that is, a similarity matrix including: When the transmission matrix satisfies the constraints, the transmission cost is minimized: B={γ∈(R + ) n×m γ1 m =p,γ T 1 n =q} Among them, γ * represents the optimized transmission matrix; <.,.> represents the inner product of the matrix, D represents the transmission distance between the user and the product, and <γ,D> represents the total transmission overhead.
7. The user-product similarity learning method based on optimal transmission according to claim 6 is characterized in that: In the step S4, the applying the transmission distance and the optimized transmission matrix to optimize the user feature vector and the commodity feature vector to obtain the mapped user feature vector and the commodity feature vector comprises: Optimize the user feature vector and the product feature vector so that the user feature vector and the product feature vector are mapped to a space with consistent distribution, that is, in, represents the optimized user feature vector; Represents the optimized product feature vector.
8. A user-product similarity learning system based on optimal transmission, characterized in that: The system comprises: A first processing module is configured to construct a user relationship graph with users as nodes based on user attribute characteristics and associations between different users; The second processing module is configured to construct a commodity relationship graph with commodities as nodes based on commodity attribute characteristics and associations between different commodities; A third processing module is configured to apply a graph convolutional neural network to extract a user feature vector from the user relationship graph; and apply a graph convolutional neural network to extract a product feature vector from the product relationship graph; The fourth processing module is configured to map the user feature vector and the product feature vector to a space with consistent distribution to obtain the mapped user feature vector and product feature vector, and a similarity matrix.
9. An electronic device, characterized in that: The electronic device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the steps in the user-product similarity learning method based on optimal transmission according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the steps in the user-product similarity learning method based on optimal transmission according to any one of claims 1 to 7 are implemented.