Knowledge graph driven power supply chain risk early warning method and related device
Through a multi-modal graph neural network driven by knowledge graph, combined with graph attention mechanism and comparison learning, multi-source data is integrated, and the existing power supply chain risk warning methods are solved, and efficient monitoring and prediction of power supply chain risks are achieved.
Patent Information
- Application Number
- CN202411880420.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-03-14
AI Technical Summary
The existing power supply chain risk warning methods rely on manual analysis, are inefficient and prone to miss potential risk points, and lack real-time and predictiveness.
Using a knowledge graph-driven method, a multi-modal graph neural network combines graph attention mechanism and comparison learning, integrates structured and unstructured data to build a dynamic knowledge graph to achieve real-time monitoring and prediction of power supply chain risks.
It improves the efficiency and accuracy of risk management in the power supply chain, realizes early warning of potential risks, and ensures the stability and reliability of power supply.
Smart Images

Figure CN119624132A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power supply chain, and in particular to a knowledge graph-driven power supply chain risk early warning method and related devices. Background Art
[0002] The power supply chain refers to the entire process from power generation to end-user use, which covers multiple key links such as power generation, transmission, voltage transformation, distribution, and power consumption. The power supply chain is a complex and important system that involves multiple links and multiple parties, and requires joint efforts and collaboration from all parties to ensure the stability and reliability of power supply.
[0003] Existing power supply chain risk early warning methods have limitations in dealing with complex network relationships and dynamic risk factors, and lack real-time and predictive capabilities. These methods often rely on manual analysis, are inefficient, and are prone to missing potential risk points. Therefore, there is an urgent need for an early warning system that can monitor and predict supply chain risks in real time to provide high stability and reliability of power supply. Summary of the invention
[0004] The purpose of the present invention is to provide a knowledge graph-driven power supply chain risk warning method and related devices to solve the technical problems that the prior art relies on manual analysis for power supply chain risk warning, which is inefficient and prone to missing potential risk points.
[0005] In order to achieve the above object, the present invention adopts the following technical solution: In a first aspect, the present invention provides a knowledge graph-driven power supply chain risk early warning method, comprising: Acquire multi-source data of the power supply chain; the multi-source data includes structured data and unstructured data; Inputting the multi-source data into a risk early warning model and outputting risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
[0006] A further improvement of the present invention is that the risk warning model includes: Input layer, used to receive structured and unstructured data; Embedding layer, which converts structured and unstructured data into vectors; The entity relationship extraction layer is used to extract entities and relationships between entities from the vector output by the embedding layer, and add the extracted entities and relationships between entities to the supply chain knowledge graph to obtain a filled supply chain knowledge graph; The graph attention mechanism layer is used to encode the populated supply chain knowledge graph and obtain the embedding vector of each entity node in the supply chain knowledge graph; The contrast learning layer is used to fuse the vectors output by the embedding layer, learn the representation of the data, and output the data fusion vector; The fusion layer is used to concatenate the embedding vectors of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer to obtain a concatenated feature vector; The output layer is used to map the concatenated feature vectors to the probability space and classify them, and output the classification and corresponding risk probability.
[0007] A further improvement of the present invention is that the structured data includes one or more of supply chain transaction data, environmental monitoring data, supplier electricity consumption, and credit scores; and the unstructured data includes one or more of news articles, social media posts, supplier information, and supplier credit records.
[0008] A further improvement of the present invention is that the knowledge graph includes entities and relationships, the entities include: suppliers, customers, products, environmental factors, social media information, credit records, electricity usage information and transaction records; the relationships include: suppliers provide products to customers, suppliers are affected by environmental factors, suppliers are related to social media information, suppliers have credit records, suppliers' electricity usage information, and transaction records involve products.
[0009] A further improvement of the present invention is that the loss function of the risk warning model is:
[0010] is the weight of contrastive learning loss, which is a hyperparameter; loss function is the classification loss and contrastive learning loss sum.
[0011] The present invention is further improved in that: In the step of extracting entities and relationships between entities from the vector output by the embedding layer, the entity relationship extraction layer uses the following function to extract entity relationships:
[0012] in, Is Entity and The probability that there is a relationship R between them, σ is the activation function, Concat represents the vector concatenation operation; W is the entity relationship extraction weight matrix, b is the entity relationship bias vector, W and b are obtained by supervised learning, and the loss function is the cross entropy loss:
[0013] is the classification loss.
[0014] A further improvement of the present invention is that in the step of encoding the populated supply chain knowledge graph and obtaining the embedding vector of each entity node in the supply chain knowledge graph, the formula used to encode the populated knowledge graph is:
[0015]
[0016] in, is the influence weight of node j on node i, and are the feature vectors of nodes i and j respectively, is a learnable attention mechanism parameter, N(i) is the set of neighbors of node i, LeakyReLU is the activation function; for The update amount; is the graph attention weight matrix obtained by supervised learning.
[0017] A further improvement of the present invention is that in the step of fusing the vectors output by the embedding layer, the fusing formula is:
[0018] in, is the fused data at time t, is the data of the ith data source at time t, is the weight of the i-th data source at time t, its initial value is randomly generated, and the final value is obtained by self-supervised contrastive learning; assuming that the positive sample pair is ( z , z +), and the negative sample pair is ( z , z −), then the contrastive learning loss function is:
[0019] Among them, sim( z , z +) is a fusion representation z and positive sample representation z + similarity between; sim( z , ) means z and j Negative samples represent The cosine similarity between ; τ is the temperature parameter; M is the number of negative samples.
[0020] A further improvement of the present invention is that: in the step of splicing the embedding vector of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer to obtain the spliced feature vector, the splicing formula is:
[0021] in, is the concatenated feature vector; is the output vector of the graph attention mechanism layer, is the output vector of the contrastive learning layer.
[0022] A further improvement of the present invention is that: in the step where the output layer maps the concatenated feature vectors to the probability space and classifies them, and outputs the classification and the corresponding risk probability, the output layer includes a fully connected layer and an activation function; the output layer formula is:
[0023] Among them, z is the feature vector output by the fusion layer; is the weight matrix; is the bias vector; softmax is the activation function used to convert the output into a probability distribution; p is the probability of each category.
[0024] A further improvement of the present invention is that it preferably includes the step of performing adaptive early warning based on risk probability, specifically including: When the risk probability is greater than or equal to the adaptive risk threshold, an early warning is issued; The adaptive risk threshold adjustment formula is:
[0025] in, is the adaptive risk threshold at time t+1, is the adaptive risk threshold at time t, is the learning rate, Actual risk label, Predict risk labels.
[0026] In a second aspect, the present invention provides a knowledge graph-driven power supply chain risk early warning device, comprising: A collection module, used to obtain multi-source data of the power supply chain; the multi-source data includes structured data and unstructured data; A prediction module, used to input the multi-source data into a risk warning model and output a risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
[0027] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the knowledge graph-driven power supply chain risk warning method.
[0028] In a fourth aspect, the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the knowledge graph-driven power supply chain risk warning method is implemented.
[0029] Compared with the prior art, the present invention has the following beneficial effects: The present invention provides a knowledge graph-driven power supply chain risk warning method, comprising: obtaining multi-source data of the power supply chain; the multi-source data includes structured data and unstructured data; inputting the multi-source data into a risk warning model, and outputting risk probability; wherein the risk warning model uses a multimodal graph neural network as a backbone network, combined with a graph attention mechanism and comparative learning, to achieve fusion of multi-source data and risk prediction and warning. The present invention utilizes advanced knowledge graph technology and deep learning algorithms to achieve intelligent risk warning for the power supply chain; the efficient knowledge graph-driven power supply chain risk warning provided by the present invention can effectively improve the risk management level of the power supply chain and provide strong guarantees for the stable operation of the power industry.
[0030] The present invention integrates and utilizes supply chain transaction data, environmental monitoring data, social media intelligence, supplier information, supplier credit records, supplier electricity usage information, etc. to complete the prediction and early warning of supply chain risks. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings constituting a part of the present invention are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the accompanying drawings: Figure 1 It is a schematic diagram of the structure of the risk warning model according to an embodiment of the present invention; Figure 2 A schematic diagram of the process of a power supply chain risk early warning method driven by a knowledge graph according to an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of a power supply chain risk early warning device driven by a knowledge graph according to an embodiment of the present invention; Figure 4 The figure is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0032] The present invention will be described in detail below with reference to the accompanying drawings and in combination with embodiments. It should be noted that the embodiments and features in the embodiments of the present invention can be combined with each other without conflict.
[0033] The following detailed description is an exemplary description, which is intended to provide further detailed description of the present invention. Unless otherwise specified, all technical terms used in the present invention have the same meaning as those generally understood by those skilled in the art to which the present invention belongs. The terms used in the present invention are only for describing specific embodiments, and are not intended to limit the exemplary embodiments according to the present invention.
[0034] In view of the deficiencies in the prior art, an embodiment of the present invention provides a knowledge graph-driven power supply chain risk warning method, which can monitor the risk status of the power supply chain in real time and implement early warning, effectively solving the technical problems to be solved: first, by adopting data fusion technology, seamless integration of multi-source heterogeneous data in the power supply chain is achieved, ensuring the comprehensiveness and accuracy of information; secondly, a dynamic knowledge graph is constructed, which can reflect the operating status of the supply chain in real time and provide an intuitive network topology view for risk analysis; thirdly, through complex network analysis technology, the risk propagation path in the supply chain network is accurately depicted, providing a scientific basis for risk prevention and control; finally, an adaptive risk warning mechanism is designed, which can intelligently adjust the warning threshold according to the real-time data and risk situation of the supply chain, thereby achieving flexibility and efficiency of risk warning.
[0035] The embodiment of the present invention provides a knowledge graph-driven power supply chain risk warning method, which aims to use multi-source data (including supply chain transaction data, environmental monitoring data, social media posts, supplier information, supplier credit records, supplier electricity consumption, etc.) to predict and warn supply chain risks. The method of the embodiment of the present invention combines entity relationship extraction, graph attention mechanism, adaptive threshold adjustment and weighted data fusion technology based on contrastive learning to improve the accuracy and robustness of prediction and warning.
[0036] Knowledge graph structure: In order to effectively integrate and utilize multi-source data, the embodiment of the present invention first constructs a supply chain knowledge graph (SCKG), which contains the following main entities and relationships: (1) Entity (node): Supplier; Customer; Product Environmental Factor; Social Media Information; Credit Record; Electricity Usage Information; Transaction Record; (2) Relationship (connections between nodes): Suppliers provide products to customers (supplies); Suppliers are affected by environmental factors (affected_by); Suppliers related to social media information (related_to); The supplier has a credit record (has_credit_record); Supplier electricity usage information (uses_electricity); The transaction record involves a product (involves_product).
[0037] Risk early warning model: The embodiment of the present invention adopts a multimodal graph neural network (MGNN) as the backbone network of the risk warning model, combined with a graph attention mechanism and a contrastive learning module, to achieve fusion of multi-source data and risk prediction and warning.
[0038] See also Figure 2 As shown in Figure 1, the risk early warning model includes: The input layer is used to accept input of structured data (such as numerical data such as transaction data) and unstructured data (such as various types of text data).
[0039] The embedding layer is used to convert structured data into vector representation, and the unstructured data is converted into vector representation after preprocessing.
[0040] The entity relationship extraction layer is used to extract entities and relationships between entities from the vector output by the embedding layer, and add the extracted entities and relationships between entities to the supply chain knowledge graph to obtain a filled supply chain knowledge graph.
[0041] The graph attention mechanism layer is used to encode the filled supply chain knowledge graph and obtain the embedding vector of each entity node in the supply chain knowledge graph (i.e., assigning different attention weights to each entity node).
[0042] The contrast learning layer is used to fuse the vectors output by the embedding layer, learn the representation of the data, and output the data fusion vector.
[0043] The fusion layer is used to concatenate the embedding vectors of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer to obtain a concatenated feature vector.
[0044] The output layer is used to map the concatenated feature vectors to the probability space and classify them, and output the classification and corresponding risk probability.
[0045] The loss that needs to be optimized when training the risk warning model consists of two parts:
[0046] is the weight of contrastive learning loss, which is a hyperparameter. Optimization goal is to minimize the classification loss and contrastive learning loss The sum of the two factors is used to improve the risk prediction accuracy of the model and the learning ability of data representation.
[0047] The specific training steps of the risk warning model are as follows: 1) Divide the data set into training set, validation set and test set; 2) Initialize the parameters of all modules (such as entity extraction, graph attention, weights and biases of contrastive learning modules); 3) Set the learning rate and decay strategy, use the Adam optimizer (gradient descent method) to carry out training, and update the model weights; 4) Monitor the performance of the validation set and use the early stopping method to prevent overfitting; 5) Use the validation set to adjust the adaptive threshold; 6) Use the test set to evaluate the model performance.
[0048] The multi-source data input into the risk warning model is divided into two types: unstructured data (text data) and structured data (numerical data).
[0049] (1) Unstructured data: Including news articles, social media posts, supplier descriptions, etc. Entities and their relationships are extracted through natural language processing techniques (such as named entity recognition and dependency parsing). For example, "Supplier A supplies product B to customer C" is extracted from a news article. Text data provides rich semantic information to help identify and understand the implicit relationships between entities, reflecting the market reputation and potential risks of suppliers, etc.
[0050] (2) Structured data: Such as transaction amount, electricity consumption, credit score, etc. Numerical data may need to be converted into text form, or used as a feature in combination with text data. For example, a high transaction volume may imply a strong relationship. Numerical data provides quantitative information, reflects the risk characteristics of suppliers, and can enhance the accuracy of relationship extraction. In order to eliminate noise and outliers in numerical data, the present invention preprocesses structured data through Fourier transform. Specifically, the time series data is first Fourier transformed, and then the amplitude threshold is set and the items with small amplitude are eliminated.
[0051] In order for the two types of data to work together, the data needs to be processed first. First, the present invention uses preprocessing technology (word segmentation, stop word removal) and embedding technology (such as BERT) to convert text into vector representation. Then, the numerical data is standardized or normalized and converted into vector representation to ensure that it is on the same scale as the text data.
[0052] Entity relationship extraction layer: The embodiment of the present invention uses entity relationship extraction technology to extract entities and their relationships from data and add them to the knowledge graph. The present invention innovatively introduces spatiotemporal attributes to construct a dynamic knowledge graph to reflect the real-time changes in the supply chain status. Using graph embedding technology, the entities and relationships in the knowledge graph are mapped to a low-dimensional vector space for subsequent analysis.
[0053] The function expression for entity relationship extraction is:
[0054] in, Is Entity and The probability that there is a relationship R between them, σ is the activation function (such as ReLU), Concat represents the vector concatenation operation; W is the entity relationship extraction weight matrix, b is the entity relationship bias vector, W and b are obtained by supervised learning, and the loss function is the cross entropy loss:
[0055] The optimization goal is to minimize it, where N represents the total number of entities.
[0056] Graph Attention Mechanism Layer: In order to accurately simulate the propagation path and impact range of risks in the supply chain network, the embodiment of the present invention uses a graph attention network (GAT) to encode the knowledge graph. GAT can automatically learn the importance of different relationships and assign different attention weights to each entity node.
[0057] The formula used to encode the filled knowledge graph is:
[0058]
[0059] in, is the influence weight of node (entity) j on node (entity) i, and are the feature vectors of nodes i and j respectively, is a learnable attention mechanism parameter, N(i) is the set of neighbors of node i, LeakyReLU is the activation function. for The update amount. is the graph attention weight matrix obtained by supervised learning.
[0060] Contrasting learning layers: In order to enable the risk warning model to consider the information contained in multi-source data more comprehensively and globally without being affected by the knowledge graph structure, the embodiment of the present invention also adopts data fusion technology. After the text data and numerical data are unified to the same scale (the embedding layer converts the structured data into vector representation, and the unstructured data is converted into vector representation after preprocessing to unify to the same scale), first, by constructing positive and negative sample pairs (such as multimodal data of the same supplier as positive samples, and data from different suppliers as negative samples), the data representation is learned. Then, the weights of different data sources are learned, and the representations of numerical and text data are combined to generate a unified representation space. Specifically, an adaptive data fusion algorithm is used to integrate information from different data sources in real time.
[0061] The adaptive data fusion formula is:
[0062] in, is the fused data at time t, is the data of the ith data source at time t, is the weight of the i-th data source at time t, its initial value is randomly generated, and the final value is obtained by self-supervised contrastive learning. Assume that the positive sample pair is ( z , z +), that is, data at different time points of the same supply chain node (entity); negative sample pairs are ( z , z −), that is, the data of different supply chain nodes (entities); then the loss function is:
[0063] Among them, sim( z , z +) is a fusion representationz and positive sample representation z + similarity, you can use dot product or cosine similarity. sim( z , ) means z and j Negative samples represent The cosine similarity between them is the cosine value of the angle between two vectors in the vector space. τ is a temperature parameter used to adjust the distribution of similarity. M is the number of negative samples. The optimization goal is to learn the optimal weights by minimizing the contrast loss .
[0064] Fusion layer: The fusion layer uses splicing fusion technology to directly splice the feature vectors from different data sources together to form a longer feature vector.
[0065] Splicing fusion formula:
[0066] in, It is the concatenated feature representation. are the output vectors of the graph attention mechanism layer and the contrastive learning layer respectively.
[0067] Output layer: The output layer is a fully connected layer followed by an activation function, which is used to map the feature vector output by the fusion layer into the probability space and classify it.
[0068] Output layer formula:
[0069] Among them, z is the output feature vector of the fusion layer (input to the output layer). is the weight matrix. is a bias vector obtained during the training process. Softmax is an activation function used to convert the output into a probability distribution. p is the probability of each category. The embodiment of the present invention designs three categories (labels) respectively: p1 high risk, p2 medium risk, and p3 low risk.
[0070] In order to dynamically adjust the threshold of risk warning, the embodiment of the present invention introduces an adaptive threshold adjustment mechanism for the output layer. The mechanism automatically adjusts the threshold according to the historical prediction results and the actual risk occurrence to balance the prediction accuracy and recall rate.
[0071] Adaptive risk threshold adjustment formula:
[0072] in, is the risk threshold at time t, is the learning rate, Actual risk label, Predict risk labels.
[0073] See also Figure 2 As shown, an embodiment of the present invention provides a knowledge graph-driven power supply chain risk early warning method, comprising: Acquire multi-source data of the power supply chain; the multi-source data includes structured data and unstructured data; Inputting the multi-source data into a risk early warning model and outputting risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
[0074] See also Figure 2 As shown, in a specific implementation, the risk warning model includes: Input layer, used to receive structured and unstructured data; Embedding layer, which converts structured and unstructured data into vectors; The entity relationship extraction layer is used to extract entities and relationships between entities from the vector output by the embedding layer, and add the extracted entities and relationships between entities to the supply chain knowledge graph to obtain a filled supply chain knowledge graph; The graph attention mechanism layer is used to encode the populated supply chain knowledge graph and obtain the embedding vector of each entity node in the supply chain knowledge graph; The contrast learning layer is used to fuse the vectors output by the embedding layer, learn the representation of the data, and output the data fusion vector; The fusion layer is used to concatenate the embedding vectors of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer to obtain a concatenated feature vector; The output layer is used to map the concatenated feature vectors to the probability space and classify them, and output the classification and corresponding risk probability.
[0075] In a specific implementation, the structured data includes: one or more of supply chain transaction data, environmental monitoring data, supplier electricity consumption, and credit scores; the unstructured data includes: one or more of news articles, social media posts, supplier information, and supplier credit records.
[0076] In a specific implementation, the knowledge graph includes entities and relationships. The entities include: suppliers, customers, products, environmental factors, social media information, credit records, electricity usage information and transaction records; the relationships include: suppliers provide products to customers, suppliers are affected by environmental factors, suppliers are related to social media information, suppliers have credit records, suppliers' electricity usage information, and transaction records involve products.
[0077] In a specific implementation, the loss function of the risk warning model is:
[0078] is the weight of contrastive learning loss, which is a hyperparameter; loss function is the classification loss and contrastive learning loss sum.
[0079] In a specific implementation, in the step of extracting entities and relationships between entities from the vector output by the embedding layer, the entity relationship extraction layer uses the following function to extract entity relationships:
[0080] in, Is Entity and The probability that there is a relationship R between them, σ is the activation function, Concat represents the vector concatenation operation; W is the entity relationship extraction weight matrix, b is the entity relationship bias vector, W and b are obtained by supervised learning, and the loss function is the cross entropy loss:
[0081] is the classification loss.
[0082] In a specific implementation, in the step of encoding the populated supply chain knowledge graph and obtaining the embedding vector of each entity node in the supply chain knowledge graph, the formula used to encode the populated knowledge graph is:
[0083]
[0084] in, is the influence weight of node j on node i, and are the feature vectors of nodes i and j respectively, is a learnable attention mechanism parameter, N(i) is the set of neighbors of node i, LeakyReLU is the activation function; for The update amount; is the graph attention weight matrix obtained by supervised learning.
[0085] In a specific implementation, in the step of fusing the vectors output by the embedding layer, the fusion formula is:
[0086] in, is the fused data at time t, is the data of the ith data source at time t, is the weight of the i-th data source at time t, its initial value is randomly generated, and the final value is obtained by self-supervised contrastive learning; assuming that the positive sample pair is ( z , z +), negative sample pairs are ( z , z −), then the contrastive learning loss function is:
[0087] Among them, sim( z , z +) is a fusion representation z and positive sample representation z + similarity between; sim( z , ) means z and j Negative samples represent The cosine similarity between ; τ is the temperature parameter; M is the number of negative samples.
[0088] In a specific implementation, the embedding vector of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer are spliced to obtain a spliced feature vector. The splicing formula is:
[0089] in, is the concatenated feature vector; is the output vector of the graph attention mechanism layer, is the output vector of the contrastive learning layer.
[0090] In a specific implementation, the output layer maps the concatenated feature vector to the probability space and classifies it, and in the step of outputting the classification and the corresponding risk probability, the output layer includes a fully connected layer and an activation function; the output layer formula is:
[0091] Among them, z is the feature vector output by the fusion layer; is the weight matrix; is the bias vector; softmax is the activation function used to convert the output into a probability distribution; p is the probability of each category.
[0092] In a specific implementation, it is preferred to include the step of performing adaptive early warning based on risk probability, specifically including: When the risk probability is greater than or equal to the adaptive risk threshold, an early warning is issued; The adaptive risk threshold adjustment formula is:
[0093] in, is the adaptive risk threshold at time t+1, is the adaptive risk threshold at time t, is the learning rate, Actual risk label, Predict risk labels.
[0094] See also Figure 3 As shown, an embodiment of the present invention provides a knowledge graph-driven power supply chain risk early warning device, comprising: A collection module, used to obtain multi-source data of the power supply chain; the multi-source data includes structured data and unstructured data; A prediction module, used to input the multi-source data into a risk warning model and output a risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
[0095] See also Figure 4 As shown, an embodiment of the present invention provides an electronic device 100 for implementing a knowledge graph-driven power supply chain risk warning method; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0096] The memory 101 can be used to store the computer program 103, and the processor 102 implements the steps of the knowledge graph-driven power supply chain risk early warning method by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data (such as audio data) created according to the use of the electronic device 100, etc. In addition, the memory 101 may include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0097] The at least one processor 102 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 may be a microprocessor or any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and uses various interfaces and lines to connect various parts of the entire electronic device 100.
[0098] The memory 101 in the electronic device 100 stores a plurality of instructions to implement a knowledge graph-driven power supply chain risk early warning method, and the processor 102 can execute the plurality of instructions to implement: Acquire multi-source data of the power supply chain; the multi-source data includes structured data and unstructured data; Inputting the multi-source data into a risk early warning model and outputting risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
[0099] If the module / unit integrated in the electronic device 100 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the process in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device that can carry the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory and read-only memory (ROM, Read-Only Memory).
[0100] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. The knowledge graph-driven power supply chain risk early warning method is characterized by: include: Obtain multi-source data for the power supply chain; The multi-source data includes structured data and unstructured data; Inputting the multi-source data into a risk early warning model and outputting risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
2. The knowledge graph-driven power supply chain risk early warning method according to claim 1 is characterized in that: The risk early warning model includes: Input layer, used to receive structured and unstructured data; Embedding layer, which converts structured and unstructured data into vectors; The entity relationship extraction layer is used to extract entities and relationships between entities from the vector output by the embedding layer, and add the extracted entities and relationships between entities to the supply chain knowledge graph to obtain a filled supply chain knowledge graph; The graph attention mechanism layer is used to encode the populated supply chain knowledge graph and obtain the embedding vector of each entity node in the supply chain knowledge graph; The contrast learning layer is used to fuse the vectors output by the embedding layer, learn the representation of the data, and output the data fusion vector; The fusion layer is used to concatenate the embedding vectors of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer to obtain a concatenated feature vector; The output layer is used to map the concatenated feature vectors to the probability space and classify them, and output the classification and corresponding risk probability.
3. The knowledge graph-driven power supply chain risk early warning method according to claim 1 is characterized in that: The structured data includes: one or more of supply chain transaction data, environmental monitoring data, supplier electricity consumption, and credit scores; the unstructured data includes: one or more of news articles, social media posts, supplier information, and supplier credit records.
4. The knowledge graph-driven power supply chain risk early warning method according to claim 2 is characterized in that: The knowledge graph includes entities and relationships. The entities include: suppliers, customers, products, environmental factors, social media information, credit records, electricity usage information and transaction records; the relationships include: suppliers provide products to customers, suppliers are affected by environmental factors, suppliers are related to social media information, suppliers have credit records, suppliers' electricity usage information, and transaction records involve products.
5. The knowledge graph-driven power supply chain risk early warning method according to claim 1 is characterized in that: The loss function of the risk warning model is: is the weight of contrastive learning loss, which is a hyperparameter; loss function is the classification loss and contrastive learning loss sum.
6. The knowledge graph-driven power supply chain risk early warning method according to claim 2 is characterized in that: In the step of extracting entities and relationships between entities from the vector output by the embedding layer, the entity relationship extraction layer uses the following function to extract entity relationships: in, Is Entity and The probability that there is a relationship R between them, σ is the activation function, Concat represents the vector concatenation operation; W is the entity relationship extraction weight matrix, b is the entity relationship bias vector, W and b are obtained by supervised learning, and the loss function is the cross entropy loss: is the classification loss.
7. The knowledge graph-driven power supply chain risk early warning method according to claim 2 is characterized in that: In the step of encoding the populated supply chain knowledge graph and obtaining the embedding vector of each entity node in the supply chain knowledge graph, the formula used to encode the populated knowledge graph is: in, is the influence weight of node j on node i, and are the feature vectors of nodes i and j respectively, is a learnable attention mechanism parameter, N(i) is the set of neighbors of node i, LeakyReLU is the activation function; for The amount of updates; is the graph attention weight matrix obtained by supervised learning.
8. The knowledge graph-driven power supply chain risk early warning method according to claim 2 is characterized in that: In the step of fusing the vectors output by the embedding layer, the fusion formula is: in, is the fused data at time t, is the data of the ith data source at time t, is the weight of the i-th data source at time t, its initial value is randomly generated, and the final value is obtained by self-supervised contrastive learning; assuming that the positive sample pair is ( z , z +), and the negative sample pair is ( z , z −), then the contrastive learning loss function is: Among them, sim( z , z +) is a fusion representation z and positive sample representation z + similarity between; sim( z , ) means z and j Negative samples represent The cosine similarity between ; τ is the temperature parameter; M is the number of negative samples.
9. The knowledge graph-driven power supply chain risk early warning method according to claim 2 is characterized in that: In the step of obtaining the concatenated feature vector by concatenating the embedding vector of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer, the concatenation formula is: in, is the concatenated feature vector; is the output vector of the graph attention mechanism layer, is the output vector of the contrastive learning layer.
10. The knowledge graph-driven power supply chain risk early warning method according to claim 2, characterized in that: The output layer maps the concatenated feature vectors to the probability space and classifies them. In the step of outputting the classification and the corresponding risk probability, the output layer includes a fully connected layer and an activation function; the output layer formula is: Among them, z is the feature vector output by the fusion layer; is the weight matrix; is the bias vector; softmax is the activation function used to convert the output into a probability distribution; p is the probability of each category.
11. The knowledge graph-driven power supply chain risk early warning method according to claim 2 is characterized in that: It is best to include steps for adaptive early warning based on risk probability, including: When the risk probability is greater than or equal to the adaptive risk threshold, an early warning is issued; The adaptive risk threshold adjustment formula is: in, is the adaptive risk threshold at time t+1, is the adaptive risk threshold at time t, is the learning rate, Actual risk label, Predict risk labels.
12. The knowledge graph-driven power supply chain risk early warning device is characterized by: include: The acquisition module is used to obtain multi-source data of the power supply chain; The multi-source data includes structured data and unstructured data; A prediction module, used to input the multi-source data into a risk warning model and output a risk probability; Among them, the risk warning model uses a multimodal graph neural network as the backbone network, combined with graph attention mechanism and contrastive learning, to achieve the fusion of multi-source data and risk prediction and warning.
13. The knowledge graph-driven power supply chain risk early warning device according to claim 12, characterized in that: The risk early warning model includes: Input layer, used to receive structured and unstructured data; Embedding layer, which converts structured and unstructured data into vectors; The entity relationship extraction layer is used to extract entities and relationships between entities from the vector output by the embedding layer, and add the extracted entities and relationships between entities to the supply chain knowledge graph to obtain a filled supply chain knowledge graph; The graph attention mechanism layer is used to encode the populated supply chain knowledge graph and obtain the embedding vector of each entity node in the supply chain knowledge graph; The contrast learning layer is used to fuse the vectors output by the embedding layer, learn the representation of the data, and output the data fusion vector; The fusion layer is used to concatenate the embedding vectors of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer to obtain a concatenated feature vector; The output layer is used to map the concatenated feature vectors to the probability space and classify them, and output the classification and corresponding risk probability.
14. The knowledge graph-driven power supply chain risk early warning device according to claim 12, characterized in that: The structured data includes: one or more of supply chain transaction data, environmental monitoring data, supplier electricity consumption, and credit scores; the unstructured data includes: one or more of news articles, social media posts, supplier information, and supplier credit records.
15. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: The knowledge graph includes entities and relationships. The entities include: suppliers, customers, products, environmental factors, social media information, credit records, electricity usage information and transaction records; the relationships include: suppliers provide products to customers, suppliers are affected by environmental factors, suppliers are related to social media information, suppliers have credit records, suppliers' electricity usage information, and transaction records involve products.
16. The knowledge graph-driven power supply chain risk early warning device according to claim 12, characterized in that: The loss function of the risk warning model is: is the weight of contrastive learning loss, which is a hyperparameter; loss function is the classification loss and contrastive learning loss sum.
17. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: In the step of extracting entities and relationships between entities from the vector output by the embedding layer, the entity relationship extraction layer uses the following function to extract entity relationships: in, Is Entity and The probability that there is a relationship R between them, σ is the activation function, Concat represents the vector concatenation operation; W is the entity relationship extraction weight matrix, b is the entity relationship bias vector, W and b are obtained by supervised learning, and the loss function is the cross entropy loss: is the classification loss.
18. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: In the step of encoding the populated supply chain knowledge graph and obtaining the embedding vector of each entity node in the supply chain knowledge graph, the formula used to encode the populated knowledge graph is: in, is the influence weight of node j on node i, and are the feature vectors of nodes i and j respectively, is a learnable attention mechanism parameter, N(i) is the set of neighbors of node i, LeakyReLU is the activation function; for The amount of updates; is the graph attention weight matrix obtained by supervised learning.
19. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: In the step of fusing the vectors output by the embedding layer, the fusion formula is: in, is the fused data at time t, is the data of the ith data source at time t, is the weight of the i-th data source at time t, its initial value is randomly generated, and the final value is obtained by self-supervised contrastive learning; assuming that the positive sample pair is ( z , z +), negative sample pairs are ( z , z −), then the contrastive learning loss function is: Among them, sim( z , z +) is a fusion representation z and positive sample representation z + similarity between; sim( z , ) means z and j Negative samples represent The cosine similarity between ; τ is the temperature parameter; M is the number of negative samples.
20. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: In the step of obtaining the concatenated feature vector by concatenating the embedding vector of each entity node output by the graph attention layer and the data fusion vector output by the contrastive learning layer, the concatenation formula is: in, is the concatenated feature vector; is the output vector of the graph attention mechanism layer, is the output vector of the contrastive learning layer.
21. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: The output layer maps the concatenated feature vectors to the probability space and classifies them. In the step of outputting the classification and the corresponding risk probability, the output layer includes a fully connected layer and an activation function; the output layer formula is: Among them, z is the feature vector output by the fusion layer; is the weight matrix; is the bias vector; softmax is the activation function used to convert the output into a probability distribution; p is the probability of each category.
22. The knowledge graph-driven power supply chain risk early warning device according to claim 13, characterized in that: It also includes steps for adaptive early warning based on risk probability, including: When the risk probability is greater than or equal to the adaptive risk threshold, an early warning is issued; The adaptive risk threshold adjustment formula is: in, is the adaptive risk threshold at time t+1, is the adaptive risk threshold at time t, is the learning rate, Actual risk label, Predict risk labels.
23. An electronic device, characterized in that: It includes a processor and a memory, wherein the processor is used to execute a computer program stored in the memory to implement the knowledge graph-driven power supply chain risk early warning method as described in any one of claims 1 to 11.
24. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, it implements the knowledge graph-driven power supply chain risk warning method as described in any one of claims 1 to 11.
Citation Information
Cited By
Intelligent network false information identification and early warning system based on multi-modal behavior map
CN120145279A
Intelligent Network False Information Recognition and Early Warning System Based on Multimodal Behavior Atlas
CN120145279B
E-commerce supply chain anti-shortage decision-making system based on multi-source data fusion
CN120338519A
Supply chain middle station data management system and method applying large model technology
CN120448448A
Supply chain middle platform data management system and method using big model technology
CN120448448B