Logistics congestion early warning method and system based on space-time coupling and track matching

By constructing a distribution prediction model based on graph convolutional networks and recurrent networks, the problem of accurately perceiving congestion on the tracks of logistics carts in tobacco blending production was solved, automated prediction of cart trajectories and congestion warning were achieved, and the intelligence and efficiency of the production line were improved.

CN120707017APending Publication Date: 2025-09-26CHINA TOBACCO ZHEJIANG IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510857545.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-09-26

AI Technical Summary

Technical Problem

In the existing tobacco blending production process, there is a lack of accurate perception and prediction of congestion on the logistics cart tracks, resulting in low production efficiency and increased risk of interruption. Relying on manual observation and subsequent adjustments cannot respond to congestion in a timely manner.

Method used

By building a distribution prediction network model based on graph convolutional networks and recurrent networks, and utilizing the historical distribution data of vehicles, the spatiotemporal coupling relationship is mined to predict the real-time trajectory of vehicles and track congestion indicators, thus realizing automated congestion warning.

Benefits of technology

It has achieved clear and explainable early warning of logistics vehicle congestion, reduced reliance on manual judgment, provided early warning of congestion, improved the intelligence and production efficiency of the production line, and reduced the risk of flow interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120707017A_ABST
    Figure CN120707017A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a logistics congestion early warning method and system based on space-time coupling and track matching, and belongs to the technical field of logistics management. The early warning method comprises the following steps: acquiring real-time distribution data of smoke box logistics trolleys; constructing and training a distribution prediction network model; inputting the real-time distribution data into the prediction network model to obtain real-time prediction distribution data; acquiring real-time track data of the trolley according to the real-time prediction distribution data; and calculating a track congestion index according to the real-time track data and carrying out congestion early warning. According to the method, the distribution prediction model is constructed through the graph convolution network and the circulation network, accurate matching of the trolley track is realized through combination of depth-first search and the Hungary algorithm, the congestion index is calculated through historical track data so as to realize congestion early warning without scheduling dependence, and dependence on manual judgment is remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of logistics management, and in particular to a logistics congestion early warning method and system based on spatiotemporal coupling and trajectory matching. Background Art

[0002] Tobacco blending and flavoring is a key step in the cigarette making process. During this process, different types of tobacco are blended in predetermined proportions for subsequent processing. Tobacco factories use logistics carts to transport cigarette cases. These carts travel on fixed, one-way tracks according to dispatch tasks, transporting cigarette cases to designated transport lines. Scheduling tasks can be irrational, and if the preceding cart on the track fails to complete its dispatch task, it can block the passage of subsequent carts, causing track congestion. This prevents the carts from delivering cigarette cases to the transport line in a timely manner, leading to blending interruptions on the production line. These blending interruptions can reduce product quality and severely impact production efficiency.

[0003] In the existing tobacco blending production process, workers judge congestion by observing the logistics cart tracks. When congestion is observed, the blending flow rate is reduced to compensate for the tobacco consumption rate, waiting for the congestion to naturally ease. Workers' judgment of track congestion relies on manual experience and lacks a more accurate and explanatory representation of the congestion state. Because they cannot specifically perceive the congestion state, workers' control methods are relatively conservative. When suspected congestion occurs, they reduce the blending flow rate to alleviate the congestion. At the same time, workers' adjustment of the blending flow rate is post-adjustment, that is, the flow rate is adjusted after congestion occurs to alleviate the risk of flow interruption. This slow-reacting adjustment method not only reduces production efficiency, but also fails to respond to track congestion in a timely manner, thereby increasing the risk of flow interruption. In short, the existing congestion adjustment method lacks the correct perception and prediction of congestion conditions and cannot be separated from manual observation, which limits the production efficiency of intelligent production lines. Summary of the Invention

[0004] In order to achieve the above objectives, the present invention provides a logistics congestion warning method and system based on spatiotemporal coupling and trajectory matching, which solves the problem of trajectory prediction and congestion warning of logistics trolleys in cigarette box tracks when scheduling information is missing.

[0005] To achieve the above objectives, an embodiment of the present invention provides a logistics congestion early warning method based on spatiotemporal coupling and trajectory matching, the early warning method comprising: Obtain real-time distribution data of cigarette box logistics vehicles; Build and train distribution prediction network models; inputting the real-time distribution data into the prediction network model to obtain real-time predicted distribution data; Acquire the real-time trajectory data of the vehicle according to the real-time predicted distribution data; A track congestion index is calculated based on the real-time trajectory data and a congestion warning is issued.

[0006] Optionally, build and train a distribution prediction network model, including: Obtain the historical real distribution data of the cars; Dividing the historical real distribution data into a training set and a test set; Constructing a distribution prediction network model based on a graph convolutional network and a recurrent network, and inputting the training set into the distribution prediction network model for training to obtain historical prediction distribution data; The cross entropy loss function is calculated according to formula (1), , (1) in, is the cross entropy loss function, is the historical true distribution vector Dimensions, and are the historical real distribution vector and the historical predicted distribution vector respectively. The value of the dimension.

[0007] Perform back propagation training according to the cross entropy loss function to update the distribution prediction network model parameters; The test set is input into the distribution prediction network model to evaluate the performance indicators of the model.

