A Multi-Label Text Classification Logistics Supplier Recommendation Method
By employing a multi-label text classification method using graph convolutional neural networks, the problem of verifying the authenticity of information in massive amounts of logistics supplier data was solved, thereby improving the accuracy and efficiency of supplier recommendations and shortening retrieval time.
Patent Information
- Application Number
- CN202311160481.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2043-09-11
AI Technical Summary
With a vast amount of logistics supplier information available, manufacturers are unable to quickly and accurately verify the authenticity and validity of supplier information, leading to inefficient selection and a lower success rate.
A multi-label text classification method based on graph convolutional neural networks is adopted. By acquiring historical text information of manufacturers and suppliers, text feature maps and heterogeneous matrices are constructed, semantic attention is incorporated and labeled, and a recommendation model is trained in combination with graph convolutional neural networks to output the final recommendation results.
It improved the accuracy and success rate of supplier recommendations, shortened the search time, and increased the matching efficiency between manufacturers and suppliers.
Smart Images

Figure CN117216270B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network logistics technology, and more specifically, to a multi-label text classification logistics supplier recommendation method based on graph convolutional neural networks. Background Technology
[0002] With the rapid development of new-generation information technologies such as the Internet, mobile Internet, and artificial intelligence, selecting logistics providers online has become a primary method for many logistics manufacturers. However, current online raw material supplier systems still have unresolved issues:
[0003] 1. Faced with massive amounts of data, false information is becoming increasingly prevalent, making it difficult for manufacturers to verify the authenticity of supplier information and thus hindering them from quickly and accurately finding suitable suppliers.
[0004] 2. Manufacturers are unable to make optimal choices based on their own needs and the raw materials provided by suppliers, resulting in a lower success rate in selecting the right suppliers and increasing the screening pressure on manufacturers;
[0005] 3. Manufacturers may blindly evaluate suppliers, leading to inefficiency. Summary of the Invention
[0006] This invention provides a multi-label text classification logistics supplier recommendation method based on graph convolutional neural networks to solve the problem of how to ensure the authenticity and effectiveness of logistics manufacturers and logistics suppliers information in a massive amount of logistics supplier information, and to improve the accuracy and success rate of supplier recommendations.
[0007] The technical solution adopted in this invention is as follows:
[0008] A multi-label text classification method for recommending logistics suppliers includes the following steps:
[0009] S1. Obtain historical text sets of manufacturer and supplier information and perform pre-training to obtain a training sample set;
[0010] S2. Based on bidirectional gated recurrent units, establish text feature maps for the training sample set;
[0011] S3. Construct a text heterogeneity matrix based on the text feature map;
[0012] S4. Incorporate semantic attention into the text feature map and annotate it to generate a multi-label text feature map;
[0013] S5. Multiply the multi-label text feature map with the text heterogeneous matrix to obtain the multi-label text classification model;
[0014] S6. Integrate the graph convolutional neural network with the multi-label text classification model to obtain a multi-label text classification logistics supplier recommendation model based on graph convolutional neural network.
[0015] S7. Input the multi-label text feature map of the manufacturer and supplier information to be classified into the multi-label text classification logistics supplier recommendation model based on graph convolutional neural network, and output the prediction result.
[0016] S8. Evaluate the prediction results and obtain the evaluation results;
[0017] S9. Output the evaluation results and prediction results as the final recommendation results.
[0018] In a preferred embodiment of the present invention, step S2 specifically includes:
[0019] Let D = [d1, d2, ..., d n ], D is the text information embedding matrix of logistics suppliers and logistics manufacturers, d i Using the feature words, the text representation is constructed using Bi-GRU as follows:
[0020]
[0021]
[0022] in, The forward hidden state, calculated from front to back by the formula GRU(·), contains the current word d. i Information about its relationship with the preceding words; The backward hidden state, calculated from back to front by the formula GRU(·), contains the current word d. i Information about its relationship with the words that follow it; h i bidirectional vector The splicing representation,
[0023] The entire text is represented as:
[0024]
[0025] in,
[0026] Given a label lj, the label is represented as:
[0027]
[0028] Calculate the reset gate r of the bidirectional gated loop unit i and update gate z i :
[0029] ri =σ(w r h i-1 +u r x i +b r )
[0030] z i =σ(w z h i-1 +u z x i +b z )
[0031] Where σ is the Sigmoid activation function, w r u r To reset the weight of the door, w z u z To update the weights of the gates, b r To reset the door's bias value, b z To update the gate's bias value, x i ∈[0,1];
[0032] By candidate hidden state Calculate the hidden state h i The calculation formula is:
[0033]
[0034]
[0035] Based on the hidden state h i Construct a text feature graph G = (V, E), where the node set V contains text features of information about logistics suppliers and logistics manufacturers, and the edge set E contains the relationships between each node.
[0036] In a preferred embodiment of the present invention, step S3 specifically includes:
[0037] The edge weights of the text feature map are represented as follows:
[0038]
[0039] If both x and y are words, the edge weight is calculated using PPMI; if x is a word and y is text, the edge weight is calculated using TF-IWF; if both x and y are words and are the same, the edge weight is set to 1; otherwise, the edge weight is 0.
[0040] Let there be k nodes υ i ∈y,(v i v j If )∈E, then we have:
[0041] Gij =(v i v j )
[0042] The normalized text heterogeneity matrix constructed based on the text feature maps is as follows:
[0043]
[0044] In a preferred embodiment of the present invention
[0045]
[0046] Where word1 and word2 are feature words, p(word x p(word1) and p(word2) represent the probability that word1 and word2 appear together, and p(word1) and p(word2) represent the probability that word1 and word2 appear alone, respectively.
[0047] In a preferred embodiment of the present invention
[0048]
[0049] Where x is the feature word, y is the training text, and WF x,y Let ∑WF be the number of times feature word x appears in text y. y Let y be the total number of words in the text, and ∑N be the word frequency of all words in the corpus. x It is the sum of the frequencies of all occurrences of feature word x in the corpus.
[0050] In a preferred embodiment of the present invention, step S4 specifically includes:
[0051] Multiplying the text representation by the label representation yields the matching matrix:
[0052]
[0053] Matching matrix V h Through linear transformation, we obtain:
[0054] B h =tanh(W ω V h )
[0055] Among them, W ω These are weight parameters;
[0056] B h The weight matrix for matching text and labels is obtained by using the softmax function, thus yielding the multi-label text feature map.
[0057]
[0058] Mh reflects the relationship between the text and the tag.
[0059] In a preferred embodiment of the present invention, in step S5, the multi-label text classification model is as follows:
[0060]
[0061] In a preferred embodiment of the present invention, step S6 specifically includes:
[0062] By integrating multi-label text feature classification and graph convolutional neural network (GCNN) techniques, we obtain a multi-label text classification logistics supplier recommendation model based on GCNN:
[0063] H l =Relu(GH) l-1 W l-1 )
[0064]
[0065] in, W is the normalized text feature matrix or the normalized label matrix. l-1 H is the weight matrix of the (l-1)th layer. l -1 H l The outputs of the (l-1)th and lth layers are given, where ReLU is the activation function; σ represents the activation function. Let X be the normalized adjacency matrix, X be the input feature, and W be the weight matrix;
[0066] The model loss function is as follows:
[0067]
[0068] Where n is the number of texts, l is the number of tags, and y ij ∈{0,1} represents the true value of the j-th label in the i-th mixed text. This represents the prediction result of the j-th label of the i-th mixed text. Based on the error between the calculated recommendation probability and the actual result, if the calculated result does not meet the actual requirements, the weight will be updated and recalculated.
[0069] In a preferred embodiment of the present invention, in step S8, micro-P, micro-R, and micro-F1 are used to evaluate the prediction results, and
[0070]
[0071]
[0072]
[0073] In the formula, K is the number of categories, TP is the number of correct recommendations, FP is the number of incorrect recommendations that are irrelevant to the logistics provider, and FN is the number of recommendations that the logistics provider is not interested in.
[0074] Compared with the prior art, the beneficial effects of the present invention are:
[0075] To address the problems existing in existing network-based material supply systems, this invention proposes a multi-label text classification logistics supplier recommendation model based on graph convolutional neural networks (GCNNs). This model integrates GCNN algorithms with text feature classification algorithms, improving the accuracy of classification results. Building upon this model, and combining the integrated GCNN and text feature classification algorithms, a multi-label text classification logistics supplier recommendation algorithm based on GCNNs is proposed. This method first uses a multi-label text classification algorithm to more accurately label the text information of logistics suppliers and manufacturers, significantly reducing the time required for retrieving key information in the network raw material supplier system. Then, a GCNN algorithm is used to match logistics suppliers and manufacturers. Through more accurate labels and the characteristics of GCNNs, matching efficiency is greatly improved. Therefore, this invention is an effective method for solving the problem of low matching efficiency between manufacturers and suppliers.
[0076] Experimental results show that the multi-label text classification logistics supplier recommendation algorithm based on graph convolutional neural network proposed in this invention outperforms four algorithms—DNN (Deep Neural Network Algorithm), CNN (Convolutional Neural Network Algorithm), GA (Genetic Algorithm), and LSTM (Long Short-Term Memory Network Algorithm)—in terms of micro-P, micro-R, and micro-F1 metrics.
[0077] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, embodiments of the present invention are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0078] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0079] Figure 1 This invention relates to a multi-label text classification logistics supplier recommendation model based on graph convolutional neural networks.
[0080] Figure 2 This is a graph showing the comparison results of micro-P values in an example of the present invention.
[0081] Figure 3 This is a graph showing the comparison results of micro-R values in an example of the present invention.
[0082] Figure 4 This is a graph showing the comparison results of micro-F1 values in an example of the present invention.
[0083] Figure 5 This is a comparison chart of micro-F1 values with and without GCN in the examples of this invention. Detailed Implementation
[0084] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0085] Please refer to Figure 1 and Figure 2 This invention provides a multi-label text classification and logistics supplier recommendation method based on graph convolutional neural networks, specifically including the following steps:
[0086] Step 1: Obtain a historical text set of manufacturer and supplier information and perform pre-training to obtain a training sample set. Then, apply Bidirectional Gated Recurrent Units (Bi-gm) technology to build text feature maps of the training sample set. Construct a text heterogeneous matrix based on these text feature maps, as follows:
[0087] Let D = [d1, d2, ..., d n ], where D is the text embedding matrix of logistics suppliers and logistics manufacturers, d i These are the feature words. The text representation constructed using Bi-GRU is as follows:
[0088]
[0089]
[0090] in, The forward hidden state, calculated from front to back by the formula GRU(·), contains the current word d. i Information about its relationship with the preceding words; The backward hidden state, calculated from back to front by the formula GRU(·), contains the current word d. i Information about its relationship with the words that follow it; h i bidirectional vector The splicing representation,
[0091] The entire text is represented as:
[0092]
[0093] in,
[0094] Similarly, given a label lj, the label is represented as:
[0095]
[0096] Bi-GRU reset gate i Update Gate Z i The calculation formula is as follows:
[0097] r i =σ(w r h i-1 +u r x i +b r (4)
[0098] z i =σ(w z h i-1 +u z x i +b z (5)
[0099] In the two equations above, σ is the Sigmoid activation function, and w r u r To reset the weight of the door, w z u z To update the gate weights, b r To reset the door's bias value, b z To update the gate's bias value, x i ∈[0,1].
[0100] By candidate hidden state Calculate the hidden state h i The calculation formula is as follows:
[0101]
[0102]
[0103] Based on the hidden state h i Construct a text feature graph G = (V, E), where the node set V contains text features of information about logistics suppliers and logistics manufacturers, and the edge set E contains the relationships between each node.
[0104] To avoid the influence of low-frequency words in the training samples on the results, the model uses bidirectional gated recurrent units to preprocess these words, and then uses PPMI and TF-IWF algorithms to construct text feature maps. These text feature maps can embed the relationships between words and between words and text into the model.
[0105] The edge weights of the text feature graphs for logistics suppliers and logistics manufacturers are defined as follows:
[0106]
[0107] If both x and y are words, the edge weight is calculated using PPMI; if x is a word and y is text, the edge weight is calculated using TF-IWF; if both x and y are words and are the same, the edge weight is set to 1; otherwise, the edge weight is 0.
[0108] PPMI (Positive PMI): A positive mutual information algorithm used to calculate the relevance between two words. The PPMI algorithm is an improvement on the PMI algorithm; to avoid negative PMI values, the formula is as follows:
[0109]
[0110] In the formula, word1 and word2 are feature words, p(word1, word2) represents the probability that word1 and word2 co-occur, and p(word1) and p(word2) represent the probabilities that word1 and word2 appear alone, respectively. The larger the PPMI value, the stronger the correlation between word1 and word2; if the PPMI value is 0, it proves that word1 and word2 are independent and unrelated.
[0111] TF-IWF (Term Frequency-Inverse Word Frequency): An improvement based on TF-IDF, TF-IWF can solve the problem of excessively small weights in IDF, and more accurately express the relevance of words in a document. The formula is as follows:
[0112]
[0113] x represents feature words, y represents training text, and WF x,y Let ∑WF be the number of times feature word x appears in text y. y Let y be the total number of words in the text, and ∑N be the word frequency of all words in the corpus. x It is the sum of the frequencies of all occurrences of feature word x in the corpus.
[0114] Let there be k nodes υ i∈y,(v i v j If )∈E, then we have:
[0115] G ij =(v i v j (11)
[0116] The normalized text heterogeneity matrix is constructed based on the text feature maps, using the following formula:
[0117]
[0118] Step 2: Incorporate semantic attention into the text feature maps and annotate them to generate multi-label text feature maps. Multiply the multi-label text feature maps with the text heterogeneity matrix to obtain a multi-label text classification model, as follows:
[0119] When classifying and predicting different labels, the semantics and functions of each word in the text are different, as are their relationships with the labels. To obtain the degree of matching between words and labels, this invention proposes a semantic attention mechanism, which uses the latent states of each word to calculate and predict the degree of matching with the labels, and generates word vectors ci. The semantic attention mechanism obtains the association between each layer of labels and text, and assigns corresponding weights based on the degree of matching between labels and words.
[0120] First, the matching matrix V is obtained by multiplying the text representation by the label representation. h The calculation formula is as follows:
[0121]
[0122] Then, the matching matrix V h B is obtained through linear transformation. h The calculation formula is as follows:
[0123] B h =tanh(W ω V h (14)
[0124] Among them, W ω For weight parameters. Then B h The multi-label text feature map M, which matches the text with the labels, is obtained using the softmax function. h .
[0125]
[0126] M h This reflects the relationship between text and labels, and the multi-label text feature map M h Multiplying with the heterogeneous text matrix yields a multi-label text classification model:
[0127]
[0128] Step 3: Integrate the graph convolutional neural network with the multi-label text classification model to obtain a multi-label text classification logistics supplier recommendation model based on graph convolutional neural network. Input the multi-label text feature maps of the manufacturers and suppliers to be classified into the multi-label text classification logistics supplier recommendation model based on graph convolutional neural network, and output the prediction results as follows:
[0129] This invention integrates a multi-label text feature classification model and a graph convolutional neural network algorithm to design a multi-label text classification algorithm for recommending logistics suppliers based on graph convolutional neural networks. The algorithm formula is as follows:
[0130]
[0131] in, W represents the normalized text heterogeneity matrix. l-1 H is the weight matrix of the (l-1)th layer. l-1 H l The outputs are for the (l-1)th and lth layers, and ReLU is the activation function.
[0132] The prediction result is obtained through a fully connected layer, as shown in the following formula:
[0133]
[0134] In the above formula, σ represents the activation function.
[0135] Loss function: Classification prediction results may contain errors. A loss function is used to calculate these errors and determine whether the predictions meet the recommended criteria. The formula for the loss function is as follows:
[0136]
[0137] Where n is the number of texts, l is the number of tags, and y ij ∈{0,1} represents the true value of the j-th label in the i-th mixed text. This represents the predicted result for the j-th label of the i-th mixed text. It is calculated based on the error between the recommended probability and the actual result. If the calculated result does not meet the actual requirements, the weights will be updated and recalculated.
[0138] Step 4: Represent the text features and labels of the prediction results to realize personalized recommendations for logistics suppliers, and evaluate the prediction results of the multi-label text classification logistics supplier recommendation algorithm based on graph convolutional neural network by using the values of micro-P, micro-R, and micro-F1, thus obtaining the evaluation results.
[0139] The prediction results of a multi-label text classification algorithm for logistics supplier recommendation based on graph convolutional neural networks are evaluated using micro-P, micro-R, and micro-F1. The formulas for calculating micro-P, micro-R, and micro-F1 are as follows:
[0140]
[0141]
[0142]
[0143] In the formula, K is the number of categories, TP is the number of correct recommendations, FP is the number of incorrect recommendations that are irrelevant to the logistics provider, and FN is the number of recommendations that the logistics provider is not interested in.
[0144] Finally, the evaluation results and prediction results can be used as the final recommendation results and output.
[0145] Simulation Experiments and Experimental Analysis
[0146] To verify the effectiveness of the proposed multi-label text classification logistics supplier recommendation algorithm, the experimental environment and parameter settings are shown in Table 1. The model parameter learning rate is set to 3×e. -5 The inactivation rate was 0.5, and the L2 regularization coefficient was 1×10⁻⁶. -5 This can enable the model to achieve a more satisfactory convergence effect.
[0147] The experimental dataset was crawled from online material supply systems such as building material supply chain procurement platforms and raw material procurement supply chain systems, collecting data on logistics suppliers and manufacturers. After data cleaning and removal of invalid data, the final usable data consisted of 23,517 pieces of information on logistics suppliers and 38,944 pieces of information on logistics manufacturers.
[0148] Table 1 Experimental Environment Information
[0149]
[0150] This invention compares a multi-label text classification logistics supplier recommendation algorithm with DNN, CNN, genetic algorithm, and LSTM algorithms. Indicators were calculated, and the results are shown in Table 2.
[0151] Table 2 Comparison of Algorithm Indicator Values
[0152]
[0153] As shown in Table 2, the algorithm presented in this paper outperforms other algorithms in terms of micro-P, micro-R, and micro-F1 scores, and shows varying degrees of improvement over them. The comparison of experimental results between the algorithm presented in this paper and CNN demonstrates that multi-label text classification fully leverages the role of graph convolutional neural networks and improves the quality of recommendations.
[0154] Experimental results for the performance metrics of each algorithm for micro-P, micro-R, and micro-F1 are as follows: Figure 2-4 As shown.
[0155] The impact of graph convolutional neural networks on model performance:
[0156] To verify the importance of graph convolutional neural networks (GCNNs) to the model, a comparative experiment was conducted between using GCNNs and not using GCNNs. The comparison of the values of each indicator is shown in Table 3.
[0157] Table 3 Comparison of various indicator values with and without GCN.
[0158]
[0159] Table 3 shows that the GCN algorithm outperforms the non-GCN algorithm in all metrics. The experimental results for the Micro-F1 values are shown in the figure below. Figure 5 As shown. From Figure 5 It can be seen that the addition of GCN significantly improves the micro-F1 score and stabilizes earlier than the model without GCN. Therefore, it can be concluded that the model with GCN performs better than the model without GCN.
[0160] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A multi-label text classification logistics provider recommendation method, characterized by, The method comprises the following steps: S1, obtaining a historical text set of manufacturer and supplier information, and pre-training to obtain a training sample set; S2, establishing a text feature map of the training sample set based on a bidirectional gated recurrent unit; S3, constructing a text heterogeneous matrix according to the text feature map; S4, performing semantic attention fusion on the text feature map and performing labeling to generate a multi-label text feature map, specifically comprising: multiplying the text representation and the label representation to obtain a matching matrix: The matching matrix V h By linear transformation we get: wherein, is a weight parameter; B h The weight matrix of text matching with label is obtained by the softmax function, that is, the multi-label text feature map is obtained wherein M h reflects the association between the text and the label; S5, multiplying the multi-label text feature map and the text heterogeneous matrix to obtain a multi-label text classification model, which is: ; S6, fusing the graph convolutional neural network and the multi-label text classification model to obtain a multi-label text classification logistics supplier recommendation model based on the graph convolutional neural network, specifically comprising: fusing the multi-label text feature classification and the graph convolutional neural network technology to obtain a multi-label text classification logistics supplier recommendation model based on the graph convolutional neural network, which is: in, This is a normalized text feature matrix or a normalized label matrix. For the first Layer weight matrix, For the first Layer and first The layer output uses ReLU as the activation function. This represents the activation function. Let X be the normalized adjacency matrix, X be the input feature, and W be the weight matrix; The model loss function is as follows: wherein n is the number of texts, is the number of labels, represents the true value of the jth label of the ith mixed text, represents the prediction result of the jth label of the ith mixed text, the error between the recommended probability and the actual result is calculated, and if the calculation result does not meet the actual demand, the weight is updated again for calculation. S7, inputting the multi-label text feature map of the manufacturer and supplier information to be classified into the multi-label text classification logistics supplier recommendation model based on the graph convolutional neural network to output a prediction result; S8, evaluating the prediction result to obtain an evaluation result; S9, taking the evaluation result and the prediction result as the final recommendation result and outputting.
2. The multi-labeled text classification logistic provider recommendation method of claim 1, wherein, Step S2 specifically comprises: Let , D be the text information embedding matrix of logistics suppliers and logistics manufacturers, d i be the feature words, and the text representation is constructed by Bi-GRU as follows: in, The forward hidden state, calculated from front to back by the formula GRU(·), contains the current word d. i Information about its relationship with the preceding words; The backward hidden state, calculated from back to front by the formula GRU(·), contains the current word d. i Information about its relationship with the words that follow it; bidirectional vector The splicing representation, ; The entire text representation is: wherein ; Given a label lj, the label representation is: ; Reset gate of a bidirectional gated recurrent unit and update gate : wherein, is a Sigmoid activation function, is a weight for the reset gate, is a weight for the update gate, is a bias value for the reset gate, is a bias value for the update gate, ; By candidate hidden states Computing implicit states The formula is: According to the hidden state A text feature graph G=(V, E) is constructed, a node set V contains text information features of the logistics suppliers and the logistics manufacturers, and an edge set E contains relationships between each node. 3.The multi-labeled text classification logistic provider recommendation method of claim 2, wherein, Step S3 specifically comprises: The edge weight of the text feature map is represented as: That is, if x and y are both words, the edge weight is calculated by PPMI; if x is a word and y is a text, the edge weight is calculated by TF-IWF; if x and y are both words and the same, the edge weight is set to 1; otherwise, the edge weight is 0; Let k nodes , then there are: The normalized text heterogeneous matrix constructed according to the text feature map is: 。 4. The multi-label text classification logistics supplier recommendation method according to claim 3, wherein, wherein word1, word2 are feature words, denotes the probability of word1 and word2 appearing together, , denotes the probability of word1 and word2 appearing together, 5. The multi-label text classification logistics supplier recommendation method according to claim 3, wherein, where x is a feature word, y is a training text, is the number of times the feature word x appears in the text y, is the total number of words in the text y, is the total number of words in the corpus, is the total number of times the feature word x appears in the corpus. 6.The multi-labeled text classification logistics provider recommendation method of claim 3, wherein, In step S8, the use of The prediction results are evaluated, and In the formula, K is the number of categories, TP is the number of correct recommendations, FP represents the number of incorrect recommendations irrelevant to the logistics supplier, and FN represents the number of recommendations not interesting to the logistics supplier.
Citation Information
Patent Citations
Method and device for training business model and determining text classification categories
CN111737474A
Multi-label text classification method based on public opinion big data analysis
CN112487143A
Cited By
Supplier grading and classifying method based on multi-dimensional feature fusion
CN122045953A