A method and device for measuring and calculating the expected driving time of a port vehicle
By using the iterative probability distribution extrapolation method of the Actor distributed parallel computing model, the problem of insufficient initial accuracy in the calculation of the estimated travel time of vehicles at the terminal is solved, resulting in more accurate calculation results and a stable scheduling system, which is suitable for the real-time calculation needs of large-scale terminal road networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEZHA SMART TECHNOLOGY (SHANGHAI) CO LTD
- Filing Date
- 2026-01-20
- Publication Date
- 2026-05-12
AI Technical Summary
Existing technologies lack initial accuracy when calculating the estimated travel time of vehicles at the dock, resulting in large cumulative errors over long routes, which affects the stability of subsequent route planning and scheduling.
An iterative probability distribution extrapolation method based on the Actor distributed parallel computing model is adopted. By simulating the vehicle driving process and combining the density and vehicle characteristics, spatiotemporal extrapolation and probability merging are performed to generate a more accurate estimated driving time.
It improved the accuracy of initial calculations, reduced the frequency of subsequent path planning and scheduling adjustments, enhanced the continuity and stability of the production scheduling system, and ensured the real-time computing capability of large-scale port road networks.
Smart Images

Figure CN121543856B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of route planning technology, and more specifically, to a method and apparatus for calculating the estimated travel time of vehicles at a dock. Background Technology
[0002] In port loading and unloading operations, improving the efficiency of individual machines and shortening the time ships spend in port are the core objectives. To this end, existing technical solutions focus on optimizing horizontal transport tasks in production scheduling. By searching for the fastest travel routes for vehicles, operations are connected nearby, and the coordination between vehicles and loading and unloading equipment is optimized to maintain operational continuity and avoid interruptions, thereby achieving the goal of shortening the time ships spend in port and improving overall operational efficiency.
[0003] The foundation for the efficient implementation of these technical solutions lies in the accurate and real-time calculation of the estimated travel time of vehicles at the port from the origin to the destination. For example, invention patent CN120489165B discloses a method and device for searching the fastest travel path for port vehicles. This method constructs Actor instances for intersections and lanes based on an Actor distributed parallel computing model, mapping them to a directed graph of the port road network. Following instructions, the method extrapolates the entry and exit times of vehicles at each node on the candidate paths in forward or reverse spatiotemporal directions to obtain the estimated travel time for each road segment, ultimately summing them to obtain the total estimated travel time for the entire path.
[0004] Specifically, in this method, the Actor instance corresponding to each travel segment collects and maintains two types of records: one is a time-series record of density fluctuations in seconds, reflecting changes in traffic flow on the road segment; the other is a list of feature combination count records, which counts different travel durations and combinations of transit features and density. When it is necessary to calculate the duration of a certain road segment, the density at the time of vehicle entry is first obtained from the time-series record, and then the record with the same or similar density and vehicle feature combination is searched from the count list. The travel duration with the largest count value is selected as the calculation result for that road segment.
[0005] However, the method described above for selecting the maximum travel time based on the count value is essentially a mode-based statistical approach. This method focuses only on the single value with the highest frequency, ignoring the distribution characteristics and overall dispersion of other data. When the vehicle's travel path is long and includes an increased number of road segments, the accumulated segmented calculation results based on the mode may produce significant cumulative errors. Although this existing technical solution has a flexible fault-tolerance mechanism that can correct the estimated travel time through real-time feedback, with better correction effects closer to the target point, insufficient initial calculation accuracy will lead to frequent corrections and recalculations, increasing the system burden and potentially causing frequent adjustments to task matching and collaborative operation schemes, affecting scheduling stability. Therefore, how to obtain a more accurate and stable estimated travel time from the initial stage, starting with the calculation method itself, to reduce subsequent adjustments, has become a technical problem worthy of improvement. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this invention provides a method and apparatus for calculating the estimated travel time of dock vehicles.
[0007] According to the present invention, a method and apparatus for calculating the estimated travel time of dock vehicles are provided, the scheme of which is as follows:
[0008] Firstly, a method for calculating the estimated travel time of vehicles at a port is provided. Based on the Actor distributed parallel computing model, the method performs spatiotemporal extrapolation of vehicle travel on alternative routes. The method includes:
[0009] S1, in response to the specified departure time, performs a simulation calculation along the forward path starting from the starting point Actor to obtain the first estimated travel time; or,
[0010] S2, in response to the specified arrival time, simulates and calculates the second estimated travel time by starting from the destination Actor and proceeding along the reverse path;
[0011] The simulation calculation includes:
[0012] Based on the statistical distribution of entry time or exit time of the current road segment, obtain the corresponding vehicle density.
[0013] Based on the density and vehicle passage characteristics, the corresponding driving time statistical distribution is obtained from historical records;
[0014] The statistical distribution of driving time is smoothed and normalized.
[0015] The processed driving time statistical distribution is combined with the entry time statistical distribution or exit time statistical distribution by probability to deduce the exit time statistical distribution or entry time statistical distribution of the next road segment.
[0016] This process is repeated until the path endpoint is reached, and the time point with the largest count value is found from the final statistical distribution to calculate the first or second estimated travel time.
[0017] Preferably, the probability merging calculation specifically includes:
[0018] For the forward path, the processed travel time statistical distribution is probabilistically merged with the entry time statistical distribution:
[0019] For each entry time and its corresponding probability in the statistical distribution of entry time, and for each travel time and its corresponding probability in the statistical distribution of travel duration, calculate the exit time and joint probability respectively;
[0020] Wherein, the departure time is the sum of the entry time and the travel duration, and the joint probability is the product of the probability corresponding to the entry time and the probability corresponding to the travel duration; the joint probabilities in all calculation results are summarized to form the statistical distribution of departure time.
[0021] When reversing the route, the processed travel time statistical distribution and the departure time statistical distribution are probabilistically merged:
[0022] For each departure time and its corresponding probability in the statistical distribution of departure time, and for each travel time and its corresponding probability in the statistical distribution of travel duration, calculate the arrival time and joint probability respectively.
[0023] Wherein, the entry time is the difference between the exit time and the travel duration, and the joint probability is the product of the probability corresponding to the exit time and the probability corresponding to the travel duration; the joint probabilities in all calculation results are summed to form the statistical distribution of entry time.
[0024] Preferably, the method for obtaining the statistical distribution of driving time includes:
[0025] Based on the density of vehicles entering the current road segment and the characteristics of vehicle passage, the system queries the historical record list of feature combination count records to obtain the original count values corresponding to different travel durations; the original count values are normalized and converted into probability values to form the statistical distribution of travel durations.
[0026] Preferably, before normalizing the original count values, the method further includes a step of smoothing the corresponding data of the driving time and the original count values;
[0027] The smoothing process includes:
[0028] Calculate the average interval between adjacent travel times in the corresponding data;
[0029] When the actual interval between any two adjacent driving times is greater than the average interval, one or more driving time data points are inserted between the two adjacent driving times so that the interval between the two adjacent data points after insertion is equal to or close to the average interval, and a count value is assigned to the inserted driving time data points by linear interpolation.
[0030] Preferably, the method for obtaining the density of vehicles entering the current road segment includes:
[0031] Determine the interquartile range of the statistical distribution of entry times for the current road segment; for each entry time point within the interquartile range, query the density fluctuation time sequence records to obtain the corresponding vehicle density.
[0032] Preferably, the simulation calculation S2 of the reverse path further includes an iterative verification step:
[0033] Based on the statistical distribution of exit times for the current road segment and an assumed high density of entry times, an statistical distribution of entry times is derived.
[0034] Based on the statistical distribution of the estimated entry time, the actual entry density is retrieved by querying again.
[0035] Calculate the degree of overlap between the assumed traffic density and the actual traffic density;
[0036] If the overlap is less than a predetermined threshold, the actual inbound traffic density is used as the new assumed inbound traffic density, and the above deduction, query and calculation steps are repeated until the overlap reaches or exceeds the predetermined threshold.
[0037] Preferably, if no corresponding data can be found in the historical records based on the density and vehicle passage characteristics, a theoretical travel time is calculated based on the length of the current travel segment and the speed limit, and a travel time statistical distribution is generated, in which the count value corresponding to the theoretical travel time is 1.
[0038] Preferably, the steps of acquiring statistical distribution data, smoothing, normalizing, and merging probabilities involved in the method are all executed using multi-threaded parallel computing technology.
[0039] Secondly, a device for calculating the estimated travel time of dock vehicles is provided, the device comprising:
[0040] Memory, used to store program instructions;
[0041] One or more processors are used to execute the program instructions to implement the method for calculating the estimated travel time of dock vehicles.
[0042] Thirdly, a computer-readable storage medium is provided that stores a computer program, which, when executed by a processor, implements the steps of the method for calculating the estimated travel time of dock vehicles.
[0043] Compared with the prior art, the present invention has the following beneficial effects:
[0044] 1. This invention adopts an iterative deduction method based on complete probability distribution to replace the original mode statistics, fully considers the data distribution characteristics, effectively reduces the cumulative error under long paths, and makes the initial calculation results more accurate;
[0045] 2. The improved initial accuracy of this invention reduces the frequent adjustments and real-time corrections to subsequent path planning and task matching caused by time deviations, thereby enhancing the continuity and stability of the production scheduling system.
[0046] 3. This invention effectively addresses the issue of insufficient historical data samples through a smoothing process, maintaining the data distribution pattern and ensuring the reliability of the iterative deduction process;
[0047] 4. This invention avoids numerical overflow problems in continuous probability multiplication through normalization processing, thus ensuring the numerical stability and performance of large-scale, long-path iterative calculations.
[0048] 5. This invention deeply integrates statistical analysis models with Actor distributed parallel computing and multi-threading technology. While ensuring accuracy, it has the ability to handle the real-time computing needs of high concurrency and large-scale port road networks, and the solution is highly scalable.
[0049] Other beneficial effects of the present invention will be explained in detail through the introduction of specific technical features and technical solutions in specific embodiments. Those skilled in the art should be able to understand the beneficial technical effects brought about by these technical features and technical solutions through the introduction of these technical features and technical solutions. Attached Figure Description
[0050] Other features, objects, and advantages of the present invention will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:
[0051] Figure 1 This is a schematic diagram of the overall process of the present invention. Detailed Implementation
[0052] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make several changes and improvements without departing from the concept of the present invention. These all fall within the protection scope of the present invention.
[0053] This invention provides a method for calculating the estimated travel time of vehicles at a port. Based on an Actor distributed parallel computing model, a port road network simulation environment is built. Through iterative probabilistic statistical deduction, the accuracy of the estimated travel time calculation can be improved while ensuring efficiency. This makes path planning, task matching, and collaborative operations based on estimated travel time data more practical, avoiding operational interruptions and improving the efficiency of port loading and unloading operations. Figure 1 As shown, the method specifically includes the following:
[0054] System architecture and data foundation:
[0055] Before implementing this method, a distributed computing environment based on the Actor model needs to be built. Each key node in the wharf road network (such as intersections, lane start / end points) is modeled as an independent virtual Actor computing unit. These Actor instances are registered and run in a distributed computing managed service cluster (e.g., using cloud-native runtimes such as Dapr), with the cluster responsible for their lifecycle management, addressing, and communication.
[0056] Each actor instance corresponding to a driving segment continuously collects and maintains two types of core historical data records:
[0057] Traffic density fluctuation time series record: Record the traffic density (e.g., number of vehicles) of this road segment at different times in seconds.
[0058] Feature combination count record list: Records the different travel times and the number of times (count values) vehicles spend passing through this road segment under different combinations of vehicle density and different vehicle passing characteristics (such as vehicle type and load status).
[0059] The specific steps of the calculation method are as follows:
[0060] The following is in conjunction with the appendix Figure 1 The flowchart shown illustrates the specific implementation process of this invention in detail. The calculation process is divided into two main lines based on the input conditions (specified departure time or specified arrival time): forward deduction and backward deduction.
[0061] Implementation method 1: Forward spatiotemporal extrapolation of a specified departure time (S1 path);
[0062] When the planned departure time of the vehicle is known, a forward deduction method is used from the starting point of the route to the destination.
[0063] 1. Initialize the starting point statistical distribution: The Actor corresponding to the path's starting point receives the calculation command and the planned departure time T_start. This Actor generates an entry time statistical distribution variable (e.g., a key-value dictionary) and creates a key-value pair: the key is T_start, and the value (count value) is 1. This indicates that the vehicle is confirmed to enter at time T_start.
[0064] 2. Iteratively process each road segment: Starting from the starting point Actor, process the Actor corresponding to each driving segment sequentially along the alternative path.
[0065] a) Obtaining Inbound Traffic Density: The current Actor reads the received inbound time statistical distribution. First, it calculates the interquartile range (IQR) of this distribution, focusing on the main interval of the distribution. For each inbound time point (accurate to the second) within the IQR, a query thread is started to retrieve the vehicle density of the road segment at that moment from the locally maintained "density fluctuation time series record", forming a "inbound time - density" correspondence.
[0066] b) Obtain and process the statistical distribution of driving time: Based on all the non-repeating dense values obtained in the previous step, and the passage characteristics extracted from the vehicle information (such as empty trucks), start a processing thread for each dense value. Within each thread:
[0067] (1) Query the “Feature Combination Count Record List” to find the historical records that are consistent with or most similar to the current density and feature combination.
[0068] (2) Extract the “travel time - count value” data from the records. If no record is found, calculate the theoretical travel time by dividing the road segment length by the speed limit and set the value to 1.
[0069] (3) Smoothing: Calculate the average interval between adjacent durations in the current “driving time - count value” data sequence (the maximum and minimum intervals can be ignored, and a lower limit such as 3 seconds can be set). Traverse the sequence, and if it is found that the interval between adjacent durations is greater than this average interval, then linear interpolation is used to fill in the duration points between the two with an interval equal to the average interval, and the count value calculated by linear interpolation is assigned to them to make the distribution curve smoother and more continuous.
[0070] (4) Normalization: Calculate the sum of all counts, divide the count corresponding to each driving time by the sum, convert it into a probability value (frequency), and make the sum of all probabilities equal to 1. At this time, we get the "probability distribution of driving time" under the condition of density.
[0071] c) Probability merging and deducing the exit time distribution: Based on each entry time point and its probability obtained in step a (provided by the initial distribution), and the corresponding density's travel time probability distribution obtained in step b, probability multiplication and merging are performed. Specifically: for each entry time point and each possible travel time, "exit time = entry time + travel time" is combined, and "joint probability = entry time probability × travel time probability" is calculated. The results of all combinations are summarized, and the joint probabilities of the same exit time are added together, thus generating the "exit time probability distribution" for the current road segment.
[0072] d) Result transmission: The exit time probability distribution generated in step c is used as the input of the entry time probability distribution of the next adjacent road segment Actor, triggering the next Actor to start its calculation process (repeating step ad).
[0073] 3. Generate the final result: When the simulation reaches the destination Actor, that Actor will obtain the final departure time probability distribution. In this distribution, find the departure time point T_arrival_max with the highest probability value (i.e., the highest count value). Then, the estimated travel time of the vehicle on the entire alternative route is: T_arrival_max - T_start.
[0074] Implementation Method 2: Reverse spatiotemporal deduction of a specified arrival time (S2 path);
[0075] When the planned arrival time of a vehicle is known, a reverse deduction method is adopted from the end point of the path to the starting point. Its core steps are symmetrical to the forward deduction, but an iterative verification step is added.
[0076] 1. Initialize the destination statistical distribution: The destination Actor receives the planned arrival time T_end and generates a departure time statistical distribution with T_end as the key and a probability of 1.
[0077] 2. Iterative processing and verification: Starting from the destination Actor, process each road segment in reverse path direction.
[0078] a) Obtaining Outbound Concentration and Hypothetical Inbound Concentration: Similar to the forward inference, the concentration at the time of departure is obtained based on the IQR of the current departure time distribution. At the beginning of the reverse inference, this concentration is also regarded as a preliminary hypothesis about the "inbound concentration" of the upstream segment.
[0079] b) Obtain and process the statistical distribution of driving time: exactly the same as step b in the forward deduction, using the assumed traffic density and vehicle characteristics, query, smooth, and normalize to obtain the probability distribution of driving time.
[0080] c) Probability merging and deducing the entry time distribution: Perform reverse probability merging. The formula is: Entry time = Exit time - Travel time, Joint probability = Exit time probability × Travel time probability. Summarize to generate the "Entry time probability distribution" for the current road segment.
[0081] d) Verification and Iteration: This is the crucial step in the reverse engineering process. Based on the entry time probability distribution derived in step c (taking its IQR), re-query historical time-series records to obtain a set of actual entry density data. Calculate the overlap between this set of actual data and the assumed entry density data in step a (e.g., the proportion of the density at the same time point is the same). If the overlap is lower than a set threshold (e.g., 80%), it indicates a large deviation in the initial hypothesis. In this case, use the actual entry density obtained from this query as the new hypothesis value, jump back to step b, and use the new hypothesis value to re-query the driving time distribution and re-engineer the data. This process is repeated until the overlap meets the threshold requirement, ensuring that the derived statistical distribution is consistent with the historical density data.
[0082] e) Result Reverse Propagation: The verified entry time probability distribution is used as the input of the exit time probability distribution of the previous adjacent (reverse path direction) segment Actor, triggering the previous Actor to start calculation (repeating step ae, including the verification loop).
[0083] 3. Generate the final result: After the reverse engineering reaches the starting point Actor and its verification steps pass, the probability distribution of the entry time at the starting point is obtained. Find the entry time point T_departure_max with the highest probability value. Then the estimated travel time of the vehicle on the entire alternative path is: T_end - T_departure_max.
[0084] Performance optimization guarantee:
[0085] To ensure the feasibility of the above method in a large-scale, real-time port environment, the following performance optimization techniques were adopted during implementation:
[0086] Multi-threaded parallel computing: In the dense query, driving time distribution processing (especially smoothing and normalization), and probability merging calculation in the above steps, multi-threaded parallel processing logic based on key values (such as different time points and different density) is designed to make full use of multi-core CPU computing resources.
[0087] The Actor model operates in a distributed parallel manner: the computation of each road segment is completed independently and asynchronously by its corresponding Actor instance, and they are connected through message passing. This distributed architecture enables the system to scale horizontally, adding computing nodes to cope with larger-scale road networks and higher concurrency computing demands, thus achieving elastic scaling of computing performance.
[0088] The present invention will now be described in more detail.
[0089] The key difference between this invention and existing calculation methods lies in the improvements and optimizations made during the simulation of vehicle travel on alternative paths, as detailed below:
[0090] S1, if a departure point is specified, simulates the process from the starting point Actor along a forward path:
[0091] 1. Using the specified departure time as the planned entry time for the starting point Actor, generate a statistical distribution of "entry time - count value":
[0092] (1) Generate an entry time statistical distribution variable from the starting point Actor. It is a Key-Value dictionary structure used to store the statistical distribution of "entry time - count value". The entry time is accurate to the second.
[0093] (2) Generate a key-value pair for the arrival time statistics distribution, where the key (arrival time) specifies the departure time and the value (count value) is 1, and add it to the arrival time statistics distribution variable;
[0094] 2. Obtain the density at the time of vehicle entry from the density fluctuation time series records second by second within the interquartile range (IQR) of the "entry time-count value" statistical distribution:
[0095] (1) Generate an incoming density data variable from the current Actor. It is a Key-Value dictionary structure used to store the correspondence between "incoming time and density".
[0096] (2) Generate key-value pairs of inbound density data one by one using the key values (inbound time) within the interquartile range (IQR) of the inbound time statistical distribution variable. The key value (inbound time) is filled with the inbound time, and the value value (density) is empty. Add them to the inbound density data variable.
[0097] (3) Start the corresponding thread one by one according to the Key value (entry time) of the data variable of the influx of traffic:
[0098] 1) Within the thread, use the current Key value (entry time) to obtain the density when the vehicle enters from the density fluctuation time sequence record, and overwrite the current Value value (density);
[0099] 2) The threads will release their resources after all threads have finished executing;
[0100] 3. In the feature combination count record list, find records that are consistent with or similar to the density quantity and feature combination, generate a "driving time - count value" statistical distribution that corresponds one-to-one with the density quantity, and perform smoothing and normalization processing:
[0101] (1) Generate a driving time statistics variable from the current Actor. It is a Key-Value dictionary structure used to store the correspondence between "dense quantity - driving time statistics distribution". The Value (driving time statistics distribution) is a Key-Value dictionary structure used to store the statistical distribution between "driving time - count value".
[0102] (2) Take out the unique Value (Dense) from the driving density data variable and generate Key-Value pairs for driving time statistics one by one. Fill the Key (Dense) with the density and leave the Value (Driving Time Statistical Distribution) empty. Add them to the driving time statistics data variable.
[0103] (3) Start the corresponding thread one by one according to the Key value (density) of the driving time statistical data variable:
[0104] 1) Within the thread, using the current Key value (density) and the passing features retrieved from the incoming vehicle message, find records in the feature combination count record list that match or are similar to these combinations;
[0105] 2) Extract the driving time and count value from the found records (if no record is found, calculate a driving time by dividing the driving length by the driving speed limit, and the count value is 1). Generate driving time statistical distribution key-value pairs one by one according to the driving time from small to large. The key value (driving time) is filled with driving time, and the value value (count value) is filled with count value to form a driving time statistical distribution variable;
[0106] 3) Smooth the statistical distribution variable of driving time:
[0107] A. Traverse the key-value pairs of the driving time statistical distribution, take the average interval of adjacent key values (driving time), ignore the maximum and minimum intervals when calculating, and take a value that is not lower than the specified minimum value (e.g., 3 seconds), in seconds;
[0108] B. Traverse the key-value pairs of the driving time statistical distribution. If the interval between adjacent key values (driving time) is greater than the average interval, generate a set of key-value pairs of the driving time statistical distribution where the interval between adjacent key values (driving time) is equal to or close to the average interval. Fill the key values (driving time) with these missing driving times and fill the value values (count values) with the count values calculated by linear interpolation. Add them one by one to the driving time statistical distribution variable.
[0109] 4) Normalize the statistical distribution variable of driving time:
[0110] A. Traverse the key-value pairs of the driving time statistics distribution, and summarize the key values (count values) to obtain the total number of count values;
[0111] B. Traverse the key-value pairs of the travel time statistical distribution and replace the value (count value) with the value divided by the total number of count values, which is equivalent to the probability or frequency of being replaced by the count value;
[0112] 5) Overwrite the driving time statistical distribution variable into the current Value (driving time statistical distribution);
[0113] 6) The threads will continue to release their contents until all threads have finished executing;
[0114] 4. Based on the density data, append the "Driving Time - Count Value" statistical distribution second by second to each entry time under the "Entry Time - Count Value" statistical distribution, generating and summarizing the "Exit Time - Count Value" statistical distributions that correspond one-to-one with the entry times:
[0115] (1) Generate a departure time statistical distribution variable from the current Actor. It is a Key-Value dictionary structure used to store the statistical distribution of "departure time - count value";
[0116] (2) Start the corresponding thread one by one according to the Key value (entry time) of the data variable of the influx of traffic:
[0117] 1) Within the thread, use the current Value (density) to find the corresponding Key (density) Value (driving time statistical distribution) from the driving time statistics variable and iterate through it:
[0118] A. Generate an exit time variable, calculated as follows: Exit time = Enter time + Travel duration. The enter time is the current key value of the enter density data variable (entry time), and the travel duration is the current key value of the travel duration statistical distribution (travel duration).
[0119] B. Generate a count value variable, calculated as follows: Count value = Count value of entry time * Count value of driving duration. The count value of entry time is the value (count value) of the corresponding key value (entry time) found from the entry time statistical distribution variable using the current key value (entry time) of the entry density data variable. The count value of driving duration is the current value (count value) of the driving duration statistical distribution.
[0120] C. Use the departure time variable to find the departure time statistical distribution key-value pairs from the departure time statistical distribution variable:
[0121] a. If found, the count variable is summed into the value (count) of the key-value pair;
[0122] b. If not found, generate a departure time statistical distribution key-value pair, where the key (departure time) is the departure time variable and the value (count value) is the count value variable, and add it to the departure time statistical distribution variable;
[0123] 2) The threads will release their resources after all threads have finished executing;
[0124] 5. If the destination Actor has not yet been simulated, the statistical distribution of "departure time - count value" is used as the statistical distribution of "entry time - count value" for the next Actor and pushed to the next Actor, from which the next Actor returns to step 2 in S1:
[0125] (1) If the current Actor is not the destination Actor, then the exit time statistical distribution variable is used as the entry time statistical distribution variable of the next Actor;
[0126] (2) Push the statistical distribution variable of the entry time to the next Actor, and do not continue the subsequent steps;
[0127] 6. Find the departure time with the largest count value from the statistical distribution of "departure time - count value". Subtract the specified departure time from the departure time to obtain the estimated travel time of the vehicle on the entire alternative route:
[0128] (1) If the current Actor is the destination Actor, then find the departure time with the largest count value from the departure time statistical distribution variable;
[0129] (2) Subtract the specified departure time from the departure time to obtain the estimated travel time of the vehicle on the entire alternative route;
[0130] S2, if a arrival time is specified, simulates the process from the destination Actor in reverse path:
[0131] 1. Using the specified arrival time as the planned departure time for the destination Actor, generate a statistical distribution of "departure time - count value":
[0132] (1) A departure time statistical distribution variable is generated by the destination Actor. It is a key-value dictionary structure used to store the statistical distribution of "departure time - count value". The departure time is accurate to the second.
[0133] (2) Generate a departure time statistical distribution key-value pair, where the key value (departure time) specifies the arrival time and the value (count value) is 1, and add it to the departure time statistical distribution variable;
[0134] 2. Within the interquartile range (IQR) of the "departure time - count value" statistical distribution, obtain the density at the time of vehicle departure from the density fluctuation time series records second by second, and use it as the hypothetical entry density:
[0135] (1) Generate a driving density data variable from the current Actor. It is a Key-Value dictionary structure used to store the correspondence between "driving time and density".
[0136] (2) Generate key-value pairs of outgoing dense data one by one using the key values (outgoing time) within the interquartile range (IQR) of the outgoing time statistical distribution variable. The key value (outgoing time) is filled with outgoing time, and the value value (dense quantity) is empty. Add them to the outgoing dense data variable.
[0137] (3) Start the corresponding thread one by one according to the Key value (departure time) of the departure density data variable:
[0138] A. Within the thread, use the current Key value (departure time) to obtain the density at the time of vehicle departure from the density fluctuation time sequence record, and overwrite the current Value value (density).
[0139] B. Continue until all threads have finished executing and are released by their respective execution processes;
[0140] (4) The outflow density data variable is also the assumed inflow density data variable;
[0141] 3. In the feature combination count record list, find records that are consistent with or similar to the density quantity and feature combination, generate a "driving time - count value" statistical distribution that corresponds one-to-one with the density quantity, and perform smoothing and normalization processing:
[0142] (1) Generate a driving time statistics variable from the current Actor. It is a Key-Value dictionary structure used to store the correspondence between "dense quantity - driving time statistics distribution". The Value (driving time statistics distribution) is a Key-Value dictionary structure used to store the statistical distribution between "driving time - count value".
[0143] (2) Take out the unique Value (Dense) from the driving out density data variable and generate Key-Value pairs of driving time statistics one by one. Fill the Key (Dense) with the density and leave the Value (Driving Time Statistics Distribution) empty. Add them to the driving time statistics data variable.
[0144] (3) Start the corresponding thread one by one according to the Key value (density) of the driving time statistical data variable:
[0145] A. Within the thread, using the current Key value (density) and the passing features extracted from the vehicle departure message, find records in the feature combination count record list that match or are similar to these combinations;
[0146] B. Extract the driving time and count value from the found records (if no record is found, calculate a driving time by dividing the driving length by the driving speed limit, and the count value is 1). Generate driving time statistical distribution key-value pairs one by one according to the driving time from small to large. Fill the key value (driving time) with driving time and fill the value value (count value) with count value to form a driving time statistical distribution variable;
[0147] C. Smooth the statistical distribution variable of travel time:
[0148] a. Traverse the key-value pairs of the driving time statistical distribution, take the average interval of adjacent key values (driving time), ignore the maximum and minimum intervals when calculating, and take a value that is not lower than the specified minimum value (e.g., 3 seconds), in seconds;
[0149] b. Traverse the key-value pairs of the driving time statistical distribution. If the interval between adjacent key values (driving time) is greater than the average interval, generate a set of key-value pairs of the driving time statistical distribution where the interval between adjacent key values (driving time) is equal to or close to the average interval. Fill the key values (driving time) with these missing driving times and fill the value values (count values) with the count values calculated by linear interpolation. Add them one by one to the driving time statistical distribution variable.
[0150] D. Normalize the statistical distribution variable of travel time:
[0151] a. Traverse the key-value pairs of the driving time statistics distribution and summarize the key values (count values) to obtain the total number of count values;
[0152] b. Traverse the key-value pairs of the travel time statistical distribution and replace the value (count value) with the value divided by the total number of count values, which is equivalent to the probability or frequency of being replaced by the count value;
[0153] E. Overwrite the current Value (driving time statistical distribution) with the driving time statistical distribution variable;
[0154] F. Continue until all threads have finished executing and are released by their respective execution processes;
[0155] 4. Based on the density data, append the "Driving Time - Count Value" statistical distribution second by second to each departure time under the "Departure Time - Count Value" statistical distribution, generating and summarizing the "Entry Time - Count Value" statistical distributions that correspond one-to-one with the departure times:
[0156] (1) Generate an entry time statistical distribution variable from the current Actor. It is a Key-Value dictionary structure used to store the statistical distribution of "entry time - count value";
[0157] (2) Start the corresponding thread one by one according to the Key value (departure time) of the departure density data variable:
[0158] A. Within the thread, use the current Value (density) to find the corresponding Key (density) Value (driving time statistical distribution) from the driving time statistics variable and iterate through it:
[0159] a. Generate an entry time variable, calculated as follows: entry time = exit time - travel duration. The exit time is the current key value of the exit density data variable (exit time), and the travel duration is the current key value of the travel duration statistical distribution (travel duration).
[0160] b. Generate a count value variable, calculated as follows: Count value = Count value of departure time * Count value of travel duration. The count value of departure time is the value (count value) of the corresponding key value (departure time) found from the departure time statistical distribution variable using the current key value (departure time) of the departure density data variable. The count value of travel duration is the current value (count value) of the travel duration statistical distribution.
[0161] c. Use the arrival time variable to find the key-value pairs in the arrival time statistical distribution variable:
[0162] If found, the count variable is aggregated into the value (count value) of that key-value pair;
[0163] If not found, generate a key-value pair for the entry time statistics distribution, where the key (entry time) is the entry time variable and the value (count value) is the count value variable, and add it to the entry time statistics distribution variable;
[0164] B. Continue until all threads have finished executing and are released by their respective execution processes;
[0165] 5. Obtain the density at the time of vehicle entry from the density fluctuation time series records second by second within the interquartile range (IQR) of the "entry time-count value" statistical distribution:
[0166] (1) Generate an incoming density data variable from the current Actor. It is a Key-Value dictionary structure used to store the correspondence between "incoming time and density".
[0167] (2) Generate key-value pairs of inbound density data one by one using the key values (inbound time) within the interquartile range (IQR) of the inbound time statistical distribution variable. The key value (inbound time) is filled with the inbound time, and the value value (density) is empty. Add them to the inbound density data variable.
[0168] (3) Start the corresponding thread one by one according to the Key value (entry time) of the data variable of the influx of traffic:
[0169] 1) Within the thread, use the current Key value (entry time) to obtain the density when the vehicle enters from the density fluctuation time sequence record, and overwrite the current Value value (density);
[0170] 2) The threads will release their resources after all threads have finished executing;
[0171] 6. If the overlap between the hypothesized inbound traffic density and the found inbound traffic density is less than a specified threshold, then the found inbound traffic density is used as the hypothesized inbound traffic density, and the current Actor returns to step 3 in S2.
[0172] (1) Compare the degree of overlap between the hypothesized inbound traffic volume data variables and the inbound traffic volume data variables;
[0173] (2) If the overlap is less than the specified threshold (e.g., 80%), the incoming dense data variable is used as the assumed incoming dense data variable, and the assumed incoming dense data variable is also the outgoing dense data variable. The current Actor returns to step 3 in S2 and does not continue the subsequent steps.
[0174] (3) If the overlap is greater than or equal to the specified threshold (e.g., 80%), it means that the entry time calculated from the assumed entry density data can also basically calculate the same entry density data, then the entry time statistical distribution variable is the correct result.
[0175] 7. If the starting Actor has not yet been simulated, the statistical distribution of "entry time - count value" is used as the statistical distribution of "exit time - count value" for the next Actor and pushed to the next Actor, from which the next Actor returns to step 2 in S2:
[0176] (1) If the current Actor is not the starting point Actor, then the entry time statistical distribution variable is used as the exit time statistical distribution variable of the next Actor;
[0177] (2) Push the statistical distribution variable of departure time to the next Actor, and do not continue the subsequent steps;
[0178] 8. Find the entry time with the largest count value from the statistical distribution of "entry time - count value", and specify when to subtract the entry time from the arrival time to obtain the estimated travel time of the vehicle on the entire alternative route:
[0179] (1) If the current Actor is the starting point Actor, then find the entry time with the largest count value from the entry time statistical distribution variable;
[0180] (2) Subtract the entry time from the specified arrival time to obtain the estimated travel time of the vehicle on the entire alternative route;
[0181] S3 returns the estimated travel time calculation result for the vehicle.
[0182] This invention provides a method and apparatus for calculating the estimated travel time of vehicles at a port. Based on probability theory and mathematical statistics, it iteratively extrapolates the statistical distributions of entry time, travel time, and exit time on a travel segment. During the extrapolation and calculation process, smoothing and normalization methods are flexibly applied to improve the stability, performance, and accuracy of statistical calculations. Based on an Actor distributed parallel computing model, a distributed architecture statistical analysis and calculation model is built, highly integrating probabilistic statistical methods with distributed computing technology. The statistical analysis and calculation methods are decomposed into models that can be independently calculated by Actor instances, and the multi-threaded parallel computing capabilities of a single machine are fully utilized to cope with the computational pressure of extrapolation under large-scale data. This improves the accuracy of calculating the estimated travel time of vehicles at the port while ensuring high efficiency. It makes path planning, task matching, and collaborative operation technologies based on estimated travel time data more practical, avoiding operational interruptions and improving the efficiency of port loading and unloading operations. Based on the Actor distributed parallel computing model and making full use of the multi-threaded parallel computing capabilities of a single machine, large-scale real-time data processing and high-performance computing can be achieved, which is sufficient to support large-scale traditional or automated dock site production operations.
[0183] Those skilled in the art will understand that, besides implementing the system and its various devices, modules, and units provided by this invention in the form of purely computer-readable program code, the same functions can be achieved entirely through logical programming of the method steps, making the system and its various devices, modules, and units of this invention function in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, the system and its various devices, modules, and units provided by this invention can be considered as a hardware component, and the devices, modules, and units included therein for implementing various functions can also be considered as structures within the hardware component; alternatively, the devices, modules, and units for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0184] Specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the specific embodiments described above, and those skilled in the art can make various changes or modifications within the scope of the claims, which do not affect the essence of the present invention. Unless otherwise specified, the embodiments and features described in this application can be arbitrarily combined with each other.
Claims
1. A method for calculating the estimated travel time of vehicles at a dock, characterized in that, Based on the Actor distributed parallel computing model, a spatiotemporal simulation of vehicle movement is performed on alternative paths. The method includes: S1, in response to the specified departure time, performs a simulation calculation along the forward path starting from the starting point Actor to obtain the first estimated travel time; or, S2, in response to the specified arrival time, simulates and calculates the second estimated travel time by starting from the destination Actor and proceeding along the reverse path; The simulation calculation includes: Based on the statistical distribution of entry time or exit time of the current road segment, obtain the corresponding vehicle density. Based on the density and vehicle passage characteristics, the corresponding driving time statistical distribution is obtained from historical records; The statistical distribution of driving time is smoothed and normalized. The processed driving time statistical distribution is combined with the entry time statistical distribution or exit time statistical distribution by probability to deduce the exit time statistical distribution or entry time statistical distribution of the next road segment. This process is repeated until the path endpoint is reached, and the time point with the largest count value is found from the final statistical distribution to calculate the first or second estimated travel time.
2. The method for calculating the estimated travel time of dock vehicles according to claim 1, characterized in that, The probability merging calculation specifically involves: For the forward path, the processed travel time statistical distribution is probabilistically merged with the entry time statistical distribution: For each entry time and its corresponding probability in the statistical distribution of entry time, and for each travel time and its corresponding probability in the statistical distribution of travel duration, calculate the exit time and joint probability respectively; Wherein, the departure time is the sum of the entry time and the travel duration, and the joint probability is the product of the probability corresponding to the entry time and the probability corresponding to the travel duration; the joint probabilities in all calculation results are summarized to form the statistical distribution of departure time. When reversing the route, the processed travel time statistical distribution and the departure time statistical distribution are probabilistically merged: For each departure time and its corresponding probability in the statistical distribution of departure time, and for each travel time and its corresponding probability in the statistical distribution of travel duration, calculate the arrival time and joint probability respectively. Wherein, the entry time is the difference between the exit time and the travel duration, and the joint probability is the product of the probability corresponding to the exit time and the probability corresponding to the travel duration; the joint probabilities in all calculation results are summed to form the statistical distribution of entry time.
3. The method for calculating the estimated travel time of dock vehicles according to claim 1 or 2, characterized in that, The method for obtaining the statistical distribution of driving time includes: Based on the density of vehicles entering the current road segment and the characteristics of vehicle passage, the system queries the historical record list of feature combination count records to obtain the original count values corresponding to different travel durations; the original count values are normalized and converted into probability values to form the statistical distribution of travel durations.
4. The method for calculating the estimated travel time of dock vehicles according to claim 3, characterized in that, Before normalizing the original count values, the process also includes a step of smoothing the corresponding data of driving time and original count values. The smoothing process includes: Calculate the average interval between adjacent travel times in the corresponding data; When the actual interval between any two adjacent driving times is greater than the average interval, one or more driving time data points are inserted between the two adjacent driving times so that the interval between the two adjacent data points after insertion is equal to the average interval, and a count value is assigned to the inserted driving time data points by linear interpolation.
5. The method for calculating the estimated travel time of dock vehicles according to claim 3, characterized in that, The method for obtaining the density of vehicles entering the current road segment includes: Determine the interquartile range of the statistical distribution of entry times for the current road segment; for each entry time point within the interquartile range, query the density fluctuation time sequence records to obtain the corresponding vehicle density.
6. The method for calculating the estimated travel time of dock vehicles according to claim 1, characterized in that, The simulation calculation S2 of the reverse path also includes an iterative verification step: Based on the statistical distribution of exit times for the current road segment and an assumed high density of entry times, an statistical distribution of entry times is derived. Based on the statistical distribution of the estimated entry time, the actual entry density is retrieved by querying again. Calculate the degree of overlap between the assumed traffic density and the actual traffic density; If the overlap is less than a predetermined threshold, the actual inbound traffic density is used as the new assumed inbound traffic density, and the above deduction, query and calculation steps are repeated until the overlap reaches or exceeds the predetermined threshold.
7. The method for calculating the estimated travel time of dock vehicles according to claim 3, characterized in that, If no corresponding data can be found in the historical records based on the density and vehicle passage characteristics, a theoretical travel time is calculated based on the length of the current travel segment and the speed limit, and a travel time statistical distribution is generated, in which the count value corresponding to the theoretical travel time is 1.
8. The method for calculating the estimated travel time of dock vehicles according to claim 1, characterized in that, The steps involved in the method, including acquiring statistical distribution data, smoothing, normalizing, and calculating probability merging, are all executed using multi-threaded parallel computing technology.
9. A device for calculating the estimated travel time of dock vehicles, characterized in that, include: Memory, used to store program instructions; One or more processors are configured to execute the program instructions to implement the method for calculating the estimated travel time of dock vehicles as described in any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for calculating the estimated travel time of dock vehicles as described in any one of claims 1 to 8.