[0008] Optionally, obtain the historical real distribution data of the vehicles, including: Collect the occupancy data of each car during operation according to the relationship between the car and the corresponding measuring points; Performing data cleaning and outlier removal on the placeholder data; According to formula (2), the occupancy data of the cars at the same time are aggregated to obtain the historical real distribution data of the cars. , (2) According to formula (3), the historical real distribution data is time-series expanded. , (3) in, is the time data, For the The historical real distribution data of the car at that moment, For the Moment The location data of each car on the map, For or calculate, is the number of cars, For the The historical real distribution data of the car after the time series expansion, For the The historical real distribution data of the car at the moment, For the The historical real distribution data of the car at the moment, is the sliding window length.

[0009] Optionally, a distribution prediction network model is constructed based on a graph convolutional network and a recurrent network, and the test set is input into the distribution prediction network model for training to obtain historical prediction distribution data, including: Determine the static adjacency matrix based on the actual connectivity relationship in the trolley track; A graph convolutional network is used to extract spatial coupling information to generate a dynamic auxiliary adjacency matrix; According to formulas (4) to (7), the gate recurrent unit is used to calculate the latent variable, , (4) , (5) , (6) , (7) Among them, the parameters It is divided into update gate, reset gate and hidden state gate in the GRU model framework. is the activation function, is a graph convolutional model, are learnable parameters, and the superscript , To use a static adjacency matrix as input to a graph convolutional model, To use the dynamic auxiliary adjacency matrix as the input of the graph convolutional model, For the The latent variable at time, For the The latent variable at time, For data splicing, Calculate the Hadamard product, is the activation function; According to formula (8), the latent variables are input into the multi-layer perceptron network to obtain historical prediction distribution data. , (8) in, is a multi-layer perceptron network, For historical forecast distribution data.

[0010] Optionally, a graph convolutional network is used to extract spatial coupling information to generate a dynamic auxiliary adjacency matrix, including: Calculate the dynamic mask vector according to formula (9), , (9) Calculate the dynamic embedding vector according to formulas (10) to (11), , (10) , (11) According to formula (12), the dynamic auxiliary adjacency matrix is ​​calculated. , (12) in, For the The dynamic mask vector at each moment, is a graph convolutional network, For the The first dynamic embedding vector at the moment, For the The second dynamic embedding vector at time t, and are the first node embedding vector and the second node embedding vector respectively, To adjust the parameters, For the Dynamic auxiliary adjacency matrix at all times, is the activation function.

[0011] Optionally, obtaining the real-time trajectory data of the vehicle according to the real-time predicted distribution data includes: Initialize the car number; Acquiring continuous predicted distribution data according to the real-time predicted distribution data; According to formulas (13) to (15), a mapping relationship between the vehicle number and the continuous prediction distribution data is established. , (13) , (14) , (15) in, For the Continuous forecast distribution data at time, No. Continuous forecast distribution data at time, No. Continuous forecast distribution data at time, is the prediction time step, For the The position of the car at time 0, The continuous predictive distribution data Moment The location data of each car on the map, is the number of trolleys running on the track, The continuous predictive distribution data The position data of the first car in the map at that moment, The continuous predictive distribution data The position data of the second car in the map at this moment, The continuous predictive distribution data Moment The position data of each car in the map; According to formula (16), the depth-first search algorithm is used to calculate the set of predicted moving positions of the car for the continuous predicted distribution data at adjacent moments. , (16) in, is a depth-first search algorithm with moving distance constraints, The continuous predictive distribution data Moment The location data of each car in the map, collection Corresponding to the set of points that the car may move to under the movement distance constraint, for The number of points that the car matches, It is the first point position that the car may move to under the movement distance constraint. is the last point position that the car may move to under the movement distance constraint. is the index number, is the number of matching points; assigning a movement relationship to the set of predicted movement positions; Update the car's position according to formula (17): , (17) in, For the Moment The point position of the car, For the Moment The point position of the car, This is the function for updating the car's position; The continuous trajectory data of the vehicle is obtained according to the point positions.

[0012] Optionally, assigning a movement relationship to the set of predicted movement positions includes: According to formula (18), the Hungarian algorithm is used to assign movement relations to the predicted movement position set. , (18) According to formula (19), the rationality constraint is determined. , , (19) in, is the Hungarian algorithm with rationality constraints, is the moving relationship of the continuous forecast distribution data at adjacent moments, is the mobile relation set, A function to solve the order in which two points pass through the track.

[0013] Optionally, calculating a track congestion index based on the real-time trajectory data and performing a congestion warning includes: Designate areas prone to congestion as arterial roads in the track; The average stagnation time in the trunk road is calculated according to formula (20): , (20) in, For the Moment The average dwell time of cars on the main road, For the Main road, For the time, For the The first trunk road When a small car enters the main road, For the The number of cars on the main road; Get the historical trajectory data of the car; Acquire a collection of historical trajectory data of non-congested vehicles according to the historical trajectory data of the vehicles; According to formula (21), the historical congestion index is calculated. ,(twenty one) in, No congestion Moment Moment The point position of the car, is the calculation function of the average stagnation time in the trunk road, is a historical congestion indicator; According to formula (22), kernel density estimation is used to fit the historical congestion index data to obtain the distribution function. ,(twenty two) in, is the distribution function, is the kernel function, is the bandwidth coefficient, is the number of samples of historical congestion indicators, is a historical congestion indicator, The first sample point Historical congestion indicators; Calculating a probability density curve according to the distribution function; A congestion threshold is determined according to the probability density curve.

