Supply chain risk prediction method and device based on causal reasoning, equipment and medium
By constructing a two-layer knowledge graph and a large language model, the problems of data fusion and causal transmission chain modeling in traditional supply chain risk prediction systems are solved, enabling real-time perception and accurate prediction of supply chain risks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN MINGXIN DIGITAL TECH CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-05-12
AI Technical Summary
Traditional supply chain risk prediction systems rely on static rule bases and historical data, which cannot dynamically integrate multi-source heterogeneous data and lack the ability to model and reason about complex causal transmission chains, resulting in delayed risk warnings and high error rates.
A two-layer knowledge graph of regulatory and logistics physical layers is constructed, multi-source data is integrated in real time, multi-level causal chains are generated through a large language model, and these chains are mapped to the logistics physical layer knowledge graph for risk prediction. A probability propagation algorithm is used to calculate the risk transmission path.
It enables real-time perception and in-depth reasoning of supply chain risk events, improves the accuracy and coverage of risk prediction, and overcomes the shortcomings of traditional methods in uncovering implicit correlations.
Smart Images

Figure CN121766788B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of supply chain risk prediction technology based on causal reasoning, and in particular to a supply chain risk prediction method, apparatus, equipment and medium based on causal reasoning. Background Technology
[0002] Traditional supply chain risk prediction systems primarily rely on static rule bases and historical data for single-dimensional analysis, which has significant limitations. First, the knowledge graphs and risk rule bases upon which these systems depend are often static, unable to dynamically integrate and analyze emerging, multi-source, heterogeneous data such as geopolitical and legal events and public opinion, leading to lagging prediction models and persistently high error rates. Second, existing methods typically assess risk at a single node (such as port congestion), lacking the ability to model and reason about complex causal transmission chains (such as raw material disruptions – production halts – delivery defaults), resulting in severe delays in risk warnings. Therefore, an intelligent prediction solution is urgently needed. Summary of the Invention
[0003] Therefore, it is necessary to propose a supply chain risk prediction method, device, equipment and medium based on causal reasoning to address the existing supply chain risk prediction problem based on causal reasoning.
[0004] A supply chain risk prediction method based on causal reasoning, the method comprising:
[0005] Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain;
[0006] The initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data corresponding to each of the initial logistics operation data and the standard geo-legal data corresponding to each of the initial geo-legal data.
[0007] A legal layer knowledge graph is constructed based on the aforementioned standard geopolitical regulatory data, and a logistics physical layer knowledge graph is constructed based on the aforementioned standard logistics operation data.
[0008] Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph;
[0009] The risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0010] The multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain.
[0011] Furthermore, the standard logistics operation data includes, but is not limited to, trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. In the steps of constructing a regulatory layer knowledge graph based on each of the standard geo-legal data and constructing a logistics physical layer knowledge graph based on each of the standard logistics operation data, the step of constructing the regulatory layer knowledge graph based on each of the standard geo-legal data includes:
[0012] A pre-trained cross-language model is used to parse each of the initial geopolitical regulatory data to obtain parsing results; wherein, the parsing results include entity, event, and relationship information;
[0013] Based on the entity, event, and relationship information obtained from the parsing results, the nodes and edges of the knowledge graph are constructed to obtain the initial knowledge graph.
[0014] Based on the analysis results, a quantified tension index is generated, and the tension index is used as a dynamic attribute of the corresponding entity or relationship and integrated into the initial knowledge graph to obtain a legal layer knowledge graph.
[0015] Furthermore, the standard logistics operation data includes, but is not limited to, trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. In the steps of constructing a regulatory layer knowledge graph based on each of the standard geo-legal data and constructing a logistics physical layer knowledge graph based on each of the standard logistics operation data, the step of constructing the logistics physical layer knowledge graph based on each of the standard logistics operation data includes:
[0016] Obtain vessel automatic identification system trajectory data, port throughput data, and transportation hub status data from the various standard logistics operation data;
[0017] Based on the trajectory data, the port throughput data, and the transportation hub status data, a logistics physical layer knowledge graph is constructed with logistics nodes as vertices and transportation routes as edges.
[0018] Furthermore, the step of inputting the risk event into a large language model to generate a multi-level causal chain of the risk event propagating in a specified supply chain includes:
[0019] The risk event is input as a prompt into the large language model;
[0020] The large language model is driven by supply chain domain knowledge to reason and output a multi-level causal chain from the source of the risk event through at least one intermediate transmission link.
[0021] Furthermore, the step of mapping the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain includes:
[0022] The transmission nodes in the multi-level causal chain are associated with the entity nodes in the logistics physical layer knowledge graph to form a risk propagation network;
[0023] A probability propagation algorithm is used to calculate the confidence probability of risk propagation along different paths in the risk propagation network; wherein, the confidence probability is used to quantify the risk prediction result;
[0024] Risk prediction is performed on the specified supply chain based on the confidence probability.
[0025] Furthermore, after the step of performing risk prediction on the specified supply chain based on the confidence probability, the method further includes:
[0026] Retrieve new event data;
[0027] Based on the new event data, the influence weights of nodes and edges in the risk propagation network are dynamically adjusted through a preset reinforcement learning framework to obtain an updated risk propagation network.
[0028] The confidence probability of the risk propagating along the path is recalculated based on the updated risk propagation network;
[0029] Risk prediction is performed on the specified supply chain based on the recalculated confidence probability.
[0030] Furthermore, after the step of mapping the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain, the method further includes:
[0031] Obtain the risk prediction results for the specified supply chain, as well as the corresponding risk transmission path;
[0032] The risk prediction results and the corresponding risk transmission paths are input into a preset large language model to generate tiered response strategies.
[0033] A supply chain risk prediction device based on causal reasoning, the device comprising:
[0034] The first acquisition module is used to acquire multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain in real time;
[0035] The processing module is used to standardize each of the initial logistics operation data and each of the initial geo-legal data to obtain standard logistics operation data corresponding to each of the initial logistics operation data and standard geo-legal data corresponding to each of the initial geo-legal data.
[0036] The module is used to construct a legal layer knowledge graph based on the various standard geo-legal data, and to construct a logistics physical layer knowledge graph based on the various standard logistics operation data.
[0037] The second acquisition module is used to acquire the perceived risk events in the legal layer knowledge graph and the logistics physical layer knowledge graph;
[0038] An input module is used to input the risk event into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0039] The mapping module is used to map the multi-level causal chain to the logistics physical layer knowledge graph in order to perform risk prediction on the specified supply chain.
[0040] An electronic device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:
[0041] Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain;
[0042] The initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data corresponding to each of the initial logistics operation data and the standard geo-legal data corresponding to each of the initial geo-legal data.
[0043] A legal layer knowledge graph is constructed based on the aforementioned standard geopolitical regulatory data, and a logistics physical layer knowledge graph is constructed based on the aforementioned standard logistics operation data.
[0044] Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph;
[0045] The risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0046] The multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain.
[0047] A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0048] Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain;
[0049] The initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data corresponding to each of the initial logistics operation data and the standard geo-legal data corresponding to each of the initial geo-legal data.
[0050] A legal layer knowledge graph is constructed based on the aforementioned standard geopolitical regulatory data, and a logistics physical layer knowledge graph is constructed based on the aforementioned standard logistics operation data.
[0051] Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph;
[0052] The risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0053] The multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain.
[0054] The beneficial effects of this invention are as follows: By constructing a two-layer knowledge graph consisting of a regulatory layer knowledge graph and a logistics physical layer knowledge graph, real-time fusion and representation of multi-source heterogeneous data on geo-regulation and logistics operations are achieved, improving the real-time perception and coverage of risk events. Then, by introducing a large language model to automatically generate multi-level causal chains, it is possible to deeply reason about the complex transmission paths of risks in the supply chain network, overcoming the shortcomings of traditional methods in mining implicit associations and improving the reasoning for risk tracing. Finally, by mapping causal chain nodes to the logistics physical layer knowledge graph and performing probabilistic calculations, risk prediction for a specified supply chain is achieved, and the accuracy of risk prediction results is improved. Attached Figure Description
[0055] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0056] in:
[0057] Figure 1 This is a diagram illustrating the application environment of a supply chain risk prediction method based on causal reasoning in one embodiment.
[0058] Figure 2 This is a flowchart of a supply chain risk prediction method based on causal reasoning in one embodiment;
[0059] Figure 3 This is a structural block diagram of a supply chain risk prediction device based on causal reasoning in one embodiment;
[0060] Figure 4 This is a structural block diagram of an electronic device in one embodiment. Detailed Implementation
[0061] 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 only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0062] Figure 1 This is a diagram illustrating an application environment for supply chain risk prediction based on causal reasoning in one embodiment. (Refer to...) Figure 1 This causal reasoning-based supply chain risk prediction method is applied to a causal reasoning-based supply chain risk prediction system. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal, specifically a mobile phone, tablet, laptop, or other similar devices. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The terminal 110 is used to acquire initial logistics operation data and initial geo-regulatory data, while the server 120 is used to perform risk prediction for a specified supply chain.
[0063] like Figure 2 As shown, in one embodiment, a supply chain risk prediction method based on causal reasoning is provided. This method can be applied to both terminals and servers; this embodiment illustrates its application to a terminal. The supply chain risk prediction method based on causal reasoning specifically includes the following steps:
[0064] S1: Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain;
[0065] S2: Standardize each of the initial logistics operation data and each of the initial geo-legal data to obtain standard logistics operation data corresponding to each of the initial logistics operation data and standard geo-legal data corresponding to each of the initial geo-legal data.
[0066] S3: Construct a legal layer knowledge graph based on the standard geopolitical regulatory data, and construct a logistics physical layer knowledge graph based on the standard logistics operation data.
[0067] S4: Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph;
[0068] S5: Input the risk event into the large language model to generate a multi-level causal chain in which the risk event propagates in the specified supply chain; wherein the multi-level causal chain includes at least one propagation node;
[0069] S6: Map the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain.
[0070] As described in step S1 above, multiple initial logistics operation data and multiple initial geo-legal data related to the specified supply chain are acquired in real time. Specifically, message queues such as Apache Kafka can be used for streaming data access, and a data freshness metric can be set. Initial logistics operation data includes, but is not limited to: AIS vessel tracks, container GPS / temperature / vibration sensor data, port / terminal actual throughput and berth operation records, warehouse inventory and inbound / outbound logs, real-time location and capacity status of transport vehicles / trains, and shipping and air freight schedule information; these data have high time-series and structured characteristics. Initial geo-legal data covers government-issued legal documents, trade control and sanctions announcements, customs policy changes, local emergency orders, summaries of judicial rulings related to the supply chain, and multilingual policy interpretations and media reports; this type of data is usually unstructured text or semi-structured documents. Data collection should take into account data collection frequency, latency tolerance, data integrity and privacy compliance (such as anonymization of non-public contract data and compliant API authorization). To ensure the traceability of subsequent processing, the data collection process should record the data source identifier, timestamp, acquisition method and original verification information, and make preliminary marking of abnormal or missing data for subsequent noise reduction and completion.
[0071] As described in step S2 above, the initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data and the standard geo-legal data corresponding to each of the initial logistics operation data and the initial geo-legal data, respectively. That is, both the standard logistics operation data and the standard geo-legal data are standardized data without changing their data type; the standardization process facilitates subsequent analysis. Specifically, the standardization of logistics operation data includes: time alignment (unifying to a standard timestamp and handling time zone differences), unit standardization (e.g., standardizing units for tonnage, number of boxes, and number of vehicles), data cleaning (removing noise and duplicate records), missing value imputation (using interpolation, model prediction, or historical averages), and anomaly detection and labeling (identifying mutations based on statistical thresholds or machine learning models). Standardization of geopolitical regulatory data begins with linguistic processing: multilingual texts are segmented, named entity recognition (NER), and events and relationships are extracted using cross-linguistic pre-trained models (such as the XLM-R series), structuring the regulatory text into data items of "subject-behavior-object-time sequence"; synonymous policy terms are semantically normalized (e.g., "export restrictions" and "export control" are mapped to a unified event type); in addition, regulatory attributes such as time sensitivity, applicable region, and level of enforcement need to be standardized and encoded. The final output standard data should include unified field names, standard time, geographic location information (latitude and longitude / administrative division), and credibility score to facilitate subsequent map construction and automated retrieval.
[0072] As described in step S3 above, a regulatory layer knowledge graph is constructed based on the various standard geo-legal data, and a logistics physical layer knowledge graph is constructed based on the various standard logistics operation data. First, the ontology of this system is defined, clarifying node types (e.g., country / region, government agency, legal clause, enterprise entity, port / warehouse / factory, transportation route, cargo category) and relationship types (e.g., "implementation-restriction", "dependent on", "discontinued at", "connected"). Based on the geo-legal data, the extracted entities and events are constructed into nodes and edges of the regulatory layer graph, and each node / edge is assigned attributes, such as applicable region, effective / termination time, enforcement level, and credibility score calculated by an authoritative source; simultaneously, quantifiable international relations or regulatory impact indicators are generated based on the analysis results and stored as dynamic attributes. When constructing the logistics physical layer knowledge graph based on standard logistics data, physical facilities, transportation routes, and time-series events (e.g., ship delays, port congestion) are mapped to graph nodes / edges, and real-time operational parameters (throughput, number of vessels in port, inventory level, throughput capacity, etc.) are assigned to them. The two-layer graph establishes association mappings across graph entities (such as the same port, enterprise, or region) to support cross-level causal transmission analysis. The graph storage can adopt a graph database (such as Neo4j or a distributed graph storage) and supports incremental updates and version management.
[0073] As described in step S3 above, risk events perceived in the regulatory layer knowledge graph and the logistics physical layer knowledge graph are obtained, and "risk events" are identified from the constructed two-layer graph as inference input. The identification of risk events can adopt a combination of rule-driven and model-driven approaches: rule-driven approaches are triggered directly based on thresholds or keywords (e.g., "implementation of embargo", "terminal closure"); model-driven approaches identify hidden risks (e.g., abnormal increase in ship waiting time on a certain route accompanied by relevant regulatory restrictions) through anomaly detection, event clustering, and causal discovery algorithms, while combining multi-source evidence fusion strategies (cross-validation of media reports, official announcements, and on-site sensor data) to improve credibility, generating a structured description (event type, occurrence time, scope of impact, involved entities, and geographical location) for each identified event, assigning an initial confidence score to the event, recording the source link and evidence, and triggering real-time alarms and manual review processes for high-priority or urgent events.
[0074] As described in step S5 above, the risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates within a specified supply chain; wherein the multi-level causal chain includes at least one transmission node. A structured or semi-structured event description is input as a prompt into a pre-trained or fine-tuned large language model (e.g., a model based on the Transformer architecture). The prompt design includes the event background, relevant entities, temporal and geographical context, and the required output format (a list of nodes in the multi-level causal chain, relationship types, and possible quantification range of impact). The LLM leverages its inherent knowledge and example-driven reasoning to generate possible transmission chains (e.g., "regulatory restrictions → port shutdown → raw material backlog → factory shutdown → product shortage"), and labels each transmission node (intermediate event or state change), the type of causal relationship between nodes, and the initial confidence level. To improve professionalism and interpretability, imperative fine-tuning, chain-of-thought, or post-processing rule filtering can be used. Fact-checking can be performed in conjunction with facts in the graph to eliminate inconsistent or low-reliability outputs. The output causal chain should be structured into a set of nodes and edges for subsequent mapping and probability calculation.
[0075] As described in step S6 above, the multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction on the specified supply chain. By mapping the causal chain nodes output by LLM to specific entities in the logistics physical layer knowledge graph, abstract causal relationships are transformed into quantifiable network impacts. The mapping process includes named entity disambiguation, geographic and temporal alignment, and semantic matching (e.g., mapping "main port closure" to specific port nodes in the graph and their operational parameters within a time window). Subsequently, a risk propagation network is constructed based on the mapped network, and a probabilistic propagation model is used to calculate the confidence probability of a node being affected. Confidence probability refers to the probabilistic measure of whether a risk event actually occurs or propagates to a target node within a given time window or path, used to quantify the credibility and uncertainty of risk prediction. For example, for a target node or a propagation path, the confidence probability p represents the subjective / objective probability estimate of whether the node is affected (or the path completes propagation) within a specified prediction window, with a value range of 0–1. Semantically: the closer p is to 1, the more reason there is to believe that the risk will occur; the closer p is to 0, the less likely it is to occur. Unlike "confidence level" and "confidence score," confidence probability has probabilistic semantics and can be used for probability calculation and decision-making (such as expected loss calculation). Confidence probability is a quantitative representation of the likelihood of a risk occurring, obtained by mathematically or statistically fusing heterogeneous evidence, model output, and historical information. Methods can include Bayesian networks, Markov random fields, or dynamic propagation models based on reinforcement learning; propagation weights can be weighted according to node attributes (throughput capacity, alternative path capacity), historical data statistics, and the influence index provided by the geopolitical regulatory layer. The model output is a risk score for each graph node within a future time window, a possible interruption time series, and the scope of impact, accompanied by interpretable information (such as core transmission paths and key intermediate nodes). The final results can be used to trigger early warnings, generate tiered emergency strategies, or provide data for human decision-making, and can be fed back to the graph and model to achieve closed-loop learning and accuracy improvement.
[0076] In one embodiment, the standard logistics operation data includes, but is not limited to, trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. In step S3, which involves constructing a regulatory layer knowledge graph based on each of the standard geo-legal data and a logistics physical layer knowledge graph based on each of the standard logistics operation data, the step of constructing the regulatory layer knowledge graph based on each of the standard geo-legal data includes:
[0077] S301: The initial geopolitical regulatory data are parsed using a pre-set cross-language pre-trained model to obtain parsing results; wherein, the parsing results include entity, event, and relationship information;
[0078] S302: Based on the entity, event, and relationship information of the parsing results, construct the nodes and edges of the knowledge graph to obtain the initial knowledge graph;
[0079] S303: Based on the analysis results, a quantified tension index is generated, and the tension index is used as a dynamic attribute of the corresponding entity or relationship and integrated into the initial knowledge graph to obtain the legal layer knowledge graph.
[0080] As described in step S301 above, a pre-set cross-language pre-trained model is used to parse each of the initial geopolitical regulatory data to obtain parsing results; wherein, the parsing results include entity, event, and relation information. First, the input initial geopolitical regulatory data is preprocessed, including language detection, character encoding normalization, PDF / HTML text extraction and cleaning, noise reduction, and segmentation. Then, the text is segmented into words / sub-words and fed into a pre-set cross-language pre-trained model (e.g., XLM-R based on Transformer / multilingual BERT variant), and downstream task modules are deployed on it—Named Entity Recognition (NER), Event Extraction, and Relation Extraction. The NER module identifies entities such as countries / regions, government agencies, regulatory clauses, corporate entities, ports / facilities, etc.; the Event Extraction module detects event types such as "implementing an embargo," "issuing a temporary decree," and "port closure," and extracts the time, location, and participating entities of the event; the Relation Extraction module identifies semantic relationships between entities (e.g., "sanctioned," "dependent on," "restricted by"). To improve cross-language consistency, it also includes semantic normalization and synonym mapping (mapping different languages or terms to a unified event / entity type), as well as attaching confidence scores and source metadata to the parsing results so that evidence weighting and filtering can be performed when constructing the graph later.
[0081] As described in step S302 above, based on the entity, event, and relation information from the parsing results, nodes and edges of the knowledge graph are constructed to obtain an initial knowledge graph. The parsing results are structured and mapped to knowledge graph elements according to a predefined ontology. First, entity disambiguation and entity linking are performed: the parsed entities are aligned with unified identifiers (such as internal primary keys or external knowledge base identifiers), handling issues of homonyms and aliases; event nodes are created for event instances, and temporal and causal relationship edges are established between events and participating entities. Next, directed / undirected edges between entities are constructed based on the relation extraction results, and attribute fields (such as time window, effective / ineffective status, text source, original sentence location, and confidence score) are added to nodes and edges. To ensure data quality, duplicate data merging, conflict detection (such as marking uncertainty when two data points contradict each other in time or attributes), and version management are performed. At the storage level, attribute graphs or triple models (such as Neo4j / JanusGraph or RDF storage) can be used, and source traceability information and timestamps are recorded for subsequent source verification and dynamic updates. The final output is a queryable, indexable initial knowledge graph with a chain of evidence, which can be used for subsequent quantification and reasoning.
[0082] As described in step S303 above, a quantified tension index is generated based on the parsing results, and this tension index is integrated into the initial knowledge graph as a dynamic attribute of the corresponding entity or relationship to obtain a regulatory layer knowledge graph. First, a calculation framework for the tension index is designed: influencing factors are determined (such as event type weight, event frequency, source credibility, time decay, geographical / economic correlation, and the degree of influence of historical similar events). Rule-based scoring, supervised learning, or a hybrid ensemble model can be used to calculate the original score: rule-based scoring is based on expert-defined event severity weights; supervised learning can use historical cases to train regression or classification models; ensemble methods weightedly fuse multi-source judgments to improve robustness. Subsequently, the original score is normalized (mapped to the 0–1 interval), and a time decay function is designed to reflect the dynamic nature of the event's influence decreasing over time or increasing due to the superposition of new events, thus obtaining the tension index. The generated tension index is written into the attribute field of the corresponding entity or relationship in the graph, along with confidence level and calculation source metadata. The purpose of the tension index is to transform qualitative and heterogeneous geopolitical / legal events and attributes into calculable, comparable, and updatable numerical values (usually normalized to the 0–1 range). This allows them to serve as dynamic attributes of entities or relationships in the knowledge graph, participating in subsequent causal inference and probability propagation calculations. Within a given time window and context, the tension index T∈[0,1] represents the intensity or probability tendency of the geopolitical / legal environment to have a significant negative impact on the target entity. T approaching 1 indicates high tension, high risk, and a strong potential impact; T approaching 0 indicates low tension and a stable environment. To support real-time performance, this attribute supports incremental updates and streaming recalculation, triggering upper-level alarms or inference modules when the index change reaches a preset threshold. In practice, the calculation must be interpretable (retaining detailed factor contributions) and auditable (retaining historical values and versions) so that decision-makers can understand the source of the index and make manual interventions.
[0083] In one embodiment, the standard logistics operation data includes, but is not limited to, trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. In step S3, which involves constructing a regulatory layer knowledge graph based on the various standard geo-legal data and a logistics physical layer knowledge graph based on the various standard logistics operation data, the step of constructing the logistics physical layer knowledge graph based on the various standard logistics operation data includes:
[0084] S311: Obtain the trajectory data of the Automatic Identification System for Vessels, port throughput data, and transportation hub status data from the various standard logistics operation data;
[0085] S312: Based on the trajectory data, the port throughput data, and the transportation hub status data, construct a logistics physical layer knowledge graph with logistics nodes as vertices and transportation routes as edges.
[0086] As described in step S311 above, the vessel automatic identification system (AIS) trajectory data, port throughput data, and transportation hub status data are obtained from the various standard logistics operation data. First, the sources and field specifications of the three types of data are clarified: AIS trajectory data typically includes MMSI / IMO number, latitude and longitude, heading, speed, timestamp, destination port, and navigation status; port throughput data includes real-time or periodic reports of the number of arriving vessels, TEUs / tonnage loaded / unloaded, available berths, operating rates, and port congestion time distribution; transportation hub status data includes road / railway capacity, congestion levels, temporary closure / restriction notices, multimodal transport schedules, and their delays. Acquisition can be performed using real-time streams (such as AIS streams, port APIs) and batch interfaces (such as port authority daily / weekly reports) in parallel. The raw data requires a rigorous preprocessing process: time synchronization (unifying time zones and interpolating to fill in missing time frames), coordinate verification and denoising (filtering out invalid latitude and longitude coordinates and jitter points), field normalization (speed units, cargo volume units), deduplication of duplicate records, and consistency verification (such as the same MMSI jumping position within a short period of time, which should be judged as abnormal). To facilitate subsequent map construction, semantic enhancement is also required, such as matching AIS trajectory fragments to known routes through route matching, aligning throughput data through port codes (UN / LOCODE), and assigning standardized labels to transportation hub status (e.g., capacity percentage, congestion level 0–4). In addition, data sources and credibility scores should be recorded, and data delay and missing data alarm mechanisms should be set up to ensure real-time performance and traceability. In engineering implementation, a stream processing platform (such as Kafka / Fluentd) is typically used to access AIS streams and port messages. Short-term time-series data is stored in a time-series database (such as InfluxDB), while raw documents and batch tables are stored in a data lake for offline verification.
[0087] As described in step S312 above, based on the trajectory data, port throughput data, and transportation hub status data, a logistics physical layer knowledge graph is constructed with logistics nodes as vertices and transportation routes as edges. First, the graph ontology and granularity are defined: node types include ports, berths, terminal operation units, warehouses, freight stations, truck distribution points, railway freight yards, and key shipping segment slices; edge types include maritime shipping segments, near-port pilotage segments, inland road / rail lines, and multimodal transport transshipment edges. The construction process includes entity unification and disambiguation: mapping the berthing or transit coordinates matched by AIS to the port boundary (geo-fence), and associating shore-side facilities with a unified entity through name / code; aggregating throughput and hub status by time window to generate node attributes (such as current throughput capacity, average operating time, number of vessels in port, inventory turnover rate, and length of connecting vehicle queues). The generation of routes and edges can be automated through trajectory clustering and route extraction techniques: path clustering is performed on historical and real-time AIS trajectories, the centerlines of commonly used routes are extracted as the geometric shape of the edges, and attributes (capacity, historical delay distribution, alternative route capacity) are added to the edges. To support time-series risk extrapolation, the graph needs to support time slicing or dynamic attributes (time-versioned properties). For example, each node / edge maintains a load / delay / available capacity sequence at the minute or hourly granularity. Mapping rules also need to be designed to convert external events (such as port closures and road closures) into state changes of nodes / edges, and event triggers need to be bound to update risk weights in the graph in real time. In terms of engineering implementation, it is recommended to use an attribute graph database (such as Neo4j or JanusGraph) combined with a geographic index (R-tree) and a time-series database, and to use incremental writing and version management to ensure efficient querying and real-time extrapolation capabilities for large-scale AIS points and throughput time series. The final output is a logistics physical layer knowledge graph with rich dynamic attributes and traceable evidence chains that can be directly called by upper-layer causal chain mapping and probability propagation algorithms. The probability propagation algorithm is selected based on the initial impact probability of nodes p0 (event source credibility), edge propagation probability p_e (edge weight), node vulnerability / resistance r_v, and time delay distribution parameters (for continuous-time models). For fast real-time response and tolerating approximation errors, the default approach is IC+parallel Monte Carlo (top-k path and node confidence probability); edge weights are initialized using the mapping formula above, with LLM confidence as the weighted input. Knowledge graph attribute mapping uses the tension index T, node substitution capability A (e.g., inventory days, replaceable capacity), and edge mobility C to calculate the initial p_e. Alternatively, Bayesian priors (e.g., Beta(α,β)) can be used for initialization, with α / β set by experts or industry statistics for easy subsequent Bayesian updates.
[0088] In one embodiment, step S5, which involves inputting the risk event into a large language model to generate a multi-level causal chain of the risk event propagating in a specified supply chain, includes:
[0089] S501: Input the risk event as a prompt into the large language model;
[0090] S502: Drive the large language model based on supply chain domain knowledge to reason and output a multi-level causal chain from the source of the risk event through at least one intermediate transmission link.
[0091] As described in step S501 above, the risk event is input as a prompt into the Large Language Model (LLM). The core is to convert the structured risk events perceived from the graph into a prompt format suitable for the LLM, enabling the model to perform causal reasoning within sufficient context. First, the event is represented in a structured manner, including fields such as event type (e.g., "port closure," "trade embargo"), timestamp, location (latitude and longitude or administrative division), involved parties (port, shipping company, regulatory agency), initial confidence level, and relevant evidence (news links, announcement text fragments, sensor data summaries). In the prompting process, a hybrid approach should be adopted: static system prompts define the task objectives and output specifications (e.g., "Please output a multi-level causal chain as a JSON array, with each node containing an event description, entity association, time window, and potential impact [0-1]"), while dynamic contextual prompts include several filtered facts (retrieval-enhanced fact segments) and a few examples to demonstrate the desired inference depth and output format. To improve factual accuracy and controllability, prompts are typically combined with Retrieval-Enhanced Generation (RAG) mechanisms: relevant fact fragments are first retrieved from the knowledge graph or vector index and injected into the model as context, preventing the model from fabricating information based solely on endogenous knowledge. In addition, generation parameters (such as temperature, top-k, and max tokens) and constraints (such as prohibiting the generation of unverified facts) should be set, and constrained decoding or templated output should be used for subsequent structured parsing. The implementation of the project needs to record complete prompts, retrieval sources, and model-returned content to ensure auditability and traceability; when deploying on the terminal, prompt length and bandwidth limitations should also be considered, and summary or segmented prompt strategies should be adopted to control latency.
[0092] As described in step S502 above, the large language model is driven to infer and output a multi-level causal chain from the source of the risk event through at least one intermediate transmission link, based on supply chain domain knowledge. First, the model should be fine-tuned for the supply chain context: through supervised fine-tuning (SFT) or instructional fine-tuning, the model is trained using examples of causal chains containing historical disruption events, expert-written examples, and domain literature, giving it a stronger reasoning preference and terminology mastery in the supply chain domain. The reasoning strategy can combine "chain-of-thought" with step-by-step generation: the model first generates candidate first-level transmission relationships (e.g., "port closure → ship delay"), and then further infers for each candidate node to form second-level and third-level transmission nodes, until a preset depth or confidence threshold is reached. To enhance multi-hypothesis coverage, multiple causal chain candidates (top-N) are typically generated, and each chain is assigned an initial confidence score (based on the model's output self-confidence, the support of input evidence, and the consistency score with facts in the knowledge graph). The generated chains require post-processing and fact verification: on the one hand, entity linking and disambiguation are performed, mapping abstract event nodes mentioned in the chains to specific entities in the graph; on the other hand, rule-based or discriminant models are used to verify the temporal consistency and logical self-consistency of the chains (e.g., prohibiting chains where "result precedes cause"), and external evidence is used to score key causal edges. Enabling reinforcement learning (such as RLHF) or a confidence calibration mechanism based on historical feedback can further improve output quality. The final output adopts a structured format (such as JSON), including the node sequence, node type, mapping to graph entities, confidence of each causal edge, and a list of evidence citations for each causal chain. It also supports human-computer interaction verification (human annotation followed by feedback to the training set) to achieve continuous learning and an interpretable causal reasoning loop. When deploying the project, inference latency, concurrency control, and privacy compliance (desensitization of sensitive regulatory texts or local inference) need to be considered, as well as the use of miniaturized models or remote invocation hybrid strategies on edge devices or terminals to balance performance and cost.
[0093] In one embodiment, step S6, which maps the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain, includes:
[0094] S601: Associate the transmission nodes in the multi-level causal chain with the entity nodes in the logistics physical layer knowledge graph to form a risk propagation network;
[0095] S602: Using a probability propagation algorithm, calculate the confidence probability of risk propagation along different paths in the risk propagation network; wherein, the confidence probability is used to quantify the risk prediction result;
[0096] S603: Perform risk prediction on the specified supply chain based on the confidence probability.
[0097] As described in step S601 above, the transmission nodes in the multi-level causal chain are associated with the entity nodes in the logistics physical layer knowledge graph to form a risk propagation network. First, the multi-level causal chain output by the LLM is structured and parsed to extract attributes such as text description, time window, geographical location, and involved subjects for each transmission node. Then, entity linking and disambiguation are performed to map abstract nodes to specific entities in the logistics physical layer knowledge graph (e.g., mapping "major port closures" to the corresponding port node in the graph). Mapping strategies include rule-based mapping (name / encoding matching, UN / LOCODE alignment), semantic similarity matching (using word vectors, sentence vectors, or cross-modal embeddings for similarity retrieval), and contextual constraint matching (time, geographical proximity, and event type consistency). For nodes that cannot be directly matched, a candidate generation and manual / model review process is used to determine the final mapping. After mapping, a risk propagation network is constructed using the mapped entity nodes as vertices and causal edges as directed edges. Simultaneously, the dynamic attributes of the corresponding nodes in the graph (such as current throughput, inventory level, and stress index) as well as the edge confidence and evidence citations output by the LLM are attached to the propagation network, forming a weighted directed graph that can be used for quantitative simulation. In engineering practice, the mapping source links and uncertainty annotations should be preserved to explain the mapping decisions during subsequent propagation calculations or manual review.
[0098] As described in step S602 above, a probability propagation algorithm is used to calculate the confidence probability of risk propagation along different paths in the risk propagation network; wherein, the confidence probability is used to quantify the risk prediction result. A probability model is established based on the risk propagation network to determine the initial disaster probability of nodes and the propagation probability of edges. The initial probability of a node can be jointly determined by the initial confidence of the event (derived from the confidence of the graph evidence and the confidence of the LLM output), the inherent vulnerability of the node (such as substitution capacity, inventory coverage days), and the time window function; the edge propagation probability can be obtained by weighted calculation of historical statistical frequency, physical transmission capacity (such as alternative route capacity), geopolitical regulatory influence index, etc. Probability propagation can be implemented using various algorithms: causal propagation based on Bayesian networks (using belief propagation / variable inference to calculate posterior probability), discrete long-distance propagation simulation using Independent Cascade or Linear Threshold models, or continuous-time propagation simulation based on Markov processes or particle filtering. To improve accuracy, Monte Carlo sampling is often used to simulate uncertain parameters, or Bayesian models are used for posterior parameter estimation. During propagation, time delay, changes in edge weights over time, and the cumulative effect of events are considered. When multiple paths exist, probabilistic union or Bayesian merging rules are used to calculate the final confidence probability of nodes. Simultaneously, the correlation between paths is corrected to avoid overestimation. The output is the confidence probability distribution of each target node within a specified prediction window and the main contributing paths.
[0099] As described in step S603 above, risk prediction is performed on the specified supply chain based on the confidence probability. The probability propagation results are transformed into actionable risk prediction outputs and decision indicators. First, the confidence probabilities are thresholded and ranked to identify high-risk nodes and key transmission paths. Second, the expected impact time window and possible duration of nodes are estimated based on time distribution, and the expected loss or priority score is calculated by combining the node's business sensitivity (such as dependence on key components and financial exposure). The system can generate multi-dimensional outputs: node-level risk score time series, end-to-end interruption probability, most likely interruption path (top-k), and scenario-based impact assessment (probability and loss ranges under different assumptions). These outputs are used to trigger early warnings (different levels trigger different response processes), provide upper-level strategy generation modules with contingency measures (such as switching to backup ports, expedited procurement, and legal compliance checks), or provide them to decision-makers for manual intervention. Furthermore, prediction errors and actual event feedback are incorporated into a closed loop: by comparing actual results with predicted confidence probabilities, parameters are adjusted, node / edge weights are updated, or reinforcement learning is used to optimize the propagation strategy to gradually improve the model's calibration and early warning accuracy. In terms of engineering implementation, it is necessary to support concurrent computing, incremental updates and visualization, and ensure that the prediction is completed within the acceptable latency for the business and is interpretable.
[0100] In one embodiment, after step S603 of performing risk prediction on the specified supply chain based on the confidence probability, the method further includes:
[0101] S6041: Retrieve new event data;
[0102] S6042: Based on the new event data, the influence weights of nodes and edges in the risk propagation network are dynamically adjusted through a preset reinforcement learning framework to obtain an updated risk propagation network;
[0103] S6043: Recalculate the confidence probability of the risk propagating along the path based on the updated risk propagation network;
[0104] S6044: Perform risk prediction on the specified supply chain based on the recalculated confidence probability.
[0105] As described in step S6041 above, acquire new event data. Continuously monitor and collect new event data that affects supply chain risk assessment to maintain the timeliness and accuracy of the risk propagation model. Sources of new event data include, but are not limited to: real-time updated AIS trajectory anomalies (e.g., sudden shipping disruptions), port announcements (e.g., temporary port closures), route rerouting information, weather warnings (typhoons, storm surges), sudden railway / highway closures, labor disputes or strike announcements, temporary adjustments to customs regulations, and emergency announcements issued by authoritative media or institutions. Data collection is not limited to structured APIs but also includes unstructured text (structured events extracted by NLP), sensor streams, and third-party intelligence after appropriate preprocessing. The system needs to timestamp, geolocate, and score the new events, and associate the events with corresponding entities or edges in the graph to provide state updates for subsequent reinforcement learning input. In engineering, stream processing architectures (e.g., Kafka, Stream processing) are typically used to ensure low-latency, high-reliability data delivery, and filtering and confidence fusion mechanisms are established to filter noise and false information, ensuring the availability and traceability of data entering the learning and update stages.
[0106] As described in step S6042 above, based on the new event data, the influence weights of nodes and edges in the risk propagation network are dynamically adjusted through a preset reinforcement learning framework to obtain an updated risk propagation network. Reinforcement learning (RL) is used as an online adaptive mechanism to convert the information brought by the new event into a dynamic adjustment strategy for the weights of the risk propagation network. First, RL components are defined: the state (s) can be composed of the node / edge feature vectors of the current risk propagation network, including the node's current risk level, historical confidence probability sequence, throughput and substitution capability, geopolitical regulatory tension index, and the characteristics of the new event (type, intensity, geographical / temporal context, confidence level); the action (a) is an operation to adjust the weights of a specific node or edge (e.g., scaling up / down, setting upper / lower limits for edge propagation probability, or replacing with an estimate based on new evidence); the reward function (r) is designed as a quantitative indicator related to prediction performance, such as the calibration degree between the predicted confidence probability and the actual observation results within the posterior validation window, the early warning lead time, and the reduction in key business KPIs (such as the number of interruption days, loss estimation). Optional RL algorithms include offline pre-trained Deep Q-Network (DQN), policy gradients or Actor-Critic (such as A2C / PPO) for continuous action spaces, or model-based reinforcement learning for higher sample efficiency. Implementation employs empirical replay, target network, and gradient pruning to stabilize learning, and imposes safety constraints on actions (e.g., maximum adjustment magnitude, no exceeding physical / regulatory constraints) to prevent simulation divergence. The model can be trained online on a centralized server or fine-tuned using federated or edge-based strategies to meet privacy and latency requirements. The output is a set of policy-adjusted node and edge weights, forming an updated risk propagation network, and recording adjustment factors and decision evidence for auditing purposes.
[0107] The reinforcement learning framework takes a vectorized system state as input, which includes, but is not limited to: the current weights and dynamic attributes (such as throughput, inventory coverage, and stress index) of candidate nodes / edges, the type and confidence of new events, network topology and historical event characteristics, and information from the last adjustment. It uses parameterized action outputs as the execution unit of the policy, where each action represents a controllable relative or absolute adjustment to the weights of several candidate nodes or edges. The reward function is a weighted combination of an immediate agent term and a delayed real feedback term. The immediate agent term measures calibration improvement, early warning lead time, and adjustment stability / cost, while the delayed term is updated based on the difference between the predicted hit rate and actual business loss observed posteriorly. The training process includes offline pre-training based on historical data and a simulation environment, as well as constrained online fine-tuning. It employs policy gradients or other stabilization strategies (such as trust region-based methods) combined with experience replay to improve sample efficiency. Simultaneously, it adopts action constraints, smooth updates, audit logs, and rollback mechanisms to ensure security and interpretability. This framework can be used in combination with Bayesian update or regularization methods to achieve adaptive calibration of weights by continuously incorporating actual observations, thereby improving the system's responsiveness to dynamic risk events and prediction accuracy.
[0108] As described in step S6043 above, the confidence probability of the risk propagation along the path is recalculated based on the updated risk propagation network. The specific process includes: first, replacing the updated initial node probabilities and edge propagation probabilities into the propagation model; if a Bayesian network is used, the posterior distribution is recalculated through belief propagation or variational inference; if an independent cascade or threshold model is used, the discrete long-range propagation simulation or Monte Carlo sampling is rerun, considering temporal dynamics (propagation delay, time window) and the superposition effect of multiple events. To improve the reliability of confidence interval estimation, multiple samplings are often used to summarize the probability distribution or confidence interval, combined with importance sampling or hierarchical sampling to reduce variance. If the reinforcement learning action involves structural changes (such as introducing new edges or alternative paths), the propagation simulation must support topology changes and assess topology sensitivity. The calculation process should support incremental updates to reduce redundant calculations: only locally recalculate the subgraphs or time windows affected by the adjustment, while retaining previous results for unchanged regions to save resources. The output consists of the latest confidence probabilities, probability distribution statistics, and key contribution factors for each node and the target path, decomposed according to the time dimension, to evaluate the adjustment effect.
[0109] As described in step S6044 above, risk prediction is performed on the specified supply chain based on the recalculated confidence probability. First, the confidence probability is thresholded, categorized, and mapped to scenarios to generate node-level and end-to-end risk scores, expected impact windows, most likely disruption paths (top-k), and loss / priority rankings. The updated prediction results are compared and analyzed with previous predictions to quantify the improvements brought about by reinforcement learning adjustments (such as reduced calibration error and increased early warning lead time). If the confidence probability exceeds a preset threshold, automated emergency recommendations are triggered, such as activating backup suppliers, rerouting transportation, or initiating compliance review processes. These recommendations are pushed to end users or upstream decision-making systems in the form of structured reports or visualization dashboards. Simultaneously, the prediction results and actual subsequent observations are recorded as data sources for reinforcement learning reward calculations and model retraining, forming a closed-loop adaptive mechanism. The engineering implementation must provide rollback strategies (such as weight rollback if adjustments cause performance degradation), model version management, and audit logs, and ensure the interpretability of the prediction output (providing key evidence chains and contribution factors) so that decision-makers can understand and trust the decisions made through automated adjustments.
[0110] In one embodiment, after step S6 of mapping the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain, the method further includes:
[0111] S701: Obtain the risk prediction results for the specified supply chain, and the corresponding risk transmission path;
[0112] S702: Input the risk prediction results and the corresponding risk transmission path into a preset large language model to generate a graded response strategy.
[0113] As described in step S701 above, obtain the risk prediction results for the specified supply chain and the corresponding risk transmission path. Extract and summarize the complete risk prediction output from the previous calculation modules (such as S602 / S603 / S604) as direct input for subsequent decision generation. Specifically, this includes: obtaining the confidence probability time series, prediction time window, set of most likely affected paths (top-k risk transmission paths), contribution and confidence of each path, status and attributes of key intermediate nodes on the path (inventory coverage days, substitution capacity, traffic capacity, etc.) for each target node at the node / path level, as well as accompanying interpretability information (such as primary evidence citations, original text of the LLM generation chain, uncertainty annotation of the graph mapping). In addition, this step should also calculate and output several business metric mapping items, such as the probability of interruption of key components of the enterprise, the estimated capacity loss caused by expected shortages, and the time sensitivity and financial exposure when different nodes are affected. When acquiring data, it is essential to ensure that the data is structured (e.g., JSON containing a list of paths, node objects, and time series) and includes metadata such as the prediction model version, calculation timestamp, data source, and confidence calibration information for traceability and auditing. The engineering implementation should support filtering by policy priority (e.g., only selecting paths with confidence probabilities greater than a threshold) and provide visual summaries and machine-readable interfaces for parallel use by the S702 (policy generation) and human decision-making modules. Furthermore, if multiple scenarios exist (e.g., different weather or regulatory assumptions), this step should output the prediction results for each scenario separately to support contextualized responses.
[0114] As described in step S702 above, the risk prediction results and the corresponding risk transmission paths are input into a preset large language model to generate tiered response strategies. Using structured risk prediction as input, the large language model (LLM) is driven by prompting engineering and retrieval enhancement strategies to generate executable, tiered response plans. First, the key information of the risk prediction (high-confidence path, key nodes, impact time window, business priority, available resources, and alternative options) is formatted into prompt content, along with relevant compliance templates and regional regulatory summaries (retrieved from a regulatory knowledge graph or legal database). The prompts include task descriptions (e.g., "Generate Level 1 / Level 2 / Level 3 response measures for high-confidence paths"), constraints (time cost cap, compliance constraints, logistics capacity limitations), and output templates (each level of strategy must include operational steps, estimated time / cost, required resources, legal compliance tags, quantitative risk reduction estimates, and triggering conditions). LLM (Limited Supply Chain Management) generates multiple tiered solutions based on internalized supply chain and emergency management knowledge combined with retrieved facts: Level 1 Emergency Response (short-term, low-latency operations, such as activating backup ports and prioritizing inventory allocation), Level 2 Medium-Term Measures (such as rescheduling routes and initiating air freight replenishment), and Level 3 Long-Term Strategies (alternative supplier selection, contract renegotiation, and regulatory compliance). Each strategy output must include a verifiable chain of evidence, compliance assessment (automatically marked "requires legal review / compliant / questionable"), detailed implementation steps, and responsibility allocation suggestions. To support decision-making, LLM should also provide benefit-cost estimates for each strategy, expected improvement to key KPIs, and uncertainty range. The final output should be returned in a structured format and support manual review and simulation (verifying strategy effectiveness in a simulation environment). User feedback and implementation results should be recorded as training signals for subsequent optimization and reinforcement learning loops. Engineering aspects include output auditability, rollback, and access control to ensure that strategies are automated recommendations within compliance and business constraints, rather than fully automated decision-making.
[0115] Reference Figure 3 The present invention also provides a supply chain risk prediction device based on causal reasoning, the device comprising:
[0116] The first acquisition module 902 is used to acquire in real time multiple initial logistics operation data and multiple initial geo-regulatory data related to the specified supply chain;
[0117] The processing module 904 is used to standardize each of the initial logistics operation data and each of the initial geo-legal data to obtain standard logistics operation data corresponding to each of the initial logistics operation data and standard geo-legal data corresponding to each of the initial geo-legal data.
[0118] The construction module 906 is used to construct a legal layer knowledge graph based on the various standard geo-legal data, and to construct a logistics physical layer knowledge graph based on the various standard logistics operation data.
[0119] The second acquisition module 908 is used to acquire the perceived risk events in the legal layer knowledge graph and the logistics physical layer knowledge graph;
[0120] Input module 910 is used to input the risk event into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0121] The mapping module 912 is used to map the multi-level causal chain to the logistics physical layer knowledge graph in order to perform risk prediction on the specified supply chain.
[0122] In one embodiment, the construction module 906, the step of constructing a regulatory layer knowledge graph based on each of the standard geopolitical regulatory data, includes:
[0123] The parsing submodule is used to parse each of the initial geopolitical regulatory data using a preset cross-language pre-trained model to obtain parsing results; wherein, the parsing results include entity, event, and relationship information;
[0124] The initial knowledge graph acquisition submodule is used to construct the nodes and edges of the knowledge graph based on the entity, event, and relationship information of the parsing results, so as to obtain the initial knowledge graph;
[0125] The integration submodule is used to generate a quantified tension index based on the parsing results, and integrate the tension index as a dynamic attribute of the corresponding entity or relationship into the initial knowledge graph to obtain the legal layer knowledge graph.
[0126] In one embodiment, the construction module 906, the step of constructing a logistics physical layer knowledge graph based on the various standard logistics operation data, includes:
[0127] The trajectory data acquisition submodule is used to acquire trajectory data from the Automatic Identification System of Ships, port throughput data, and transportation hub status data from the various standard logistics operation data.
[0128] The logistics physical layer knowledge graph construction submodule is used to construct a logistics physical layer knowledge graph with logistics nodes as vertices and transportation routes as edges based on the trajectory data, the port throughput data, and the transportation hub status data.
[0129] In one embodiment, the input module 910 includes:
[0130] The input submodule is used to input the risk event as a prompt into the large language model;
[0131] The driving submodule is used to drive the large language model to reason and output a multi-level causal chain from the source of the risk event through at least one intermediate transmission link based on supply chain domain knowledge.
[0132] In one embodiment, the mapping module 912 includes:
[0133] The association submodule is used to associate the transmission nodes in the multi-level causal chain with the entity nodes in the logistics physical layer knowledge graph to form a risk propagation network.
[0134] The first calculation submodule is used to calculate the confidence probability of risk propagation along different paths in the risk propagation network using a probability propagation algorithm; wherein the confidence probability is used to quantify the risk prediction result.
[0135] The first risk prediction submodule is used to predict the risk of the specified supply chain based on the confidence probability.
[0136] In one embodiment, the mapping module 912 further includes:
[0137] The new event data acquisition submodule is used to acquire new event data;
[0138] The adjustment submodule is used to dynamically adjust the influence weights of nodes and edges in the risk propagation network based on the new event data through a preset reinforcement learning framework, so as to obtain an updated risk propagation network.
[0139] The second calculation submodule is used to recalculate the confidence probability of the risk propagating along the path based on the updated risk propagation network;
[0140] The second risk prediction submodule is used to predict the risk of the specified supply chain based on the recalculated confidence probability.
[0141] In one embodiment, the supply chain risk prediction device based on causal reasoning further includes:
[0142] The risk prediction result acquisition module is used to acquire the risk prediction results for the specified supply chain, as well as the corresponding risk transmission path.
[0143] The response strategy generation module is used to input the risk prediction results and the corresponding risk transmission path into a preset large language model to generate hierarchical response strategies.
[0144] Figure 4An internal structural diagram of an electronic device in one embodiment is shown. This electronic device can specifically be a terminal or a server, and more specifically, a computer device. Figure 4 As shown, the electronic device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a supply chain risk prediction method based on causal reasoning. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement a supply chain risk prediction method based on causal reasoning. Those skilled in the art will understand that... Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0145] In one embodiment, an electronic device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:
[0146] Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain;
[0147] The initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data corresponding to each of the initial logistics operation data and the standard geo-legal data corresponding to each of the initial geo-legal data.
[0148] A legal layer knowledge graph is constructed based on the aforementioned standard geopolitical regulatory data, and a logistics physical layer knowledge graph is constructed based on the aforementioned standard logistics operation data.
[0149] Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph;
[0150] The risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0151] The multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain.
[0152] By constructing a two-layer knowledge graph consisting of a regulatory layer knowledge graph and a logistics physical layer knowledge graph, real-time fusion and representation of multi-source heterogeneous data on geo-regulation and logistics operations are achieved, improving the real-time perception and coverage of risk events. Then, by introducing a large language model to automatically generate multi-level causal chains, it is possible to deeply reason about the complex transmission paths of risks in the supply chain network, overcoming the shortcomings of traditional methods in mining implicit associations and improving the reasoning for risk tracing. Finally, by mapping causal chain nodes to the logistics physical layer knowledge graph and performing probabilistic calculations, risk prediction for a specified supply chain is achieved, and the accuracy of risk prediction results is improved.
[0153] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps:
[0154] Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain;
[0155] The initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data corresponding to each of the initial logistics operation data and the standard geo-legal data corresponding to each of the initial geo-legal data.
[0156] A legal layer knowledge graph is constructed based on the aforementioned standard geopolitical regulatory data, and a logistics physical layer knowledge graph is constructed based on the aforementioned standard logistics operation data.
[0157] Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph;
[0158] The risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node;
[0159] The multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain.
[0160] By constructing a two-layer knowledge graph consisting of a regulatory layer knowledge graph and a logistics physical layer knowledge graph, real-time fusion and representation of multi-source heterogeneous data on geo-regulation and logistics operations are achieved, improving the real-time perception and coverage of risk events. Then, by introducing a large language model to automatically generate multi-level causal chains, it is possible to deeply reason about the complex transmission paths of risks in the supply chain network, overcoming the shortcomings of traditional methods in mining implicit associations and improving the reasoning for risk tracing. Finally, by mapping causal chain nodes to the logistics physical layer knowledge graph and performing probabilistic calculations, risk prediction for a specified supply chain is achieved, and the accuracy of risk prediction results is improved.
[0161] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0162] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0163] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A supply chain risk prediction method based on causal reasoning, characterized in that, The method includes: Real-time acquisition of multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain; The initial logistics operation data and the initial geo-legal data are standardized to obtain the standard logistics operation data corresponding to each of the initial logistics operation data and the standard geo-legal data corresponding to each of the initial geo-legal data. A legal layer knowledge graph is constructed based on the aforementioned standard geopolitical regulatory data, and a logistics physical layer knowledge graph is constructed based on the aforementioned standard logistics operation data. Obtain the perceived risk events from the regulatory layer knowledge graph and the logistics physical layer knowledge graph; The risk event is input into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node; The multi-level causal chain is mapped to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain; The standard logistics operation data includes trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. The steps of constructing a regulatory layer knowledge graph based on the various standard geo-legal data and constructing a logistics physical layer knowledge graph based on the various standard logistics operation data include: A pre-trained cross-language model is used to parse each of the initial geopolitical regulatory data to obtain parsing results; wherein, the parsing results include entity, event, and relationship information; Based on the entity, event, and relationship information obtained from the parsing results, the nodes and edges of the knowledge graph are constructed to obtain the initial knowledge graph. Based on the analysis results, a quantitative tension index is generated, and the tension index is used as a dynamic attribute of the corresponding entity or relationship, and integrated into the initial knowledge graph to obtain a legal layer knowledge graph. The tension index is generated as follows: the influencing factors are determined, and the original scores are calculated using rule-based scoring, supervised learning, or a hybrid ensemble model. The original scores are normalized, and a time decay function is designed to reflect the dynamic nature of the event's influence decreasing over time or increasing due to the superposition of new events, thereby obtaining the tension index. The step of mapping the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain includes: The transmission nodes in the multi-level causal chain are associated with the entity nodes in the logistics physical layer knowledge graph to form a risk propagation network; A probability propagation algorithm is used to calculate the confidence probability of risk propagation along different paths in the risk propagation network; wherein, the confidence probability is used to quantify the risk prediction result; Risk prediction is performed on the specified supply chain based on the confidence probability.
2. The supply chain risk prediction method based on causal reasoning according to claim 1, characterized in that, The standard logistics operation data includes trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. The steps of constructing a regulatory layer knowledge graph based on the various standard geo-legal data and constructing a logistics physical layer knowledge graph based on the various standard logistics operation data include: Obtain vessel automatic identification system trajectory data, port throughput data, and transportation hub status data from the various standard logistics operation data; Based on the trajectory data, the port throughput data, and the transportation hub status data, a logistics physical layer knowledge graph is constructed with logistics nodes as vertices and transportation routes as edges.
3. The supply chain risk prediction method based on causal reasoning according to claim 1, characterized in that, The step of inputting the risk event into a large language model to generate a multi-level causal chain of the risk event propagating in a specified supply chain includes: The risk event is input as a prompt into the large language model; The large language model is driven by supply chain domain knowledge to reason and output a multi-level causal chain from the source of the risk event through at least one intermediate transmission link.
4. The supply chain risk prediction method based on causal reasoning according to claim 1, characterized in that, Following the step of performing risk prediction on the specified supply chain based on the confidence probability, the method further includes: Retrieve new event data; Based on the new event data, the influence weights of nodes and edges in the risk propagation network are dynamically adjusted through a preset reinforcement learning framework to obtain an updated risk propagation network. The confidence probability of the risk propagating along the path is recalculated based on the updated risk propagation network; Risk prediction is performed on the specified supply chain based on the recalculated confidence probability.
5. The supply chain risk prediction method based on causal reasoning according to claim 1, characterized in that, Following the step of mapping the multi-level causal chain to the logistics physical layer knowledge graph to perform risk prediction for the specified supply chain, the method further includes: Obtain the risk prediction results for the specified supply chain, as well as the corresponding risk transmission path; The risk prediction results and the corresponding risk transmission paths are input into a preset large language model to generate tiered response strategies.
6. A supply chain risk prediction device based on causal reasoning, characterized in that, The device includes: The first acquisition module is used to acquire multiple initial logistics operation data and multiple initial geo-regulatory data related to a specified supply chain in real time; The processing module is used to standardize each of the initial logistics operation data and each of the initial geo-legal data to obtain standard logistics operation data corresponding to each of the initial logistics operation data and standard geo-legal data corresponding to each of the initial geo-legal data. The module is used to construct a legal layer knowledge graph based on the various standard geo-legal data, and to construct a logistics physical layer knowledge graph based on the various standard logistics operation data. The second acquisition module is used to acquire the perceived risk events in the legal layer knowledge graph and the logistics physical layer knowledge graph; An input module is used to input the risk event into a large language model to generate a multi-level causal chain in which the risk event propagates in a specified supply chain; wherein the multi-level causal chain includes at least one transmission node; The mapping module is used to map the multi-level causal chain to the logistics physical layer knowledge graph in order to perform risk prediction for the specified supply chain; The standard logistics operation data includes trajectory data from the Automatic Identification System (AIS), port throughput data, and transportation hub status data. The construction module includes: The parsing submodule is used to parse each of the initial geopolitical regulatory data using a preset cross-language pre-trained model to obtain parsing results; wherein, the parsing results include entity, event, and relationship information; The initial knowledge graph acquisition submodule is used to construct the nodes and edges of the knowledge graph based on the entity, event, and relationship information of the parsing results, so as to obtain the initial knowledge graph; An integration submodule is used to generate a quantified tension index based on the parsing results, and to integrate the tension index as a dynamic attribute of the corresponding entity or relationship into the initial knowledge graph to obtain a regulatory layer knowledge graph. The tension index is generated as follows: determining the influencing factors, using rule-based scoring, supervised learning, or a hybrid ensemble model to calculate the original score, normalizing the original score, and designing a time decay function to reflect the dynamic nature of the event's influence decreasing over time or increasing due to the superposition of new events, thereby obtaining the tension index. The mapping module includes: The association submodule is used to associate the transmission nodes in the multi-level causal chain with the entity nodes in the logistics physical layer knowledge graph to form a risk propagation network. The first calculation submodule is used to calculate the confidence probability of risk propagation along different paths in the risk propagation network using a probability propagation algorithm; wherein the confidence probability is used to quantify the risk prediction result. The first risk prediction submodule is used to predict the risk of the specified supply chain based on the confidence probability.
7. A computer-readable storage medium, characterized in that, The system contains a computer program that, when executed by a processor, causes the processor to perform the steps of the supply chain risk prediction method based on causal reasoning as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, The device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the supply chain risk prediction method based on causal reasoning as described in any one of claims 1 to 5.