A supply recommendation method based on graph attention mechanism reinforcement learning
By adopting the source recommendation method based on graph attention mechanism to strengthen learning in the vehicle-cargo matching platform, using the Actor-Critic framework and graph attention mechanism, the problems of low efficiency and insufficient accuracy of source recommendation in the existing technology are solved, and the More efficient utilization of logistics resources and improved user satisfaction.
Patent Information
- Application Number
- CN202210136627.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-15
- Publication Date
- 2025-01-17
- Estimated Expiration
- 2042-02-15
AI Technical Summary
The existing vehicle and cargo matching platforms have problems such as information asymmetry and user preference dynamics in terms of supply recommendations, resulting in low recommendation efficiency and high cost.
Using graph attention mechanism reinforcement learning (GAMRL) framework, combined with Actor-Critic framework and graph attention mechanism, a local logistics relationship network is designed, and user recent behavior data and source data are embedding, and multi-layer self-attention mechanism and residual Poor network extraction features and optimize recommendation strategies.
It improves the responsiveness and accuracy of supply recommendations, improves logistics resource utilization and user satisfaction, and solves the shortcomings of traditional recommendation methods in dealing with dynamic user preferences and environmental changes.
Smart Images

Figure CN114548864B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for recommending sources of goods based on graph attention mechanism reinforcement learning, and belongs to the technical field. Background Art
[0002] With the rapid development of China's economy, logistics demand has increased rapidly, and transportation capacity has been challenged. In addition, my country's logistics industry is also facing problems such as information asymmetry between drivers and cargo owners, idle vehicles, and empty return trips, which leads to high freight costs. However, the rise of mobile Internet technology has brought new opportunities to improve transportation efficiency. Vehicle-cargo matching is a new opportunity, which involves the establishment of a vehicle-cargo information integration platform and reasonable vehicle-cargo allocation. Through the sharing of vehicle-cargo resources, such a logistics service platform has become an important means to improve transportation efficiency and reduce transportation costs.
[0003] As for the mainstream vehicle-cargo matching platforms on the market, the usage process of these platforms is: cargo owners publish cargo information through the App, and drivers use the App to filter out cargo that meets the transportation conditions. Due to the huge number of online cargo sources, drivers need to browse a large number of cargo sources or frequently switch screening conditions to find truly suitable cargo sources. Therefore, it is necessary to develop a cargo source recommendation system to improve the driver's cargo search efficiency and improve the overall transaction rate of the platform.
[0004] Modern recommendation systems are under great pressure to cope with the continuous emergence of new users, the changing recommendation candidate pool, and context-related interests. Traditional recommendation methods focus on modeling users' consistent preferences and cannot reflect the high dynamics of user interests and environments. In this case, interactive recommendation is an effective solution that combines a dynamic recommendation process to improve recommendation performance. An interactive recommendation system recommends sources to a single user and then receives feedback during iterations to adjust its strategy. Many studies model interactive recommendation as a multi-armed bandit (MAB) problem. This approach usually assumes that users' preferences are consistent during the recommendation process and focuses on the trade-off between current and future rewards. Therefore, they face the challenge of handling environments with dynamically changing user preferences or interests. Reinforcement learning (RL) is a promising interactive recommendation method. In recommender systems, RL methods have achieved remarkable results with their ability to learn from users' immediate feedback.
[0005] Due to its potential to handle dynamic interactions, RL is widely considered to be a potentially better solution for interactive recommendations. However, in interactive recommendations, most existing RL techniques focus on practicality rather than performance. The main reason is that the information provided by the system is limited and incomplete, making it difficult to reasonably control the decision-making process. In addition, interactive recommender systems usually contain a large number of discrete candidate actions, resulting in high time complexity and low accuracy of RL-based techniques. In addition, all works based on Deep Q Network (DQN) need to process a large number of discrete actions because DQN contains a maximization operation that considers all actions. When the size of the action increases, the maximization operation will become extremely slow or even get stuck. Regularized gradient-based methods will also get into trouble in this case because it may converge to a local maximum instead of a global maximum.
[0006] In recent years, knowledge-aware recommendation systems have become increasingly popular because knowledge graphs can transfer the relationships of contextual information and improve recommendation performance. Inspired by the above research, the applicant proposed a graph attention mechanism reinforcement learning (GAMRL) model for interactive recommendation and used the Actor-Critic framework to formulate the entire process. By designing a local logistics relationship network to represent the relationship between sources of goods, the recommendation system can make recommendations based on these relationships, while the Critic network is guided by the local logistics relationship network to improve performance. The Critic network is used to evaluate the performance of the Actor, allowing the Actor to optimize itself and develop in the right direction. In addition, the applicant also uses the graph attention mechanism (GAM) inside the critic network to capture the high-level structural information inside the local logistics relationship network and the deep deterministic policy gradient (DDPG) to train the model. Summary of the invention
[0007] In order to solve the problems existing in the prior art, the present invention proposes a framework based on graph attention mechanism reinforcement learning (GAMRL) for interactive recommendation, which models the explicit interaction between users and the recommendation system to improve the responsiveness and accuracy of the recommendation. The present invention uses the Actor-Critic framework to formulate the entire process, which can predict the source of goods that meets the driver's preferences and provide it to the driver, thereby improving the efficiency of logistics and driver satisfaction.
[0008] To achieve the above purpose, the technical solution adopted by the present invention is: a method for recommending sources of goods based on graph attention mechanism reinforcement learning, comprising the following specific steps:
[0009] Step 1: Build the graph attention mechanism reinforcement learning model GAMRL, use the Actor network to generate operations, collect users' recent behavior data as the input data of the embedding layer, use the embedding method to vectorize the input data, embed the embedding matrix into the multi-layer self-attention mechanism layer to further screen the data, and use the residual network to ensure the training results of the multi-layer attention;
[0010] Step 2: Design a Critic network to evaluate the operations generated by the Actor network, establish a local logistics relationship network to represent the specific relationship between users and sources of goods, use the graph attention mechanism GAM to capture the high-level structural information of the local logistics relationship network, and evaluate the Actor behavior through the training results.
[0011] Furthermore, in step 1, the user's recent behavior data is: the source of goods information that the user has recently clicked and browsed and the source of goods information that the user has ordered. The source of goods data is specifically expressed as: I = {i t-1 ,i t-2 ,i t-3 ,…,i t-n}, where i t-1 Indicates the sources of goods that the user is interested in at time t-1; the source information related to the several recent behavior items that has not yet been ordered is set as the candidate set D(i) of the user recommendation list.
[0012] Furthermore, in step 1, the specific process of the self-attention mechanism layer is as follows:
[0013] Step 1.1, obtain the vector representation of the user's recent behavior through the embedding layer: Get the embedding matrix represented as E∈R |I|×d , where d is the dimension of the latent space, |I| represents the dimension of the supply matrix I; use the position embedding matrix P∈R n×l , maintain the order of sources that the user was previously interested in, and embed the two matrices into a matrix M as follows:
[0014]
[0015] Then initialize the weight matrix and multiply the above matrix M by the three weight matrices W Q , W K , W V , and we get three values Q, K, and V respectively. The calculation formula is:
[0016] Q=M·W q (1)
[0017] K=M·W k (2)
[0018] V=M·W v (3)
[0019] The obtained Q, K, and V represent query, key, and value respectively;
[0020] Step 1.2, calculate the correlation between each two input vectors based on Q and K obtained in the previous step, that is, calculate the attention value score, using the scaled dot product method:
[0021] score = Q·K T =(M·W q )·(M·W k ) T (4)
[0022] Step 1.3, apply the softmax activation function to the attention value score calculated in the previous step and multiply it by the value value to obtain the output vector of the self-attention layer corresponding to each vector:
[0023]
[0024] In order to stabilize the gradient, As a scaling factor for adjusting the value range of Q·K; embed this into the ReLU activation function layer; stack multiple self-attention layers to improve the accuracy of feature extraction, and use the residual network to ensure the training effect of the multi-layer self-attention module. The training result is output as S t ; The state S at time t t Input strategy function to generate the user recommendation list and predicted action a t (i.e. source of goods p ), and then the state S t and predict action a t As the input of the Critic network.
[0025] Furthermore, in step 2, the Critic network designs a local logistics relationship network based on the input state, constructs a local logistics relationship network based on entity-relationship-entity tuple {(i,r,j)|i,j∈M,r∈R}, where M represents the source set and R represents the relationship set; by calculating the score between the user and the specific relationship, the importance of the relationship to the user is measured, and the local logistics relationship network is converted into a user-specific graph A u .
[0026] Furthermore, in step 2, the importance of the relationship to the user is calculated as follows:
[0027] Given a user u∈U and an item q∈I, let D(i) be the set of items directly related to item i as the recommendation candidate set, r ij represents the relationship between item i and item j, and the user-specific relationship score is calculated as follows:
[0028]
[0029] Where f: R d ×R d →R; f is a scoring function used to calculate the score between users and relationships; d is the dimension of user and relationship representation; u∈R d , Measure r ij Importance to user u;
[0030] The above D(i) is the candidate set that needs to be recommended, and the user-specific relationship score is normalized to:
[0031]
[0032] Convert the local logistics relationship network into a user-specific graph A u , it is R |I|×|I| The adjacency matrix of , in which each position (i, j) corresponds to a score The higher the score, the stronger the relationship between i and j. The higher supply is added to D(i) as the supply recommendation candidate set;
[0033] The graph attention mechanism GAM is used to obtain the high-order structural proximity between the items in the relational network, and obtain a weighted graph specific to the user-item; then based on the user-item weighted graph, the action at predicted by the actor is searched, that is, the predicted item i is p The distance to the true target it; according to the distance between the predicted item and the target item, the Q value is calculated by estimating the reward r:
[0034]
[0035] where w pt For i p to t The sum of the weights of the shortest path; ∝ is a parameter to prevent the denominator from becoming 0.
[0036] Furthermore, in step 2, the specific process of the graph attention mechanism layer is as follows:
[0037] The input of the graph attention mechanism layer is a set of feature vectors of a node: v = {v1, v2, …, vN}, v i∈RF, where N represents the number of nodes, F represents the number of node features, the size of the matrix v is N×F, representing the features of all nodes, and R represents only the features of a certain node, with a size of 1×F;
[0038] Train a weight matrix for all input nodes: W∈R F′×F , a self-attention mechanism is implemented for each node, and the attention coefficient is defined as: c ij =a(W·v i ,W·v j ), where a is a function that represents the importance of node i to node j, and v represents the feature vector of the node; in order to make the attention coefficient easier to calculate and compare, softmax is introduced to normalize all i's neighboring nodes j:
[0039]
[0040] The output is a new set of node feature vectors: v′={v′1,v′2,…,v′ N},v′ i ∈RF′, where F′ represents the feature vector dimension of the new node, F′=F or F′≠F; According to the above steps, the normalized attention coefficients between different nodes are obtained, which can be used to predict the output features of each node:
[0041]
[0042] W is the weight matrix multiplied by the feature, a ij is the attention correlation coefficient calculated above, σ is the nonlinear activation function, j∈N i The j traversed in the above example represents all nodes adjacent to i.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. The cargo source recommendation method proposed in the present invention is efficient and accurate, and innovatively proposes a graph attention mechanism reinforcement learning (GAMRL) model, which not only solves the problems of low logistics resource utilization and improves user satisfaction to a certain extent, but also improves the accuracy and responsiveness of cargo source recommendation.
[0045] 2. The source recommendation method proposed in the present invention innovatively uses a combination of self-attention mechanism and residual network to improve the efficiency and accuracy of data feature extraction.
[0046] 3. The local logistics relationship network established by the present invention is used to represent the specific relationship between users and sources of goods, and a graph attention mechanism is used based on the local logistics relationship network to obtain a weighted graph specific to users and sources of goods, and then the Q-value function Q(S t ,at ) Evaluate the operations generated by the Actor network and update the strategy function to obtain the best recommendation strategy, which improves the accuracy of the recommendation BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0048] The embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be interpreted as limiting the present invention.
[0049] This embodiment proposes a method for recommending sources of goods based on graph attention mechanism reinforcement learning, and its process is as follows: Figure 1 As shown, first, the driver's historical transaction records and browsing records are collected, and data preprocessing is performed on these historical records to extract cargo attribute labels. The feature weights are input into the strategy function, and the cargo sources with high feature matching in the cargo source candidate set are added to the cargo source recommendation list. The cargo source recommendation list is recommended to the driver terminal, and the recommendation strategy is adjusted according to the driver's feedback results to better predict the driver's preference.
[0050] The whole method flow is as follows:
[0051] First, a Graph Attention Mechanism Reinforcement Learning (GAMRL) model is constructed and the Actor-Critic framework is used to formulate the whole process, in which the Actor network generates actions, the Critic network evaluates the actions generated by the Actor network, and then the Actor network updates the strategy based on the recommendations of the Critic network.
[0052] Among them, the Actor network collects the information of the sources of goods that users have recently clicked and browsed and the sources of goods that they have ordered. These source data can be specifically expressed as: I = {i t-1, i t-2, i t-3,…, i t-n}, where i t-1Indicates the source of goods that the user is interested in at time t-1; represents the collected real data through the embedding layer vector; obtains the embedding matrix and embeds it into the multi-layer self-attention mechanism layer to reduce the impurities in the embedding layer, and uses the residual network to ensure the training quality, and obtains the feature weights of each corresponding source of goods; then inputs the feature extraction results of each corresponding source of goods into the deep deterministic policy gradient algorithm (DDPG) module for training, models the interaction behavior between users and the system, obtains the best policy function, and decides which source of goods to recommend to users to obtain positive feedback.
[0053] Critic network: Design the Critic network to improve the Q value function Q(S t ,a t ) is estimated to evaluate the operations generated by the Actor network. The state representation S t and action representation a t As input, they are respectively input into the critic network to be calculated in combination with the feedback result data. A local logistics relationship network is designed in the critic network, and the graph attention mechanism (GAM) is used to obtain the high-order structural proximity between the items in the relationship network to obtain a weighted graph specific to the user-supply source. Based on the weighted graph of the user-supply source, the action a predicted by the actor is searched t (i.e. predicted item) to the true target i t The Q value is calculated by estimating the reward r based on the distance between the predicted item and the target item.
[0054] Through the above two networks, the innovative supply recommendation system based on the graph attention mechanism reinforcement learning (GAMRL) framework of this patent can be basically realized. The main core content is to use the method of combining multi-layer self-attention mechanism and residual network to extract features from the embedding matrix, and use the deep deterministic policy gradient algorithm (DDPG) for training; then, a local logistics relationship network is designed according to the user-supply relationship, and the graph attention mechanism is used to obtain a weighted graph specific to the user-supply, and then the Q value function Q(S t ,a t ) evaluates the operations generated by the Actor network and updates the policy function to obtain the best recommended policy.
[0055] The Actor network uses the user's recent behavior as input data, and sets the unordered sources related to the recent behavior items as the candidate set D(i) of the user's recommendation list. The vector representation of the user's recent behavior is obtained through the embedding layer, and then the obtained embedding matrix is embedded in the multi-layer self-attention module to further filter the data.
[0056] Among them, the processing flow of the self-attention layer module is as follows:
[0057] Step 1. Obtain the vector representation of the user’s recent behavior through the embedding layer Get the embedding matrix representation E∈R |I| × d (d is the dimension of the latent space, |I| represents the dimension of the supply matrix I), using the position embedding matrix P∈R n×l , maintaining the order of sources that the user was previously interested in. Embed the two matrices into a matrix M as follows:
[0058]
[0059] Then initialize the weight matrix. In the setting of neural network, the weight is generally a very small number. Here, Gaussian random distribution is used for random initialization. Multiply the above matrix M by the three weight matrices W Q , W K , W V , and we get three values Q, K, and V respectively. The calculation formula is:
[0060] Q=M·W q (1)
[0061] K=M·W k (2)
[0062] V=M·W v (3)
[0063] The obtained Q, K, and V represent query, key, and value respectively.
[0064] Step 2. Calculate the correlation between each two input vectors based on the Q and K obtained above, that is, calculate the attention value score. There are many ways to calculate the score, usually using the scaled dot product method:
[0065] score = Q·K T =(M·W q )·(M·W k ) T (4)
[0066] Step 3. Apply the softmax activation function to the attention value score calculated above and multiply it by the value to obtain the output vector of the self-attention layer corresponding to each vector:
[0067]
[0068] In order to stabilize the gradient, As a scaling factor to adjust the range of Q·K values. This is embedded into the ReLU activation function layer. Multiple self-attention layers are superimposed to improve the accuracy of feature extraction, and the residual network is used to ensure the training effect of the multi-layer self-attention module. The training result is output as S t .
[0069] The state S at time t t Input strategy function to generate the user recommendation list and predicted action a t (i.e. source of goods p ). Then the state S t and predict action a t As the input of the Critic network.
[0070] The input of the Critic network is the output state St and predicted action at of the Actor network. Based on the input state St, a local logistics relationship network is designed, and a local logistics relationship network based on entity-relationship-entity tuples {(i,r,j)|i,j∈M,r∈R} is constructed, where M represents the source set and R represents the relationship set. Each item in the local logistics relationship network L is regarded as an entity, and the local logistics relationship network is converted into a graph that more accurately represents user preferences. By calculating the score between the user and a specific relationship, the importance of the relationship to the user is measured, and the local logistics relationship network is converted into a user-specific graph A. u .
[0071] The importance of a relationship to a user is calculated as follows:
[0072] Given a user u∈U and an item q∈I, let D(i) be the set of items directly related to item i as the recommendation candidate set, r ij Represents the relationship between item i and item j. The user-specific relationship score calculation method is as follows:
[0073]
[0074] Where f: R d ×R d →R
[0075] Where f is a scoring function (e.g., inner product) used to calculate the score between users and relationships; d is the dimension of user and relationship representation; u∈R d ,r ij ∈R d ; Measure r ij Importance to user u.
[0076] The above D(i) is the candidate set that needs to be recommended. We normalize the user-specific relationship score as follows:
[0077]
[0078] Convert the local logistics relationship network into a user-specific graph A u , it is R |I|×|I| The adjacency matrix of . In this matrix, each position (i, j) corresponds to a score The higher the score, the stronger the relationship between i and j. The higher source is added to D(i) as the candidate set of source recommendation.
[0079] The graph attention mechanism (GAM) is used to obtain the high-order structural proximity between the items in the relation network and obtain a user-item-specific weighted graph. Then, based on the user-item-based weighted graph, the actor predicted action at (i.e., predicted item i) is searched. p ) to the true target it. Based on the distance between the predicted item and the target item, the Q value is calculated by estimating the reward r:
[0080]
[0081] where w pt For i p to t The sum of the weights of the shortest path; ∝ is a parameter to prevent the denominator from becoming 0. We use Dijkstra's algorithm to calculate the distance.
[0082] The specific process of the graph attention mechanism layer is as follows:
[0083] The input of the graph attention mechanism layer is a feature vector set of a node: v =
[0084] {v1,v2,…,vN},v i ∈RF, where N represents the number of nodes, F represents the number of node features, the size of the matrix v is N×F, representing the features of all nodes, and R only represents the features of a certain node, with a size of 1×F.
[0085] Train a weight matrix for all input nodes: W∈R F′×F , a self-attention mechanism is implemented for each node, and the attention coefficient is defined as: c ij =a(W·v i ,W·v j ), where a is a function that represents the importance of node i to node j, and v represents the feature vector of the node. In order to make the attention coefficient easier to calculate and compare, softmax is introduced to normalize all i's neighboring nodes j:
[0086]
[0087] The output is a new set of node feature vectors: v′={v′1,v′2,…,v′ N},v i ′∈RF′, where F′ represents the feature vector dimension of the new node (which may not be equal to F). According to the above steps, the normalized attention coefficients between different nodes are obtained, which can be used to predict the output features of each node:
[0088]
[0089] W is the weight matrix multiplied by the feature, a ij is the attention correlation coefficient calculated above, σ is the nonlinear activation function, j∈N i The j traversed in the above example represents all nodes adjacent to i.
[0090] It should be noted that the above-mentioned embodiments illustrate rather than limit the invention and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims.
Claims
1. A method for recommending sources of goods based on graph attention mechanism reinforcement learning, characterized in that: The specific steps include: Step 1: Construct the graph attention mechanism reinforcement learning model GAMRL, use the Actor network to generate operations, collect the user's recent behavior data as the input data of the embedding layer, use the embedding method to vectorize the input data, embed the embedding matrix into the multi-layer self-attention mechanism layer to further screen the data, and use the residual network to ensure the training results of the multi-layer attention; the user's recent behavior data is: the source information of the user's recent clicks and browsing and the source information of the order, and the source data is specifically expressed as: I = {i t-1, i t-2, i t-3,…, i t-n }, where i t-1 Indicates the source of goods that the user is interested in at time t-1; the source of goods information related to several recent behavior items that have not been ordered is set as the candidate set D(i) of the user recommendation list; the specific process of the self-attention mechanism layer is: Step 1.1, obtain the vector representation of the user's recent behavior through the embedding layer: Get the embedding matrix represented as E∈R |I|×d , where d is the dimension of the latent space, |I| represents the dimension of the supply matrix I; Use the position embedding matrix P∈R n×l , maintain the order of sources that the user was previously interested in, and embed the two matrices into a matrix M as follows: Then initialize the weight matrix and multiply the above matrix M by the three weight matrices W Q , W K , W V , and we get three values Q, K, and V respectively. The calculation formula is: Q = M·W q (1) K = M·W k (2) V = M·W v (3) The obtained Q, K, and V represent query, key, and value respectively; Step 1.2, calculate the correlation between each two input vectors based on Q and K obtained in the previous step, that is, calculate the attention value score, using the scaled dot product method: score= Q·K T =(M·W q )·(M·W k ) T (4) Step 1.3, apply the softmax activation function to the attention value score calculated in the previous step and multiply it by the value value to obtain the output vector of the self-attention layer corresponding to each vector: In order to stabilize the gradient, As a scaling factor for adjusting the value range of Q·K; embed this into the ReLU activation function layer; stack multiple self-attention layers to improve the accuracy of feature extraction, and use the residual network to ensure the training effect of the multi-layer self-attention module. The training result is output as S t ; Set the state S at time t t Input strategy function to generate the user recommendation list and predicted action a t , that is, the source of goods i p , then the state S t and predict action a t As the input of the Critic network; Step 2: Design a Critic network to evaluate the operations generated by the Actor network, establish a local logistics relationship network to represent the specific relationship between users and sources, use the graph attention mechanism GAM to capture the high-level structural information of the local logistics relationship network, and evaluate the Actor behavior through the training results; The Critic network designs a local logistics relationship network based on the input state, constructs a local logistics relationship network based on entity-relationship-entity tuples {(i,r,j)|i,j∈M,r∈R}, where M represents the source set and R represents the relationship set; by calculating the score between the user and the specific relationship, the importance of the relationship to the user is measured, and the local logistics relationship network is converted into a user-specific graph A. u ; The importance of a relationship to a user is calculated as: Given a user u∈U and an item q∈I, let D(i) be the set of items directly related to item i as the recommendation candidate set, r ij represents the relationship between item i and item j, and the user-specific relationship score is calculated as follows: Where f: R d ×R d →R; f is a scoring function used to calculate the score between users and relationships; d is the dimension of user and relationship representation; u∈R d ,r ij ∈R d ; Measure r ij Importance to user u; The above D(i) is the candidate set that needs to be recommended, and the user-specific relationship score is normalized to: Convert the local logistics relationship network into a user-specific graph A u , it is R |I|×|I| The adjacency matrix of , in which each position (i, j) corresponds to a score The higher the score, the stronger the relationship between i and j. The high-quality sources are added to D(i) as the candidate set of source recommendations; The graph attention mechanism GAM is used to obtain the high-order structural proximity between the items in the relational network and obtain a weighted graph specific to the user-item. Then, based on the weighted graph of the user-item, the action at predicted by the actor is searched, that is, the predicted item i is p The distance to the true target it; according to the distance between the predicted item and the target item, the Q value is calculated by estimating the reward r: where w pt For i p to t The sum of the weights of the shortest path; ∝ is a parameter to prevent the denominator from becoming 0.
2. The method for recommending sources of goods based on graph attention mechanism reinforcement learning according to claim 1, characterized in that: In step 2, the specific process of the graph attention mechanism layer is as follows: The input of the graph attention mechanism layer is a set of feature vectors of a node: v = {v1, v2, …, vN}, v i ∈RF, where N represents the number of nodes, F represents the number of node features, the size of the matrix v is N×F, representing the features of all nodes, and R represents only the features of a certain node, with a size of 1×F; Train a weight matrix for all input nodes: W∈R F′×F , a self-attention mechanism is implemented for each node, and the attention coefficient is defined as: c ij =a(W·v i ,W·v j ), where a is a function that represents the importance of node i to node j, and v represents the feature vector of the node; in order to make the attention coefficient easier to calculate and compare, softmax is introduced to normalize all i's neighboring nodes j: The output is a new set of node feature vectors: v′={v′1,v′2,…,v′ N },v′ i ∈RF′, where F′ represents the feature vector dimension of the new node, F′=F or F′≠F; According to the above steps, the normalized attention coefficients between different nodes are obtained to predict the output features of each node: W is the weight matrix multiplied by the feature, a ij is the attention correlation coefficient calculated above, σ is the nonlinear activation function, j∈N i The j traversed in represents all nodes adjacent to i.
Citation Information
Patent Citations
Article recommendation method based on collaborative filtering
CN110781409A
Multi-behavior migration recommendation method based on deep learning
CN110910218A