[0014] Optionally, calculating a track congestion index based on the real-time trajectory data and performing a congestion warning further includes: Calculating a real-time track congestion index based on the real-time trajectory data; According to formula (23), congestion warning judgment is made. ,(twenty three) in, is the congestion warning function, is a real-time congestion indicator. is the congestion threshold.

[0015] On the other hand, the present invention provides a logistics congestion warning system based on spatiotemporal coupling and trajectory matching, the system including a processor for executing any of the warning methods described above.

[0016] Through the above technical solution, the present invention provides a cigarette box logistics congestion warning method and system based on time-space coupling and intelligent trajectory matching. In a data-driven manner, the historical data of the distribution of small cars in actual cigarette box transportation is used to establish a distribution prediction network model based on graph convolutional networks and recurrent networks, and to mine the time-space coupling relationship between distribution data. During online monitoring, the real-time distribution of small cars is input into the distribution prediction network to obtain real-time predicted distribution data, and continuous predicted distribution data is obtained based on the real-time predicted distribution data. At the same time, based on the depth-first search and the Hungarian algorithm, the distance constraints and rationality constraints during the operation of the small cars are integrated. The movement information of each small car can be matched from the distribution of small cars at adjacent moments, and then the continuous predicted distribution data can be converted into the trajectory of the small cars. Finally, the traffic efficiency and congestion index of the small cars in the track are calculated through the running trajectory of the small cars, and congestion warning is realized. This method effectively predicts the future trajectory of vehicles by mining the spatiotemporal coupling relationship of vehicle trajectories and integrating the rationality constraints and distance constraints in the vehicle trajectories. Without relying on scheduling information, it realizes congestion warning of logistics vehicles and provides clear explanation for whether vehicles are in congestion.

