A method, system, medium and device for calculating a track coincidence rate of a transportation line
By calculating the deviation between the trajectory points of the transportation route and the standard trajectory points, and rationally dividing the trajectory segments, the problem of the limitation on the number and length of trajectory points in the existing technology is solved, and efficient and accurate trajectory overlap rate calculation is achieved, thus improving the user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-11
- Publication Date
- 2026-03-03
AI Technical Summary
Existing technologies are expensive to calculate the overlap rate of transportation routes and have strict limitations on the number of trajectory points and mileage, which cannot meet the needs of real business scenarios and result in a poor user experience.
By acquiring the actual trajectory points and standard trajectory points of the transportation task, the distance is calculated and the deviation segment is determined. The mileage of the standard trajectory segment is merged, the trajectory overlap rate is calculated, and the division is carried out using preset deviation mileage and number of points. It supports the analysis of any number of trajectory points and mileage, reducing the requirements for calculation and analysis capabilities.
It breaks through the limitations of the number and length of trajectory points, improves the accuracy of calculation results and user experience, meets the needs of real business scenarios, and reduces the requirements for computing and analysis capabilities.
Smart Images

Figure CN116680305B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics transportation trajectory calculation technology, and in particular to a method, system, medium and equipment for calculating the overlap rate of transportation route trajectories. Background Technology
[0002] In the express delivery industry, each transportation route is generally assigned a standard route. The transportation management authority requires drivers to transport according to the standard route. After the actual transportation, the system needs to be able to intelligently analyze and calculate the overlap rate between the standard route and the actual transportation route. The management authority then analyzes the specific reasons based on the overlap rate to decide whether the standard route needs to be adjusted, thereby selecting an optimal route.
[0003] Therefore, some third-party service providers have emerged in the market to offer the aforementioned service capabilities and technologies. However, most of these services are expensive and have strict limitations on the number of trajectory points and mileage to be analyzed, such as requiring that the number of trajectory points not exceed 500 or 1000 and the mileage not exceed 500 kilometers. These limitations fall far short of the needs of real business scenarios and have many limitations in actual use. They are very different from the actual transportation route conditions, making it impossible to implement in real-world scenarios and resulting in a poor user experience. Summary of the Invention
[0004] Based on this, it is necessary to propose a method, system, medium, and equipment for calculating the overlap rate of transportation route trajectories to address the above problems.
[0005] This invention discloses a method for calculating the overlap rate of transportation route trajectories, the method comprising:
[0006] Obtain the actual trajectory points and standard trajectory points of the transportation task;
[0007] Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and identify all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0008] Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated line segments;
[0009] Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0010] Furthermore, the specific formula for calculating the overlap rate of transportation route trajectories is as follows:
[0011] Transportation route trajectory overlap rate = (total mileage of standard trajectory - total mileage of separated route segments) / total mileage of standard trajectory.
[0012] Furthermore, the distance between all actual trajectory points and the standard trajectory points is calculated iteratively, and all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number are identified as deviation segments, specifically including:
[0013] Preset the deviation mileage, deviation points, and a pre-set empty deviation suspect queue;
[0014] Iterate through all actual trajectory points;
[0015] Calculate the distance between the current actual trajectory point and the nearest standard trajectory point;
[0016] Determine if the distance is greater than the preset deviation mileage.
[0017] If the deviation is greater than the preset deviation mileage, continue to check if the cumulative number of points in the current deviation suspect queue is greater than zero. If it is greater than zero, directly put the current actual trajectory point into the deviation suspect queue and continue to execute the traversal steps. If it is not greater than zero, record the sequence number of the current standard trajectory point as the standard start sequence number of the current deviation segment, and then put the current actual trajectory point into the deviation suspect queue and continue to execute the traversal steps.
[0018] If the number of points is not greater than the preset deviation mileage, then check if the cumulative number of points in the current suspected deviation queue is greater than the preset deviation number. If it is greater than the preset deviation number, record the sequence number of the standard trajectory point of the previous traversal as the standard end sequence number of the current deviation segment. Then, treat all the actual trajectory points in the current suspected deviation queue as a deviation segment, clear the current suspected deviation queue, and continue to execute the traversal steps. If the number of points is not greater than the preset deviation number, then directly clear the current suspected deviation queue and continue to execute the traversal steps.
[0019] Furthermore, the standard trajectory segments corresponding to each deviation segment are determined, specifically including:
[0020] Based on the standard start number and standard end number of each deviation segment, extract the standard trajectory segment corresponding to each deviation segment from the standard trajectory points.
[0021] Furthermore, before the step of traversing and calculating the distance between all actual trajectory points and the standard trajectory points, the following steps are also included:
[0022] Trajectory cleaning is performed on the actual trajectory points and the standard trajectory points. The trajectory cleaning includes at least: trajectory point deduplication and trajectory point completion.
[0023] Furthermore, the distances between all actual trajectory points and the standard trajectory points are calculated, specifically including:
[0024] All standard trajectory points are pre-stored in the Redis storage system. The GEO function of the Redis storage system is then used to iterate and calculate the distance between all actual trajectory points and standard trajectory points.
[0025] Furthermore, the method also includes:
[0026] The actual trajectory points of the transportation task are compared with the standard trajectory points through trajectory visualization.
[0027] On the other hand, the present invention also discloses a system for calculating the overlap rate of transportation route trajectories, the system comprising:
[0028] The trajectory acquisition module is used to acquire the actual trajectory points and standard trajectory points of the transportation task;
[0029] The deviation segment determination module is used to traverse and calculate the distance between all actual trajectory points and standard trajectory points, and to determine all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0030] The module for calculating the total mileage of the separated route segments is used to determine the standard trajectory segments corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated route segments.
[0031] The trajectory overlap rate calculation module is used to obtain the total mileage of the standard trajectory and calculate the trajectory overlap rate of the transportation route based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0032] On the other hand, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the following steps:
[0033] Obtain the actual trajectory points and standard trajectory points of the transportation task;
[0034] Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and identify all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0035] Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated line segments;
[0036] Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0037] On the other hand, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the following steps:
[0038] Obtain the actual trajectory points and standard trajectory points of the transportation task;
[0039] Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and identify all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0040] Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated line segments;
[0041] Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0042] The present invention, by adopting the above technical solution, has the following beneficial effects:
[0043] In this invention, a preset deviation mileage and number of deviation points are defined. By traversing and calculating the distance between all actual trajectory points and standard trajectory points, all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset number of deviation points are identified as deviation segments. Then, the segment mileage of the standard trajectory segment corresponding to each deviation segment is merged to form the total mileage of the separated line segment. This mileage is then used together with the total mileage of the standard trajectory to calculate the trajectory overlap rate. This invention allows for the reasonable division of actual deviation trajectories based on the settings of deviation mileage and number of deviation points, thereby supporting the analysis of any number of trajectory points and trajectory mileage. This overcomes the limitations of the number and length of trajectory points in the prior art, reduces the gap with the actual transportation route situation, meets the needs of real business scenarios, improves the user experience, and at the same time reduces the requirements for computational analysis capabilities, making it easier to improve the accuracy of the calculation results. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] in:
[0046] Figure 1 This is a flowchart of a method for calculating the overlap rate of transportation route trajectories in one embodiment;
[0047] Figure 2 This is a flowchart of step S200 in the method for calculating the overlap rate of transportation route trajectories in one embodiment.
[0048] Figure 3 This is a core information diagram of a transportation task specifically applied to the transportation route trajectory overlap rate calculation method in one embodiment.
[0049] Figure 4 This is a visual comparison chart of transportation task trajectories in a specific application of the transportation route trajectory overlap rate calculation method in one embodiment;
[0050] Figure 5 This is a diagram showing the starting position of the deviation segment of the transportation task trajectory in a specific application of the transportation route trajectory overlap rate calculation method in one embodiment.
[0051] Figure 6 This is a diagram showing the end position of the deviation segment of the transportation task trajectory in a specific application of the transportation route trajectory overlap rate calculation method in one embodiment.
[0052] Figure 7 This is a block diagram of a transportation route trajectory overlap rate calculation system in one embodiment;
[0053] Figure 8 This is a structural block diagram of a computer device in one embodiment.
[0054] Explanation of reference numerals in the attached diagram: 100 for trajectory acquisition module, 200 for deviation segment determination module, 300 for total mileage calculation module of separated route segments, and 400 for trajectory overlap rate calculation module. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] like Figure 1 As shown, in one embodiment, a method for calculating the overlap rate of transportation route trajectories is provided, which specifically includes the following steps:
[0057] S100: Obtain the actual trajectory points and standard trajectory points of the transportation task;
[0058] S200: Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and determine all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0059] S300. Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileage of each standard trajectory segment to form the total mileage of the separated line segments.
[0060] S400: Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0061] In this embodiment, the specific meaning of deviation mileage is as follows: when the actual trajectory point is more than a certain value away from the nearest point of the standard trajectory, it can be considered that the actual position has deviated. The specific calculation method can be as follows: the latitude and longitude of the truck is collected once every 10 seconds, and the truck speed is up to 80 km / h. Then the deviation mileage = (80*1000) / (60*60)*10 is approximately equal to 220 meters. The specific meaning of deviation mileage is as follows: when the cumulative number of actual trajectory points that deviate reaches a certain number, it can be considered that a line deviation has occurred. For example, if the above-mentioned truck deviation point count is set to 30, it means that within 5 minutes (30*10 seconds), the route traveled by the vehicle deviates from the standard trajectory. Therefore, this section of the route is considered to be a deviated route.
[0062] In this embodiment, the deviation mileage and number of deviation points can be set according to the actual machine computing power or business scenario. Then, based on the distance between the actual trajectory points and the standard trajectory points, the actual trajectory points of consecutive road segments that are farther from the standard trajectory points than the preset deviation mileage and whose cumulative number of points reaches the preset number of deviation points are all determined as deviation segments. That is, in this embodiment, instead of statistically analyzing and calculating all deviation trajectories on the entire route at once, the actual deviation trajectories are reasonably divided into small deviation segments by setting the deviation mileage and number of deviation points. Then, the mileage of each deviation segment is calculated, and finally, the mileage of the deviation segments is combined with the total mileage of the standard trajectory to calculate the trajectory overlap rate. This allows the method of this embodiment to reasonably divide deviation trajectory analyses, regardless of how long or complex they are. As a result, the overlap rate calculation method of this embodiment can support the analysis of any number of trajectory points and trajectory mileage, breaking through the limitations of the number and length of trajectory points in the prior art, reducing the gap with the actual transportation route situation, meeting the needs of real business scenarios, improving the user experience, and at the same time reducing the requirements for computing and analysis capabilities, which facilitates the improvement of the accuracy of the calculation results.
[0063] Furthermore, in one embodiment, the specific formula for calculating the overlap rate of the transportation route trajectory in step S400 is as follows:
[0064] Transportation route trajectory overlap rate = (total mileage of standard trajectory - total mileage of separated route segments) / total mileage of standard trajectory.
[0065] Furthermore, such as Figure 2As shown, in one embodiment, step S200 specifically includes:
[0066] S210, preset deviation mileage, deviation points, and preset an empty deviation suspect queue;
[0067] S220, Traverse all actual trajectory points;
[0068] S230. Calculate the distance between the current traversed actual trajectory point and the nearest standard trajectory point;
[0069] S240. Determine whether the distance is greater than the preset deviation mileage. If it is greater than the preset deviation mileage, continue to execute step S250. If it is not greater than the preset deviation mileage, continue to execute step S260.
[0070] S250. Determine whether the cumulative number of points in the current deviation suspect queue is greater than zero. If it is greater than zero, continue to execute step S251. If it is not greater than zero, continue to execute step S252.
[0071] S251. Directly add the current actual trajectory point to the deviation suspect queue and continue to execute traversal step S220;
[0072] S252. Record the index of the standard trajectory point being traversed, and use it as the standard starting index of the current deviation segment. Then, put the actual trajectory point being traversed into the deviation suspect queue and continue to execute traversal step S220.
[0073] S260. Determine whether the cumulative number of points in the current deviation suspect queue is greater than the preset deviation number. If it is greater than the preset deviation number, continue to execute step S261. If it is not greater than the preset deviation number, continue to execute step S262.
[0074] S261. Record the index of the standard trajectory point of the previous traversal as the standard end index of the current deviation segment. Then, take all the actual trajectory points in the current deviation suspect queue as a deviation segment, clear the current deviation suspect queue, and continue to execute the traversal step S200.
[0075] S262. Clear the current deviated suspect queue directly and continue to execute traversal step S200.
[0076] Furthermore, in one embodiment, step S300, determining the standard trajectory segment corresponding to each deviation segment, specifically includes:
[0077] Based on the standard start number and standard end number of each deviation segment, extract the standard trajectory segment corresponding to each deviation segment from the standard trajectory points.
[0078] Furthermore, in one embodiment, before step S200, the method further includes:
[0079] Trajectory cleaning is performed on the actual trajectory points and the standard trajectory points. The trajectory cleaning includes at least: trajectory point deduplication and trajectory point completion.
[0080] In real-world business scenarios, GPS device issues often cause changes in the frequency of data collection for transportation routes, resulting in many overlapping points. Alternatively, GPS devices may become offline, leading to the loss of certain track segments. Therefore, it is necessary to clean the acquired standard track and the actual track.
[0081] In the specific implementation process, to address the problem of repeated trajectory points, the trajectory can be traversed, and the current point can be compared with the next adjacent point. If the latitude and longitude are exactly the same, the next point can be discarded directly. To address the problem of missing trajectory segments, third-party services, such as Baidu Eagle Eye, can be used to automatically complete the trajectory based on the trajectory location information and point timestamps. This results in higher quality trajectory data and greatly improves the accuracy of the algorithm results.
[0082] Furthermore, in one embodiment, step S200, which involves iterating and calculating the distances between all actual trajectory points and the standard trajectory points, specifically includes:
[0083] All standard trajectory points are pre-stored in the Redis storage system. The GEO function of the Redis storage system is then used to iterate and calculate the distance between all actual trajectory points and standard trajectory points.
[0084] In the actual implementation process, calculating the distance between the actual trajectory point and the nearest standard trajectory point requires first calculating the distance between the actual trajectory point and each point of the standard trajectory, and then obtaining the closest one. This is computationally intensive and inefficient. Therefore, in this embodiment, all standard trajectory points are stored in Redis in advance. Utilizing Redis's GEO function can greatly improve computational performance and efficiency.
[0085] Furthermore, in one embodiment, the method further includes:
[0086] The actual trajectory points of the transportation task are compared with the standard trajectory points through trajectory visualization.
[0087] The trajectory visualization and comparison function provided in this embodiment helps to more intuitively show users the trajectory overlap in transportation tasks, further improving the user experience.
[0088] Furthermore, in this embodiment, a specific application experiment is conducted on the method for calculating the overlap rate of transportation routes to verify the accuracy of the method. Figure 3This is a core information map showing the specific application of this method to the transportation task on the Shanghai-Ningbo route. The map shows that the transportation task number is 5220914500036650. During the execution of the transportation task, a deviation occurred between the standard trajectory and the actual trajectory. Specifically, the deviation segment is the trajectory segment from point 253 (numbering starts from zero, so the number of digits needs to be reduced by one) to point 497 on the standard trajectory, which corresponds to the trajectory segment from point 281 to point 735 on the actual trajectory. The mileage of the standard trajectory segment corresponding to the deviation segment is 91638 meters, meaning the total mileage of the separated route segment is 91638 meters. The actual mileage is 149865 meters, and the total mileage of the standard trajectory is 181266 meters. Therefore, according to the trajectory overlap rate calculation method in this embodiment, the calculated trajectory overlap rate is 0.49 = (181266 - 91638) / 181266, which is consistent with the actual calculation, verifying the accuracy of the transportation route trajectory overlap rate calculation method proposed in this embodiment.
[0089] Furthermore, this embodiment also provides a trajectory visualization comparison chart of the transportation task on the Shanghai-Ningbo route in this method, such as... Figure 4-6 In the diagram, line 1 represents the actual trajectory, and line 2 represents the standard trajectory. Figure 4 This is a comparison chart of the actual trajectory of the entire route and the standard trajectory. Figure 5 This is a map showing the starting position of the deviation section. Figure 6 This is a map showing the end location of the deviated road segment. Specifically, from... Figure 4 It can be seen that the actual trajectory deviates from the standard trajectory by a certain distance. Figure 5 It can be seen that the starting point of the deviation from the trajectory segment occurred at the Haiyan hub, from Figure 6 It can be seen that the deviation from the trajectory segment ended at the Cicheng Interchange Expressway entrance.
[0090] like Figure 7 As shown, in one embodiment, a transportation route trajectory overlap rate calculation system is also provided, the system comprising:
[0091] The trajectory acquisition module 100 is used to acquire the actual trajectory points and standard trajectory points of the transportation task.
[0092] The deviation segment determination module 200 is used to traverse and calculate the distance between all actual trajectory points and standard trajectory points, and to determine all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0093] The total mileage calculation module 300 for separated route segments is used to determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileage of each standard trajectory segment to form the total mileage of the separated route segments.
[0094] The trajectory overlap rate calculation module 400 is used to obtain the total mileage of the standard trajectory and calculate the trajectory overlap rate of the transportation route based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0095] Figure 8 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 8 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement a method for calculating the overlap rate of transportation route trajectories. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to implement the method for calculating the overlap rate of transportation route trajectories. Those skilled in the art will understand that… Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0096] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the following steps:
[0097] Obtain the actual trajectory points and standard trajectory points of the transportation task;
[0098] Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and identify all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0099] Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated line segments;
[0100] Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0101] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, causes the processor to perform the following steps:
[0102] Obtain the actual trajectory points and standard trajectory points of the transportation task;
[0103] Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and identify all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments.
[0104] Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated line segments;
[0105] Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
[0106] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0107] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0108] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method of calculating a track coincidence rate of a transportation line, characterized by, The method includes: Obtain the actual trajectory points and standard trajectory points of the transportation task; Iterate through and calculate the distance between all actual trajectory points and standard trajectory points, and identify all consecutive actual trajectory points whose distance from the standard trajectory point is greater than the preset deviation mileage and whose cumulative number of points reaches the preset deviation point number as deviation segments, including: preset deviation mileage, deviation point number, and a preset empty deviation suspect queue; Iterate through all actual trajectory points; Calculate the distance between the current actual trajectory point and the nearest standard trajectory point; Determine if the distance is greater than the preset deviation mileage. If the deviation is greater than the preset deviation mileage, continue to check if the cumulative number of points in the current deviation suspect queue is greater than zero. If it is greater than zero, directly put the current actual trajectory point into the deviation suspect queue and continue to execute the traversal steps. If it is not greater than zero, record the sequence number of the current standard trajectory point as the standard start sequence number of the current deviation segment, and then put the current actual trajectory point into the deviation suspect queue and continue to execute the traversal steps. If the number of points is not greater than the preset deviation mileage, then continue to check if the cumulative number of points in the current suspected deviation queue is greater than the preset deviation number. If it is greater than the preset deviation number, then record the sequence number of the standard trajectory point of the previous traversal as the standard end sequence number of the current deviation segment. Then, take all the actual trajectory points in the current suspected deviation queue as a deviation segment, clear the current suspected deviation queue, and continue to execute the traversal steps. If the number of points is not greater than the preset deviation number, then directly clear the current suspected deviation queue and continue to execute the traversal steps. Determine the standard trajectory segment corresponding to each deviation segment, obtain the segment mileage of each standard trajectory segment, and merge the segment mileages of each standard trajectory segment to form the total mileage of the separated line segments; Obtain the total mileage of the standard trajectory, and calculate the overlap rate of the transportation route trajectory based on the total mileage of the standard trajectory and the total mileage of the separated route segments.
2. The method of claim 1, wherein, The specific formula for calculating the overlap rate of transportation routes is as follows: Transportation route trajectory overlap rate = (total mileage of standard trajectory - total mileage of separated route segments) / total mileage of standard trajectory.
3. The method of claim 1, wherein, Determine the standard trajectory segments corresponding to each deviation segment, specifically including: Based on the standard start number and standard end number of each deviation segment, extract the standard trajectory segment corresponding to each deviation segment from the standard trajectory points.
4. The method of claim 1, wherein, Before the step of traversing and calculating the distance between all actual trajectory points and the standard trajectory points, the following is also included: Trajectory cleaning is performed on the actual trajectory points and the standard trajectory points. The trajectory cleaning includes at least: trajectory point deduplication and trajectory point completion.
5. The method of claim 1, wherein, Iterate through and calculate the distance between all actual trajectory points and the standard trajectory points, specifically including: All standard trajectory points are pre-stored in the Redis storage system. The GEO function of the Redis storage system is then used to iterate and calculate the distance between all actual trajectory points and standard trajectory points.
6. The method of claim 1, wherein, The method further includes: The actual trajectory points of the transportation task are compared with the standard trajectory points through trajectory visualization.
7. A system for calculating the overlap rate of transportation route trajectories, characterized in that, The system includes: The trajectory acquisition module is used to acquire the actual trajectory points and standard trajectory points of the transportation task; The deviation section determination module is configured to calculate the distance between all actual trajectory points and standard trajectory points, and determine all continuous actual trajectory points with a distance greater than a preset deviation mileage from a standard trajectory point and an accumulated point number reaching a preset deviation point number as a deviation section; specifically, the preset deviation mileage, the deviation point number, and a preset empty deviation suspicion queue are set; all actual trajectory points are traversed; the distance between the current traversed actual trajectory point and the nearest standard trajectory point is calculated; it is determined whether the distance is greater than the preset deviation mileage; if the distance is greater than the preset deviation mileage, it is further determined whether the accumulated point number in the current deviation suspicion queue is greater than zero; if the accumulated point number is greater than zero, the current traversed actual trajectory point is directly put into the deviation suspicion queue, and the traversal step is continued; if the accumulated point number is not greater than zero, the serial number of the current traversed standard trajectory point is recorded as the standard start serial number of the current deviation section, the current traversed actual trajectory point is put into the deviation suspicion queue, and the traversal step is continued; if the distance is not greater than the preset deviation mileage, it is further determined whether the accumulated point number in the current deviation suspicion queue is greater than the preset deviation point number; if the accumulated point number is greater than the preset deviation point number, the serial number of the last traversed standard trajectory point is recorded as the standard end serial number of the current deviation section, all actual trajectory points in the current deviation suspicion queue are taken as a deviation section, the current deviation suspicion queue is emptied, and the traversal step is continued; if the accumulated point number is not greater than the preset deviation point number, the current deviation suspicion queue is directly emptied, and the traversal step is continued; The separated line section total mileage calculation module is configured to determine the standard trajectory sections corresponding to each deviation section, obtain the section mileage of each standard trajectory section, and combine the section mileage of each standard trajectory section to form a separated line section total mileage. The trajectory coincidence rate calculation module is configured to obtain the standard trajectory total mileage, and calculate the trajectory coincidence rate of the transportation line according to the standard trajectory total mileage and the separated line section total mileage.
8. A computer readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor, so that the processor executes the steps of the method according to any one of claims 1 to 6. 9.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-8 when the computer program is executed by the processor. The computer program is executed by the processor, so that the processor executes the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for determining quality of map track matching data, server and medium
CN109919518A
Vehicle trajectory data processing method, device and equipment and storage medium
CN111966729A