A supplier classification method based on knowledge graph using GA parameter optimization
Through the GA parameter optimization BP neural network method based on knowledge graph, the problem that traditional classification methods cannot discover the intrinsic classification factors of data is solved, and more accurate classification of suppliers is achieved, and better business management reference is provided.
Patent Information
- Application Number
- CN202310015798.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2043-01-06
AI Technical Summary
Traditional supplier classification methods make subjective judgments or statistical classification based on two-dimensional tables, and cannot find the classification factors inherent in the data, and it is difficult to find classification conditions from the correlation degree in the actual business circulation process.
The BP neural network supplier classification method based on GA parameter optimization based on knowledge graph is adopted, and the supplier multi-dimensional data vector is extracted through the graph representation algorithm Graph2Vector, and the dimensionality reduction processing is used using an autoencoder. The initial parameters of the BP network are optimized in combination with the genetic algorithm to achieve better learning effects and efficiency.
Deeply refine the inherent connections of business data, find out the objectively existing key classification factors, achieve better classification of suppliers and other businesses, and provide valuable references to manage suppliers.
Smart Images

Figure CN116028864B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the electric power field and relates to a supplier classification method, and specifically to a supplier classification method based on a knowledge graph using GA parameter optimization. Background Art
[0002] Electricity resources have long been an indispensable resource in people's daily lives and social activities. The generation, conversion, transmission, and storage of electricity are inseparable from individual power facilities. The construction of power facilities is inseparable from various power materials. Due to the high degree of professionalism in power engineering, the power materials involved are also relatively specialized. Power equipment, especially large-scale power equipment, generally requires a longer production cycle. The high-quality and accurate supply of power equipment is a strong guarantee for the high-quality and timely completion of power engineering. Therefore, the selection of power equipment suppliers is an important part of engineering construction, which directly affects the progress and quality of the project.
[0003] The supplier's own business conditions, historical delivery timeliness, supplier misconduct, whether there are violations of laws and regulations, etc. directly affect the company's production scheduling, contract execution and other links, and in serious cases, even affect the project milestone construction. Therefore, based on the supplier's business conditions, assets and liabilities, remaining inventory value, historical performance evaluation results and other multi-dimensional data, professional classification of suppliers can provide valuable reference for enterprise management departments to manage suppliers.
[0004] Traditional classification methods can only perform subjective judgment or statistical classification based on two-dimensional tables. They are unable to discover the inherent classification factors of the data, and it is also difficult to find the classification conditions from the correlation in the actual business flow process.
[0005] BP neural network refers to a multi-layer feedforward neural network trained using the error back propagation algorithm (BP algorithm). The BP algorithm is one of the most successful neural network learning algorithms. The BP algorithm is based on the gradient descent strategy, which adjusts the parameters in the negative gradient direction of the target. The BP algorithm is an iterative learning algorithm that uses a generalized perceptron learning rule to update and estimate the parameters in each round of iteration. Multi-layer neural networks can approximate any nonlinear continuous function with arbitrary precision, so the BP neural network has a strong nonlinear mapping ability. The BP neural network can automatically extract the intrinsic logical relationship between input and output data through sample learning, and adaptively record these intrinsic logics in the corresponding weights and thresholds in the network. Summary of the invention
[0006] The purpose of this invention is to provide a BP neural network supplier classification method based on knowledge graph using GA parameter optimization. The BP neural network classification method using knowledge graph to provide data can deeply refine the internal connection of business data, find out the objective key classification factors, and achieve better classification of suppliers and other businesses.
[0007] The purpose of the present invention is achieved through the following technical solutions:
[0008] A supplier classification method based on knowledge graph using GA parameter optimization includes the following contents:
[0009] S1 obtains the graph structure and data of the supplier knowledge graph, including the ontology, entities, attributes, and relationships of the knowledge graph. Use the graph representation algorithm Graph2Vector to obtain vector data starting from the supplier. Read the entity attribute data contained in the vector node to form a multi-dimensional sample data space for the supplier. Filter out dimension data with serious missing dimensions and extremely unbalanced data; interpolate a few missing values, propose outlier data, and form a preliminary sample space.
[0010] S2 If the data sample attributes are complicated, in order to avoid the large-scale training network, which will lead to a decrease in network training efficiency and overfitting, the autoencoder is first used to reduce the dimension of the data sample. The structure of the BP neural network is directly related to the choice of dimension. The dimensions selected in this article after processing include the supplier's asset-liability ratio in the previous year, working capital, number of supply batches in the past three years, number of legal incidents in the past three years, cumulative contract amount, contract amount in the past three years, number of batches of supply produced on time in the past three years, number of bad behaviors, types of supplies, etc.
[0011] Table 1: Example of 10-dimensional sample data
[0012]
[0013] S3 determines the output of the neural network. Select the appropriate number of hidden layers and establish a BP neural network. Randomly initialize all connection weights and thresholds in the network within the range of (0, 1). Select the SIGMOID function as the activation function.
[0014] Table 2: BP neural network topology
[0015]
[0016] Table 3: BP neural network output layer
[0017]
[0018]
[0019] S4 reads the weights and thresholds of the current BP network, which are all real numbers, and uses 10-bit binary to encode the initial parameters of the network. The length of the code = the number of weights from the input layer to the hidden layer + the number of hidden layers + the number of hidden layers to the output layer + the number of output layers, which is 154 in Table 2 in this paper. The encoded data is used as the input of GA, and the GA parameters are set, as shown in Table 4.
[0020] Table 4: GA parameter settings
[0021]
[0022] S5 uses GA algorithm to optimize the weight and threshold parameters of the current BP network.
[0023] 1. Calculate the chromosome fitness of the current state of GA and copy the chromosome with the highest fitness.
[0024] 2. Calculate the fitness ratio of chromosomes in the population and use the roulette wheel selection method to select chromosomes from the population to form a new population.
[0025] 3. According to the crossover probability in Table 4, the chromosomes in the new population are crossovered to generate new offspring chromosomes. The chromosomes that have not been crossovered are copied to the new population.
[0026] 4. Perform mutation operation on the population after crossover according to the mutation probability in Table 4. The mutated chromosomes replace the original chromosomes, and the unmutated chromosomes are directly copied to form a new population. And the evolutionary generation count is increased by 1.
[0027] S6 decodes the chromosome of GA, substitutes the decoded parameters into the BP neural network, and trains it. Then, the error of the current network output layer, that is, the gradient term of the output layer neurons, is calculated; the error is then propagated back to the hidden layer neurons, and the gradient term of the hidden layer neurons of the current network is calculated. Finally, the connection weights and thresholds are adjusted according to the error of the hidden layer neurons. The absolute value of the calculated error E mse .
[0028] Define the evaluation scheme. In this paper, the absolute value of the result error is used for evaluation, that is, E mse The smaller the value of , the more reliable the parameter.
[0029] S7 tests the network error. If the end condition is not met, the iterative procedure is started, and the process from S3 to S6 is repeated until the training error has reached a very small value or the maximum iteration number of GA is reached.
[0030] S8 provides new supplier sample data as the input of the network input layer according to the BP neural network selected in S7, and classifies the suppliers according to the network obtained by weight and threshold training after multiple optimizations by GA.
[0031] The main function of the knowledge graph is to use graph structures to model, identify, store and reason about "knowledge". These knowledge data are stored in the form of graphs in graph databases. First, a suitable graph representation algorithm is designed to vectorize the graph data, and then the structured data in the vector space is processed as a sample for algorithm learning. BP neural network refers to a multi-layer feedforward neural network trained using the error back propagation algorithm (BP algorithm). The BP algorithm is one of the most successful neural network learning algorithms at present. The BP algorithm is based on the gradient descent strategy, which adjusts the parameters in the negative gradient direction of the target. The BP algorithm is an iterative learning algorithm, which uses the generalized perceptron learning rule to update and estimate the parameters in each round of iteration. Multi-layer neural networks can approximate any nonlinear continuous function with arbitrary precision, so BP neural networks have strong nonlinear mapping capabilities. BP neural networks can automatically extract the intrinsic logical relationship between input and output data through sample learning, and adaptively record these intrinsic logics in the corresponding weights and thresholds in the network. The initial weights and thresholds have a great influence on the network effect. The network trained by direct random assignment may not achieve the expected effect in terms of performance or algorithm effect. The present invention optimizes the BP network initialization parameters through the GA algorithm, crossover mutation, survival of the fittest and other methods, so that the algorithm can improve performance and execution effect.
[0032] The beneficial effects of the present invention are as follows:
[0033] The present invention uses the constructed supplier knowledge graph data to extract the key features of the graph data and construct data samples; uses a genetic algorithm to optimize the initial parameters of the BP neural network to achieve better learning effect and efficiency; uses the BP neural network classification method of the data provided by the knowledge graph to deeply refine the internal connection of the business data, find out the objectively existing key classification factors, and achieve better classification of suppliers and other businesses. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a structural schematic diagram of the present invention. DETAILED DESCRIPTION
[0035] A supplier classification method based on knowledge graph using GA parameter optimization includes the following contents:
[0036] 1. Read the graph data of the supplier knowledge graph and use the graph representation method Graph2Vector to generate the supplier multidimensional data vector.
[0037] Graph representation algorithm Graph2Vector:
[0038] 1) Construct a set O containing all ontology types of the graph, and an adjacency list N of the graph with knowledge graph entities as vertices and relationships as edges.
[0039] 2) Select entity v as the starting point and start randomly walking its adjacent nodes. When walking to the adjacent node w, use the coverage function f to determine the next walking object t. The larger the coverage function result, the higher the probability of selecting the corresponding node. Consider the shortest path depth l from v to t, and the selection probability parameter p. That is, the next possible node t i The number of nodes in its adjacency list that have not been traversed. When l = 0, the fallback operation is performed with probability q (q is a hyperparameter).
[0040]
[0041] 3) Determine the entity type corresponding to entity node t. If it does not appear in set O, add it to set O and insert node t into the target supplier multidimensional data vector. If it is already in set O, delete its data in the adjacency table and go back to the previous node to walk again.
[0042] 4) Repeat the operations of 2) and 3) until all ontology types or all entity nodes are covered. The multidimensional data vector space of suppliers is formed. The sample data is preprocessed to filter out the dimension data with serious missing dimensions and extremely unbalanced data; interpolation is performed on a few missing values, outlier data is proposed, and a preliminary sample space is formed.
[0043] 2. Assume that the known supplier data sample set is D = {(x1, y1), (x2, y2)…, (x m ,y m )}, id represents the number of input dimensions, od represents the output od-dimensional real-valued vector. Suppose the hidden layer has hd neurons.
[0044] Use θ j represents the threshold of the jth neuron in the output layer.
[0045] Use γ h represents the threshold of the hth neuron in the hidden layer.
[0046] Use v ih Represents the connection weight from the i-th neuron in the input layer to the h-th neuron in the hidden layer.
[0047] Use ω hj Represents the connection weight from the hth neuron in the hidden layer to the jth neuron in the output layer.
[0048] Let η1 represent the learning rate from the input layer to the hidden layer, and η2 represent the learning rate from the hidden layer to the output layer.
[0049] Assume that the input received by the hth neuron in the hidden layer is The jth neuron in the output layer;
[0050] The input received is where b h is the output of the hth neuron in the hidden layer.
[0051] Both the output layer and the hidden layer use the SIGMOID function as the activation function, that is,
[0052] Assume that the input sample (x k ,y k ) is in Then, the sample (x k ,y k ) has a mean square error of
[0053] Since the BP algorithm iteration uses generalized perceptron learning rules to update and estimate parameters, the learning of weights and thresholds is unified into the learning of weights, and any parameters can be used to update the estimate.
[0054] 3. Randomly initialize all connection weights and thresholds in the network within the range of (-0.5, 0.5).
[0055] 4. forevery(x k ,y k )∈D;
[0056] do 1) Calculate the output of the current sample
[0057] 2) Calculate the output layer neuron gradient term
[0058] 3) Calculate the gradient term of hidden layer neurons
[0059] 4) Calculate the update formula Δω for the connection weight from the hidden layer to the output layer hj =η2g j b h ;
[0060] 5) Calculate the threshold update formula Δθ from the hidden layer to the output layer j =-η2g j ;
[0061] 6) Calculate the update formula Δv for the connection weight from the input layer to the hidden layer ih=η1e h x i ;
[0062] 7) Calculate the input layer to hidden layer threshold update formula Δγ h =-η1e h ;
[0063] Update all connection weights and thresholds according to the formula;
[0064] 8) Binary encode the weights and thresholds in the current network as input parameters of the GA algorithm;
[0065] 9) Calculate the fitness of chromosomes in the population and copy the chromosome with the highest fitness to the new population;
[0066] 10) Calculate the fitness ratio of chromosomes and use the roulette wheel method to select chromosomes to enter the new population;
[0067] 11) For the chromosomes in the old population, calculate their coding similarity pairwise and sort them in descending order according to the similarity, that is, the lower the similarity, the higher the ranking.
[0068] 12) To ensure the overall genetic diversity of the population, select pairs with low similarity for crossover. According to the set GA crossover probability, select the chromosome pairs with high ranking for crossover operation for the pairing results sorted in the previous step. Use the following crossover selection method to determine the crossover point, and perform crossover operation to form new chromosomes and add them to the new population. The original chromosomes before crossover are directly eliminated; those that are not selected are directly copied into the new population;
[0069] Crossover selection method: compare the codes of two paired chromosomes, determine the position of their longest identical code parts, and select the largest repeated code string from the position Pos pair k , from Pos pair+1 k To Pos len k Use a random function to select the intersection point.
[0070] 13) According to the set GA mutation probability, select the chromosome coding position, perform mutation operation on the chromosome, add the generated new chromosome to the new population, and eliminate the original chromosome;
[0071] 14)GA evolution generation +1.
[0072] endfor
[0073] 5. Repeat step 3 until the training error reaches a very small value (preset value), or the validation set error increases while the training set error decreases, or the maximum GA progress generation is reached. Select the trained BP network at the end of the loop.
[0074] 6. Bring the pre-classified supplier data into the neural network selected in step 4 to classify the target suppliers.
[0075] The present invention uses the constructed supplier knowledge graph data to extract key features of the graph data, construct data samples, and uses a genetic algorithm to optimize the initial parameters of the BP neural network to achieve better learning effect and efficiency.
[0076] In the present invention, the glossary of relevant technical terms is explained as follows:
[0077] 1. Validation set: A part of the sample set used to verify the error of the algorithm execution results.
[0078] 2. Gradient descent method: Use the negative gradient direction to determine the new search direction for each iteration, so that each iteration can gradually reduce the objective function to be optimized.
[0079] 3. Perceptron: It consists of two layers of neurons. The input layer receives external input signals and passes them to the output layer. The output layer is MP neurons, also known as "threshold logic units"
[0080] 4. Neuron connection weight: the weight connecting two neurons.
[0081] 5. Neuron threshold: When external stimuli reach a certain threshold, the neuron will be activated and affect the next neuron.
[0082] 6.GA: Genetic Algorithm.
[0083] 7. Chromosome: originally refers to biological gene chromosomes, in this article it refers to a single piece of data after binary encoding of BP network parameters.
Claims
1. A supplier classification method based on knowledge graph using GA parameter optimization, characterized in that: Contains the following: S1. Obtain the graph structure and data of the supplier knowledge graph, including the ontology, entities, attributes, and relationships of the knowledge graph. Use the graph representation algorithm Graph2Vector to obtain vector data starting from the supplier, read the entity attribute data contained in the vector node, and form a multi-dimensional sample data space for the supplier; filter the dimension data with missing dimensions and unbalanced data; interpolate the missing values, remove outlier data, and form a preliminary sample space; S2. If the data samples obtained have complicated attributes, first use the autoencoder to reduce the dimension of the data samples; the structure of the BP neural network is directly related to the selection of dimensions. After processing, the selected dimensions include the supplier's asset-liability ratio in the previous year, working capital, number of supply batches in the past three years, number of legal incidents in the past three years, cumulative contract amount, contract amount in the past three years, number of on-time production and supply batches in the past three years, number of bad behaviors, and types of supplied materials; S3, determine the output of the neural network; select the appropriate number of hidden layers, establish a BP neural network, randomly initialize all connection weights and thresholds in the network within the range of (0,1), and select the SIGMOID function as the activation function; S4, read in the weights and thresholds of the current BP network, which are all real numbers, and use 10-bit binary to encode the initial parameters of the network. The length of the encoding = the number of weights from the input layer to the hidden layer + the number of hidden layers + the number of hidden layers to the output layer + the number of output layers. The encoded data is used as the input of GA to set the GA parameters; S5, using GA algorithm to optimize the weight and threshold parameters of the current BP network; S6, decode the chromosome of GA, substitute the decoded parameters into the BP neural network, and train it; then, calculate the error of the current network output layer, that is, the gradient term of the output layer neurons; Then the error is propagated back to the hidden layer neurons to calculate the gradient term of the hidden layer neurons of the current network; finally, the connection weights and thresholds are adjusted according to the error of the hidden layer neurons; The absolute value of the error in the calculation result is E mse ; The absolute value of the result error is used for evaluation, that is, E mse The smaller the value of , the more reliable the parameter; S7, test the network error. If the end condition is not met, start the iterative procedure and repeat the process from S3 to S6 until the training error reaches a preset value or the maximum iteration number of GA is reached; S8, according to the BP neural network selected in S7, new supplier sample data is provided as the input of the network input layer, and the suppliers are classified according to the network obtained by training the weights and thresholds after multiple optimizations by GA; In step S1, the graph representation algorithm Graph2Vector is as follows: 11) Construct a set O containing all ontology types of the graph, and an adjacency list N of the graph with knowledge graph entities as vertices and relationships as edges; 12) Select entity v as the starting point and start randomly walking its adjacent nodes. When walking to the adjacent node w, use the coverage function f to determine the next walking object t. The larger the coverage function result, the higher the probability of selecting the corresponding node; consider the shortest path depth l from v to t, and the selection probability parameter p; That is, the next possible node t i The number of nodes that have not been traversed in its adjacency list; when l = 0, the fallback operation is performed with probability q, where q is a hyperparameter; 13) Determine the entity type corresponding to entity node t. If it does not appear in set O, add it to set O and insert node t into the target supplier multidimensional data vector. If it is already in set O, delete its data in the adjacency table and go back to the previous node to walk again. 14) Repeat operations 12) and 13) until all ontology types or all entity nodes are covered to form a supplier multidimensional data vector space.
2. The supplier classification method based on knowledge graph using GA parameter optimization according to claim 1 is characterized in that: In step S5, the GA algorithm is used to optimize the weights and threshold parameters of the current BP network, as follows:
51. Calculate the chromosome fitness of the current state of GA and copy the chromosome with the highest fitness; 52. Calculate the fitness ratio of chromosomes in the population and use the roulette wheel selection method to select chromosomes from the population to form a new population; 53. According to the crossover probability, the chromosomes in the new population are crossed to generate new offspring chromosomes, and the chromosomes that have not been crossed are copied to the new population; 54. The population after crossover is mutated according to the mutation probability. The mutated chromosome replaces the original chromosome, and the unmutated chromosome is directly copied to form a new population, and the evolutionary generation count is increased by 1.
Citation Information
Patent Citations
Supplier default risk prediction method
CN113642826A