[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings: Figure 1 is a flowchart of an early warning method according to one embodiment of the present invention.

[0019] Figure 2 is a flowchart of constructing and training a distribution prediction network model according to one embodiment of the present invention; Figure 3 is a flow chart for obtaining historical real distribution data of vehicles according to one embodiment of the present invention; Figure 4 is a flowchart of constructing a distribution prediction network model based on a graph convolutional network and a recurrent network according to one embodiment of the present invention; Figure 5 is a flow chart of generating a dynamic auxiliary adjacency matrix according to one embodiment of the present invention; Figure 6 is a flow chart of obtaining real-time trajectory data of a vehicle according to one embodiment of the present invention; Figure 7 is a flow chart of assigning movement relationships to a set of predicted movement positions according to one embodiment of the present invention; Figure 8 is a flow chart of performing congestion warning based on congestion indicators according to one embodiment of the present invention; Figure 9 This is a real distribution diagram of logistics vehicles in the tobacco factory's blending and flavoring process according to one embodiment of the present invention; Figure 10 is a schematic diagram of prediction results of a distribution prediction model according to one embodiment of the present invention; Figure 11 is a congestion index prediction verification diagram according to one embodiment of the present invention; Figure 12 This is a congestion warning signal prediction verification diagram according to one embodiment of the present invention. DETAILED DESCRIPTION

[0020] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.

[0021] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application are in compliance with the relevant provisions of laws and regulations. In the embodiments of this application, certain software, components, models, and other existing solutions in the industry may be mentioned. These should be considered as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but it does not mean that the applicant has or will necessarily use such solutions.

[0022] Figure 1 FIG. 1 is a flow chart of an early warning method according to an embodiment of the present invention. In the figure, the early warning method includes: In step S1, the real-time distribution data of the cigarette box logistics cart is obtained.

[0023] In step S2, a distribution prediction network model is constructed and trained.

[0024] In step S3, the real-time distribution data is input into the prediction network model to obtain real-time predicted distribution data.

[0025] In step S4, the real-time trajectory data of the vehicle is obtained based on the real-time predicted distribution data.

[0026] In step S5, the track congestion index is calculated based on the real-time trajectory data, and a congestion warning is issued. Quantifying track congestion is a prerequisite for sensing congestion conditions and issuing congestion warnings. In urban road traffic models, various artificially designed congestion indicators are often used to describe road congestion, such as average speed and road occupancy ratio. For one-way tracks used by small vehicles in actual production, a congestion indicator that can characterize the degree of track congestion can be designed based on road congestion indicators.

[0027] In the process of blending and flavoring in tobacco factories, logistics carts are used to transport tobacco box materials. The carts are arranged by scheduling information and run along fixed tracks to carry out transportation tasks. Figure 9As shown, the carts are distributed along a fixed, one-way track and run along the track according to the scheduling tasks. There are a total of 34 carts on the track, equipped with 147 point sensors that record the presence of a cart at the current point. Due to defects in the inherent scheduling planning, the track is prone to congestion, which prevents the carts from carrying cigarette boxes to the transportation line in a timely manner, causing interruptions and affecting product quality and production efficiency. In steps S1 to S5, the real-time distribution data of the cigarette box logistics carts is input into the distribution prediction network model to predict the real-time predicted distribution data for the future time. Based on the real-time predicted distribution data, real-time trajectory data and congestion indicators are obtained to provide congestion warnings. Compared with the existing technology, this method effectively predicts the future travel trajectory of the carts, realizes congestion warnings for the logistics carts without relying on scheduling information, and provides clear and interpretable information on whether the carts are in congestion. By quantifying the congestion status of the track, the present invention can greatly reduce the reliance on manual judgment, provide early warnings of impending congestion, and facilitate the establishment of a smarter and more efficient production line.

[0028] In step S2, a distribution prediction network model is constructed and trained. There are many ways to construct and train the distribution prediction network model known to those skilled in the art. In one example of the present invention, the method for constructing and training the distribution prediction network model can be as follows: Figure 2 The method shown in Figure 2 In the early warning method, the early warning method includes: In step S21, the historical real distribution data of the vehicles is obtained.

[0029] In step S22, the historical real distribution data is divided into a training set and a test set. The training set and the test set are constructed from the historical real distribution data of the continuous car, including: Construct the training set and test set according to formulas (24) to (25), ,(twenty four) , (25) in, For the Time data, is the length of the training set or test set, is the time step for model prediction, 、 The model input data and labels for the training set and test set are respectively. In the present invention, , using one week's worth of data to build a dataset, , the unit is the time point, which means using the current distribution state to predict the distribution state two minutes in the future.

[0030] In step S23, a distribution prediction network model is constructed based on the graph convolutional network and the recurrent network. The training set is input into the distribution prediction network model for training to obtain historical predicted distribution data. The distribution prediction network model constructed by the graph convolutional network and the recurrent network mines the spatiotemporal coupling relationship between the distribution data.

[0031] In step S24, the cross entropy loss function is calculated according to formula (1), , (1) in, is the cross entropy loss function, is the historical true distribution vector Dimensions, and are the historical real distribution vector and the historical predicted distribution vector respectively. In the present invention, .

[0032] In step S25, backpropagation training is performed based on the cross-entropy loss function to update the distribution prediction network model parameters. The backpropagation algorithm is used to train the entire network by minimizing the loss function. Multiple training rounds are repeated to obtain the final distribution prediction network model. The number of training rounds can be 30.

[0033] In step S26, the test set is input into the distribution prediction network model to evaluate the performance indicators of the model.

[0034] Existing methods for establishing traffic models can be divided into two categories. The first is a simulated traffic model based on scheduling information, which relies on actual vehicle operation plans to simulate the vehicle's operating status. However, in practical applications, there is often a lack of clear vehicle scheduling information data, making it difficult to establish an accurate simulated traffic model. At the same time, scheduling instructions only represent ideal traffic scheduling plans and cannot represent the actual vehicle logistics operation conditions. Simulated traffic models are only suitable for traffic trajectory prediction problems under ideal conditions and cannot cope with interference caused by unexpected emergencies. For example, a vehicle failure during operation may also cause congestion. The simulated traffic model can only simulate traffic based on the given scheduling information and cannot simulate the impact of vehicle failures. The second is a data-driven model based on traffic data. By mining the potential traffic patterns in historical data, it can capture the operating rules and dynamic changes of vehicles under various conditions, thereby realizing the prediction of vehicle traffic status.

[0035] In steps S21 through S26, a distribution prediction model is constructed by combining a graph convolutional network with a recurrent network. This effectively exploits the spatiotemporal coupling of the vehicle distribution data. A multidimensional cross-entropy loss function is used to directly optimize the probability difference between the true and predicted distributions, bringing the predicted distribution closer to the true distribution. Finally, an independent test set is used to evaluate the model's generalization performance, ensuring the practicality and robustness of the prediction results. Data show that after 30 rounds of training, the distribution prediction network model can consistently output highly accurate predictions for the vehicle distribution prediction task, significantly improving the accuracy and robustness of spatiotemporal distribution predictions in complex scenarios.

[0036] When obtaining the historical real data of the car, it is necessary to pre-process the data to improve the data quality and provide a reliable data basis for subsequent analysis. Therefore, in this embodiment, the step of obtaining the historical real distribution data of the car can be as follows: Figure 3 As shown in the figure, the steps of obtaining the historical real distribution data of the car include: In step S211, the position data of each trolley during operation is collected based on the relationship between the trolley and the corresponding measuring points. The position data of each trolley during operation is collected from the database of the cigarette box transportation production line based on the relationship between the trolley and the corresponding measuring points.

[0037] In step S212, the placeholder data is cleaned and outliers are removed. The data sampling period is 10 seconds. The collected data is cleaned and data from non-production periods is deleted.

[0038] In step S213, the occupancy data of the cars at the same time are aggregated according to formula (2) to obtain the historical real distribution data of the cars. , (2) In step S214, the historical real distribution data is time-series expanded according to formula (3). , (3) in, is the time data, For the The historical real distribution data of the car at this moment is a 147-dimensional vector. For the Moment The location data of each car on the map, For or calculate, is the number of cars and In the present invention, 34 trolleys are fixed on the track for operation. For the The historical real distribution data of the car after the time series expansion, For the The historical real distribution data of the car at the moment, For the The historical real distribution data of the car at the moment, is the sliding window length, in the present invention Furthermore, for the obtained real-time distribution data of the cigarette box logistics carts, the real-time distribution data through the data sliding window can also be time-series expanded according to step S211 to step S214, and the real-time distribution data of the carts after time-series expansion is used as the input of the distribution prediction network model.

[0039] In steps S211 to S214, the real-time distribution data and historical distribution data of the vehicles are respectively expanded in time series through the data sliding window, and the isolated instantaneous distribution is converted into a continuous spatiotemporal sequence, providing a more comprehensive and reliable data basis for subsequent congestion warning.

[0040] Furthermore, there are many ways to construct a distribution prediction network model known to those skilled in the art. In one example of the present invention, a distribution prediction network model can be constructed based on a graph convolutional network and a recurrent network. Specifically, it can be Figure 4 The method shown in Figure 4 In the method, the method comprises: In step S231, a static adjacency matrix is ​​determined based on the actual connectivity relationship in the trolley track. Specifically, it includes: Determine each element in the static adjacency matrix according to formula (26), , (26) in, is the first in the static adjacency matrix Rank The elements of the column define the static adjacency matrix as , each element in the matrix is .

[0041] In step S232, a graph convolutional network is used to extract spatial coupling information to generate a dynamic auxiliary adjacency matrix.

[0042] In step S233, the gate recurrent unit is used to recursively calculate the latent variable according to formulas (4) to (7). , (4) , (5) , (6) , (7) Among them, the parameters It is divided into update gate, reset gate and hidden state gate in the GRU model framework. is the activation function, is a graph convolutional model, are learnable parameters, and the superscript , To use a static adjacency matrix as input to a graph convolutional model, To use the dynamic auxiliary adjacency matrix as the input of the graph convolutional model, For the The latent variable at time, For the The latent variable at time, For data splicing, Calculate the Hadamard product, is the activation function.

[0043] In step S234, the latent variables are input into the multilayer perceptron network according to formula (8) to obtain historical prediction distribution data. , (8) in, is a multi-layer perceptron network, For historical forecast distribution data, the model input data for time series expansion is calculated cyclically, latent variables are calculated, and model output is calculated.

[0044] In steps S231 to S234, efficient spatiotemporal distribution prediction is achieved through the collaborative cooperation of graph convolutional networks and recurrent networks. An auxiliary adjacency matrix is ​​dynamically generated based on the graph convolutional network to capture the real-time spatial coupling relationship between nodes, making up for the problem that the static adjacency matrix is ​​not adaptable enough to dynamic scenes; the recurrent network integrates the static adjacency matrix and the dynamic adjacency matrix to update the latent variables and enhance the temporal dependency modeling capability. Finally, the prediction results are output through the multi-layer perceptron network, achieving accurate prediction of the predicted distribution data. Figure 9 As shown in the figure, the forecast distribution data at a certain moment is shown.

[0045] Furthermore, the method for generating the dynamic auxiliary adjacency matrix can be various methods known to those skilled in the art. In one example of the present invention, the method for generating the dynamic auxiliary adjacency matrix can be as follows: Figure 5 The method shown. Figure 5 In the early warning method, the early warning method includes: A graph convolutional network is used to extract spatial coupling information to generate a dynamic auxiliary adjacency matrix, including: In step S2321, the dynamic mask vector is calculated according to formula (9): , (9) Calculate the dynamic embedding vector according to formulas (10) to (11), , (10) , (11) According to formula (12), the dynamic auxiliary adjacency matrix is ​​calculated. , (12) in, For the The dynamic mask vector at each moment, is a graph convolutional network, For the The first dynamic embedding vector at the moment, For the The second dynamic embedding vector at time t, and are the first node embedding vector and the second node embedding vector respectively, To adjust the parameters, For the Dynamic auxiliary adjacency matrix at all times, is the activation function. In the present invention, .

[0046] In steps S2321 to S2323, the spatial dependencies of temporal changes are first captured using a dynamic mask vector, combining the current input and the previous hidden state. Next, two dynamic embedding vectors are calculated, and the mask vectors and node embeddings are mapped using a nonlinear activation function. Finally, a dynamic auxiliary adjacency matrix is ​​calculated. By performing dot products and transformations on the relationships between the embedding vectors, the interdependencies between nodes are captured. This method effectively models the complex dynamic characteristics of spatiotemporal data.

[0047] In this embodiment, the travel trajectory of each car is obtained from the continuous car distribution data, specifically, it can be as follows Figure 6 The method shown. Figure 6 In the method for obtaining the real-time trajectory data of the vehicle according to the real-time predicted distribution data, the method may include: In step S41, the vehicle number is initialized.

[0048] In step S42, continuous predicted distribution data is obtained based on the real-time predicted distribution data. Through the time-forward sliding window prediction, continuous vehicle distribution data at future moments can be obtained, specifically including: According to formulas (27) to (28), the real-time prediction distribution data after time series expansion is obtained through sliding windows. , (27) , (28) in, is a set of real-time prediction distribution data after time series expansion. For the Real-time prediction distribution data after time series expansion, For the Real-time prediction distribution data after time series expansion, For the Real-time prediction distribution data after time series expansion, For the Continuous forecast distribution data at time, For the Continuous forecast distribution data at time, For the Continuous predictive distribution data at time instant.

[0049] Get the distribution data of the last moment , then the continuous car distribution data at future moments can be obtained through the forward sliding window prediction.

[0050] In step S43, a mapping relationship between the vehicle number and the continuous prediction distribution data is established according to formulas (13) to (15). , (13) , (14) , (15) in, For the Continuous forecast distribution data at time, No. Continuous forecast distribution data at time, No. Continuous forecast distribution data at time, is the prediction time step, For the The position of the car at time 0, The continuous predictive distribution data Moment The location data of each car on the map, is the number of trolleys running on the track, The continuous predictive distribution data The position data of the first car in the map at that moment, The continuous predictive distribution data The position data of the second car in the map at this moment, The continuous predictive distribution data Moment The location data of each car on the map, Taken from , Taken from ...and so on and so forth.

[0051] In step S44, the continuous prediction distribution data at adjacent moments are used to calculate the set of predicted moving positions of the car using the depth-first search algorithm according to formula (16). , (16) in, is a depth-first search algorithm with moving distance constraints, The continuous predictive distribution data Moment The location data of each car in the map, collection Corresponding to the set of points that the car may move to under the movement distance constraint, for The number of points that the car matches, It is the first point position that the car may move to under the movement distance constraint. is the last point position that the car may move to under the movement distance constraint. is the index number, is the number of matching points. and , using the depth-first search method with movement distance constraints, the search obtains the movement relationship set of the car at that moment, that is, In the moment The corresponding car is in the Possible locations to move to at any time .

[0052] In step S45 , a movement relationship is assigned to the set of predicted movement positions.

[0053] In step S46, the point position of the car is updated according to formula (17), , (17) in, For the Moment The point position of the car, For the Moment The point position of the car, This is the function for updating the car's position.

[0054] According to formula (29), the update function is determined. , (29) In step S47, the continuous trajectory data of the car is obtained based on the point position. The real-time continuous prediction data is matched with the car movement relationship and the car position is updated to obtain the predicted trajectory of the car.

[0055] In steps S41 to S47, a sliding window technique is used to perform time series expansion on real-time data, thereby obtaining continuous vehicle distribution data for future moments. Next, by establishing a mapping relationship between vehicle numbers and predicted distribution data, combined with a depth-first search algorithm, the set of possible movement positions for each vehicle is calculated, and precise positioning is performed based on movement distance constraints. Finally, by updating the vehicle's point position, continuous predicted trajectory data is obtained, enabling the present invention to accurately predict the vehicle's movement trajectory.

[0056] Furthermore, the manner of assigning a movement relationship to a set of predicted movement positions may be various manners known to persons skilled in the art. In one example of the present invention, the manner of assigning a movement relationship to a set of predicted movement positions may be as follows: Figure 7 The method shown in Figure 7 In the method, the method comprises: In step S451, the Hungarian algorithm is used to assign movement relations to the predicted movement position set according to formula (18). , (18) In step S452, the rationality constraint is determined according to formula (19): , , (19) in, is the Hungarian algorithm with rationality constraints, It is the moving relationship of the continuous prediction distribution data at adjacent moments, indicating the movement from the point position Move to point position The mobile relationship, is the mobile relation set, To solve the function of the order of two points passing through the track. For each point distribution with a collection of potential mobile locations , the Hungarian algorithm can assign it a set of mobile relations ,express The corresponding car is in Time moves to After obtaining the moving relationship using the Hungarian algorithm, a rationality check is performed. The rationality here means that in a one-way track, the car in the front row of the track will always be in front of the car in the back row. Move to under the moving distance constraint If the position is, it returns 1, otherwise if it can be Move to under the moving distance constraint If the position of the moving relationship is not found, -1 is returned, otherwise 0 is returned. If the rationality check of the moving relationship fails, the matching is repeated.

[0057] In step S451 to step S452, by combining the depth-first search and the Hungarian algorithm, the distance constraints and rationality constraints during the operation of the car are integrated, and the movement information of each car can be matched from the car distribution at adjacent moments, and then the predicted car distribution data can be converted into car trajectories.

[0058] In this embodiment, a congestion index representing the degree of track congestion can be calculated based on the vehicle trajectory in the historical data, and then a congestion warning can be issued based on the congestion index. Figure 8 As shown, the following steps may be included: In step S51 , areas prone to congestion in the track are classified as main roads.

[0059] In step S52, the average stagnation time in the trunk road is calculated according to formula (20): , (20) in, For the Moment The average dwell time of cars on the main road, For the Main road, For the time, For the The first trunk road When a small car enters the main road, For the The number of cars on the main road.

[0060] In step S53, the historical trajectory data of the vehicle is obtained.

[0061] In step S54, a collection of historical trajectory data of non-congested vehicles is obtained based on the historical trajectory data of the vehicles.

[0062] In step S55, the historical congestion index is calculated according to formula (21): ,(twenty one) in, No congestion Moment Moment The point position of the car, is the calculation function of the average stagnation time in the trunk road, It is a historical congestion indicator.

[0063] In step S56, kernel density estimation is used to fit the historical congestion index data according to formula (22) to obtain the distribution function. ,(twenty two) in, is the distribution function, is the kernel function, is the bandwidth coefficient, is the number of samples of historical congestion indicators, is a historical congestion indicator, The first sample point Historical congestion indicators.

[0064] In step S57 , a probability density curve is calculated according to the distribution function.

[0065] In step S58, the congestion threshold is determined based on the probability density curve. After calculating the probability density curve, the value at the 95% quantile is taken as the congestion threshold. In the present invention, the congestion threshold is divided into The average stagnation time is 150 seconds. When the average stagnation time exceeds 150 seconds, the track is considered to be congested.

[0066] In steps S51 to S58, the average stagnation time within the main roads is calculated, and the congestion status of different main roads at different times is obtained. Kernel density estimation is then used to fit historical data to obtain the distribution of congestion indicators. Warning criteria are then determined based on the congestion thresholds in the historical data. Combined with the real-time predicted trajectory data, the congestion indicator at the predicted time is calculated. If the predicted congestion indicator exceeds the congestion threshold, a congestion warning is triggered. This method enables real-time monitoring of rail transit congestion and provides early warnings.

[0067] Furthermore, the track congestion index is calculated based on the real-time trajectory data and congestion warning is issued, which also includes: In step S59 , a real-time track congestion index is calculated based on the real-time trajectory data.

[0068] In step S510, congestion warning judgment is performed according to formula (23): ,(twenty three) in, is the congestion warning function, is a real-time congestion indicator. is the congestion threshold.

[0069] In steps S59 to S510, Indicates that the predicted future rail transit congestion requires early warning. Indicates that the predicted future rail transit will not be congested and no warning is needed. In the present invention, the test data time length used is 5000 seconds, of which the track is obviously congested after 3200 seconds. This method is used to verify the congestion warning, such as Figure 11 As shown in , it can be seen that when congestion occurs, the designed congestion index increases significantly. Figure 12 As shown, this method can provide a two-minute advance warning of congestion, with the difference between the predicted warning signal and the actual warning signal within 10 seconds. Compared to the traditional method of manually determining whether congestion is present, this method can intelligently predict the distribution of small vehicles and clearly perceive the congestion status. By providing early warning of track congestion, it can effectively assist on-site workers in regulating the mixing flow, reducing the risk of flow interruption and improving product quality.

[0070] On the other hand, the present invention provides a logistics congestion warning system based on spatiotemporal coupling and trajectory matching, the system including a processor for executing any of the above-mentioned warning methods.

[0071] Through the above technical solution, the present invention provides a cigarette box logistics congestion warning method and system based on time-space coupling and intelligent trajectory matching. In a data-driven manner, the historical data of the distribution of small cars in actual cigarette box transportation is used to establish a distribution prediction network model based on graph convolutional networks and recurrent networks, and to mine the time-space coupling relationship between distribution data. During online monitoring, the real-time distribution of small cars is input into the distribution prediction network to obtain real-time predicted distribution data, and continuous predicted distribution data is obtained based on the real-time predicted distribution data. At the same time, based on the depth-first search and the Hungarian algorithm, the distance constraints and rationality constraints during the operation of the small cars are integrated. The movement information of each small car can be matched from the distribution of small cars at adjacent moments, and then the continuous predicted distribution data can be converted into the trajectory of the small cars. Finally, the traffic efficiency and congestion index of the small cars in the track are calculated through the running trajectory of the small cars, and congestion warning is realized. This method effectively predicts the future trajectory of vehicles by mining the spatiotemporal coupling relationship of vehicle trajectories and integrating the rationality constraints and distance constraints in the vehicle trajectories. Without relying on scheduling information, it realizes congestion warning of logistics vehicles and provides clear explanation for whether vehicles are in congestion.

[0072] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0073] The above are merely embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.

