An AI-based supply chain risk early warning method and system
By constructing fulfillment time series and using the Transformer model to extract fulfillment disturbance features, the response lag and misjudgment problems of supply chain risk warning in existing technologies are solved, and high-precision identification and warning of supply chain risks are achieved.
Patent Information
- Application Number
- CN202510829211.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-09-09
- Estimated Expiration
- 2045-06-20
AI Technical Summary
Existing technologies lack the ability to dynamically model time disturbances and node sequence changes in fulfillment behaviors in supply chain risk warnings, resulting in delayed responses and difficulty in identifying the spread of systemic risks caused by node sequence disturbances. In addition, reliance on a single abnormal signal leads to misjudgment and omission of warning results.
By constructing the fulfillment time series, identifying the staggered degree and jump vector, and using the Transformer model to extract the non-periodic fulfillment disturbance features, combined with density mutation identification, the supply chain logistics fulfillment risk warning results are generated.
It achieves high-precision identification of complex disturbance patterns, improves the accuracy and coverage of risk identification, and provides a more valuable guiding basis for decision-making.
Smart Images

Figure CN120338525B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart logistics technology, and in particular to an AI-based supply chain risk early warning method and system. Background Art
[0002] The field of smart logistics technology encompasses the intelligent perception, transmission, processing, and intelligent decision-making and execution of logistics information. It is a comprehensive technology system based on the Internet of Things, artificial intelligence, and big data, enabling intelligent management of the entire logistics process. Core elements of this field include intelligent scheduling of logistics resources, optimized management of transportation routes, automated coordination of warehousing operations, real-time monitoring of logistics node status, and the development of predictive mechanisms.
[0003] Supply chain risk early warning methods are a process of identifying potential abnormal trends by setting key indicator monitoring points and comparing and analyzing historical data with real-time operational data to identify risk events such as disruptions, delays, and inventory imbalances that may occur during supply chain operations. This includes technical considerations such as setting risk identification parameters, extracting risk signature patterns, constructing early warning logic rules, and setting trigger conditions.
[0004] Existing technologies for risk event monitoring primarily rely on statically setting key indicators and comparing trends with historical data. They lack the ability to dynamically model temporal disturbances and node sequence changes in fulfillment behavior, resulting in delayed responses when dealing with complex disturbance patterns. In the process of identifying node anomalies, most methods only mark sudden changes in outliers and fail to establish a sequential structural relationship between nodes, making it difficult to identify the spread of systemic risks caused by node sequence disturbances. Density identification is typically statistically analyzed based on fixed time periods, ignoring the temporal volatility of local task loads, which can easily mask density variations under high-frequency disturbances. In the process of risk level identification, they rely on a single abnormal signal as the basis for judgment and fail to collaboratively evaluate multiple features, making it easy for early warning results to be misjudged or missed. For example, in a certain logistics distribution task, although the overall node data did not show abnormal value jumps, there were sequence misalignments and concentrated task accumulation at multiple fulfillment nodes. Relying solely on traditional indicator monitoring would fail to promptly identify rhythm imbalances and load anomalies in the execution chain, thereby triggering subsequent logistics disruptions and plan deviation risks, resulting in reduced overall supply chain scheduling efficiency. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of the existing technology and propose an AI-based supply chain risk early warning method and system.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: an AI-based supply chain risk early warning method, comprising the following steps:
[0007] S1: Obtain the fulfillment time series through the planned time and completion time of the logistics order node, and perform staggered trigger point identification processing on the fulfillment status difference to obtain the staggered degree series;
[0008] S2: Constructing a fulfillment completion sequence based on the node completion time in the fulfillment time sequence, and performing position comparison with the node number to generate a jump vector;
[0009] S3: Inputting the interleaving sequence and the jump vector into the embedding layer of the Transformer model to extract non-periodic fulfillment disturbance features to obtain a non-periodic fulfillment disturbance feature set;
[0010] S4: Obtaining task distribution according to the node completion time in the fulfillment time series, constructing a task pressure time window view to identify density mutations, screening nodes with density mutations, and forming a density mutation node set;
[0011] S5: Input the density mutation node set and the non-periodic performance disturbance feature set into the decoding layer of the Transformer model, calculate the abnormal risk score of the density mutation node, and generate the supply chain logistics performance risk warning result according to the score.
[0012] As a further solution of the present invention, the interleaving sequence includes rhythm reversal positions, sign change nodes, and execution interval fluctuation segments; the jump vector includes sequence offset, reverse execution node number, and jump node spacing value; the non-periodic fulfillment disturbance feature set includes multi-channel time alignment vector, attention focus weight, and fulfillment disturbance pattern encoding; the density mutation node set includes task concentration mutation points, local pressure change segments, and periodic density anomaly windows; the supply chain logistics fulfillment risk warning results include risk node numbers, anomaly risk scores, and node risk level identifiers.
[0013] As a further solution of the present invention, the step of obtaining the interleaving sequence is specifically as follows:
[0014] S111: Obtain the planned completion time and actual completion time of each fulfillment node in the supply chain order, calculate the difference between the planned connection interval and the execution interval between adjacent nodes in the fulfillment time series composed of the two types of time data, and obtain a planned-actual interval difference series;
[0015] S112: Based on the planned-actual interval difference sequence, obtain the positive and negative signs of the difference between each node, perform continuity judgment according to the change state of the positive and negative signs, and obtain a staggered trigger point set;
[0016] S113: Based on the staggered trigger point set, the trigger positions corresponding to the fulfillment nodes in the original sequence are marked and counted to obtain a staggered degree sequence representing a numerical sequence of staggered degrees as the degree of rhythm disturbance.
[0017] As a further solution of the present invention, the step of obtaining the jump vector is specifically as follows:
[0018] S211: Obtain the actual completion time of the nodes in the performance time sequence, arrange each performance node in ascending order according to the completion time, and construct a performance completion sequence sequence that reflects the actual performance order;
[0019] S212: Compare the node positions of the fulfillment completion sequence with the original numbering sequence of the fulfillment nodes, calculate the position difference of the corresponding nodes in the two sequences, and determine the offset direction and span size based on the position difference, identify the jump nodes and reverse nodes, and generate a jump vector representing the node sequence disturbance.
[0020] As a further solution of the present invention, the steps for obtaining the non-periodic performance disturbance feature set are specifically as follows:
[0021] S311: Based on the jump vector, the interleaving sequence, and the fulfillment time series of the original order node, the three types of data are spliced in the fulfillment node position dimension to construct a composite input vector with a unified structure, thereby obtaining a multi-channel fulfillment expression sequence;
[0022] S312: Input the multi-channel performance expression sequence into the embedding layer of the Transformer model, call the position encoding mechanism to perform vector-level embedding processing on the node sequence information, and form an encoded input representation with a temporal structure;
[0023] S313: Based on the encoded input representation, the multi-head attention mechanism of the Transformer model is called to compare the expression content between each channel, extract cross-channel cross features, and obtain a non-periodic fulfillment disturbance feature set including node disturbance, rhythm interleaving and time deviation characteristics.
[0024] As a further solution of the present invention, the step of obtaining the density mutation node set is specifically as follows:
[0025] S411: Obtain the completion time of each fulfillment node in the fulfillment time series as the arrival time data of the node task, divide the arrival time data into non-continuous time periods according to the minimum completion time interval between tasks, and construct a set of local time windows covering the entire fulfillment cycle;
[0026] S412: Based on the set of local time windows, a kernel density estimation algorithm is used to calculate the task arrival density in each local time window, and density vectors reflecting the changing trend of task distribution are sequentially generated;
[0027] S413: Based on the density vector, the difference between the density vector and the average density value of the window at the same position in the period record of the corresponding fulfillment node is calculated to identify the window position where the density change amplitude exceeds the amplitude threshold range, extract the node where it is located, and form a density mutation node set.
[0028] As a further solution of the present invention, the steps for obtaining the supply chain logistics performance risk warning results are specifically as follows:
[0029] S511: Based on the density mutation node set and the non-periodic performance disturbance feature set, feature splicing processing is performed on the two types of data in the performance node dimension to construct a fusion feature sequence including density change information and performance disturbance features;
[0030] S512: Input the fused feature sequence into the decoding layer of the Transformer model, call the multi-head attention mechanism to calculate the attention weights of the fused features between nodes in the fused feature sequence, extract the focus response value of each node under the multi-dimensional perturbation and density background, and output a risk score representing the degree of node abnormality;
[0031] S513: Based on the risk score, a classification judgment is performed according to the set risk judgment threshold, nodes with scores exceeding the threshold are screened and assigned corresponding grade identifications, and supply chain logistics fulfillment risk warning results are generated to reveal risk hazards such as timing imbalance, execution offset and node load anomalies in the fulfillment process.
[0032] An AI-based supply chain risk early warning system, the AI-based supply chain risk early warning system is used to implement the above-mentioned AI-based supply chain risk early warning method, the system comprising:
[0033] The fulfillment node analysis module obtains the fulfillment time series through the logistics order node planning time and completion time, and performs staggered trigger point identification processing on the fulfillment status difference to obtain the staggered degree series;
[0034] The jump vector generation module constructs the fulfillment completion order according to the node completion time in the fulfillment time sequence, compares the position with the node number and generates a jump vector;
[0035] The disturbance feature extraction module inputs the interleaving sequence and the jump vector into the embedding layer of the Transformer model to extract the non-periodic performance disturbance feature, thereby obtaining a non-periodic performance disturbance feature set;
[0036] The density mutation identification module obtains the task distribution according to the node completion time in the fulfillment time series, constructs a task pressure time window view to identify density mutations, and screens nodes with density mutations to form a density mutation node set;
[0037] The risk warning calculation module inputs the density mutation node set and the non-periodic performance disturbance feature set into the decoding layer of the Transformer model, calculates the abnormal risk score of the density mutation node, and generates a supply chain logistics performance risk warning result based on the score.
[0038] Compared with the prior art, the advantages and positive effects of the present invention are:
[0039] In the present invention, by comparing the planned and completed times of nodes in logistics orders, constructing a fulfillment time series, and identifying changing behaviors such as rhythm reversal and execution interval fluctuations, the rhythm deviation caused by external disturbances in the fulfillment process can be effectively characterized; by comparing the fulfillment completion order with the node number, the displacement degree of the fulfillment sequence disturbance is extracted, and the nonlinear temporal relationship between nodes is further captured; the above two types of disturbance vectors are jointly encoded into a deep expression structure with a temporal structure, realizing cross-dimensional and cross-channel feature alignment and association mapping, and being able to identify abnormal signals from the two dimensions of fulfillment rhythm and sequence deviation, and improve the model's recognition accuracy of complex disturbance patterns; With the help of local time window division and kernel density estimation methods, the task density mutation is quantitatively analyzed, and the density anomaly identification does not rely on preset thresholds, which has higher adaptability and generalization. In the feature fusion stage, a node-level risk assessment system is established through the unified expression structure of fulfillment disturbance features and density mutation features, so that the anomaly score has dual background information of fulfillment behavior and load changes, thereby significantly improving the accuracy and coverage of risk identification. In the early warning generation process, the risk level identification is dynamically constructed according to the multi-dimensional feature extraction results, so that the early warning results have interpretability and hierarchical guidance functions, which can provide more guiding decision-making basis for supply chain scheduling. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 It is a schematic diagram of the workflow of the present invention;
[0041] Figure 2 This is a flow chart of step S1 of the present invention;
[0042] Figure 3 This is a flow chart of step S2 of the present invention;
[0043] Figure 4 This is a flow chart of step S3 of the present invention;
[0044] Figure 5 This is a flow chart of step S4 of the present invention;
[0045] Figure 6 This is a flow chart of step S5 of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0047] In the description of the present invention, it should be understood that the terms "length," "width," "up," "down," "front," "back," "left," "right," "vertical," "horizontal," "top," "bottom," "inside," "outside," and the like, indicating positions or relationships, are based on the positions or relationships shown in the accompanying drawings and are intended only to facilitate the description of the present invention and simplify the description. They do not indicate or imply that the devices or elements referred to must have a specific orientation, be constructed, or operate in a specific orientation. Therefore, they should not be construed as limiting the present invention. Furthermore, in the description of the present invention, "plurality" means two or more, unless otherwise expressly and specifically defined.
[0048] See also Figure 1 The present invention provides a technical solution: an AI-based supply chain risk early warning method, comprising the following steps:
[0049] S1: Obtain the fulfillment time series through the planned time and completion time of the logistics order node, and perform staggered trigger point identification processing on the fulfillment status difference to obtain the staggered degree series;
[0050] S2: Construct the fulfillment completion order based on the node completion time in the fulfillment time series, and compare the position with the node number to generate a jump vector;
[0051] S3: Input the interleaving sequence and the jump vector into the embedding layer of the Transformer model to extract the non-periodic fulfillment perturbation features and obtain the non-periodic fulfillment perturbation feature set;
[0052] S4: Obtain the task distribution based on the node completion time in the fulfillment time series, construct a task pressure time window view to identify density mutations, filter nodes with density mutations, and form a density mutation node set;
[0053] S5: Input the density mutation node set and the non-periodic performance disturbance feature set into the decoding layer of the Transformer model, calculate the abnormal risk score of the density mutation node, and generate the supply chain logistics performance risk warning result based on the score;
[0054] The interleaving sequence includes rhythm reversal positions, sign change nodes, and execution interval fluctuation segments. The jump vector includes sequence offset, reverse execution node number, and jump node spacing value. The non-periodic fulfillment disturbance feature set includes multi-channel time alignment vector, attention focus weight, and fulfillment disturbance pattern encoding. The density mutation node set includes task concentration mutation points, local pressure change segments, and periodic density anomaly windows. The supply chain logistics fulfillment risk warning results include risk node number, anomaly risk score, and node risk level identification.
[0055] See also Figure 2 , the steps for obtaining the interleaving sequence are as follows:
[0056] S111: Obtain the planned completion time and actual completion time of each fulfillment node in the supply chain order, calculate the difference between the planned connection interval and the execution interval between adjacent nodes in the fulfillment time series composed of the two types of time data, and obtain a planned-actual interval difference series;
[0057] To obtain the planned completion time and actual completion time of each fulfillment node in the supply chain order, first retrieve the order number and its associated fulfillment node information from the order management system. Each node data must include the planned completion time (such as 14:00 on March 12, 2025) and the actual completion time of the node (such as 10:00 on March 13, 2025). Then, arrange all fulfillment nodes in the same order in order, traverse each two adjacent nodes in turn, and calculate the time difference between the planned completion time between node i and node i+1 (such as node 1 is planned to be 14:00 on March 12 and node 2 is planned to be 14:00 on March 13, then the planned continuation interval is 24 hours). Similarly, calculate the time difference between the actual completion time of the two nodes (such as Node 1 is actually at 10:00 on March 13th, and node 2 is at 13:00 on March 14th, so the execution interval is 27 hours). The difference between the two intervals is then calculated: that is, the execution interval minus the planned connection interval. This difference is used as the time deviation value for the fulfillment segment. The above process is repeated to obtain a sequence of planned-actual interval differences between all nodes. The unit of time is uniformly hours to maintain consistency in subsequent calculations. For example, if there are five fulfillment nodes in order number A123, a total of four adjacent node pairs are generated, and ultimately four difference data will be obtained, such as [3, -2, 1, -4], where 3 indicates that the actual connection is extended by 3 hours, and -2 indicates that the connection is completed 2 hours ahead of schedule. In this way, a complete difference sequence is obtained.
[0058] S112: Based on the planned-actual interval difference sequence, obtain the positive and negative signs of the difference between each node, perform continuity judgment according to the change state of the positive and negative signs, and obtain a staggered trigger point set;
[0059] Based on the planned-actual interval difference sequence, such as the sequence [3, -2, 1, -4], first obtain the sign of each difference to form a symbol sequence [+, -, +, -]. Then, the symbol sequence is judged item by item, and the changes between the two adjacent symbols are analyzed. If there is an alternation between positive and negative (such as + to - or - to +), it is regarded as an interleaving trigger point. For example, the change from + to - from the first item to the second item is recorded as interleaving trigger point 1, followed by - to + from the second item to the third item, recorded as interleaving trigger point 2, and so on. The entire sequence is traversed to determine all possible interleaving positions, thereby forming an interleaving trigger point set. The elements are recorded according to the index in the original sequence. For example, the trigger point index in this example is [1, 2, 3]. This set can be used to further analyze the rhythm change characteristics between the fulfillment nodes, assign a number or label to each interleaving record, and form annotation results such as "interleaving point @ node 2", "interleaving point @ node 3", etc. The interleaving annotation status is recorded for each node in the data record table, and whether it is an interleaving node pair is recorded in an array or Boolean value, such as [True, True, True, False], indicating that the first three pairs of nodes are all interleaving change points. Finally, all recognition results are integrated to form a complete set of interleaving trigger points.
[0060] S113: Based on the staggered trigger point set, the trigger positions corresponding to the fulfillment nodes in the original sequence are marked and counted to obtain a staggered degree sequence representing a sequence of staggered degree values as a rhythm disturbance degree;
[0061] Based on the set of staggered trigger points, the trigger positions corresponding to the fulfillment nodes in the original sequence are marked and counted. First, in the original fulfillment node list, the identified staggered points are marked with serial numbers. For example, if the original fulfillment nodes are [N1, N2, N3, N4, N5] and the staggered trigger points are [1, 2, 3], the marking results are that nodes N2, N3, and N4 are marked as "staggered node 1", "staggered node 2", and "staggered node 3" respectively. Then the number of staggered trigger points in the overall sequence is counted, such as 3 in this case. On this basis, a sequence of staggered degrees is formed with the nodes as indexes, and its value represents the staggered degree of the node. The interleaving frequency of the point. If a node appears in multiple interleaving trigger points at the same time, the interleaving degree of the node increases by 1. For example, node N3 is the common node of the node pairs (N2, N3) and (N3, N4), so the interleaving degree is 2. After counting all nodes, the interleaving degree sequence is obtained, such as [0, 1, 2, 1, 0]. The interleaving degree sequence can be further normalized. Assuming the highest interleaving degree is 2, the normalized sequence is [0, 0.5, 1.0, 0.5, 0]. This sequence is the interleaving degree sequence of the rhythm disturbance degree. Each value clearly reflects the degree of rhythm instability reflected by the corresponding node in the entire fulfillment chain.
[0062] See also Figure 3 , the steps to obtain the jump vector are as follows:
[0063] S211: Obtain the actual completion time of the nodes in the performance time sequence, sort each performance node in ascending order according to the completion time, and construct a performance completion sequence sequence that reflects the actual performance order;
[0064] To obtain the actual completion time of the nodes in the fulfillment time series, it is necessary to record the completion time information of each fulfillment node. This information usually comes from the timestamp data generated in the on-site execution system. For example, the actual completion time of node N1 is 15:00 on March 12, 2025, node N2 is 09:00 on March 11, 2025, node N3 is 18:00 on March 13, 2025, node N4 is 12:00 on March 11, 2025, and node N5 is 08:00 on March 14, 2025. Arrange all nodes in ascending order by timestamp from earliest to latest, and the actual fulfillment order is N2 (09:00) → N4 (12:00) → N1 (15:00) → N3 (18:00) → N5 (08:00@14th), constructing a new sequence [N2, N4, N1, N3, N5] to reflect the actual fulfillment order of each node, and the sorting result can be used as the basis for subsequent jump identification. The original numbering order needs to be retained for subsequent comparison. For example, if the original order is [N1, N2, N3, N4, N5], the position of each node in the actual order is recorded through the sequence mapping operation. For example, N1 was originally in the first place, but is in the third place in the actual order. N2 was originally in the second place, but is now in the first place. In this way, a complete sorting mapping comparison relationship is obtained.
[0065] S212: Compare the node positions of the fulfillment completion sequence with the original numbering sequence of the fulfillment nodes, calculate the position difference of the corresponding nodes in the two sequences, and determine the offset direction and span size based on the position difference, identify the jump nodes and reverse order nodes, and generate a jump vector representing the node sequence disturbance;
[0066] Compare the node positions of the fulfillment completion sequence with the original numbering sequence of the fulfillment nodes, compare the positions of each node in the original sequence and the actual fulfillment sequence, record the position difference and calculate its positive and negative direction and the absolute value of the difference. For example, for node N1, its original position is 1, and the actual fulfillment position is 3. The position difference is +2, indicating that it is completed two places later. N2’s original position is 2, and the actual position is 1. The difference is -1, indicating that it is completed one place ahead of time. Process all nodes in this way to obtain a complete position difference vector such as [+2, -1, 0, -2, +1]. Then analyze each value in the difference vector. When the absolute value of the difference is large, the position difference is calculated. When the difference is equal to 2, it is recorded as a jump node, such as N1(+2) and N4(-2) are jump nodes. If the difference is negative and the absolute value exceeds 1, it is recorded as a reverse order node. For example, N4(-2) meets the condition. In this way, the node jump type is marked and classified, and a jump vector structure is constructed for all nodes. Each item in the vector is the corresponding node mark value. For example, if it is encoded with {0: no disturbance, 1: jump, 2: reverse order}, the vector result is [1, 0, 0, 2, 0], indicating that node N1 is a jump, N4 is reverse order, and the remaining nodes are normal order nodes. At the same time, a complete disturbance vector is constructed and the disturbance type and degree value corresponding to each node are output.
[0067] See also Figure 4 , the specific steps for obtaining the feature set of non-periodic performance disturbance are as follows:
[0068] S311: Based on the jump vector, the interleaving sequence, and the fulfillment time series of the original order node, the three types of data are spliced in the fulfillment node location dimension to construct a composite input vector with a unified structure, thereby obtaining a multi-channel fulfillment expression sequence.
[0069] Based on the jump vectors, interleaving sequence, and fulfillment time series, we first align the fulfillment nodes by their positions, ensuring that the three data dimensions correspond within the node sequence. The jump vector represents the perturbation state of each node in the fulfillment order. For example, the jump state of nodes 1 to 5 is [1, 0, 0, 2, 0]. The interleaving sequence represents the intensity of the rhythmic perturbation during the fulfillment process, such as [0.0, 0.5, 1.0, 0.5, 0.0]. The fulfillment time series records the actual completion time of the nodes. Starting from a fixed reference time (for example, 00:00 on March 11, 2025), the completion time of each node can be converted into a time difference (in hours). For example, if node 1 is completed at 15:00 on March 12, the difference is 39 hours, and if node 2 is completed at 09:00 on March 11, the difference is 9 hours, resulting in [39, 9, 66, 12, 80]. The three types of data are concatenated in node order, and each node forms a three-dimensional ternary vector. The results are: node 1 is [1, 0.0, 39], node 2 is [0, 0.5, 9], node 3 is [0, 1.0, 66], node 4 is [2, 0.5, 12], and node 5 is [0, 0.0, 80]. Finally, a composite input matrix with 5 rows and 3 columns is constructed.
[0070] S312: Input the multi-channel fulfillment expression sequence into the embedding layer of the Transformer model, and use the position encoding mechanism to perform vector-level embedding processing on the node sequence information to form an encoded input representation with a temporal structure;
[0071] When a multi-channel performance expression sequence is input into the Transformer model, each node's ternary vector is first mapped. A fully connected layer is typically used to map each three-dimensional input into a high-dimensional vector of a fixed dimension, such as 64. The process is as follows: Node 1's original ternary vector, [1, 0.0, 39], is linearly transformed into a 64-dimensional vector A1; Node 2's input, [0, 0.5, 9], is mapped into vector A2, and so on, resulting in five high-dimensional representations, A1 through A5. To preserve the order of nodes, a positional encoding mechanism is introduced. Based on the node's index position in the sequence (i.e., 1 through 5), a set of encoding vectors P1 through P5 with the same dimensions as the mapping vector is generated. Each node's embedding vector is then added to its corresponding positional encoding vector to form embedding vectors E1 through E5 that incorporate order information. For example, if the logistics process includes five nodes: Node 1 is the warehousing station, Node 2 is the sorting center, Node 3 is the transportation center, Node 4 is the transit hub, and Node 5 is the terminal distribution point, then these nodes will exhibit different disturbance behaviors during the fulfillment process due to rhythm, sequence, and time differences. The five embedded vectors E1 to E5 mentioned above serve as model inputs with time and sequence semantics.
[0072] S313: Based on the encoded input representation, the multi-head attention mechanism of the Transformer model is used to compare the expression content between each channel, extract cross-channel features, and obtain a non-periodic performance perturbation feature set including node perturbation, rhythm interleaving, and time deviation characteristics;
[0073] After receiving a sequence of node embedding vectors with positional encodings, the Transformer model first analyzes the dependencies between nodes using a multi-head attention mechanism. Each attention head calculates the correlation between the embedding vectors of each pair of nodes and, by constructing a query vector, a key vector, and a value vector, calculates the degree of attention a node pays to all other nodes. For example, node 3, which has the greatest impact on the rhythm during transportation, has a jump value of 0, an interleaving degree of 1.0, and a time difference of 66 hours. This node may generate higher attention scores for nodes 1 (the incoming node) and 5 (the terminal node) in the attention mechanism, indicating that its positional anomaly may affect the fulfillment stability of the preceding and following nodes. Multiple attention heads can simultaneously capture cross-channel features, such as the relationship between jumps and time, and the synchronization between interleaving degree and fulfillment time. The features extracted by all attention heads are fused and fed into a feedforward neural network to further refine high-level semantics, resulting in a set of non-periodic perturbation features exhibited by each node in the fulfillment process. The final output feature set reflects the dynamic changes between nodes in multiple dimensions, such as rhythm disruption, sequence changes, and time delays. For example, node 4 is a transfer hub. Due to sudden traffic problems, the actual fulfillment order is advanced, but the degree of interleaving is not high. Its disturbance characteristics are shown as feature points dominated by sequential disturbances after model processing. However, due to the simultaneous occurrence of time delay and rhythm jump in node 3, its feature vector is shown as a typical multiple disturbance node.
[0074] See also Figure 5 , the specific steps for obtaining the density mutation node set are:
[0075] S411: Obtain the completion time of each fulfillment node in the fulfillment time series as the arrival time data of the node task, divide the arrival time data into non-continuous time periods according to the minimum completion time interval between tasks, and construct a set of local time windows covering the entire fulfillment cycle;
[0076] To obtain the actual completion time of each node in the fulfillment time series as the task arrival time data, first retrieve the completion timestamps of each node from the system. For example, the completion times of nodes 1 through 5 are 09:00, March 11, 2025, 12:00, March 11, 2025, 15:00, March 12, 2025, 18:00, March 13, 2025, and 08:00, March 14, 2025. Calculate the time differences between the completion times of adjacent nodes, which are 3 hours, 27 hours, 27 hours, and 14 hours, respectively. Use a minimum interval of 3 hours as the unit of division for the local time window, and divide the entire fulfillment cycle into non-contiguous intervals based on this interval. The fulfillment cycle starts at 09:00 on March 11, 2025, and ends at 08:00 on March 14, 2025, with a total duration of 71 hours. Therefore, it is divided into 24 non-overlapping windows of 3 hours: [the first window is 09:00-12:00 on March 11, the second window is 12:00-15:00... the 24th window is 05:00-08:00 on March 13]. All task completion times are classified into corresponding windows to form a local time window set.
[0077] S412: Based on the set of local time windows, a kernel density estimation algorithm is used to calculate the task arrival density within each local time window, and density vectors reflecting the changing trend of task distribution are generated in sequence;
[0078] Based on the constructed local time window set, the kernel density estimation algorithm is used to estimate the arrival density of tasks in each window. In view of the non-uniform distribution characteristics of node tasks in the fulfillment scenario, the kernel density estimation formula is introduced as follows:
[0079] ;
[0080] The parameters are described as follows: : Indicates at a point in time The task density estimate on is a continuous expression of the task distribution in the current window; : The number of task nodes in the current local time window. This value may be different in each window; : basic bandwidth parameter, which controls the diffusion degree of the kernel function. The larger the value, the higher the smoothing degree. In this paper, it is set to 1 hour according to the density of the performance time series; :Indicates the The actual completion time of each task node (in hours, the time difference is calculated based on the start time of the performance); : is the node adaptive bandwidth adjustment item, which is used to correct the bandwidth in combination with the performance disturbance characteristics. If the node corresponding jump vector value is 2 or the interleaving value is greater than 0.8, then set hours, otherwise , which is used to reflect the expansion of the local influence range of the disturbed node on the density estimation; : is the standard normal kernel function, defined as: , this function is used to calculate the density contribution value of a task arrival point to the target time point.
[0081] Take the first time window from 09:00 to 12:00 on March 11, 2025 as an example. This window includes node 1 (arrival time is 09:00, jump value is 0, and interleaving degree is 0.0) and node 2 (arrival time is 12:00, jump value is 0, and interleaving degree is 0.5). Since both nodes do not meet the disturbance condition, . Set the basic bandwidth Hour, compute the density estimate for the midpoint of the window, 10:30: , which can be obtained from the standard normal distribution table ,have to: , using this method to calculate the center point of each time window, we can get the complete density vector in turn, such as: [0.1295, 0.1102, 0.0300, 0, …], which reflects the dynamic distribution of tasks in the entire fulfillment cycle and serves as the basis for subsequent density mutation analysis.
[0082] S413: Based on the density vector, a difference is calculated between the density vector and the average density value of the window at the same position in the period record of the corresponding fulfillment node, and the window position where the density change amplitude exceeds the amplitude threshold range is identified. The node at the window position is extracted to form a density mutation node set;
[0083] Based on the above density vector, the difference between the density value of each time window and the historical average density at the same window position in the cycle record is calculated. The historical data comes from the average of multiple task arrival records in the historical fulfillment cycle. For example, the current density of window 1 is 0.1295, and the historical average density is 0.08, then the difference is +0.0495. Set the density change amplitude threshold to 0.04. If the absolute value of the current difference exceeds the threshold, it is considered a density mutation window. In this example, the difference of the first window is +0.0495>0.04, which is marked as a mutation window. Extract the nodes covered by the window, namely node 1 and node 2, to form a density mutation node set. After traversing all windows in turn, a complete set of mutation node indexes is obtained, such as [1, 2, 4], which means that the task arrival density of nodes 1, 2, and 4 has changed significantly during their time period.
[0084] See also Figure 6 , the specific steps for obtaining the supply chain logistics performance risk warning results are as follows:
[0085] S511: Based on the density mutation node set and the non-periodic performance disturbance feature set, the two types of data are subjected to feature splicing processing in the performance node dimension to construct a fusion feature sequence including density change information and performance disturbance features;
[0086] Based on the density mutation node set and the non-periodic fulfillment perturbation feature set, feature concatenation is performed on the fulfillment node dimension. The density mutation node set reveals abnormalities in task concentration through changes in window density, while the perturbation feature set is derived from the Transformer model's extraction of multi-dimensional perturbation features such as node jumps, interleavings, and time offsets. Each node can be represented as a high-dimensional vector. For example, the perturbation feature is represented as a 64-dimensional dense representation, while the density change is represented as a 2-dimensional representation of whether it is a mutation node (Boolean value) and its original difference (real number). These two types of information are combined to construct a 66-dimensional fused feature vector for each node, that is, each node includes: [disturbance feature 1, ..., disturbance feature 64, density mutation Boolean flag, density change value], which are organized in sequence along the fulfillment node to form a fused feature sequence. For example, node 1 is [0.23, ..., 0.75, 1, 0.049], node 2 is [0.11, ..., 0.60, 1, 0.036], and node 3 is [0.04, ..., 0.52, 0, 0.015]. Finally, a matrix input of the shape of N×66 is formed for decoder processing.
[0087] S512: Input the fused feature sequence into the decoding layer of the Transformer model, call the multi-head attention mechanism to calculate the attention weights of the fused features between nodes in the fused feature sequence, extract the focus response value of each node under the multi-dimensional perturbation and density background, and output a risk score representing the degree of node abnormality;
[0088] After the fused feature sequence is input into the decoding layer of the Transformer model, the model uses a multi-head attention mechanism to extract the focus response of each node in the context of the fused perturbation feature and density information. The response value of each node represents the intensity of attention it receives in the global sequence. The focus response value is calculated as follows:
[0089] ;
[0090] The definition of each letter is as follows: : No. The focused response value of each fulfillment node. The higher the value, the more susceptible the node is to the response aggregation of other nodes in the disturbance and density dimensions. : No. The fused feature vector of each fulfillment node, including non-periodic perturbation features (such as jumps, staggers, time offsets) and density mutation features (Boolean values, differences) extracted from the multi-channel fulfillment expression; : No. The fusion feature vector of the fulfillment nodes is the feature of other target nodes focused on by node j; : query matrix, Mapping to query vector , used to initiate attention operations on external information, with a dimension of ; : key matrix, Mapping to key vector , used to respond to query operations, the dimensions are the same ; :node The density correction vector of , which indicates the enhancement of the attention of the node due to the density mutation, is defined as: , :node Whether it is a density mutation node, if it is a mutation node, it is 1, otherwise it is 0; :node The density mutation amplitude (the difference between the current window density and the historical mean, in density units / hour); :node For Node The attention weight is calculated as: , , : Unnormalized attention score, measuring the node and The feature correlation of : Dimension scaling factor of query / key vector to ensure numerical stability of the model; : The total number of nodes, equal to the number of fulfillment nodes in the fulfillment sequence; : Traverse the index to calculate the attention normalization for all nodes; : Indicates the number of the first node in the current sequence input data, used to indicate the minimum position index.
[0091] Assume that the fulfillment sequence consists of 3 nodes (N=3), each fusion feature vector The dimension is reduced to 3 for calculation demonstration: Node 1: , where 0.049 is the density difference and the mutation mark is 1. , , so Node 2: , Node 3: , non-mutation nodes, , The identity matrix, .
[0092] Calculate the attention response value of node 1 :
[0093] Calculate the unnormalized attention score:
[0094] ;
[0095] ;
[0096] ;
[0097] Calculating attention weights :
[0098] ;
[0099] 、 ;
[0100] Calculate the focus response value: ,Finally, the focused response value of node 1 is 0.0917, reflecting the risk intensity of the ,node.
[0101] S513: Based on the risk score, a classification judgment is performed according to the set risk judgment threshold, and nodes with scores exceeding the threshold are screened and assigned corresponding level identifications. The results of the supply chain logistics fulfillment risk warning are generated to reveal the risk hazards such as timing imbalance, execution offset and node load abnormality in the fulfillment process.
[0102] Based on the focused response value (i.e., risk score) of each fulfillment node output by the Transformer decoding layer ), execute the classification judgment process to identify the key risk nodes in the performance process. The system pre-sets a set of risk judgment thresholds to classify the risk scoring results. Let the main threshold be This value is the critical point obtained through the statistical distribution of abnormal node scores in historical performance data, which is used to distinguish normal from abnormal nodes. At the same time, a grading threshold system is introduced to further subdivide the scoring interval into three levels: Low-risk interval: , the node score is within the normal fluctuation range; medium risk range: , the node has moderate disturbance and needs to be paid special attention; high-risk area: , the node may be in the state of execution bottleneck, rhythm disorder or overload, triggering a strong early warning mechanism. Judge the score of each node and filter out nodes that exceed the main threshold , and assign risk level labels according to the scoring intervals to which they belong. In the above example, the score of node 1 is , is in the medium risk range, so it is labeled as "medium risk". If the score of node 2 is 0.125 and that of node 3 is 0.060, the corresponding labels are "high risk" and "low risk" respectively. Finally, the risk level information of all nodes is bound to the node identifier and output as a set of risk warning result structures. For example, the following are: Node 1 (transit warehouse): medium risk, Node 2 (city distribution hub): high risk, Node 3 (terminal distribution point): low risk. This structure can be written into the fulfillment process tracking record by the system logging module, or the risk warning engine can directly trigger downstream scheduling optimization actions, realizing early identification and dynamic adjustment of hidden dangers such as timing imbalance, fulfillment offset and node pressure anomalies. The entire classification and output process ensures the closed-loop application of the early disturbance modeling, feature extraction and response calculation links.
[0103] An AI-based supply chain risk early warning system, which is used to implement the above-mentioned AI-based supply chain risk early warning method, includes:
[0104] The fulfillment node analysis module obtains the fulfillment time series through the logistics order node planning time and completion time, and performs staggered trigger point identification processing on the fulfillment status difference to obtain the staggered degree series;
[0105] The jump vector generation module constructs the fulfillment completion order based on the node completion time in the fulfillment time series, and compares the position with the node number to generate the jump vector;
[0106] The perturbation feature extraction module inputs the interleaving sequence and jump vector into the embedding layer of the Transformer model to extract the non-periodic fulfillment perturbation features and obtain the non-periodic fulfillment perturbation feature set;
[0107] The density mutation identification module obtains the task distribution based on the node completion time in the fulfillment time series, constructs a task pressure time window view to identify density mutations, and screens nodes with density mutations to form a density mutation node set;
[0108] The risk warning calculation module inputs the density mutation node set and the non-periodic performance disturbance feature set into the decoding layer of the Transformer model, calculates the abnormal risk score of the density mutation node, and generates the supply chain logistics performance risk warning result based on the score.
[0109] The above are merely preferred embodiments of the present invention and do not limit the present invention in any other form. Any technician familiar with the profession may use the technical content disclosed above to change or modify it into an equivalent embodiment with equivalent changes and apply it to other fields. However, any simple modification, equivalent change and modification made to the above embodiment based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall still fall within the scope of protection of the technical solution of the present invention.
Claims
1. An AI-based supply chain risk early warning method, characterized by: The following steps are involved: S1: Obtain the fulfillment time series through the planned time and completion time of the logistics order node, and perform staggered trigger point identification processing on the fulfillment status difference to obtain the staggered degree series; S2: Constructing a fulfillment completion sequence based on the node completion time in the fulfillment time sequence, and performing position comparison with the node number to generate a jump vector; S3: Inputting the interleaving sequence and the jump vector into the embedding layer of the Transformer model to extract non-periodic fulfillment disturbance features to obtain a non-periodic fulfillment disturbance feature set; S4: Obtaining task distribution according to the node completion time in the fulfillment time series, constructing a task pressure time window view to identify density mutations, screening nodes with density mutations, and forming a density mutation node set; S5: Input the density mutation node set and the non-periodic performance disturbance feature set into the decoding layer of the Transformer model, calculate the abnormal risk score of the density mutation node, and generate a supply chain logistics performance risk warning result based on the score; The specific steps for obtaining the supply chain logistics performance risk warning results are as follows: S511: Based on the density mutation node set and the non-periodic performance disturbance feature set, feature splicing processing is performed on the two types of data in the performance node dimension to construct a fusion feature sequence including density change information and performance disturbance features; S512: Input the fused feature sequence into the decoding layer of the Transformer model, call the multi-head attention mechanism to calculate the attention weights of the fused features between nodes in the fused feature sequence, extract the focus response value of each node under the multi-dimensional perturbation and density background, and output a risk score representing the degree of node abnormality; To extract the focused response value of each node under the background of multidimensional perturbation and density, the formula is used: ; in, It is The focused response value of each fulfillment node. The higher the value, the more susceptible the node is to the response aggregation of other nodes in the disturbance and density dimensions. It is The fusion feature vector of the fulfillment nodes, It is The fusion feature vector of the fulfillment nodes, is the query matrix, used to initiate attention to external information, is the key matrix, used to respond to queries, is a node The density correction vector represents the enhancement of the attention of the node due to the density mutation. is a node For Node The attention weight, is the total number of nodes, which is equal to the number of fulfillment nodes in the fulfillment sequence; S513: Based on the risk score, a classification judgment is performed according to the set risk judgment threshold, nodes with scores exceeding the threshold are screened and assigned corresponding grade identifications, and supply chain logistics fulfillment risk warning results are generated to reveal the risk hazards of timing imbalance, execution offset and node load abnormality in the fulfillment process.
2. The AI-based supply chain risk early warning method according to claim 1 is characterized in that: The interleaving sequence includes rhythm reversal positions, sign change nodes, and execution interval fluctuation segments; the jump vector includes sequence offset, reverse execution node number, and jump node spacing value; the non-periodic performance disturbance feature set includes multi-channel time alignment vector, attention focus weight, and performance disturbance pattern encoding; the density mutation node set includes task concentration mutation points, local pressure change segments, and periodic density anomaly windows; the supply chain logistics performance risk warning results include risk node numbers, anomaly risk scores, and node risk level identifiers.
3. The AI-based supply chain risk early warning method according to claim 1 is characterized in that: The steps for obtaining the interleaving sequence are specifically as follows: S111: Obtain the planned completion time and actual completion time of each fulfillment node in the supply chain order, calculate the difference between the planned connection interval and the execution interval between adjacent nodes in the fulfillment time series composed of the two types of time data, and obtain a planned-actual interval difference series; S112: Based on the planned-actual interval difference sequence, obtain the positive and negative signs of the difference between each node, perform continuity judgment according to the change state of the positive and negative signs, and obtain a staggered trigger point set; S113: Based on the staggered trigger point set, the trigger positions corresponding to the fulfillment nodes in the original sequence are marked and counted to obtain a staggered degree sequence representing a numerical sequence of staggered degrees as the degree of rhythm disturbance.
4. The AI-based supply chain risk early warning method according to claim 3 is characterized in that: The steps for obtaining the jump vector are specifically as follows: S211: Obtain the actual completion time of the nodes in the performance time sequence, arrange each performance node in ascending order according to the completion time, and construct a performance completion sequence sequence that reflects the actual performance order; S212: Compare the node positions of the fulfillment completion sequence with the original numbering sequence of the fulfillment nodes, calculate the position difference of the corresponding nodes in the two sequences, and determine the offset direction and span size based on the position difference, identify the jump nodes and reverse nodes, and generate a jump vector representing the node sequence disturbance.
5. The AI-based supply chain risk early warning method according to claim 4 is characterized in that: The steps for obtaining the non-periodic performance disturbance feature set are specifically as follows: S311: Based on the jump vector, the interleaving sequence, and the fulfillment time series of the original order node, the three types of data are spliced in the fulfillment node position dimension to construct a composite input vector with a unified structure, thereby obtaining a multi-channel fulfillment expression sequence; S312: Input the multi-channel performance expression sequence into the embedding layer of the Transformer model, call the position encoding mechanism to perform vector-level embedding processing on the node sequence information, and form an encoded input representation with a temporal structure; S313: Based on the encoded input representation, the multi-head attention mechanism of the Transformer model is called to compare the expression content between each channel, extract cross-channel cross features, and obtain a non-periodic fulfillment disturbance feature set including node disturbance, rhythm interleaving and time deviation characteristics.
6. The AI-based supply chain risk early warning method according to claim 5 is characterized in that: The steps for obtaining the density mutation node set are specifically as follows: S411: Obtain the completion time of each fulfillment node in the fulfillment time series as the arrival time data of the node task, divide the arrival time data into non-continuous time periods according to the minimum completion time interval between tasks, and construct a set of local time windows covering the entire fulfillment cycle; S412: Based on the set of local time windows, a kernel density estimation algorithm is used to calculate the task arrival density in each local time window, and density vectors reflecting the changing trend of task distribution are sequentially generated; S413: Based on the density vector, the difference between the density vector and the average density value of the window at the same position in the period record of the corresponding fulfillment node is calculated to identify the window position where the density change amplitude exceeds the amplitude threshold range, extract the node where it is located, and form a density mutation node set.
7. An AI-based supply chain risk early warning system, characterized by: The AI-based supply chain risk early warning method according to any one of claims 1 to 6, wherein the system comprises: The fulfillment node analysis module obtains the fulfillment time series through the logistics order node planning time and completion time, and performs staggered trigger point identification processing on the fulfillment status difference to obtain the staggered degree series; The jump vector generation module constructs the fulfillment completion order according to the node completion time in the fulfillment time sequence, compares the position with the node number and generates a jump vector; The disturbance feature extraction module inputs the interleaving sequence and the jump vector into the embedding layer of the Transformer model to extract the non-periodic performance disturbance feature, thereby obtaining a non-periodic performance disturbance feature set; The density mutation identification module obtains the task distribution according to the node completion time in the fulfillment time series, constructs a task pressure time window view to identify density mutations, and screens nodes with density mutations to form a density mutation node set; The risk warning calculation module inputs the density mutation node set and the non-periodic performance disturbance feature set into the decoding layer of the Transformer model, calculates the abnormal risk score of the density mutation node, and generates a supply chain logistics performance risk warning result based on the score.
Citation Information
Patent Citations
Transform-based micro-service performance anomaly detection method and system
CN116776270A
Order fulfillment management method and device
CN117829938A
Trade process digital optimization method and system
CN119740876A