Emergency resource reserve intelligent prediction system and method based on graph neural network
By constructing a heterogeneous spatiotemporal graph of event flow and a graph neural network, the problem of consistency between prediction results and passage constraints in port and shipping emergency scenarios was solved, realizing the real-time and executable nature of intelligent prediction and allocation decisions for port and shipping emergency resource reserves.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-09
- Publication Date
- 2026-04-07
AI Technical Summary
In port and shipping emergency scenarios, existing technologies are fragmented in terms of demand forecasting, safety stock threshold setting, accessibility assessment, and transportation timeliness estimation. This makes it difficult to maintain consistency between forecast results and access constraints under the constraints of the passage window formed by tides and drafts and the frequent updates of emergencies, resulting in insufficient feasibility of allocation plans.
A heterogeneous spatiotemporal graph of event flow is constructed. Node features and edge features are updated through graph neural networks and memory units. Combined with a multi-task prediction module and a consistent constraint training module, quantile demand prediction, accessibility score, transportation timeliness, and safety stock threshold are generated. Allocation and distribution quantities and berth operation time windows are also generated to achieve intelligent prediction of port and shipping emergency resource reserves.
It has improved the real-time nature and feasibility of port and shipping emergency resource reserve forecasting and allocation decisions, ensured the consistency between forecast results and traffic constraints in the event of an emergency, and enhanced the real-time response capability of the port and shipping network.
Smart Images