Claims

1. A logistics congestion warning method based on spatiotemporal coupling and trajectory matching, characterized by: The early warning method includes: Obtain real-time distribution data of cigarette box logistics vehicles; Build and train distribution prediction network models; inputting the real-time distribution data into the prediction network model to obtain real-time predicted distribution data; Acquire the real-time trajectory data of the vehicle according to the real-time predicted distribution data; A track congestion index is calculated based on the real-time trajectory data and a congestion warning is issued.

2. The early warning method according to claim 1, characterized in that: Build and train a distribution prediction network model, including: Obtain the historical real distribution data of the cars; Dividing the historical real distribution data into a training set and a test set; Constructing a distribution prediction network model based on a graph convolutional network and a recurrent network, and inputting the training set into the distribution prediction network model for training to obtain historical prediction distribution data; The cross entropy loss function is calculated according to formula (1), ,(1) in, is the cross entropy loss function, is the historical true distribution vector Dimensions, and are the historical real distribution vector and the historical predicted distribution vector respectively. The value of the dimension. Perform back propagation training according to the cross entropy loss function to update the distribution prediction network model parameters; The test set is input into the distribution prediction network model to evaluate the performance indicators of the model.

3. The early warning method according to claim 2, characterized in that: Obtain the historical real distribution data of the car, including: Collect the occupancy data of each car during operation according to the relationship between the car and the corresponding measuring points; Performing data cleaning and outlier removal on the placeholder data; According to formula (2), the occupancy data of the cars at the same time are aggregated to obtain the historical real distribution data of the cars. ,(2) According to formula (3), the historical real distribution data is time-series expanded. ,(3) in, is the time data, For the The historical real distribution data of the car at that moment, For the Moment The location data of each car on the map, For or calculate, is the number of cars, For the The historical real distribution data of the car after the time series expansion, For the The historical real distribution data of the car at the moment, For the The historical real distribution data of the car at the moment, is the sliding window length.

4. The early warning method according to claim 3, characterized in that: A distribution prediction network model is constructed based on a graph convolutional network and a recurrent network, and the test set is input into the distribution prediction network model for training to obtain historical prediction distribution data, including: Determine the static adjacency matrix based on the actual connectivity relationship in the trolley track; A graph convolutional network is used to extract spatial coupling information to generate a dynamic auxiliary adjacency matrix; According to formulas (4) to (7), the gate recurrent unit is used to calculate the latent variable, ,(4) ,(5) ,(6) ,(7) Among them, the parameters It is divided into update gate, reset gate and hidden state gate in the GRU model framework. is the activation function, is a graph convolutional model, are learnable parameters, and the superscript , To use a static adjacency matrix as input to a graph convolutional model, To use the dynamic auxiliary adjacency matrix as the input of the graph convolutional model, For the The latent variable at time, For the The latent variable at time, For data splicing, Calculate the Hadamard product, is the activation function; According to formula (8), the latent variables are input into the multi-layer perceptron network to obtain historical prediction distribution data. ,(8) in, is a multi-layer perceptron network, For historical forecast distribution data.

5. The early warning method according to claim 4, characterized in that: A graph convolutional network is used to extract spatial coupling information to generate a dynamic auxiliary adjacency matrix, including: Calculate the dynamic mask vector according to formula (9), ,(9) Calculate the dynamic embedding vector according to formulas (10) to (11), ,(10) ,(11) According to formula (12), the dynamic auxiliary adjacency matrix is ​​calculated. ,(12) in, For the The dynamic mask vector at each moment, is a graph convolutional network, For the The first dynamic embedding vector at the moment, For the The second dynamic embedding vector at time t, and are the first node embedding vector and the second node embedding vector respectively, To adjust the parameters, For the Dynamic auxiliary adjacency matrix at all times, is the activation function.