Figure CN121809987A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent prediction technology, specifically relating to an intelligent prediction system and method for emergency resource reserves based on graph neural networks. Background Technology
[0002] Port and shipping emergency resource reserve management typically involves the coordinated operation of multiple entities such as ports, berths, waterway sections, emergency warehouses, and vessels. It is significantly affected by the constraints of passage windows created by factors such as tides and draft. During emergencies such as typhoons, dense fog, waterway construction, and equipment failures, passage relationships and operational capabilities change rapidly over time, and demand-side material consumption and replenishment requests exhibit volatility and uncertainty. Current technologies often employ rule-based thresholds, empirical coefficients, or prediction models based on single-point time series to estimate demand and transportation timeliness separately, then combine these with static paths or manual scheduling to generate allocation plans. These methods often treat demand forecasting, inventory thresholds, accessibility, transportation timeliness, and berth operations in isolation, making it difficult to simultaneously express the coupling of multiple relationships between entities, the dynamic impact of emergencies on edge weights, and the hard constraints of passage windows on edge feasibility within the same structure. When the network structure changes over time or local links fail, prediction and scheduling results are prone to spatiotemporal inconsistencies, and it is difficult to use execution feedback to correct subsequent predictions. Especially when there are a large number of feeder channels, temporary berths and boundary nodes in the port and shipping network, directly modeling and inferring the entire network involves a large amount of computation, which affects the real-time response capability in scenarios with high-frequency updates of emergencies. Summary of the Invention
[0003] This invention provides an intelligent prediction system and method for emergency resource reserves based on graph neural networks. It solves the technical problems in related technologies where demand forecasting, safety stock threshold setting, accessibility assessment and transportation timeliness estimation are disconnected in port and shipping emergency scenarios. Furthermore, it is difficult to maintain consistency between prediction results and access constraints under the constraints of passage time windows formed by tides and drafts and the frequent updates of emergencies, resulting in insufficient executability of allocation plans.
[0004] This invention provides an intelligent prediction system for emergency resource reserves based on graph neural networks, comprising:
[0005] The spatiotemporal graph construction module is used to collect information on ports, berths, waterway sections, emergency warehouses and ships, passage time window information formed by tides and drafts, and emergency event information to obtain an event flow heterogeneous spatiotemporal graph, wherein the passage time window information corresponds to the edge feasibility state, and the emergency event information corresponds to the edge weight.
[0006] The backbone filtering module is used to filter backbone subgraphs from heterogeneous spatiotemporal graphs of event streams, and to set relation feature transformation rules and time feature representation rules for backbone subgraphs;
[0007] The graph memory update module is used to update node and edge features based on the backbone subgraph through graph neural network and memory unit when updating information about sudden events.
[0008] The multi-task prediction module is used to obtain quantile demand prediction, accessibility score, transportation timeliness and safety stock threshold based on node features and edge features;
[0009] The consistency constraint training module is used to train consistency constraints based on quantile demand forecasts, safety stock thresholds, accessibility scores, and transportation timeliness. The consistency constraints include the path dependency of edges, and the safety stock threshold references quantile demand forecasts.
[0010] The inventory allocation decision module is used to determine the inventory gap based on the safety stock threshold and real-time inventory, determine the feasible supply set and generate the allocation quantity based on the accessibility score and edge feasibility status, and output the earliest shipment time and the estimated arrival time.
[0011] The berth time window recharge module is used to generate berth operation time windows based on the expected arrival time and passage time window information. When berth operation time windows conflict, the path is replaced according to the relationship influence weight, and the actual arrival time is recharged.
[0012] This invention provides an intelligent prediction method for emergency resource reserves based on graph neural networks, comprising the following steps:
[0013] Step 91: Collect information on ports, berths, waterway sections, emergency warehouses and ships, passage time window information formed by tides and drafts, and emergency event information to obtain an event flow heterogeneous spatiotemporal graph, wherein the passage time window information corresponds to the edge feasible state, and the emergency event information corresponds to the edge weight.
[0014] Step 92: Filter the backbone subgraphs of the heterogeneous spatiotemporal graph of the event flow, and set relation feature transformation rules and time feature representation rules for the backbone subgraphs;
[0015] Step 93: When updating the information on sudden events, update the node features and edge features based on the backbone subgraph using a graph neural network and memory units;
[0016] Step 94: Based on node features and edge features, obtain quantile demand forecast, accessibility score, transportation timeliness and safety stock threshold;
[0017] Step 95: Train consistency constraints based on quantile demand forecasts, safety stock thresholds, accessibility scores, and transportation timeliness. The consistency constraints include the path dependency of edges, and the safety stock thresholds reference quantile demand forecasts.
[0018] Step 96: Determine the inventory gap based on the safety stock threshold and real-time inventory, determine the feasible supply set based on the accessibility score and edge feasibility status and generate the allocation quantity, and output the earliest shipment time and the estimated arrival time.
[0019] Step 97: Generate berth operation time windows based on estimated arrival time and passage time window information. When berth operation time windows conflict, replace the path according to the relationship influence weight and reinstate the actual arrival time.
[0020] The beneficial effects of this invention are as follows: By constructing a heterogeneous spatiotemporal graph of event flow, this invention uniformly represents entities such as ports, berths, waterway sections, emergency warehouses, and ships, as well as their passage, berthing, replenishment, and transportation relationships. It maps the passage window constraints formed by tides and drafts into edge-feasible states, and maps the impact of sudden events into the temporal update results of edge weights, forming a graph structure input that can change with events. Based on backbone subgraph selection and relation feature transformation, and temporal feature representation rules, incremental updates of the graph neural network and memory units are achieved, enabling node features and edge features to be quickly synchronized during sudden event updates. Furthermore, it outputs quantile demand forecasts, accessibility scores, transportation timeliness, and safety stock thresholds in a multi-task manner, and ensures logical consistency between inventory thresholds and demand forecasts, accessibility, and passage constraints through joint training using reference consistency constraints and passage window consistency constraints. Ultimately, by combining real-time inventory, the system generates allocation quantities, earliest shipping times, and estimated arrival times, as well as berth operation time windows. In case of conflicts, it replaces paths based on the weight of relational influences and reinjects the actual arrival time, thereby improving the real-time performance, feasibility, and closed-loop adaptive capabilities of port and shipping emergency resource reserve forecasting and allocation decisions. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of a module of an intelligent prediction system for emergency resource reserves based on graph neural networks according to the present invention. Detailed Implementation
[0022] The subject matter described herein will now be discussed with reference to exemplary embodiments. It should be understood that these embodiments are discussed only to enable those skilled in the art to better understand and implement the subject matter described herein, and changes may be made to the function and arrangement of the elements discussed without departing from the scope of this specification. Various processes or components may be omitted, substituted, or added as needed in the examples. Furthermore, features described in some examples may be combined in other examples.
[0023] It should be noted that, unless otherwise defined, the technical or scientific terms used in one or more embodiments of the present invention should have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in one or more embodiments of the present invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed after the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0024] like Figure 1 As shown, an intelligent prediction system for emergency resource reserves based on graph neural networks includes:
[0025] The spatiotemporal graph construction module 1 is used to collect information on ports, berths, waterway sections, emergency warehouses and ships, passage time window information formed by tides and drafts, and emergency event information to obtain an event flow heterogeneous spatiotemporal graph, wherein the passage time window information corresponds to the edge feasibility state, and the emergency event information corresponds to the edge weight.
[0026] Backbone filtering module 2 is used to filter backbone subgraphs from heterogeneous spatiotemporal graphs of event streams, and to set relation feature transformation rules and time feature representation rules for backbone subgraphs;
[0027] Graph memory update module 3 is used to update node features and edge features based on the backbone subgraph through graph neural network and memory unit when updating information on sudden events.
[0028] Multi-task prediction module 4 is used to obtain quantile demand prediction, accessibility score, transportation timeliness and safety stock threshold based on node features and edge features;
[0029] Consistency constraint training module 5 is used to train consistency constraints based on quantile demand forecast, safety stock threshold, accessibility score and transportation timeliness. The consistency constraints include the path dependency of the edges, and the safety stock threshold references the quantile demand forecast.
[0030] The inventory allocation decision module 6 is used to determine the inventory gap based on the safety stock threshold and real-time inventory, determine the feasible supply set and generate the allocation quantity according to the accessibility score and edge feasibility status, and output the earliest shipment time and the expected arrival time.
[0031] The berth time window recharge module 7 is used to generate berth operation time windows based on the expected arrival time and passage time window information. When there is a conflict between berth operation time windows, the path is replaced according to the relationship influence weight, and the actual arrival time is recharged.
[0032] In one embodiment of the present invention, information on ports, berths, waterway sections, emergency warehouses, and vessels, as well as passage window information formed by tides and drafts and information on emergencies, are collected to obtain an event flow heterogeneous spatiotemporal graph. The passage window information corresponds to the feasible state of edges, and the emergency event information corresponds to the edge weights, including:
[0033] Step 11: Based on the collected information on ports, berths, waterways, emergency warehouses, and vessels, determine the node set and edge set of the heterogeneous spatiotemporal graph of the event flow. Record initial values of node features for the node set and initial values of edge weights for the edge set. Each edge has a corresponding relationship type, forming a set of relationship types. The heterogeneous spatiotemporal graph of the event flow is a graph data structure used to describe the evolution of different entities and their relationships in the port and shipping emergency resource reserve system over time. Nodes in the graph represent entities such as ports, berths, waterways, emergency warehouses, and vessels, while edges represent relationships between entities. The relationships between the edges include passage, berthing, replenishment, and transportation. Each edge has a corresponding relationship type, which represents the business semantic category corresponding to the edge, including channel passage, berth operation, warehouse replenishment, and ship transportation. The initial value of the node feature is used to characterize the attribute state of the node at the initial moment, which includes, but is not limited to, port throughput capacity, berth operation capacity, channel passage level, emergency warehouse capacity and inventory attributes, ship carrying capacity and current position, etc. The initial value of the edge weight is used to characterize the passage cost of the edge at the initial moment, which can be determined by basic factors such as passage distance, travel time, and passage restriction level.
[0034] Step 12: Determine whether an edge in the set is passable or impassable based on the passage window information, one by one, and obtain the edge feasibility state corresponding to the edge set. The passage window information is used to indicate whether a certain channel segment or a certain passage relationship meets the navigation conditions under different time indices. The navigation conditions are jointly determined by factors such as tidal height, ship draft, and channel depth. The edge feasibility state is the passability label of the edge under each time index. Its value range is two states: passable and impassable. It is used to explicitly introduce the time feasibility of the port and shipping system constrained by tides and draft into the graph structure, so that the graph neural network can distinguish between passable and impassable edges during the learning process.
[0035] Step 13 decomposes the collected emergency information into emergency type, emergency impact range, emergency occurrence time, and emergency intensity. The emergency type is used to distinguish event categories, including but not limited to typhoons, rainstorms, dense fog, waterway construction, ship collisions, and equipment failures. The emergency impact range is used to determine the set of edges or nodes affected. The emergency occurrence time is used to determine the effective time of the event's impact on the graph structure. The emergency intensity is used to quantify the degree of impact of the event on traffic capacity, operational capacity, or transportation risks. Based on the emergency impact range, the emergency intensity is mapped to the corresponding edge weights, and a temporal update result of the edge weights is formed according to the emergency occurrence time, so that the edge weights can dynamically change as the emergency occurs, develops, and resolves. When an edge is determined to be impassable in a feasible state, the corresponding edge weight is reset to a preset impassable edge weight constant. The impassable edge weight constant is a fixed value set in advance to ensure that impassable edges are strongly constrained to be unusable in graph neural network feature propagation and subsequent path calculation, thereby avoiding the inconsistency problem that the feasible state is impassable but the edge weight can still be misused when the sudden event is not fully covered.
[0036] Step 14: Assemble the node set, edge set, initial values of node features, edge feasibility states, and temporal update results of edge weights into an event flow heterogeneous spatiotemporal graph. Perform consistency checks on the value range of edge feasibility states and the correspondence between travel window information and edge feasibility states, and between sudden event information and edge weights, before outputting the event flow heterogeneous spatiotemporal graph. The consistency check verifies whether travel window information has been correctly mapped to edge feasibility states, whether sudden event information has been correctly mapped to edge weights and their temporal update results, and whether the edge weight has been set to a constant value for an inaccessible edge when the edge feasibility state is inaccessible. This ensures that the graph structure does not exhibit semantic conflicts or data anomalies before being input into the graph neural network.
[0037] Through the above method, this embodiment constructs a heterogeneous spatiotemporal graph of event flow, enabling the subsequent graph neural network to simultaneously learn the node state evolution of ports, berths, waterway sections, emergency warehouses, and ships within the same graph structure, as well as key influencing factors such as the passage window constraints formed by tides and drafts, and the dynamic changes in edge weights caused by emergencies. Thus, when emergencies occur and are updated, the graph neural network can perform incremental updates based on the linkage changes of node features and edge features, improving the prediction consistency and real-time performance of the port and shipping emergency resource reserve system under emergency conditions.
[0038] In one embodiment of the present invention, the process of filtering backbone subgraphs from a heterogeneous spatiotemporal graph of an event stream, and setting relation feature transformation rules and time feature representation rules, includes:
[0039] Step 21: Based on the time index set corresponding to the heterogeneous spatiotemporal graph of the event flow, a graph sequence is formed time-by-time. Each graph sequence includes a node set, an edge set, a relation type set, a set of initial node feature values, a set of feasible edge states, and a set of edge weights. The time index set is used to describe the discrete time scale of the heterogeneous spatiotemporal graph of the event flow. Each time index corresponds to a time, and is used to map the changes in the passage time window formed by tides and draft, as well as the changes in edge weights caused by sudden events, to discrete time points. The graph sequence is a graph set organized by time index, and each time index corresponds to a graph instance. Each graph instance includes a node set, an edge set, a relation type set, a set of initial node feature values, a set of feasible edge states, and a set of edge weights, so that the subsequent model can sequentially process graph structure changes in the time dimension and support incremental updates to the graph structure when sudden events occur.
[0040] Step 22: Determine whether each edge in the edge set is traversable at each time step based on its feasibility status. When an edge is determined to be impassable, delete the corresponding edge from the edge set to obtain a traversable edge set. A filterable subgraph is then formed based on the node set and the traversable edge set. The deletion is performed on the edge set corresponding to the graph instance at the current time index; the corresponding edge set is regenerated based on the edge feasibility status at the next time index. This process directly applies the traversability window constraint to the graph structure through structural pruning, preventing impassable edges from participating in backbone filtering and subsequent graph neural network message passing at this time step. This avoids the model learning misleading information from impassable paths and reduces ineffective computations in the graph neural network during the inference phase.
[0041] Step 23: Calculate the number of node cores in the selectable subgraph. Select nodes with a number of cores not less than a preset threshold to form a backbone node set. Then, determine the backbone edge set based on the backbone node set to form a backbone subgraph. The backbone subgraph is a subgraph of the heterogeneous spatiotemporal graph of the event flow. It is used to retain nodes and edges that make a major contribution to the allocation of port and shipping emergency resources and demand prediction, thus avoiding the introduction of a large number of weakly correlated or impassable structures into the graph neural network, thereby improving the stability and real-time performance of graph neural network training and inference. The number of node cores is an indicator used to measure the structural importance of a node in a high-density connected substructure in the graph structure. It is defined as the order of the highest-order k-core to which the node belongs. The k-core is the induced subgraph of the selectable subgraph, in which the degree of each node is not less than k. A higher number of node cores indicates that the node is in a denser and more stable connected structure. Using node core count and core count threshold for filtering can effectively preserve the more structurally critical passage and transportation relationships between ports, berths, waterway sections and emergency warehouses. It is especially suitable for situations where there are a large number of branch waterways, temporary berths or boundary nodes in the port and shipping network, so that the backbone sub-graph can reflect the main passage structure of port and shipping emergency resource allocation.
[0042] Step 24: Set relation feature transformation rules and time feature representation rules in the backbone subgraph. The relation feature transformation rules are used to uniformly map edge features for heterogeneous relation types, so that different types of relations have distinguishable representations during the message transmission process of the graph neural network. The edge features consist of edge weights and edge feasibility states. The edge weights are used to reflect the intensity of the emergency, the cost of passage, or the risk level, and the edge feasibility states are used to reflect the passage time window constraints. The two together constitute the edge features, so that the edge features contain both soft and hard constraint information. Performing transformation on the edge features according to the relation type can give different relation types independent feature mapping methods, so that the graph neural network can distinguish the propagation logic of different semantic relations such as port to berth, berth to channel segment, channel segment to port, emergency warehouse to port, and ship to port.
[0043] The time feature representation rule includes determining the relative time of the event based on the time corresponding to the time in the time index set and the time when the sudden event occurs, and generating the time feature representation result; wherein, the relative time of the event is used to represent the time difference between the current time and the time when the sudden event occurs. By encoding the relative time of the event into the time feature representation result, the graph neural network can learn the pattern of the impact of the sudden event changing over time, and form differentiated node and edge update responses when the sudden event continues, decays or is resolved.
[0044] Through the aforementioned backbone subgraph selection and rule setting, this invention, while maintaining the core structural information of the port and shipping vessel emergency network, promptly removes impassable edges and retains backbone nodes and edges with high structural importance. This allows the subsequent graph neural network to perform feature propagation and memory updates only on structurally stable subgraphs that are crucial for allocation decisions, thereby improving computational efficiency and prediction consistency under conditions of frequent updates in emergencies. By explicitly introducing differences in heterogeneous relation types into edge feature transformation through relation feature transformation rules, and by introducing relative time information of the emergency occurrence into the model input through time feature representation rules, the graph neural network can simultaneously learn the differences in heterogeneous relations and the temporal impact of events, improving interpretability and robustness for subsequent computations.
[0045] In one embodiment of the present invention, when updating information about sudden events, the node features and edge features are updated based on the backbone subgraph using a graph neural network and memory units, including:
[0046] Step 31: When the emergency event information is updated, firstly, edges belonging to the impact range of the emergency event information are selected from the backbone subgraph as the affected edge set, and the affected node set is determined by the endpoint nodes of the affected edge set. The impact range of the emergency event is the spatial domain in the emergency event information, which is used to indicate the channel segment, berth, port waterway, or transportation channel affected by the emergency event. Through this selection method, the affected edge set contains only edges located within the impact range of the emergency event, and thus the affected node set contains only endpoint nodes directly connected to the affected edge set, avoiding the participation of nodes and edges unrelated to the emergency event in the update, and reducing the computational burden of the model.
[0047] Step 32: For each edge in the affected edge set, extract the edge weight and feasible state to form edge features under the current time index, and transform the edge features according to the relation feature transformation rules based on the relation type to obtain the relation feature transformation result. The relation feature transformation rules are feature mapping rules configured according to relation types, which are used to make edges of different semantic relation types have distinguishable representations in the feature space, thereby enabling the graph neural network to perform differentiated information propagation for different relation categories such as waterway passage, berth operations, warehouse replenishment, and shipping.
[0048] According to the time feature representation rules, the difference between the current time index and the time of the sudden event is taken as the relative time of the event, and a time feature representation result is generated. The time feature representation result can be generated from the relative time of the event through a time embedding function, such as using multinomial embedding or periodic embedding to form a fixed-dimensional time feature vector, which serves as the time input for subsequent edge message generation.
[0049] Step 33: After obtaining the relation feature transformation results and time feature representation results, edge-level messages are generated based on the graph neural network. These edge-level messages, along with the edge memory maintained by the memory unit, are input into the memory unit to obtain updated edge memory. Updated edge features are then generated from the updated edge memory. The graph neural network is a neural network model used to perform message passing and feature aggregation on a graph structure, learning the structured dependencies between nodes transmitted through edges. The memory unit is a cyclic update structure that maintains historical states, used to retain historical information of nodes and edges in the time dimension, enabling the model to identify the continuous impact and decay patterns of sudden events. The memory unit can be implemented using a gated cyclic structure, such as a gated cyclic unit or a long short-term memory unit. The edge memory and node memory are state variables maintained within the memory unit, used to store the implicit representations of edges and nodes under historical time indices, respectively. The edge-level messages are used to represent the state changes of edges after being affected by sudden events under the current time index.
[0050] Step 34: After obtaining the updated edge features, based on the graph neural network, neighborhood-weighted aggregation is performed on the affected node set using the updated edge features to obtain node-level messages. These node-level messages, along with the node memories maintained by the memory unit, are then input into the memory unit to obtain updated node memories. Finally, updated node features are generated from the updated node memories. The neighborhood-weighted aggregation is used to aggregate the influence of edges connected to a node into the node representation. Its node-level messages can be represented as follows: , This represents the node-level message of node v at the current time index; This represents the set of neighboring nodes of node v in the backbone subgraph; Representing an edge The aggregation weight of node v is used to reflect the contribution of different edges in node aggregation; This represents the updated edge features, where u, v, and r are node indices. The node-level messages and the node memories maintained by the memory unit are input into the memory unit to obtain the updated node memories. The updated node memories are then used to generate the updated node features, and the updated node features and updated edge features are output.
[0051] Through the incremental update mechanism based on graph neural networks and memory units, the present invention can map the updates of emergency event information in real time as feature changes of affected edges and affected nodes in the backbone subgraph. This enables the port and shipping emergency resource reserve intelligent prediction system to quickly update the structural representation of network accessibility and transportation timeliness when emergencies such as typhoons, dense fog, waterway closures, and berth failures occur, and further influence the prediction of emergency material demand and the estimation of inventory safety thresholds.
[0052] In one embodiment of the present invention, quantile demand prediction, accessibility score, transportation timeliness, and safety stock threshold are obtained based on node features and edge features, including:
[0053] Step 41: Obtain the updated node features and updated edge features, and limit the output objects to nodes and edges in the backbone subgraph. By limiting the output objects to nodes and edges in the backbone subgraph, predictions can be avoided for low-relevance edges and isolated nodes, thereby reducing computational overhead and improving the stability of model output.
[0054] Step 42: For each node, the updated node features are weighted based on the first weight matrix and superimposed with the first bias vector to obtain the first intermediate vector, and an activation function is executed to obtain the second intermediate vector; for each material category, the second intermediate vector is weighted based on the second weight matrix and superimposed with the second bias vector to obtain the quantile demand prediction vector, where each dimension of the quantile demand prediction vector corresponds to a pre-defined set of quantiles; the updated node features are weighted based on the third weight matrix and superimposed with the third bias vector to obtain the original uncertainty estimate, and the values less than zero in the original uncertainty estimate are set to zero to obtain the uncertainty estimate; the quantile demand prediction is used to output the demand prediction results at multiple quantiles, enabling the system to form prediction intervals with different risk levels when there are fluctuations in emergency resource demand; the uncertainty estimate is used to characterize the prediction error or the magnitude of demand fluctuation, serving as the input for the subsequent safety stock threshold correction term.
[0055] Step 43: For each edge, the updated edge features are weighted based on the fourth weight matrix and superimposed with the fourth bias vector to obtain the original value of the accessibility score; the accessibility score is used to represent the degree of accessibility of the passage or transportation relationship corresponding to the edge under the current emergency and passage window constraints, and its value ranges from 0 to 1.
[0056] The accessibility score is calculated by exponentially dividing the raw value of the accessibility score, using the exponential value as the numerator, and then summing the exponential value with a factor to obtain the denominator. The accessibility score is then calculated based on the ratio of the numerator to the denominator. Specifically, the formula for calculating the accessibility score is as follows: , The score represents the accessibility rating, and exp represents the exponential function. The original value of the accessibility score is represented; and for any pair of nodes, the updated node features of the starting node, the updated node features of the ending node, and the corresponding updated edge features are concatenated in sequence to obtain the transportation timeliness input vector. The transportation timeliness input vector is weighted based on the fifth weight matrix and superimposed with the fifth bias vector to obtain the original value of the transportation timeliness. The values less than zero in the original value of the transportation timeliness are set to zero to obtain the transportation timeliness; the transportation timeliness is used to represent the time cost required for transportation along the edge or path from the starting node to the ending node.
[0057] Step 44: For each material category at each node, select the quantile demand forecast corresponding to the reference quantile as the baseline term. Multiply the uncertainty estimate by a pre-set combination coefficient to obtain a correction term. Superimpose the baseline term and the correction term to obtain the safety stock threshold. Output the quantile demand forecast, accessibility score, transportation timeliness, and safety stock threshold in a unified manner. The safety stock threshold is used to determine the minimum safe inventory level that emergency warehouses or demand nodes should maintain under current forecast conditions. In port and shipping emergency scenarios, it is used to mitigate the risks of transportation delays and demand surges caused by unforeseen events. The pre-set combination coefficient is used to adjust the degree of correction of the safety stock threshold by the uncertainty estimate. In this way, the safety stock threshold not only uses the quantile demand forecast to form a controllable inventory minimum level, but also further introduces uncertainty estimation to reflect demand fluctuations or forecast errors, enabling the safety stock threshold to adaptively adjust with changes in emergency information and graph structure.
[0058] It should be noted that the weight matrix and bias vector in this embodiment are training parameters used to perform linear transformations on the updated node features or updated edge features, mapping the feature space output by the graph neural network to various prediction output spaces. The weight matrix and bias vector are determined through consistency constraint training and remain fixed during the inference phase. The weight matrix is used to perform weighted combinations on each dimension of the input vector to extract linear combination features related to the target output; the bias vector is used to perform translation adjustments on the linear transformation results to improve the model's adaptability to nodes or edges at different baseline levels.
[0059] Through the aforementioned multi-task output mechanism based on node and edge features, this invention unifies the key decision quantities in the port and shipping emergency resource reserve system into graph neural network outputs; quantile demand forecasting and uncertainty estimation provide multi-quantile interval representations for emergency resource demand and provide interpretable risk benchmarks for safety stock threshold calculations; accessibility scoring and transportation timeliness integrate passage window constraints and the impact of emergencies into the forecasting process in the form of dynamic edge features, enabling allocation decisions to respond based on real-time accessibility and transportation timeliness changes; thus enabling this invention to form demand forecasting, accessibility assessment, timeliness estimation, and inventory threshold outputs consistent with graph structures in port and shipping scenarios where emergencies are frequently updated.
[0060] In one embodiment of the present invention, consistency constraint training is performed based on quantile demand forecasting, safety stock threshold, accessibility score, and transportation timeliness, including:
[0061] Step 51: Obtain quantile demand forecast, safety stock threshold, accessibility score, and transportation timeliness, and read the path dependency of the edges; the path dependency of the edges is a weighted index used to characterize the degree to which the edges are relied upon in the allocation path. The larger the value, the higher the frequency of the edge in the feasible path or the higher its contribution to the feasibility of the allocation. Determine the training window based on the time index set, and align the data of the same node, the same material category, the same edge, and the same node pair within the training window according to the time index;
[0062] Step 52: For each material category and each quantile point of each node within the training window, calculate the difference between the historical actual demand and the quantile demand prediction. When the difference is positive, use the product of the quantile value and the difference as the first loss term for that quantile point. When the difference is negative, subtract the quantile value from one and multiply it by the absolute value of the difference to obtain the second loss term for that quantile point. Add the first and second losses to obtain the quantile loss. Summate the quantile losses for all quantile points, material categories, nodes, and time indices to obtain the quantile demand prediction training loss. The quantile value represents the weight value corresponding to the quantile point, used to implement the asymmetric penalty mechanism of the quantile loss function, ensuring that overestimation and underestimation of the predicted value receive different penalty weights at different quantile points. Specifically, the quantile demand prediction training loss can be expressed as: ;
[0063] in, This represents the training loss for quantile demand prediction. This represents the set of time indices corresponding to the training window, where t represents the time index and c represents the type of resource. Indicates quantiles, This represents a predefined set of quantiles, and `max` indicates the operation of taking the maximum value. It represents the actual historical demand, specifically the actual demand for a certain type of material at a certain point in time under the historical time index that has already occurred; This represents the quantile demand forecast. Using this loss form, the model can output demand forecasts at different risk levels when port and shipping emergency demand fluctuates significantly, thus providing an interpretable risk benchmark for subsequent safety stock thresholds.
[0064] Step 53: For each edge in the training window, read the historical reachability label. The historical reachability label indicates whether the edge is reachable under the corresponding time index, and the value is reachable or unreachable. When the historical reachability label is reachable, take the negative of the natural logarithm of the reachability score as the reachability loss of the edge. When the historical reachability label is unreachable, take a number minus the negative of the natural logarithm of the reachability score as the unreachability loss of the edge. Add the reachability loss and the unreachability loss to obtain the edge loss. Multiply the edge loss by a number plus the product of the path dependency weighting coefficient and the path dependency degree of the edge to obtain the weighted edge loss. Sum all the weighted edge losses in the training window to obtain the reachability score training loss. For each material category of each node in the training window, when the safety stock threshold is less than the quantile demand forecast, take the difference between the two as the reference consistency constraint training loss term. Sum all the reference consistency constraint training loss terms to obtain the reference consistency constraint training loss.
[0065] Specifically, the accessibility score training loss can be expressed as: ;
[0066] in, This represents the training loss for reachability scores. Indicates accessibility score, This represents a historical reachability tag, with a value of 1 indicating reachability and a value of 0 indicating unreachability. This represents the path dependency of an edge. The path dependency weighting coefficient is used to adjust the influence of the path dependency of the edge on the training weight. Through this weighting method, the accessibility score is more constrained on the main access edge, key berth connection edge and high-frequency allocation edge of the port and shipping network, thereby improving the reliability of subsequent determination of feasible supply set and allocation path selection.
[0067] The training loss based on consistency constraints can be expressed as: ;
[0068] in, This represents the training loss based on consistency constraints. This indicates the safety stock threshold reference quantile. This indicates the predicted demand for the quantile corresponding to the cited quantile. This represents the safety stock threshold. In this way, the model is forced to meet the consistency condition that the safety stock threshold must not be lower than the quantile demand forecast it references during the training phase. This ensures that the safety stock boundary is strictly consistent with the demand risk benchmark, thereby avoiding the failure of allocation strategies due to contradictions between the safety stock threshold and demand forecasts.
[0069] Through the aforementioned consistency constraint training mechanism, this invention integrates key forecast quantities such as demand forecasting, inventory thresholds, and transportation accessibility in port and shipping emergency resource reserve scenarios into a trainable constraint framework. On the one hand, the quantile demand forecasting training loss enables the model to output multi-quantile demand forecasts, adapting to the risk expression of demand fluctuations under emergencies. On the other hand, the accessibility scoring training loss strengthens the accessibility learning of key edges through edge path dependency weighting, enabling the model to focus on the main traffic structure of the port and shipping network. At the same time, the consistency constraint training loss ensures that the safety stock threshold and quantile demand forecasts remain consistent during the training phase, thereby providing a stable, interpretable, and structurally consistent forecasting basis for subsequent inventory gap calculation, allocation quantity generation, and berth operation time window conflict resolution.
[0070] In one embodiment of the present invention, the total loss is determined and iteratively updated based on the quantile demand prediction training loss, accessibility score training loss, transportation timeliness training loss, reference consistency constraint training loss, and passage window consistency constraint training loss, including:
[0071] Step 61: For each node pair within the training window, calculate the absolute difference between the transportation timeliness and the historical transportation timeliness label as the node pair timeliness loss. Summate the timeliness losses of all node pairs within the training window to obtain the transportation timeliness training loss. The node pair represents the combination of the transportation start node and the transportation end node. The historical transportation timeliness label is used to characterize the actual transportation time consumption record of the node pair under the historical time index. It can be formed by ship navigation records, berthing records, loading and unloading operation records, and port area short-haul transportation records, etc.
[0072] Step 62: Read the edge feasibility state. When the edge feasibility state is impassable, theoretically the reachability score corresponding to the edge should approach zero. Otherwise, it will cause a logical conflict between the subsequent selection of feasible supply sets and path selection. At this time, take the reachability score of the edge as the training loss term of the consistency constraint of the passage window. Summing up all the training loss terms of the consistency constraint of the passage window yields the training loss of the consistency constraint of the passage window.
[0073] Step 63: Multiply the quantile demand prediction training loss, accessibility score training loss, transportation timeliness training loss, referral consistency constraint training loss, and passage window consistency constraint training loss by their respective loss weights to obtain weighted losses. Sum the weighted losses to obtain the total loss, and iteratively update the model parameters based on the total loss. The loss weights are pre-set non-negative constants used to adjust the contribution ratio of different losses to the total loss. The model parameters of this invention include neural network parameters, memory unit parameters, and the weight matrix and bias vector of the output layer.
[0074] Through the aforementioned total loss determination and iterative update mechanism, this invention integrates the key forecast quantities required for port and shipping emergency resource reserve prediction and allocation decision-making into a trainable multi-objective constraint framework. The transportation timeliness training loss enables the model to learn the transportation time variation pattern under the conditions of emergencies and traffic constraints; the traffic window consistency constraint training loss ensures that the model's accessibility score output is consistent with the hard traffic constraints; the weighted total loss and iterative update mechanism enable the graph neural network to achieve balanced learning among multi-task outputs and avoid conflicts between tasks, thereby providing stable, interpretable and consistent predictive support for subsequent inventory gap calculation, feasible supply set screening, allocation quantity generation and berth operation time window conflict resolution.
[0075] In one embodiment of the present invention, the inventory gap is determined based on a safety stock threshold and real-time inventory; a feasible supply set is determined based on an accessibility score and edge feasibility status, and a transfer allocation quantity is generated; the earliest shipment time and estimated arrival time are output, including:
[0076] Step 71: Obtain the safety stock threshold, accessibility score, transportation timeliness, edge feasibility status, and real-time inventory, and identify the emergency warehouse node set and the demand node set in the node set; the real-time inventory is the actual inventory quantity collected under the current time index, the emergency warehouse node set represents the set of nodes with material supply capacity, and the demand node set represents the set of nodes with inventory replenishment needs. Determine the inventory gap based on the difference between the safety stock threshold and the real-time inventory, setting the difference to zero if it is less than zero.
[0077] Step 72: Based on the edge feasibility status, inaccessible edges are eliminated, and edges with reachability scores not less than a reachability score threshold are selected as the set of feasible edges. The reachability score threshold is a pre-set constant used to map the reachability scores output by the graph neural network to feasibility judgment conditions, thereby avoiding the selection of risky edges with excessively low reachability scores in allocation decisions. By eliminating inaccessible edges through hard constraints on edge feasibility status and then selecting high-reachability edges through soft constraints on reachability scores, the set of feasible edges simultaneously satisfies both the passage window constraint and the impact constraint of unforeseen events. Further, based on the set of feasible edges, nodes connected to the demand node set are selected from the emergency warehouse node set to determine the feasible supply set. Connectivity means that within the graph structure defined by the set of feasible edges, there exists at least one feasible path from the emergency warehouse node to the demand node, ensuring that the supply-side node can perform actual transportation to the demand-side node under the current passage window and unforeseen event conditions.
[0078] Step 73: Sort the feasible supply set based on transportation timeliness, and determine the earliest dispatch time that satisfies the edge feasibility state as passable in the feasible edge set based on the passage window information. The earliest dispatch time is used to characterize the earliest time index in which the supply-side node can dispatch along the feasible path in the current and future time indices. Its determination process is based on the passage window information to ensure that the dispatch decision conforms to tidal and draft constraints. The smaller the transportation timeliness, the higher the priority of the corresponding supply node in the sorting. Based on the above sorting results, the allocation quantity is generated on the supply side with real-time inventory as the upper limit and on the demand side with inventory gap as the upper limit. The allocation quantity is generated by allocating one by one according to the sorting order: for each material category of each demand node, the allocation quantity corresponding to each warehouse is determined in turn according to the sorting order of the feasible supply set. In each determination, the smaller value between the inventory gap and the real-time inventory of the corresponding warehouse is taken as the current allocation quantity, and the inventory gap and real-time inventory are updated synchronously until the inventory gap is zero or the feasible supply set is traversed. This deterministic allocation logic ensures that the allocation quantity satisfies both the supply-side inventory boundary and the demand-side gap boundary, and prioritizes warehouse nodes with higher priority to undertake allocation tasks.
[0079] Step 74: Combine the earliest departure time with the transportation timeliness to determine the estimated arrival time, and output the allocation quantity, the earliest departure time, and the estimated arrival time; perform an edge feasibility state consistency check on the output results to verify whether the path corresponding to the estimated arrival time meets the edge feasibility state and is passable during the departure time and transportation period; if the consistency check is not met, update the feasible supply set and regenerate the allocation quantity and estimated arrival time to ensure that the final output scheme is consistent with the passage window constraint.
[0080] Through the aforementioned mechanisms of inventory gap quantification, feasible supply set screening, allocation quantity generation, and estimated arrival time output, this invention directly transforms the safety stock threshold, accessibility score, and transportation timeliness output by the graph neural network into executable decision quantities for port and shipping emergency resource allocation. The inventory gap maps the safety stock threshold to the demand-side replenishment boundary, the feasible supply set maps the accessibility score and edge feasible state to the supply-side feasibility set, and the transportation timeliness ranking and earliest departure time determination explicitly integrate port and shipping passage window constraints into the allocation time arrangement. This ensures that the allocation quantity and estimated arrival time remain dynamically consistent with the graph structure even under conditions of frequent updates to emergencies, thereby improving the allocation response speed and execution reliability of the port and shipping emergency resource reserve system under emergency conditions.
[0081] In one embodiment of the present invention, a berth operation time window is generated based on the estimated arrival time and the passage time window. In case of conflict, the path is replaced according to the relational influence weight, and the actual arrival time is reinjected, including:
[0082] Step 81: Obtain the estimated arrival time, passage window information, and relationship influence weights, and establish a correspondence between the estimated arrival time and the target berth using supply candidate pairs and material categories as association keys. The supply candidate pairs are node pairs composed of supply-side nodes and demand-side nodes, used to indicate the allocation task of transporting emergency supplies from supply-side nodes to demand-side nodes; the material categories are used to distinguish different types of emergency supplies; the association keys are used to ensure a one-to-one correspondence between the estimated arrival time, allocation quantity, and target berth. The target berth is the berth resource corresponding to the demand-side node, used to perform berthing, loading / unloading, or transfer operations of emergency supplies. Further, determine the edge feasibility state of the berth-corresponding edge set based on the passage window information, so as to map the berth-related passage and operation restrictions into the basis for operation determination. The berth-corresponding edge set is the edge set related to the target berth, which includes at least berth operation relationship type edges between the berth and port nodes or passage relationship type edges between the berth and channel sections.
[0083] Step 82: For each target berth, retrieve the operable time period from the access window information based on the estimated arrival time, and generate a candidate berth operation time window. The operable time period is the set of time periods related to berth operation in the access window information, representing the time period under the corresponding time index where the target berth meets the berthing and operation conditions. In specific implementation, when the estimated arrival time falls within an operable time period, the estimated arrival time is used as the starting point of the candidate berth operation time window; when the estimated arrival time does not fall within an operable time period, search backwards for the starting point of the first operable time period with a feasible edge state of "accessible," and use this starting point as the starting point of the candidate berth operation time window. Further, the ending point of the candidate berth operation time window is determined by combining it with a pre-set operation duration. The operation duration is a pre-set or fixed duration determined according to the type of materials and loading / unloading capacity, used to form a time window object with a clear start and end time. Thus, the estimated arrival time can be strictly mapped to the candidate berth operation time window that meets the access and operation constraints, thereby ensuring the feasibility of subsequent berth arrangements.
[0084] Step 83: Perform time overlap detection on the candidate operation time windows of the same target berth to obtain a conflict task set. The time overlap detection is used to determine whether there is an overlap interval between the candidate operation time windows of multiple allocation tasks in the same berth; when there is an overlap, it means that the berth resources cannot simultaneously meet the operation requirements of multiple tasks in the corresponding time period, thus forming a berth operation time window conflict. The conflict task set is the set of tasks with berth operation time window conflicts.
[0085] To resolve conflicts, this embodiment calculates the path relationship influence weight for each conflicting task in the conflict task set by summing the relationship influence weights corresponding to the relationship types of the edges on its current path. The path replacement priority is then determined based on these path relationship influence weights. The relationship influence weight is a weight value set for each relationship type, representing the degree of influence of that relationship type on path stability, operational reliability, or passage risk. The path relationship influence weight is a path-level weight obtained by summing the relationship influence weights of each edge on the path, used to evaluate the replacement priority of the path in conflict situations. The path replacement priority can be determined by sorting the path relationship influence weights from largest to smallest, prioritizing tasks with larger path relationship influence weights for path replacement, thus replacing high-risk or high-impact paths with more stable or lower-impact alternative paths. Alternative paths are searched sequentially within the feasible edge set according to the path replacement priority. The estimated arrival time is updated based on the alternative paths, and a new berth candidate operation time window is generated based on the updated estimated arrival time until the conflict task set is empty and the berth operation time window is locked. This iterative replacement mechanism can resolve berth operation conflicts at the source by adjusting the expected arrival time through route changes, while ensuring the feasibility of passage.
[0086] Step 84: Collect the actual arrival time and write it into the edge weight time-series update result of the path corresponding to the supply candidate pair. Output the berth operation time window and the actual arrival time. The edge weight time-series update result is an update sequence used to record the changes of edge weights over time in the heterogeneous spatiotemporal graph of the event flow. By writing the actual arrival time into the edge weight time-series update result of each edge contained in the corresponding path, the graph neural network update mechanism under the subsequent time index can consider the actual execution feedback when updating the edge weights, thereby continuously correcting the predicted outputs such as transportation timeliness and accessibility score.
[0087] Through the aforementioned berth operation time window generation, conflict detection, and path replacement mechanisms, this invention maps the expected arrival time and passage time window constraints output by the graph neural network into executable berth operation time windows. It also couples berth conflict handling with path replacement strategies, enabling berth resource constraints to influence allocation path selection. This strengthens the executability and consistency of emergency material allocation plans under port and shipping emergencies. Furthermore, by feeding back edge weight time-series update results using actual arrival times, the heterogeneous spatiotemporal graph of the event flow can absorb execution feedback, enhancing the robustness and real-time adaptability of this invention in dynamic port and shipping environments.
[0088] This invention provides an intelligent prediction method for emergency resource reserves based on graph neural networks, comprising the following steps:
[0089] Step 91: Collect information on ports, berths, waterway sections, emergency warehouses and ships, passage time window information formed by tides and drafts, and emergency event information to obtain an event flow heterogeneous spatiotemporal graph, wherein the passage time window information corresponds to the edge feasible state, and the emergency event information corresponds to the edge weight.
[0090] Step 92: Filter the backbone subgraphs of the heterogeneous spatiotemporal graph of the event flow, and set relation feature transformation rules and time feature representation rules for the backbone subgraphs;
[0091] Step 93: When updating the information on sudden events, update the node features and edge features based on the backbone subgraph using a graph neural network and memory units;
[0092] Step 94: Based on node features and edge features, obtain quantile demand forecast, accessibility score, transportation timeliness and safety stock threshold;
[0093] Step 95: Train consistency constraints based on quantile demand forecasts, safety stock thresholds, accessibility scores, and transportation timeliness. The consistency constraints include the path dependency of edges, and the safety stock thresholds reference quantile demand forecasts.
[0094] Step 96: Determine the inventory gap based on the safety stock threshold and real-time inventory, determine the feasible supply set based on the accessibility score and edge feasibility status and generate the allocation quantity, and output the earliest shipment time and the estimated arrival time.
[0095] Step 97: Generate berth operation time windows based on estimated arrival time and passage time window information. When berth operation time windows conflict, replace the path according to the relationship influence weight and reinstate the actual arrival time.
[0096] It should be noted that the interval and threshold sizes are set for ease of comparison. The size of the threshold depends on the amount of sample data and the base number set by those skilled in the art for each set of sample data, as long as it does not affect the proportional relationship between the parameter and the quantized value. Furthermore, the above formulas are all dimensionless calculations, and the formulas are derived from software simulations using a large amount of collected data to obtain the most recent real-world results. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0097] The embodiments of the present invention have been described above, but the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms based on the guidance of the present embodiments, all of which are within the protection scope of the present embodiments.
Claims
1. An intelligent prediction system for emergency resource reserves based on graph neural networks, characterized in that, include: The spatiotemporal graph construction module is used to collect information on ports, berths, waterway sections, emergency warehouses and ships, passage time window information formed by tides and drafts, and emergency event information to obtain an event flow heterogeneous spatiotemporal graph, wherein the passage time window information corresponds to the edge feasibility state, and the emergency event information corresponds to the edge weight. The backbone filtering module is used to filter backbone subgraphs from heterogeneous spatiotemporal graphs of event streams, and to set relation feature transformation rules and time feature representation rules for backbone subgraphs; The graph memory update module is used to update node and edge features based on the backbone subgraph through graph neural network and memory unit when updating information about sudden events. The multi-task prediction module is used to obtain quantile demand prediction, accessibility score, transportation timeliness and safety stock threshold based on node features and edge features; The consistency constraint training module is used to train consistency constraints based on quantile demand forecasts, safety stock thresholds, accessibility scores, and transportation timeliness. The consistency constraints include the path dependency of edges, and the safety stock threshold references quantile demand forecasts. The inventory allocation decision module is used to determine the inventory gap based on the safety stock threshold and real-time inventory, determine the feasible supply set and generate the allocation quantity based on the accessibility score and edge feasibility status, and output the earliest shipment time and the estimated arrival time. The berth time window recharge module is used to generate berth operation time windows based on the expected arrival time and passage time window information. When berth operation time windows conflict, the path is replaced according to the relationship influence weight, and the actual arrival time is recharged.
2. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, Information on ports, berths, waterway sections, emergency warehouses, and vessels, as well as passage windows formed by tides and drafts, and information on emergencies, are collected to obtain a heterogeneous spatiotemporal graph of the event flow. The passage window information corresponds to the feasible state of edges, and the emergency event information corresponds to the edge weights, including: Step 11: Based on the collected port, berth, waterway section, emergency warehouse and ship information, determine the node set and edge set of the event flow heterogeneous spatiotemporal graph, and record the initial value of node feature for the node set and the initial value of edge weight for the edge set. Each edge has a corresponding relationship type and forms a relationship type set. Step 12: Determine whether each edge in the edge set is passable or impassable based on the passage window information, and obtain the edge feasibility status corresponding to each edge set. Step 13: Decompose the collected emergency information into emergency type, emergency impact range, emergency occurrence time and emergency intensity; map the emergency intensity to the corresponding edge weight according to the emergency impact range, and form the temporal update result of the edge weight according to the emergency occurrence time; when the feasible state of an edge is determined to be impassable, reset the corresponding edge weight to the preset impassable edge weight constant. Step 14: Assemble the node set, edge set, initial values of node features, edge feasible state, and temporal update results of edge weights into an event flow heterogeneous spatiotemporal graph. Then, perform consistency checks on the value range of edge feasible state and the correspondence between passage window information and edge feasible state, and between sudden event information and edge weights, and output the event flow heterogeneous spatiotemporal graph.
3. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, Filter backbone subgraphs from heterogeneous spatiotemporal graphs of event flows, and set rules for relation feature transformation and temporal feature representation, including: Step 21: Based on the time index set corresponding to the heterogeneous spatiotemporal graph of the event stream, form a graph sequence time by time. Each graph sequence contains a set of nodes, a set of edges, a set of relation types, a set of initial values of node features, a set of feasible edge states, and a set of edge weights. Step 22: Determine whether each edge in the edge set is passable based on its feasibility status at each time step. When the edge is determined to be impassable, delete the corresponding edge from the edge set to obtain a passable edge set. Then, form a filterable subgraph based on the node set and the passable edge set. Step 23: Calculate the number of node cores in the filterable subgraph, filter nodes with a number of node cores not less than the preset core number threshold to form a backbone node set, and determine the backbone edge set based on the backbone node set to form a backbone subgraph. Step 24: Set relation feature transformation rules and time feature representation rules in the backbone subgraph. The relation feature transformation rules include transforming edge features according to relation type and generating relation feature transformation results. The edge features consist of edge weights and edge feasible states. The time feature representation rules include determining the relative time of the event based on the time index set corresponding to the time of the sudden event and generating time feature representation results. Output the backbone subgraph, relation feature transformation results, and time feature representation results.
4. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, When updating information about emergencies, node and edge features are updated based on the backbone subgraph using a graph neural network and memory units, including: Step 31: When the information of an emergency event is updated, the edges that belong to the scope of the emergency event information in the backbone subgraph are selected as the set of affected edges, and the set of affected nodes is determined by the endpoint nodes of the set of affected edges. Step 32: Extract the edge weight and feasible state of each edge in the affected edge set to form edge features under the current time index. According to the relation feature transformation rules, transform the edge features according to the relation type to obtain the relation feature transformation result. And according to the time feature representation rules, take the difference between the time corresponding to the current time index and the time when the sudden event occurs as the event relative time and generate the time feature representation result. Step 33: Generate edge-level messages based on the graph neural network's transformation results of relational features and the representation results of temporal features. Input the edge-level messages and the edge memories maintained by the memory unit into the memory unit to obtain the updated edge memories, and generate updated edge features from the updated edge memories. Step 34: Based on the graph neural network, perform neighborhood weighted aggregation on the affected node set with the updated edge features to obtain node-level messages. Input the node-level messages and the node memories maintained by the memory unit into the memory unit to obtain updated node memories. Generate updated node features from the updated node memories and output the updated node features and updated edge features.
5. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, Based on node and edge features, quantile demand forecasting, accessibility scores, transportation timeliness, and safety stock thresholds are obtained, including: Step 41: Obtain the updated node features and updated edge features, and limit the output objects to the nodes and edges in the backbone subgraph. Step 42: For each node, the updated node features are weighted based on the first weight matrix and superimposed with the first bias vector to obtain the first intermediate vector, and an activation function is executed to obtain the second intermediate vector; for each material category, the second intermediate vector is weighted based on the second weight matrix and superimposed with the second bias vector to obtain the quantile demand prediction vector, where each dimension of the quantile demand prediction vector corresponds to a pre-defined set of quantiles; and the updated node features are weighted based on the third weight matrix and superimposed with the third bias vector to obtain the original uncertainty estimate, and the values less than zero in the original uncertainty estimate are set to zero to obtain the uncertainty estimate; Step 43: For each edge, the updated edge features are weighted based on the fourth weight matrix and superimposed with the fourth bias vector to obtain the original reachability score; the original reachability score is exponentially calculated to obtain the exponent value, which is used as the numerator, and superimposed with one to obtain the denominator. The reachability score is obtained based on the ratio of the numerator to the denominator; and for any pair of nodes, the updated node features of the starting node, the updated node features of the ending node, and the corresponding updated edge features are concatenated in sequence to obtain the transportation timeliness input vector. The transportation timeliness input vector is weighted based on the fifth weight matrix and superimposed with the fifth bias vector to obtain the original transportation timeliness value. The values less than zero in the original transportation timeliness value are set to zero to obtain the transportation timeliness. Step 44: For each material category at each node, select the quantile demand forecast corresponding to the safety stock threshold reference quantile as the benchmark term, multiply the uncertainty estimate by the pre-set combination coefficient to obtain the correction term, and superimpose the benchmark term and the correction term to obtain the safety stock threshold. Then, output the quantile demand forecast, accessibility score, transportation timeliness and safety stock threshold in a unified manner.
6. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, Consistency constraint training is performed based on quantile demand forecasting, safety stock thresholds, accessibility scores, and transportation timeliness, including: Step 51: Obtain quantile demand forecast, safety stock threshold, accessibility score and transportation timeliness, and read the path dependency of the edges; determine the training window based on the time index set, and align the data of the same node, the same material category, the same edge and the same node pair in the training window according to the time index; Step 52: For each material category and each quantile of each node within the training window, calculate the difference between the historical actual demand and the quantile demand prediction. When the difference is positive, use the product of the quantile value and the difference as the first loss for that quantile. When the difference is negative, subtract the quantile value from one and multiply it by the absolute value of the difference to obtain the second loss for that quantile. Add the first and second losses to obtain the quantile loss. Summate the quantile losses for all quantiles, material categories, nodes, and time indices to obtain the quantile demand prediction training loss. Here, the quantile value represents the weight value corresponding to the quantile. Step 53: For each edge within the training window, read the historical reachability label; when the historical reachability label is reachable, take the negative of the natural logarithm of the reachability score as the reachability loss of that edge; when the historical reachability label is unreachable, take a number minus the negative of the natural logarithm of the reachability score as the unreachability loss of that edge; add the reachability loss and the unreachability loss to obtain the edge loss; multiply the edge loss by a number plus the product of the path dependency weighting coefficient and the path dependency degree of the edge to obtain the weighted edge loss; sum all the weighted edge losses within the training window to obtain the reachability score training loss; for each material category of each node within the training window, when the safety stock threshold is less than the quantile demand forecast, take the difference between the two as the reference consistency constraint training loss term; sum all the reference consistency constraint training loss terms to obtain the reference consistency constraint training loss.
7. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 6, characterized in that, The total loss is determined and iteratively updated based on the training losses from quantile demand prediction, accessibility score, transportation timeliness, reference consistency constraints, and passage window consistency constraints. This includes: Step 61: For each node pair within the training window, calculate the absolute difference between the transportation timeliness and the historical transportation timeliness label as the timeliness loss of the node pair, and sum the timeliness losses of all node pairs within the training window to obtain the transportation timeliness training loss. Step 62: Read the edge feasibility state. When the edge feasibility state is impassable, take the reachability score of the edge as the training loss term of the consistency constraint of the passage window. Summing up all the training loss terms of the consistency constraint of the passage window yields the training loss of the consistency constraint of the passage window. Step 63: Multiply the training loss of quantile demand prediction, accessibility score, transportation timeliness, reference consistency constraint, and passage window consistency constraint by their respective weights to obtain each weighted loss. Sum the weighted losses to obtain the total loss, and perform iterative updates on the model parameters based on the total loss.
8. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, Inventory gaps are determined based on safety stock thresholds and real-time inventory. A feasible supply set is determined based on accessibility scores and edge feasibility states, and allocation quantities are generated. The earliest shipment time and estimated arrival time are output, including: Step 71: Obtain the safety stock threshold, accessibility score, transportation timeliness, edge feasibility status and real-time inventory, and identify the emergency warehouse node set and the demand node set in the node set; determine the inventory gap based on the difference between the safety stock threshold and the real-time inventory, and set the case where the difference is less than zero to zero; Step 72: Filter out impassable edges based on edge feasibility status, and select the edges with reachability scores not less than the reachability score threshold as the set of feasible edges; based on the set of feasible edges, filter the nodes connected to the demand node set in the emergency warehouse node set to determine the feasible supply set. Step 73: Sort the feasible supply set based on transportation timeliness, and determine the earliest shipment time that satisfies the edge feasibility state as passable based on the passage window information in the feasible edge set; generate the allocation quantity on the supply side with real-time inventory as the upper limit and on the demand side with inventory gap as the upper limit; wherein, for each material category of each demand node, the allocation quantity corresponding to each warehouse is determined in the order of sorting of the feasible supply set, and the smaller value between the inventory gap and the real-time inventory of the corresponding warehouse is taken as the current allocation quantity in a single determination, and the inventory gap and real-time inventory are updated synchronously until the inventory gap is zero or the feasible supply set is traversed. Step 74: Combine the earliest departure time with the transportation time to determine the estimated arrival time, and output the allocation quantity, the earliest departure time and the estimated arrival time; perform edge feasible state consistency check on the output results, and if the consistency check is not satisfied, update the feasible supply set and regenerate the allocation quantity and the estimated arrival time.
9. The emergency resource reserve intelligent prediction system based on graph neural networks according to claim 1, characterized in that, A berth operation time window is generated based on the estimated arrival time and the passage time window. In case of conflict, the path is replaced according to the weight of the relationship, and the actual arrival time is reinjected, including: Step 81: Obtain the estimated arrival time, passage window information, and relationship influence weights, and establish the correspondence between the estimated arrival time and the target berth using the supply candidate pair and the material category as the association key; determine the edge feasibility state of the edge set corresponding to the berth based on the passage window information. Step 82: For each target berth, retrieve the workable time period from the passage time window information based on the estimated arrival time. If the estimated arrival time does not fall into the workable time period, search backwards for the starting point of the first workable time period with the edge feasible status as passable. Combine this with the pre-set operation duration to generate a candidate operation time window for the berth. Step 83: Perform time overlap detection on the candidate operation time windows of the same target berth to obtain a set of conflicting tasks; for each conflicting task in the set of conflicting tasks, accumulate the relationship influence weights corresponding to the relationship types of each edge on its current path to obtain the path relationship influence weight, and determine the path replacement priority according to the path relationship influence weight; search for alternative paths in the set of feasible edges according to the path replacement priority and update the estimated arrival time until the set of conflicting tasks is empty and the berth operation time window is locked. Step 84: Collect the actual arrival time and write the actual arrival time into the edge weight time-series update result of the path corresponding to the supply candidate pair, and output the berth operation time window and the actual arrival time.
10. An intelligent prediction method for emergency resource reserves based on graph neural networks, characterized in that, The emergency resource reserve intelligent prediction system based on graph neural networks as described in any one of claims 1-9 includes the following steps: Step 91: Collect information on ports, berths, waterway sections, emergency warehouses and ships, passage time window information formed by tides and drafts, and emergency event information to obtain an event flow heterogeneous spatiotemporal graph, wherein the passage time window information corresponds to the edge feasible state, and the emergency event information corresponds to the edge weight. Step 92: Filter the backbone subgraphs of the heterogeneous spatiotemporal graph of the event flow, and set relation feature transformation rules and time feature representation rules for the backbone subgraphs; Step 93: When updating the information on sudden events, update the node features and edge features based on the backbone subgraph using a graph neural network and memory units; Step 94: Based on node features and edge features, obtain quantile demand forecast, accessibility score, transportation timeliness and safety stock threshold; Step 95: Train consistency constraints based on quantile demand forecasts, safety stock thresholds, accessibility scores, and transportation timeliness. The consistency constraints include the path dependency of edges, and the safety stock thresholds reference quantile demand forecasts. Step 96: Determine the inventory gap based on the safety stock threshold and real-time inventory, determine the feasible supply set based on the accessibility score and edge feasibility status and generate the allocation quantity, and output the earliest shipment time and the estimated arrival time. Step 97: Generate berth operation time windows based on estimated arrival time and passage time window information. When berth operation time windows conflict, replace the path according to the relationship influence weight and reinstate the actual arrival time.
Citation Information
Patent Citations
Order dynamic distribution optimization method and system based on user portrait
CN120509566A
Intelligent management method and system for port and navigation Internet of Things data
CN120598395A
Self-adaptive inventory management method and system based on real-time anomaly detection driving
CN121073346A
Quantile-event gating-graph residual fusion prediction method and system for emergency material storage and scheduling, and storage medium
CN121168946A
Unsupervised learning-based power battery anomaly detection system
WO2025002378A1
Cited By
Deep learning-based ship travel service prediction method and system
CN122088991A
A ship travel service prediction method and system based on deep learning
CN122088991B