6. The early warning method according to claim 5, characterized in that: Acquiring the real-time trajectory data of the vehicle according to the real-time predicted distribution data includes: Initialize the car number; Acquiring continuous predicted distribution data according to the real-time predicted distribution data; According to formulas (13) to (15), a mapping relationship between the vehicle number and the continuous prediction distribution data is established. ,(13) ,(14) ,(15) in, For the Continuous forecast distribution data at time, No. Continuous forecast distribution data at time, No. Continuous forecast distribution data at time, is the prediction time step, For the The position of the car at time 0, The continuous predictive distribution data Moment The location data of each car on the map, is the number of trolleys running on the track, The continuous predictive distribution data The position data of the first car in the map at that moment, The continuous predictive distribution data The position data of the second car in the map at this moment, The continuous predictive distribution data Moment The position data of each car in the map; According to formula (16), the depth-first search algorithm is used to calculate the set of predicted moving positions of the car for the continuous predicted distribution data at adjacent moments. ,(16) in, is a depth-first search algorithm with moving distance constraints, The continuous predictive distribution data Moment The location data of each car in the map, collection Corresponding to the set of points that the car may move to under the movement distance constraint, for The number of points that the car matches, It is the first point position that the car may move to under the movement distance constraint. is the last point position that the car may move to under the movement distance constraint. is the index number, is the number of matching points; assigning a movement relationship to the set of predicted movement positions; Update the car's position according to formula (17): ,(17) in, For the Moment The point position of the car, For the Moment The point position of the car, This is the function for updating the car's position; The continuous trajectory data of the vehicle is obtained according to the point positions.

7. The early warning method according to claim 6, characterized in that: Assigning a movement relationship to the set of predicted movement positions includes: According to formula (18), the Hungarian algorithm is used to assign movement relations to the predicted movement position set. ,(18) According to formula (19), the rationality constraint is determined. , ,(19) in, is the Hungarian algorithm with rationality constraints, is the moving relationship of the continuous forecast distribution data at adjacent moments, is the mobile relation set, A function to solve the order in which two points pass through the track.

8. The early warning method according to claim 1, characterized in that: Calculating track congestion indicators and issuing congestion warnings based on the real-time trajectory data includes: Designate areas prone to congestion as arterial roads in the track; The average stagnation time in the trunk road is calculated according to formula (20): ,(20) in, For the Moment The average dwell time of cars on the main road, For the Main road, For the time, For the The first trunk road When a small car enters the main road, For the The number of cars on the main road; Get the historical trajectory data of the car; Acquire a collection of historical trajectory data of non-congested vehicles according to the historical trajectory data of the vehicles; According to formula (21), the historical congestion index is calculated. ,(21) in, No congestion Moment Moment The point position of the car, is the calculation function of the average stagnation time in the trunk road, is a historical congestion indicator; According to formula (22), kernel density estimation is used to fit the historical congestion index data to obtain the distribution function. ,(22) in, is the distribution function, is the kernel function, is the bandwidth coefficient, is the number of samples of historical congestion indicators, is a historical congestion indicator, The first sample point Historical congestion indicators; Calculating a probability density curve according to the distribution function; A congestion threshold is determined according to the probability density curve.

9. The early warning method according to claim 8, characterized in that: Calculating the track congestion index based on the real-time trajectory data and issuing a congestion warning also includes: Calculating a real-time track congestion index based on the real-time trajectory data; According to formula (23), congestion warning judgment is made. ,(23) in, is the congestion warning function, is a real-time congestion indicator. is the congestion threshold.

10. On the other hand, the present invention provides a logistics congestion warning system based on spatiotemporal coupling and trajectory matching, the system comprising a processor for executing the warning method according to any one of claims 1 to 9.