A work route repetition rate detection and reverse exemption method and system

CN122886930APending Publication Date: 2026-10-09YUKUAI CHUANGLING INTELLIGENT TECH (NANJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611373248.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-10-09

AI Technical Summary

Technical Problem

[0005]全量GPS点位直接比对算力消耗巨大:环卫车辆GPS采样密集,城区道路采样间隔仅10米左右,单条路线点位数量庞大;若直接对原始点位两两交叉比对,计算量随路线数量呈平方级增长,系统响应卡顿、算力浪费严重

Benefits of technology

实现作业路线重复情况自动化批量识别,无需人工目视比对地图,降低人工校验成本,适配路线库持续扩容后的批量复核需求;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122886930A_ABST
    Figure CN122886930A_ABST
Patent Text Reader

Abstract

The application provides a kind of job route repetition rate detection and reverse exemption method and system, it is related to environmental sanitation vehicle operation scheduling and route planning technical field;The method comprises the following steps: S1: job route original track thinning pretreatment, S2: grid route repetition rate batch preliminary screening, S3: reverse route exemption accurate determination;S4: final repeated route result output;The system includes: route setting interface, business logic layer, tool layer, data access layer, persistent storage layer;The application solves the problem that the job repeated route cannot be automatically identified in the traditional detection, the cost of manual verification is high, there is no objective, quantifiable repeated determination standard and the problem that the direct comparison of too many GPS points consumes a lot of computing power.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of sanitation vehicle operation scheduling and route planning technology, specifically to a method and system for detecting and reversing the repetition rate of operation routes. Background Technology

[0002] The sanitation industry has now fully implemented digital management of work routes. Dispatchers need to maintain a massive number of work routes corresponding to different areas, time periods, and vehicle types. Each route needs to store business attributes such as name, start and end coordinates, ordered GPS points along the route, mileage, and road grade. Existing digital management systems for work routes mostly adopt a layered backend development architecture, providing interfaces for adding, deleting, modifying, and querying routes, detailed queries, and batch export. The underlying layer stores all GPS waypoints through data tables, uniformly using the GCJ-02 domestic surveying and mapping coordinate system. Waypoints are stored in sorted order of collection. When it is necessary to determine whether two routes overlap, it relies entirely on staff manually comparing them one by one on the electronic map, lacking standardized automatic calculation capabilities. This leads to the following obvious technical defects in operation: Duplicate routes cannot be automatically identified, and manual verification is extremely costly: As the enterprise's route database continues to expand, the same sanitation road section is easily duplicated with multiple routes with different names; manual map visual comparison is labor-intensive, judgment standards are inconsistent, and batch automated verification is not possible.

[0003] There is no objective and quantifiable standard for determining repetition: the industry lacks a unified algorithm model to quantify the degree of route overlap, and the judgment results rely entirely on the subjective feelings of the operators. The judgment conclusions of different personnel cannot be reused or compared.

[0004] Misjudging reverse routes within the same corridor as duplicate routes: In urban two-way lanes and circular sanitation operation scenarios, the geographical grid points of the outbound and return routes highly overlap, but they belong to two independent and compliant operation routes; the existing algorithm does not distinguish the direction of travel of the route and will judge the legal reverse route as a duplicate and redundant route.

[0005] Directly comparing all GPS points consumes a huge amount of computing power: sanitation vehicles have dense GPS sampling, and the sampling interval on urban roads is only about 10 meters, resulting in a large number of points on a single route; if the original points are directly compared pairwise, the amount of computing power increases exponentially with the number of routes, leading to system lag and serious waste of computing power. Summary of the Invention

[0006] To address the aforementioned technical problems, this invention proposes a method for detecting and reversing the repetition rate of work routes, comprising the following steps: S1: Thinning preprocessing of the original trajectory of the work route; When a user adds or modifies a sanitation operation route and saves it, the original GPS waypoint sequence stored in the order of travel is read, sorted in ascending order by the sort_order field, and the thinning algorithm is called recursively to filter key turning points of the road based on the preset thinning tolerance threshold, thus completing the polyline thinning. Delete all existing thinned records of the route, and batch insert the newly generated thinned ordered waypoint sequence into the thinned waypoint table and save it in the database.

[0007] The simplified historical points of the route are for scenarios where modifications and updates are performed on existing routes. They are lightweight inflection point coordinates that are processed by an algorithm and stored in a dedicated data table when the trajectory is saved once on the route. The specific steps are as follows: S101: Acquisition and serialization of all waypoint data; When the operator completes the addition of a sanitation operation route or adjusts the driving trajectory and points of a previous operation route and clicks the save command, the corresponding original GPS waypoint sequence in GCJ-02 format is read from the full waypoint data table generated by the vehicle. The full amount of waypoint data is generated based on GPS coordinates reported by the vehicle positioning terminal at a fixed sampling frequency, and the GCJ-02 coordinate system is uniformly used as the spatial reference benchmark. The GCJ-02 original GPS points refer to the continuous latitude and longitude coordinates collected by sanitation vehicles while they are driving along the work roads and recorded in the GCJ-02 National Bureau of Surveying and Mapping encrypted coordinate system. To ensure accurate reconstruction of the route's spatial orientation, the original GPS waypoint sequence is forced to use the sort_order field in the waypoint record as an index, and all the original GPS waypoints read are sorted in ascending order to construct an original ordered GPS waypoint sequence with a clear driving direction. The sorting field sort_order is an integer column belonging to the full route point data table job_route_waypoint, and has a one-to-one correspondence with the route point records. The value corresponds to the order of the timestamps when the vehicle terminal reports the GPS location. The smaller the value, the earlier the reporting time. Under the same work route identifier, the ordered sequence obtained by sorting in ascending order of the sort_order field must be completely consistent with the spatial trajectory traversed by the vehicle continuously traveling on the actual road in terms of geometric adjacency, that is, to ensure that the sequence of waypoints has topological continuity that can be recursively processed. S102: Setting the thinning tolerance and calling the algorithm; Obtain the preset thinning tolerance threshold epsilonMeters; The original ordered GPS waypoint sequence and the thinning tolerance threshold are input together into the Douglas-Peucker piecewise linear thinning algorithm as the initial input data of the algorithm. The Douglas-Peucker polyline thinning algorithm is a polyline geometric simplification algorithm used to remove redundant coordinate points in a trajectory and retain key inflection points of the route. When executing the Douglas-Peucker polyline thinning algorithm, if the vertical distance from the coordinate point to the corresponding driving line segment is greater than the thinning tolerance threshold, it is determined to be a road turning point and retained; otherwise, it is determined to be a redundant sampling point and discarded. The thinning tolerance threshold is a preset judgment threshold, which is used as a standard to determine whether a point needs to be retained. Based on a comprehensive consideration of the GPS positioning drift error of urban sanitation vehicles in the region and the width of urban roads, a thinning tolerance threshold is set to eliminate geometric noise caused by slight vehicle swaying or signal jitter. S103: Polyline thinning based on recursive segmentation and vertical distance determination; The start and end points of the current original ordered GPS waypoint sequence to be processed are marked as non-deletable retention points. Based on this, all intermediate points between the start and end points are traversed, and polyline thinning spatial calculations are performed during the traversal process: S1031: Recursive partitioning; The first and last points of the original ordered GPS waypoint sequence of the entire route are not affected by the thinning tolerance threshold judgment and are forcibly retained to ensure that the start and end positions of the route are not lost; Take the start and end points of the current sub-segment, calculate the latitude value corresponding to the geometric midpoint of the line connecting the start and end points, and calculate the meter / degree conversion coefficient in the longitude and latitude directions respectively based on the latitude value of the geometric midpoint. Traverse all intermediate coordinate points p within the current sub-segment, and based on two sets of transformation coefficients, project the latitude and longitude differences of the current sub-segment's start, end, and all intermediate points p to be determined onto a Cartesian coordinate system, converting them into Cartesian coordinate values ​​in meters. The sub-segment is a local straight line segment obtained by the polyline thinning algorithm after the entire polyline of the complete operation trajectory is segmented. The initial sub-segment is the initial baseline segment formed by the start and end points of the complete line. Multiple sub-segments are formed after recursive segmentation. The meter / degree conversion factor in the latitudinal direction is taken as the arc length constant corresponding to one degree of latitude on the Earth's meridian; The meter / degree conversion coefficient in the longitude direction is the product of the arc length constant and the cosine of the latitude of the geometric midpoint of the line connecting the start and end points of the sub-segment; The perpendicular distance from each undetermined intermediate point p to the line connecting the start and end points of the current sub-segment is calculated using the vector cross product method. Specifically, with the start point of the current sub-segment as the origin, the projection vectors of each intermediate point p relative to the start point are constructed. and the projection vector of the end point relative to the start point. Calculate the projection vector and The absolute value of the two-dimensional cross product, divided by The quotient obtained by taking the modulus length is the vertical deviation distance of the midpoint in the actual geographic space, in meters; Synchronously record the intermediate point p with the largest vertical distance value during the traversal of the intermediate points of the sub-segments in this round. max and its corresponding maximum vertical distance value d max ; S1032: Determine the vertical distance between recursive branches; Maximum vertical distance value d max If the value is less than or equal to the preset thinning tolerance threshold, it indicates that all intermediate points p in the current sub-segment are close to the straight path between the starting point and the ending point, and do not contribute much to the overall geometric shape of the entire route. Discard all intermediate points in the current sub-segment interval and terminate the recursion of the current branch. Maximum vertical distance value d max If the deviation exceeds the preset thinning tolerance threshold, then the maximum deviation point p will be... max Mark these as key inflection points and retain them, while using p max The point is the dividing boundary. The current sub-segment is divided into a left sub-segment and a right sub-segment. The above step S1031 is recursively executed for each sub-segment to calculate, search and determine until there are no intermediate points in any sub-segment of the complete route that meet the thinning tolerance threshold. S104: Persistent storage and data isolation of thinning results; After the recursive segmentation process is completed, all the key inflection points marked as retained are arranged into a thinned ordered waypoint sequence according to their order in the original ordered GPS waypoint sequence. The number of points in the thinned ordered waypoint sequence is significantly reduced compared to the number of points in the original ordered GPS waypoint sequence, while the key turning and directional features of the entire route are fully preserved. The thinning calculation results are written to persistent storage media on the physical disk. An atomic "delete first, insert later" strategy is used to store the thinning results to ensure the consistency of data at the points of transit. Specifically, firstly, based on the current route identifier, all existing thinned records of the route are deleted from the dedicated thinned waypoint data table. Furthermore, if the route is newly created and has never been thinned before, the conditional deletion will not hit any records. The route identifier includes the route primary key ID; The newly generated thinned ordered path point sequences are batch inserted into the thinned path point data table and stored in the database. During insertion, the metadata corresponding to each thinning point is recorded. Furthermore, the metadata includes route identifier, ordered sequence number after thinning, GCJ-02 coordinates, current thinning tolerance threshold, and thinning algorithm identifier. The sparse waypoint data table and the original ordered GPS waypoint sequence are stored separately in different data tables. Furthermore, the original ordered GPS waypoint sequence is stored in the waypoint table.

[0008] S2: Initial screening of gridded route repetition rate in batches; After the persistent storage of the thinned ordered waypoints is completed, the latitude and longitude coordinates of the thinned ordered waypoints are discretized into a grid. After deduplication of the internal grid of the route, statistics of the shared grid and calculation of the overlap rate, suspected illegal route pairs that exceed the overlap threshold are initially screened out. The specific steps are as follows: S201: Grid-based discretization of latitude and longitude coordinates; Perform route identifier deduplication on all the input thinned and ordered waypoint sequences, remove duplicate route identifiers. If there are fewer than two routes after deduplication, terminate the process directly and return an empty result to avoid invalid calculations. After deduplication by route identifier, the sequence of all routes participating in this detection is read from the thinned path point table and then processed into a gridded discretization process. For each thinned point in the ordered sequence of waypoints after thinning of each route, the continuous latitude and longitude coordinates are converted into discrete grid key values. Specifically, Latitude and longitude values ​​are rounded to decimal places according to the rounding rules, with four decimal places being preferred. This matches the GPS sampling interval in urban road environments, captures the spatial overlap features between routes, and filters out non-substantial differences caused by slight lateral vehicle offsets or GPS positioning jitter. Ideally, the default GPS sampling interval is 10 meters, and the side length of the ground grid corresponding to the four decimal places of latitude and longitude is 11 meters. After rounding, each sparse point is mapped to a grid key composed of a four-digit latitude string and a four-digit longitude string. The grid key is selected as the basic operation unit for subsequent set intersection operations. S202: Deduplication of grids within the route and statistics of the total number of grids; After completing the mesh transformation of all sparse points, the mesh sets of each route are aggregated into a mesh set, and the mesh sets of each route are deduplicated. Specifically, the deduplication means that when a route has multiple waypoints within the same grid, these duplicate grid keys only represent the same spatial location being passed multiple times. When determining whether two routes share the same physical road segment, they should not be counted repeatedly. Each route is represented as a set of distinct grid keys through set deduplication. The number of unique grid keys contained in each route after deduplication of the grid key set is recorded as the total number of grid keys for each route. After deduplication, each route is represented as an unordered set of grid keys. The set of grid keys is used to quickly calculate the grid repetition rate between route pairs, without involving the determination of the route's direction of travel. S203: Statistics and repetition rate calculation of shared grids between routes; After obtaining the independent grid set and total number of grids for each route, all routes to be detected are paired up. Each pair is calculated only once. Furthermore, the pairing format is fixed so that the smaller route identifier comes first and the larger route identifier comes second to avoid duplicate calculations. Calculate the intersection size of the set of grid keys held by the two routes of each route pair, that is, the number of independent grid keys shared by the two routes, and calculate the grid overlap rate of the route pair. The grid overlap rate refers to the ratio of the number of grid keys shared by two routes to the minimum value among the total number of grid keys of each route; it reflects the degree to which the route with a smaller spatial coverage is covered by the other route. S204: Screening of suspected violation line pairs based on preset overlap threshold; Obtain the pre-configured overlap threshold, and compare the calculated grid overlap rate of each route pair with the overlap threshold; If the grid overlap rate of a route pair is greater than the overlap threshold, the route pair will be marked as a suspected violation route pair and included in the initial screening results list. If the grid overlap rate of a route pair is less than or equal to the overlap threshold, the route pair is determined to have no substantial spatial repetition and is excluded. After completing the initial screening of route pairs, output a list of all suspected non-compliant route pairs that exceed the overlap threshold; If the initial screening result list is empty, it is directly determined that there is no duplication among all routes to be detected, without triggering subsequent calculations, thus saving computing resources.

[0009] S3: Accurate determination of reverse route exemption; For route pairs that are judged to be suspected of being illegal due to high overlap of grid keys, the complete ordered grid key sequence of the routes involved in the suspected illegal route pair is loaded. The reverse driving direction feature is further introduced to execute the reverse driving judgment logic, so as to identify and remove the legal reverse routes generated by the up and down operation in the same corridor. The specific steps are as follows: S301: Loading of an ordered grid sequence of suspected non-compliant routes; Iterate through all suspected violation route pairs and obtain the route identifiers of the two routes involved in each suspected violation route pair; Using route identifiers as a condition, all thinned point records corresponding to the two routes in each suspected violation route pair are read from the thinned waypoint data table. The route thinned point records are forcibly sorted in ascending order according to the stored thinned sequence number. For each thinned point, the continuous latitude and longitude coordinates are converted into discrete grid keys, and a complete and ordered grid key sequence with a clear driving direction is reconstructed. Furthermore, the complete ordered grid key sequence retains the complete information of all sparsed points of a route after grid mapping; S302: Reverse peer determination based on sequence order; After obtaining the complete ordered grid key sequence of the two routes in a suspected violation route pair, execute the reverse peer judgment logic; The reverse peer determination logic includes two sets of parallel and complementary discrimination mechanisms: strong rules and weak rules. If either set of rules is hit, the suspected violation route pair is identified as a reverse peer route and removed from the list of suspected violation route pairs, and is not regarded as a duplicate route. Specifically, including, S3021: Strong rule determination; When the number of grid keys in the complete ordered grid key sequences of the two routes is equal, a strong rule judgment is executed; The strong rule judgment compares the complete ordered grid key sequence of the first route with the complete ordered grid key sequence of the second route in reverse order, and determines whether the i-th grid key in the complete ordered grid key sequence of the first route is completely consistent with the i-th to last grid key in the complete ordered grid key sequence of the second route. The comparison is traversed through all grid keys in the complete ordered grid key sequence of the first route. All grid keys at all locations correspond one-to-one and are equal, indicating that the suspected violation route pairs pass through the same set of spatial grids and travel in completely opposite directions. The route pairs are determined to be round-trip routes within the same corridor and are exempted from the list of suspected violations in the initial screening results. S3022: Weak rule determination; When the number of grid keys in the complete ordered grid key sequences of two suspected violation routes is unequal, the strong rule no longer applies, and the weak rule judgment is applied. If the following progressive judgment condition is met, it is identified as a round-trip route along the same corridor: Endpoint swapping condition is the start and end point condition: Extract the first and last grid keys of the complete ordered grid key sequence of the first route and the first and last grid keys of the complete ordered grid key sequence of the second route from the suspected violation route; If the first grid key of the first route is equal to the last grid key of the second route, and the last grid key of the first route is equal to the first grid key of the second route, then the spatial start and end points of the two routes are determined to be opposite to each other, satisfying the endpoint interchange condition. The mesh multiset consistency condition is a frequency condition: The frequency of each different grid bond in the complete ordered grid bond sequence of the two suspected violation routes is counted separately, generating their respective grid multiset frequency distributions, and comparing whether the two are completely consistent. If the types of grid bonds and the frequency of each grid bond are exactly the same in the two routes, it means that the two routes cover the same spatial grid multiset, and the only difference is in factors that do not affect the types and frequencies of grid bonds, such as the grid arrangement order and sampling density. When both of the above conditions are met, routes suspected of being in violation that are essentially reverse routes on the same corridor will be exempted from the list of suspected violations in the initial screening results. S303: Output of exemption results and final determination of the violation list; For all suspected violation routes, reverse peer judgment is applied based on whether they meet the strong or weak rules. If a suspected violation route pair in the reverse peer judgment hits either a strong rule or a weak rule, it will be removed from the initial screening list of suspected violation route pairs and will not be considered a duplicate violation route. Suspected violation line pairs that do not match any reverse peer judgment rules are retained as duplicate violation line pairs for final confirmation. Output a list of all confirmed suspected violation route pairs.

[0010] S4: Output of the final repeated circuit result; Summarize all duplicate violation route pairs that have not been granted reverse exemption, organize the route identifier, route business name, grid overlap rate, and overlap threshold, and generate a standardized duplicate route list to be pushed to the front-end page for display. Specifically, it includes: S401: Confirmation of the final violation line pair; Obtain the list of suspected violation route pairs remaining after strong rule or weak rule reverse peer exemption processing, and confirm them as the final duplicate violation route pairs; Furthermore, if the remaining route list is empty after strong rule or weak rule reverse peer exemption processing, it is determined that there is no duplicate violation among all routes currently participating in the detection, and an empty result is directly output and the process is terminated. S402: Result recalculation mechanism under dynamic threshold adjustment; When only the overlap threshold parameter is modified during the detection process, the loading operation of the ordered grid sequence that has been loaded in the original trajectory thinning preprocessing of the operation route in step S1 and the precise determination of the exemption of the reverse route in step S3 will not be re-executed. Instead, it will be re-executed directly from the shared grid statistics and repetition rate calculation of the route in step S203. If the thinning tolerance threshold or mesh accuracy is modified during the detection process, the entire process must be re-executed starting from the original trajectory thinning preprocessing of the operation route in step S1. The grid precision refers to the number of decimal places retained for latitude and longitude during grid discretization. S403: Structured output of detailed information for violation lines; For the finally confirmed violation routes, a structured output record is generated. Each record includes: the unique route identifier of each of the two routes, the service name of each of the two routes, the total number of grids for each of the two routes, the route grid overlap rate, and the overlap threshold. Finally, the repeated violation routes adopt a unified output data structure for the output records, and adapt the transmission method according to the access requirements of the business modules, including: The data is returned to the front-end page in standard JSON format via a RESTful API; Synchronously write to the database table, and persistently store the output records of the final repeated violation routes in the audit log table and violation record table for subsequent query and tracing; The final repeated violation route will be pushed as a message body to the downstream alarm system to trigger automatic notification and processing. S404: Subsequent processing at the business layer; The business module executes corresponding business processing logic on the details based on the output violation line, including: In the scenario of saving routes, prevent duplicate route entries and return an error message to guide users to adjust waypoints or modify route names; In a route plan binding scenario, a duplicate route alarm is issued to alert dispatchers that there are redundant route configurations. In the context of regular audits, the list of non-compliant routes is compiled to generate a duplicate route audit report, which is then used by managers to clean up and optimize the route database.

[0011] The present invention also provides a system for detecting and reversing the repetition rate of work routes, including a route setting interface, a business logic layer, a tool layer, a data access layer, and a persistent storage layer; The route setting interface is the entry point for functional interaction. It adopts a RESTful style design and is used to provide a request call channel to the outside world. It receives request parameters from the front end via the HTTP protocol, forwards the request to the business logic layer for processing, and returns the processing result to the front end in JSON format. The requests include adding, modifying, querying, deleting, batch exporting, and duplicate verification of work routes; The request parameters include basic route information, a list of GPS waypoints arranged in driving order, a preset thinning tolerance threshold, and a preset overlap threshold. The business logic layer is the core scheduling module, which is used to coordinate the entire process of business processing. Specifically, the route master table mapper writes the basic attributes of the route into the route master table, the waypoint table mapper writes the original GPS waypoint data into the waypoint table in batches, the thinning utility class is called to perform Douglas-Peucker polyline thinning on the original GPS waypoints, and the thinning result is written into the thinned waypoint table through the thinned waypoint table mapper. Furthermore, the basic attributes of the route include route name, vehicle fleet, start and end addresses, mileage, road grade, and planned operation time. Before the original GPS waypoints are written into the waypoint table in batches, the sorting field sort_order in the waypoint record is forcibly used as the index to sort all the original GPS waypoints in ascending order. Furthermore, the thinning results are written to the thinning path point table. When storing, an atomic update strategy is adopted: first delete the original old thinning records of the route, and then insert new thinning records in batches. After receiving the duplicate verification request, the business logic layer is also used to perform deduplication on the input route identifier list, call the data access layer to batch query the sparse point data, complete the initial screening of grid overlap rate, call the exemption rule utility class to perform reverse peer judgment, confirm the final illegal route pair, and output the standardized duplicate route result. The tool layer includes a thinning tool class and an exemption rule tool class, which are used to thin the original ordered GPS waypoint sequence using Douglas-Peucker polylines, identify suspected illegal routes after the initial screening of grid overlap rate, and remove the legal routes from the initial screening results. The thinning tool class has a built-in Douglas-Peucker polyline thinning algorithm. It reads the preset thinning tolerance threshold in the request parameters and uses it to perform recursive calculations on the original ordered GPS waypoint sequence, remove redundant driving sampling points, and retain the first and last points of the route and key inflection points to provide a lightweight calculation data source for route repetition rate determination and reverse exemption. The exemption rule utility class encapsulates a two-layer reverse route determination logic, which is used to identify legal routes traveling back and forth along the same corridor in suspected violation route pairs and remove the legal routes from the suspected violation route pairs; Furthermore, the exemption rule utility class receives suspected violation route pairs from the business logic layer. The suspected violation route pair includes complete ordered grid key sequences of two routes. When the lengths of the complete ordered grid key sequences of the two routes are equal, a strong rule is invoked for judgment. When the lengths of the complete ordered grid key sequences of the two routes are unequal, a weak rule is invoked for judgment. The strong rule judgment compares the complete ordered grid key sequence of the first route with the reversed complete ordered grid key sequence of the second route. If all grid keys are equal, the two routes are determined to have completely identical spatial grid sets and completely opposite driving directions, and are exempted from the rule. The weak rule determination extracts the first and last grid keys of the suspected violation route pairs for the first and second routes respectively. When the first grid key of the first route is equal to the last grid key of the second route, the last grid key of the first route is equal to the first grid key of the second route, and the grid key types and frequencies of each grid key of the two routes are exactly the same, it is determined that the spatial grid sets of the two routes are exactly the same and the driving directions are completely opposite, and an exemption is granted. The data access layer includes a route master table mapper, a waypoint table mapper, and a thinned waypoint table mapper, which provide data addition, deletion, batch query, and association matching capabilities, and support all data read and write requirements for route trajectory thinning preprocessing and grid overlap rate batch screening. The route master table mapper is used to provide basic operations for the route master table, including single insertion, batch query, update by identifier, and logical deletion; Furthermore, the route master table mapper supports multi-condition combined queries based on route name, fleet, and activation status, as well as join queries for route service names in the duplicate detection process; Joined table queries refer to querying the main route table and the sparse waypoint table according to the route identifier; The waypoint table mapper is used to provide basic operations for the waypoint table, including batch insertion, querying all waypoints by route identifier, and deleting all waypoints by route identifier; Furthermore, when the caller queries the original ordered GPS waypoints, it calls the waypoint table mapper to sort the waypoints in ascending order according to the sort_order field and returns the results to the caller; The thinning path point mapper is used to provide basic operations for thinning path point tables, including batch insertion, querying all thinning points by route identifier, deleting all old thinning points by route identifier, and batch querying thinning points for multiple routes. Furthermore, the thinned path point mapper provides batch preliminary screening queries of grid overlap rate, including latitude and longitude grid discretization processing, grid deduplication within routes, shared grid statistics between routes, and batch preliminary screening of suspected illegal route pairs based on overlap threshold; The persistent storage layer includes a route master table, a waypoint table, and a thinned waypoint table, which are used to store the basic attributes of the route, the original ordered GPS waypoint sequence, and the lightweight thinned ordered waypoint sequence, respectively. The main route table is used to store the basic business attributes of each sanitation operation route, including route identifier, route business name, fleet code, starting address and latitude and longitude, ending address and latitude and longitude, route mileage, road extension attributes, planned operation duration, road activation status and logical deletion flag, and is used to display and associate route business information. Preferably, the road extension attributes include road level. The waypoint table is used to store the original ordered GPS waypoint sequence in the GCJ-02 coordinate system collected by sanitation vehicles, as the original input data for the thinning operation. The thinning path point table is used to independently store the ordered path point sequence after thinning, which is simplified by the thinning tool class. It includes route identifier, ordered sequence number after thinning, GCJ-02 coordinates, current thinning tolerance threshold and thinning algorithm identifier. Compared with the prior art, the beneficial effects of the present invention are as follows: It enables automated batch identification of repetitive work routes, eliminating the need for manual visual comparison of maps, reducing manual verification costs, and adapting to the batch review needs after the route database continues to expand. By introducing geographic grid quantification to calculate overlap rate, computational complexity is reduced, an objective and unified digital judgment standard is established, differences in subjective human judgment are eliminated, and the judgment results are reproducible and easy to manage in a unified manner. A two-layer line duplication exemption mechanism combining coarse and fine judgment is set up to filter obviously non-overlapping lines in batches, and then a gridded sequence order verification is carried out on a small number of suspected lines, balancing detection efficiency and judgment accuracy. A trajectory thinning preprocessing mechanism is adopted, which uses simplified inflection points to participate in coincidence detection, reducing the number of coordinates involved in the calculation. At the same time, trajectory matching is transformed into grid set statistics, which alleviates the computing power pressure caused by large-scale route comparison and improves the detection response speed. Attached Figure Description

[0012] Figure 1 This is a system architecture diagram of the operation route repetition rate detection and reverse exemption system of the present invention; Figure 2 This is a flowchart of the Douglas-Peucker polyline thinning algorithm of the present invention; Figure 3 This is a flowchart illustrating the exemption determination process for reverse routes based on suspected illegal routes in this invention. Figure 4 This is a timing diagram for determining the repetition of the work route in this invention; Figure 5 This is a schematic diagram of a typical application scenario for the operation route repetition rate detection and reverse exemption system of the present invention. Detailed Implementation

[0013] To provide a further understanding of the purpose, structure, features, and functions of the present invention, detailed descriptions are provided below with reference to specific embodiments.

[0014] Example 1

[0015] Please refer to the following: Figure 1 , Figure 2 , Figure 3 , Figure 4 This invention provides a method for detecting the repetition rate of sanitation route operations and for reverse exemption.

[0016] In this embodiment, before binding the operation route to the fleet and area, the sanitation company performs batch automatic route duplication verification to clear redundant duplicate routes in the same direction in advance and allows legal round-trip and reverse routes to avoid wasting scheduling resources. Input route ID 981001: Forward sanitation operation route, 10km in total, GPS original sampling interval 10m; Enter route ID 981002: travel in the exact opposite direction of route 981001 along the same corridor; Input route ID 981003: Independent area operation route, with no overlap in geospatial grid with 981001.

[0017] S1: Pre-processing of the original trajectory of the work route by thinning; Read the original GPS waypoint sequences stored in the driving order of the three routes, sort them in ascending order with the sort_order field as the index, and call the thinning algorithm recursively to filter key road turning points based on the preset thinning tolerance threshold of 10m to complete the polyline thinning. Delete all existing thinned records of the route, and batch insert the newly generated thinned ordered waypoint sequence into the thinned waypoint table and save it in the database. The simplified historical points of the route are for scenarios where modifications and updates are performed on existing routes. They are lightweight inflection point coordinates that are processed by an algorithm and stored in a dedicated data table when the trajectory is saved once on the route. The specific steps are as follows: S101: Acquisition and serialization of all waypoint data; When the sanitation company's operators complete the addition of three sanitation operation routes, they read three corresponding original GPS waypoint sequences in GCJ-02 format from the full data table of waypoints generated by the vehicle. The full amount of waypoint data is generated based on GPS coordinates reported by the vehicle positioning terminal at a fixed sampling frequency, and the GCJ-02 coordinate system is uniformly used as the spatial reference benchmark. The GCJ-02 original GPS points refer to the continuous latitude and longitude coordinates collected by sanitation vehicles while they are driving along the work roads and recorded in the GCJ-02 National Bureau of Surveying and Mapping encrypted coordinate system. To ensure accurate reconstruction of the route's spatial orientation, the original GPS waypoint sequence is forced to use the sort_order field in the waypoint record as an index, and all the original GPS waypoints read are sorted in ascending order to construct an original ordered GPS waypoint sequence with a clear driving direction. The sorting field sort_order is an integer column belonging to the full route point data table job_route_waypoint, and has a one-to-one correspondence with the route point records. The value corresponds to the order of the timestamps when the vehicle terminal reports the GPS location. The smaller the value, the earlier the reporting time. Under the same work route identifier, the ordered sequence obtained by sorting in ascending order of the sort_order field must be completely consistent with the spatial trajectory traversed by the vehicle continuously traveling on the actual road in terms of geometric adjacency, that is, to ensure that the sequence of waypoints has topological continuity that can be recursively processed. S102: Setting the thinning tolerance and calling the algorithm; Based on a comprehensive consideration of the GPS positioning drift error of 5-15m for urban sanitation vehicles in the region and the width of urban roads, a thinning tolerance threshold of 10m is set to eliminate geometric noise caused by slight vehicle swaying or signal jitter. Obtain the preset thinning tolerance threshold epsilonMeters=10m; The original ordered GPS waypoint sequence and the thinning tolerance threshold are input together into the Douglas-Peucker piecewise linear thinning algorithm as the initial input data of the algorithm. The Douglas-Peucker polyline thinning algorithm is a polyline geometric simplification algorithm used to remove redundant coordinate points in a trajectory and retain key inflection points of the route. When executing the Douglas-Peucker polyline thinning algorithm, if the vertical distance from the coordinate point to the corresponding driving line segment is greater than the thinning tolerance threshold, it is determined to be a road turning point and retained; otherwise, it is determined to be a redundant sampling point and discarded. The thinning tolerance threshold is a preset judgment threshold, which is used as a standard to determine whether a point needs to be retained. S103: Polyline thinning based on recursive segmentation and vertical distance determination; The start and end points of the current original ordered GPS waypoint sequence to be processed are marked as non-deletable retention points. Based on this, all intermediate points between the start and end points are traversed, and polyline thinning spatial calculations are performed during the traversal process: S1031: Recursive partitioning; The first and last points of the original ordered GPS waypoint sequence of the entire route are not affected by the thinning tolerance threshold judgment and are forcibly retained to ensure that the start and end positions of the route are not lost; Take the start and end points of the current sub-segment, calculate the latitude value corresponding to the geometric midpoint of the line connecting the start and end points, and calculate the meter / degree conversion coefficient in the longitude and latitude directions respectively based on the latitude value of the geometric midpoint. Traverse all intermediate coordinate points p within the current sub-segment, and based on two sets of transformation coefficients, project the latitude and longitude differences of the current sub-segment's start, end, and all intermediate points p to be determined onto a Cartesian coordinate system, converting them into Cartesian coordinate values ​​in meters. The sub-segment is a local straight line segment obtained by the polyline thinning algorithm after the entire polyline of the complete operation trajectory is segmented. The initial sub-segment is the initial baseline segment formed by the start and end points of the complete line. Multiple sub-segments are formed after recursive segmentation. The meter / degree conversion coefficient in the latitudinal direction is taken as the arc length constant corresponding to one degree of latitude on the Earth's meridian, and 111320 meters for mid-latitude regions; The meter / degree conversion coefficient in the longitude direction is the product of the arc length constant and the cosine of the latitude of the geometric midpoint of the line connecting the start and end points of the sub-segment; The perpendicular distance from each undetermined intermediate point p to the line connecting the start and end points of the current sub-segment is calculated using the vector cross product method. Specifically, with the start point of the current sub-segment as the origin, the projection vectors of each intermediate point p relative to the start point are constructed. and the projection vector of the end point relative to the start point. Calculate the projection vector and The absolute value of the two-dimensional cross product, divided by The quotient obtained by taking the modulus length is the vertical deviation distance of the midpoint in the actual geographic space, in meters; Synchronously record the intermediate point p with the largest vertical distance value during the traversal of the intermediate points of the sub-segments in this round. max and p max The corresponding maximum vertical distance value d max ; S1032: Determine the vertical distance between recursive branches; The maximum vertical distance value d max If the value is less than or equal to the preset thinning tolerance threshold, it indicates that all intermediate points p in the current sub-segment are close to the straight path between the starting point and the ending point, and do not contribute much to the overall geometric shape of the entire route. Discard all intermediate points in the current sub-segment interval and terminate the recursion of the current branch. The maximum vertical distance value dmax If the deviation exceeds the preset thinning tolerance threshold, then the maximum deviation point p will be... max Mark these as key inflection points and retain them, while using p max The point is the dividing boundary. The current sub-segment is divided into a left sub-segment and a right sub-segment. The above step S1031 is recursively executed for each sub-segment to calculate, search and determine until there are no intermediate points in any sub-segment of the complete route that meet the thinning tolerance threshold. S104: Persistent storage and data isolation of thinning results; After the recursive segmentation process is completed, all the key inflection points marked as retained are arranged in the order of their original ordered GPS waypoint sequence to form a thinned ordered waypoint sequence PointA, PointB, and PointC, which correspond to routes 981001, 981002, and 981003, respectively. The number of points in the thinned ordered waypoint sequence is significantly reduced compared to the number of points in the original ordered GPS waypoint sequence, while the key turning and directional features of the entire route are fully preserved. The thinning calculation results are written to persistent storage media on the physical disk. An atomic "delete first, insert later" strategy is used to store the thinning results to ensure the consistency of data at the points of transit. Specifically, firstly, based on the current route identifier, all existing thinned records of the route are deleted from the dedicated thinned waypoint data table. Furthermore, if the route is newly created and has never been thinned before, the conditional deletion will not hit any records. In this embodiment, routes 981001, 981002, and 981003 are all newly added routes and have no historical simplified points. The route identifier includes route primary key IDs: 981001, 981002, and 981003; After thinning the three newly generated routes and extracting the ordered waypoint sequences, insert them in batches into the thinned waypoint data table and save them in the database. During insertion, the metadata corresponding to each thinning point is recorded. Further, the metadata includes route identifier, ordered sequence number after thinning, GCJ-02 coordinates, current thinning tolerance threshold of 10m, and thinning algorithm identifier simplify_algo=douglas_peucker. Preferably, the route identifier is the route primary key ID. The sparse waypoint data table and the original ordered GPS waypoint sequence are stored separately in different data tables. Furthermore, the original ordered GPS waypoint sequence is stored in the waypoint table. S2: Initial screening of gridded route repetition rate in batches; After persistent storage of the ordered waypoints after thinning the three routes, the latitude and longitude coordinates of the thinned ordered waypoints are discretized into a grid. After deduplication of the internal grid of the route, statistics of the shared grid and calculation of the overlap rate, suspected illegal route pairs that exceed the overlap threshold are initially screened out. The specific steps are as follows: S201: Grid-based discretization of latitude and longitude coordinates; Perform route identifier deduplication on all the input thinned ordered path point sequences PointA, PointB, and PointC, removing duplicate route identifiers. If the number of routes after deduplication is less than two, terminate the process directly and return an empty result to avoid invalid calculations. A sanitation company worker mistakenly entered route 981001 twice. After deduplication by route identification, only routes 981001, 981002, and 981003 were retained. After deduplication by route identifier, the sequence of all routes participating in this detection is read from the thinned path point table and then ordered by the thinned path points, namely PointA, PointB, and PointC, and then entered into gridded discretization processing. For each thinned point in the ordered sequence of waypoints after thinning of each route, the continuous latitude and longitude coordinates are converted into discrete grid key values. Specifically, Latitude and longitude values ​​are rounded to 4 decimal places according to the rounding rules. The GPS sampling interval is 10m in urban road environment to capture the spatial overlap features between routes and filter out non-substantial differences caused by slight lateral vehicle offset or GPS positioning jitter. Furthermore, the side length of the ground grid corresponding to the four decimal places of latitude and longitude is retained to be 11 meters; After rounding, each sparse point is mapped to a grid key composed of a four-digit latitude string and a four-digit longitude string. The grid key is selected as the basic operation unit for subsequent set intersection operations. S202: Deduplication of grids within the route and statistics of the total number of grids; After completing the mesh transformation of all sparse points, the mesh sets of each route are aggregated into a mesh set, and the mesh sets of each route are deduplicated. Specifically, the deduplication process means that when a route has multiple waypoints within the same grid, these duplicate grid keys only represent that the same spatial location has been passed multiple times. When determining whether two routes share the same physical road segment, they should not be counted repeatedly. Each route is represented as a set of distinct grid keys through set deduplication. The number of unique grid keys contained in each route after deduplication of the grid key set is recorded as the total number of grid keys for each route. After deduplication, routes 981001 and 981002 have 58 grids, and route 981003 has 46 grids. After deduplication, each route is represented as an unordered set of grid keys SeqA-1, SeqB-1, and SeqC-1. The grid key set is used to quickly calculate the grid repetition rate between route pairs, without involving the determination of the route's driving direction. S203: Statistics and repetition rate calculation of shared grids between routes; After obtaining the independent grid set and total number of grids for each route, all routes to be detected are paired up, and each pair is calculated only once, with the route with the smaller identifier first and the larger identifier second, to avoid duplicate calculations. The pairing results are (981001, 981002), (981001, 981003), and (981002, 981003); Calculate the intersection size of the set of grid keys held by the two routes of each route pair, that is, the number of independent grid keys shared by the two routes, and calculate the grid overlap rate of the route pair. The grid overlap rate refers to the ratio of the number of grid keys shared by two routes to the minimum value among the total number of grid keys of each route; it reflects the degree to which the route with a smaller spatial coverage is covered by the other route. The route pair (981001, 981003) shares 0 grids and has an overlap rate of 0. The route pair (981001, 981002) shares a full grid coverage, with an overlap rate of 1. The route pair (981002, 981003) shares 0 grids and has an overlap rate of 0. S204: Screening of suspected violation line pairs based on preset overlap threshold; Obtain the pre-configured overlap threshold of 0.5, and compare the calculated grid overlap rate of each route pair with the overlap threshold of 0.5; If the grid overlap rate of the route pair (981001, 981002) is >0.5, it is marked as a suspected violation route pair and output. The route pair is marked as a suspected violation route pair and included in the preliminary screening results list. The overlap rate of the grids for route pairs (981001, 981003) and (981002, 981003) is <0.5, indicating that there is no substantial spatial repetition in the route pairs, and they are excluded. After completing the initial screening of route pairs, output the suspected non-compliant route pairs (981001, 981002) that exceed the overlap threshold; If the initial screening result list is empty, it is directly determined that there is no duplication among all routes to be detected, without triggering subsequent calculations, thus saving computing resources. S3: Accurate determination of reverse route exemption; For route pairs that are judged as suspected violations due to high overlap of grid keys, the complete ordered grid key sequence of the routes involved in the suspected violation route pair is loaded. The route travel direction feature is further introduced to execute the reverse same-line judgment logic, and legal routes generated by running in the same corridor back and forth direction are identified and eliminated. The specific steps are as follows: S301: Loading of an ordered grid sequence of suspected non-compliant routes; Iterate through all suspected violation route pairs and obtain the route identifiers 981001 and 981002 of the two routes involved in the suspected violation route pair; Using route identifiers as a condition, all thinned point records corresponding to the two routes in each suspected violation route pair are read from the thinned route point data table. The route thinned point records are forcibly sorted in ascending order according to the stored thinned sequence number. For each thinned point, the continuous latitude and longitude coordinates are converted into discrete grid key values, and a complete and ordered grid key sequence SeqA and SeqB with a clear driving direction is reconstructed. Furthermore, the complete ordered grid key sequence retains the complete information of all the sparsed points of a route after grid mapping, which are all arranged in an ordered manner; S302: Reverse peer determination based on sequence order; After obtaining the complete ordered grid key sequence of the two routes in the suspected violation route pair (981001, 981002), the reverse peer judgment logic is executed; The reverse peer determination logic includes two sets of parallel and complementary discrimination mechanisms: strong rules and weak rules. If either set of rules is hit, the suspected violation route pair is identified as a reverse peer route and removed from the list of suspected violation route pairs, and is not regarded as a duplicate route. Specifically, including, S3021: Strong rule determination; For routes 981001 and 981002, the complete ordered grid bond sequences SeqA and SeqB have the same number of grid bonds, so a strong rule judgment is executed. The strong rule judgment compares the complete ordered grid key sequence of the first route with the complete ordered grid key sequence of the second route in reverse order, and determines whether the i-th grid key in the complete ordered grid key sequence of the first route is completely consistent with the i-th to last grid key in the complete ordered grid key sequence of the second route. The comparison is traversed through all grid keys in the complete ordered grid key sequence of the first route. All grid keys in SeqA and SeqB are identical. The two suspected violation routes pass through the same set of spatial grids and travel in completely opposite directions. The route pair is determined to be a round-trip route in the same corridor and is exempted from the list of suspected violations in the initial screening results. S3022: Weak rule determination; When the number of grid keys in the complete ordered grid key sequences of two suspected violation routes is unequal, the process switches to weak rule judgment. If the following progressive judgment condition is met, the route is identified as a round-trip route along the same corridor: Endpoint swapping condition is the start and end point condition: Extract the first and last grid keys of the complete ordered grid key sequence of the first route and the first and last grid keys of the complete ordered grid key sequence of the second route from the suspected violation route; If the first grid key of the first route is equal to the last grid key of the second route, and the last grid key of the first route is equal to the first grid key of the second route, then the spatial start and end points of the two routes are determined to be opposite to each other, satisfying the endpoint interchange condition. The consistency condition for mesh multisets is a frequency condition: The frequency of each different grid bond in the complete ordered grid bond sequence of the two suspected violation routes is counted separately, generating their respective grid multiset frequency distributions, and comparing whether the two are completely consistent. If the types of grid bonds and the frequency of each grid bond are exactly the same in the two routes, it means that the two routes cover the exact same spatial grid multiset, and the only difference is in factors that do not affect the types and frequencies of grid bonds, such as the grid arrangement order and sampling density. When both of the above conditions are met, routes suspected of being in violation that are essentially reverse routes on the same corridor will be exempted from the list of suspected violations in the initial screening results. S303: Output of exemption results and final determination of the violation list; For suspected violation route pairs (981001, 981002), a strong rule reverse peer judgment is performed. If the suspected violation route pair hits the strong rule, it is removed from the preliminary screening list of suspected violation route pairs and is not considered a duplicate violation route. Suspected violation line pairs that do not match any reverse peer judgment rules are retained as duplicate violation line pairs for final confirmation. Output a list of all confirmed suspected violation route pairs; S4: Output of the final repeated circuit result; Summarize all duplicate violation route pairs that have not been granted reverse exemption, organize the route primary key identifier, route business name, grid overlap rate, and overlap threshold, and generate a standardized duplicate route list to be pushed to the front-end page for display. If the remaining route list is empty after strong or weak rule reverse peer exemption processing, it is determined that there is no duplicate violation among all routes 981001, 981002, and 981003 currently participating in the detection, and an empty result is directly output and the process is terminated.

[0018] Compared with existing technologies, this invention enables automated batch identification of repetitive work routes, eliminating the need for manual visual comparison of maps, reducing manual verification costs, and adapting to the batch review needs after the route database continues to expand. By introducing geographic grid quantification to calculate the overlap rate, the computational complexity is reduced, an objective and unified digital judgment standard is established, the differences in subjective human judgment are eliminated, and the judgment results are reproducible and easy to manage in a unified manner. A two-layer line duplication exemption mechanism combining coarse and fine judgment is set up to filter obviously non-overlapping lines in batches, and then a gridded sequence order verification is carried out on a small number of suspected lines, balancing detection efficiency and judgment accuracy. A trajectory thinning preprocessing mechanism is adopted, which uses simplified inflection points to participate in coincidence detection, reducing the number of coordinates involved in the calculation. At the same time, trajectory matching is transformed into grid set statistics, which alleviates the computing power pressure caused by large-scale route comparison and improves the detection response speed.

[0019] Example 2

[0020] Please refer to the following: Figure 1 , Figure 5 This invention provides a system for detecting and reversing the repetition rate of sanitation route operations.

[0021] Sanitation companies conduct a repetitive audit of their route database every week. Currently, there are a total of 127 operational routes in use, five of which are newly added this week and have not yet generated the latest diluted data. Route ID 981001: South City Group A forward sweeping route, 10km in total, GPS original sampling interval 10m; Route ID 981002: South City Group A reverse cleaning route, running in the exact opposite direction of 981001 along the same corridor, 10km in total; Route ID 981003: Independent sweeping route for Group B in the north of the city, with no geographical overlap with the route in the south of the city, totaling 8km; Route ID 981004: Backup route for Group A in the south of the city, in the same direction as 981001 and with 98% overlap, total length 9.8km; Route ID 981005: Partially overlapping route in Group C of Chengnan, with 40% overlap with 981001, totaling 7.5km.

[0022] S1: Pre-processing of the original trajectory of the work route by thinning; All five routes were added this week and the latest thinned data has not yet been generated. The business logic layer JobRouteService automatically schedules the thinning utility class JobRoutePolylineSimplifyUtil to perform Douglas-Peucker polyline thinning preprocessing on the five routes.

[0023] Specifically, it includes the following steps; S101: Acquisition and serialization of all waypoint data; The business logic layer uses the JobRouteWaypointMapper to read the original GPS waypoint records in GCJ-02 format for each of the five routes from the full waypoint data table job_route_waypoint.

[0024] The full amount of waypoint data is generated based on GPS coordinates reported by the vehicle positioning terminal at a fixed sampling frequency, and the GCJ-02 coordinate system is uniformly used as the spatial reference benchmark. To ensure accurate reconstruction of the route spatial orientation, the waypoint table mapper forces the sort_order field in the waypoint record to be used as the index, sorts all the original GPS waypoints read in ascending order and returns them, thus constructing an original ordered GPS waypoint sequence with a clear driving direction; The sorting field sort_order is an integer column that corresponds one-to-one with the route point records. The value corresponds to the order of the timestamps when the vehicle terminal reports the GPS location. The smaller the value, the earlier the reporting time.

[0025] S102: Setting the thinning tolerance and calling the algorithm; Based on the conventional consideration of GPS positioning drift error of 5 to 15m for urban sanitation vehicles and the width of urban roads, the preferred thinning tolerance threshold is set to 10.0m to eliminate geometric noise caused by slight vehicle swaying or signal jitter. The business logic layer obtains the preset thinning tolerance threshold epsilonMeters=10.0m, inputs the original ordered GPS waypoint sequence of the five routes and the thinning tolerance threshold into the thinning utility class JobRoutePolylineSimplifyUtil, and calls the Douglas-Peucker polyline thinning algorithm to recursively filter. The Douglas-Peucker polyline thinning algorithm is a polyline geometric simplification algorithm used to remove redundant coordinate points in a trajectory and retain key inflection points of the route.

[0026] S103: Polyline thinning based on recursive segmentation and vertical distance determination; The thinning utility class marks the start and end points of the current ordered GPS waypoint sequence as non-deletable retention points. Based on this, it iterates through all intermediate points between the start and end points, performing polyline thinning space calculations during the traversal process. S1031: Recursive partitioning; The first and last points of the original ordered GPS waypoint sequence of the entire route are not affected by the thinning tolerance threshold judgment and are forcibly retained to ensure that the start and end positions of the route are not lost; The thinning tool class takes the start and end points of the current calculation sub-segment, calculates the latitude value corresponding to the geometric midpoint of the line connecting the start and end points, and calculates the meter / degree conversion coefficient in the longitude and latitude directions respectively based on the latitude value of the geometric midpoint. Traverse all intermediate coordinate points p within the current sub-segment, and based on two sets of transformation coefficients, project the latitude and longitude differences of the current sub-segment's start, end, and all intermediate points p to be determined onto a Cartesian coordinate system, converting them into Cartesian coordinate values ​​in meters. The sub-segment is a local straight line segment obtained by the polyline thinning algorithm after the entire polyline of the complete operation trajectory is segmented. The initial sub-segment is the initial baseline segment formed by the start and end points of the complete line. Multiple sub-segments are formed after recursive segmentation. The meter / degree conversion coefficient in the latitudinal direction is taken as the arc length constant corresponding to one degree of latitude on the Earth's meridian, and 111,320 meters in mid-latitude regions; the meter / degree conversion coefficient in the longitude direction is taken as the product of the arc length constant and the cosine of the latitude of the geometric midpoint of the line connecting the start and end points of the sub-segment.

[0027] The thinning utility class calculates the perpendicular distance from all undetermined intermediate points p of the current sub-segment to the line connecting the start and end points of the current sub-segment using the vector cross product method. Specifically, taking the start point of the current sub-segment as the origin, it constructs the projection vector of each intermediate point p relative to the start point. and the projection vector of the end point relative to the start point. Calculate the projection vector and The absolute value of the two-dimensional cross product, divided by The quotient obtained by taking the modulus length is the vertical deviation distance of the midpoint in the actual geographic space, in meters; The thinning utility class synchronously records the intermediate point p with the largest vertical distance value during the traversal of the intermediate points of the sub-segments in this round. max and p max The corresponding maximum vertical distance value d max ; S1032: Determine the vertical distance between recursive branches; If the maximum vertical distance value d max If the value is less than or equal to the preset thinning tolerance threshold of 10.0m, it indicates that all intermediate points p in the current sub-segment are close to the straight path between the start and end points, and do not contribute much to the overall geometric shape of the entire route. The thinning tool class discards all intermediate points in the current sub-segment interval and terminates the recursion of the current branch. If the maximum vertical distance value dmax If the deviation exceeds the preset thinning tolerance threshold of 10.0m, the thinning utility class will set the maximum deviation point p. max Mark these as key inflection points and retain them, while using p max The point is the dividing boundary. The current sub-segment is divided into a left sub-segment and a right sub-segment. The process of calculating, searching and judging is recursively executed for each of the two sub-segments until there are no intermediate points in any sub-segment within the complete route that meet the thinning tolerance threshold. S104: Persistent storage and data isolation of thinning results; After the recursive segmentation process is completed, all the key inflection points marked as retained are arranged into a thinned ordered waypoint sequence according to their order in the original ordered GPS waypoint sequence. The number of points in the ordered route point sequence after thinning is significantly reduced compared to the number of original sampling points, while the key turning and directional features of the entire route are fully preserved. The data volume after thinning from the five routes is as follows: Route 981001, original sampling points 1000, 67 points retained after thinning; Route 981002, original sampling points 1000, 67 points retained after thinning; Route 981003, original sampling points 800, 52 points retained after thinning; Route 981004, original number of sampling points 980, 65 points retained after thinning; Route 981005, original sampling points 750, 48 points retained after thinning; The business logic layer writes the thinning calculation results to persistent storage on the physical disk through the JobRouteWaypointSimplifiedMapper. The storage of the thinning results adopts an atomic "delete first, insert later" strategy to ensure the consistency of the path point data.

[0028] Specifically, the business logic layer first uses the current route identifier as a condition to delete all existing thinned records of the current route from the thinned waypoint data table. In this embodiment, all five routes are newly added routes. No thinning operation has been performed before, and the deletion operation will not hit any records. The business logic layer will batch insert the newly generated thinned ordered path point sequence into the thinned path point data table and save it in the database. During insertion, the thinning path point mapper records the metadata corresponding to each thinning point, including route identifiers 981001, 981002, 981003, 981004, and 981005, the ordered sequence number after thinning, GCJ-02 coordinates, the current thinning tolerance threshold of 10.0m, and the thinning algorithm identifier simplify_algo=douglas_peucker.

[0029] S2: Initial screening of gridded route repetition rate in batches; The latitude and longitude coordinates of the thinned ordered route points are discretized into a grid. After deduplication of the internal grid, statistical analysis of the shared grid, and calculation of the overlap rate, suspected illegal route pairs exceeding the overlap threshold are initially screened out.

[0030] The specific steps are as follows: S201: Grid-based discretization of latitude and longitude coordinates; The thinned waypoint mapper performs route identifier deduplication on all the input thinned ordered waypoint sequences, removing duplicate route identifiers. If the number of routes after deduplication is less than two, the mapper terminates the query and returns an empty result. In this embodiment, all five route identifiers are unique and are retained. The thinned waypoint mapper reads the thinned ordered waypoint sequence of all five routes participating in this detection from the thinned waypoint table, performs grid-based discretization processing, and converts the continuous latitude and longitude coordinates into discrete grid key values ​​for each thinned point of each route. Specifically, the waypoint mapper retains 4 decimal places for latitude and longitude values ​​according to the rounding rules, matches the 10m GPS sampling interval in urban road environment, captures the spatial overlap features between routes, and filters out non-substantial differences caused by slight lateral vehicle offset or GPS positioning jitter. Furthermore, the side length of the ground grid corresponding to the four decimal places of latitude and longitude is retained as 11 meters, and the grid key is selected as the basic operation unit for subsequent set intersection operations.

[0031] S202: Deduplication of grids within the route and statistics of the total number of grids; After the thinning path point mapper completes the mesh transformation of all thinned points, it aggregates all the mesh keys contained in each route into a mesh set, taking each route as the grouping unit, and performs deduplication on the mesh set of each route. Specifically, the deduplication process refers to the continuous dense sampling that occurs when a vehicle is waiting at a red light or traveling at low speed at an intersection. These repeated grid keys only represent that the same spatial location has been passed multiple times. When determining whether two routes share the same physical road segment, they should not be counted repeatedly. By deduplicating within the set, the five routes are represented as an unordered set SeqA-1, SeqB-1, SeqC-1, SeqD-1, and SeqE-1, which are composed of distinct grid keys. The thinning path point mapper counts the number of unique grid keys contained in each route after deduplication of the grid key set, which is denoted as the total number of grid keys for each route. The total number of grid cells for the five routes in this embodiment after deduplication is as follows: Route 981001, set SeqA-1, number of points retained after thinning is 67, number of independent mesh keys after deduplication is 58; Route 981002, after SeqB-1 thinning, the number of points retained is 67, and the number of independent mesh keys after deduplication is 58; Route 981003, after SeqC-1 thinning, the number of points retained is 52, and the number of independent mesh keys after deduplication is 46; Route 981004, after SeqD-1 thinning, the number of points retained is 65, and the number of independent mesh keys after deduplication is 56; Route 981005, after SeqE-1 thinning, retains 48 points, and after deduplication, retains 40 independent mesh keys.

[0032] S203: Statistics and repetition rate calculation of shared grids between routes; After the path point mapper obtains the independent grid set and total number of grids for each route, it pairs all routes to be detected, and each pair is calculated only once, with the route identifier of smaller value first and larger value second, to avoid duplicate calculations; In this embodiment, the five routes are paired as follows: Route pair 1 (981001, 981002), Route pair 2 (981001, 981003), Route pair 3 (981001, 981004), Route pair 4 (981001, 981005), Route pair 5 (981002, 981003), Route pair 6 (981002, 981004), Route pair 7 (981002, 981005), Route pair 8 (981003, 981004), Route pair 9 (981003, 981005), and Route pair 10 (981004, 981005). The thinning path point mapper counts the size of the intersection of the unordered grid key sets held by the two routes of each route pair, that is, the number of independent grid keys shared by the two routes, and calculates the grid overlap rate of the route pair. The grid overlap rate refers to the ratio of the number of grid keys shared by two routes to the minimum value of the total number of grid keys of each route, reflecting the degree to which the route with a smaller spatial coverage is covered by the other route; In this embodiment, the overlap rate of route to grid 1 is 100%, the overlap rate of route to grid 2 is 0%, the overlap rate of route to grid 3 is 98.2%, the overlap rate of route to grid 4 is 45%, the overlap rate of route to grid 5 is 0%, the overlap rate of route to grid 6 is 96.4%, the overlap rate of route to grid 7 is 42.5%, the overlap rate of route to grid 8 is 0%, the overlap rate of route to grid 9 is 0%, and the overlap rate of route to grid 10 is 42.5%.

[0033] S204: Screening of suspected violation line pairs based on preset overlap threshold; The thinning path point mapper obtains a pre-configured overlap threshold of 0.5, and compares the calculated grid overlap rate of each path pair with the overlap threshold. If the grid overlap rate of a route pair is greater than the overlap threshold of 0.5, it is marked as a suspected violation route pair and included in the initial screening results list; If the grid overlap rate of a route pair is less than or equal to the overlap threshold of 0.5, the route pair is determined to have no substantial spatial repetition and is excluded. After completing the initial screening of route pairs, the thinning path point mapper outputs three suspected non-compliant route pairs: (981001, 981002), (981001, 981004), and (981002, 981004). S3: Accurate determination of reverse route exemption; For three route pairs that are suspected of being in violation due to high overlap of grid keys, the complete ordered grid key sequence of the routes involved in the suspected violation route pairs is loaded. The business logic layer further introduces the route driving direction feature to execute the reverse same-line judgment logic, and calls the exemption rule utility class JobRouteWaypointOverlapRules to identify and remove legal routes generated by running in the same corridor back and forth direction.

[0034] S301: Loading of an ordered grid sequence of suspected non-compliant routes; The business logic layer iterates through the three suspected violation route pairs and obtains the route identifiers of the two routes involved in each suspected violation route pair; Using route identifiers as conditions, the business logic layer reads all the thinned point records corresponding to the two routes in each suspected violation route pair from the thinned point data table through the thinned waypoint table mapper. The thinned point records are then forcibly sorted in ascending order according to the stored thinned sequence number. For each thinned point, the continuous latitude and longitude coordinates are converted into discrete grid key values, and a complete ordered grid key sequence SeqA, SeqB, and SeqD with a clear driving direction is reconstructed.

[0035] S302: Reverse peer determination based on sequence order; After the business logic layer obtains the complete ordered grid key sequence of all routes for the suspected violation route pair (981001, 981002), (981001, 981004), and (981002, 981004), it calls the exemption rule utility class to execute the reverse peer judgment logic. The reverse peer determination logic includes two sets of parallel and complementary discrimination mechanisms: strong rules and weak rules. If either set of rules is matched, the suspected violation route pair is identified as a reverse peer route.

[0036] S3021: Strong rule determination; The complete ordered grid key sequence lengths of routes 981001 and 981002 are both 58, and the number of grid keys is equal. The exemption rule utility class performs strong rule judgment. The strong rule determination compares the complete ordered grid key sequence SeqA of the first route 981001 with the complete ordered grid key sequence SeqB of the second route 981002 in reverse order, and determines whether the i-th grid key in SeqA is completely consistent with the i-th grid key from the end in SeqB. The first digit of SeqA, a1, equals the last digit of SeqB, b. 58 SeqA second digit a2 = SeqB second to last digit b 57 ,..., SeqA No. 58a 58 = SeqB, the 58th bit from the end, b1, all 58 grid keys correspond one-to-one and are equal; The two routes pass through the same spatial grid sequence and travel in completely opposite directions. The exemption rule tool class determines that the route pair (981001, 981002) is a round-trip route in the same corridor and exempts it from the list of suspected violations in the initial screening results. S3022: Weak rule determination (route pairs 981001, 981004 and 981002, 981004) The number of grid keys for route pair (981001, 981004) is unequal, so strong rules no longer apply, and the exemption rule utility class is switched to weak rule judgment; The exemption rule utility class extracts the endpoint grid keys of routes 981001 and 981004 respectively to determine the endpoint swap conditions: a1 of SeqA and d of SeqD 56 If they are not equal, the endpoint swapping condition is not met, the weak rule is not hit, and the exemption rule tool class determines that the route pair (981001, 981004) is a duplicate route in the same direction and retains it as the final illegal route pair; In route pair (981002, 981004), the endpoints of SeqB and SeqD are not interchanged. 58 ≠d 56 If the weak rule is not hit, the exemption rule tool class determines that the route pair (981002, 981004) is a duplicate route in the same direction and retains it as the final violation route pair.

[0037] S303: Output of exemption results and final determination of the violation list; The exemption rules utility class performs reverse peer judgment on all suspected violation route pairs and outputs a list of all finally confirmed suspected violation route pairs: (981001, 981004), (981002, 981004).

[0038] S4: Output of the final repeated circuit result; The business logic layer aggregates all duplicate violation route pairs that have not been exempted by reverse exemption, organizes the route primary key identifier, route business name, grid overlap rate, and overlap threshold, and generates a standardized duplicate route list to be pushed to the front-end page for display.

[0039] Compared with the prior art, the present invention realizes automated batch identification of repeated operation routes, eliminating the need for manual visual comparison of maps, reducing manual verification costs, and adapting to the batch review needs after the route database continues to expand. By introducing geographic grid quantification to calculate the overlap rate, the computational complexity is reduced, an objective and unified digital judgment standard is established, the differences in subjective human judgment are eliminated, and the judgment results are reproducible and easy to manage in a unified manner. A two-layer line duplication exemption mechanism combining coarse and fine judgment is set up to filter obviously non-overlapping lines in batches, and then a gridded sequence order verification is carried out on a small number of suspected lines, balancing detection efficiency and judgment accuracy. A trajectory thinning preprocessing mechanism is adopted, which uses simplified inflection points to participate in coincidence detection, reducing the number of coordinates involved in the calculation. At the same time, trajectory matching is transformed into grid set statistics, which alleviates the computing power pressure caused by large-scale route comparison and improves the detection response speed.

Claims

1. A method for detecting and reversing the repetition rate of work routes, characterized in that, Includes the following steps: S1: Thinning preprocessing of the original trajectory of the work route; The Douglas-Peucker polyline thinning algorithm is used to recursively filter the original ordered GPS waypoint sequence. A thinning tolerance threshold is preset, and only the first and last points of the route and key road inflection points are retained to obtain lightweight thinned waypoint latitude and longitude coordinates. The thinned waypoint latitude and longitude coordinates are sorted in ascending order to generate a thinned ordered waypoint sequence and inserted into the thinned waypoint table for storage. S2: Initial screening of gridded route repetition rate in batches; The latitude and longitude coordinates of the thinned ordered route points are discretized into a grid. After deduplication of the internal grid, statistics of the number of shared grids and calculation of the overlap rate, suspected illegal route pairs exceeding the overlap threshold are initially screened out. S3: Accurate determination of reverse route exemption; For route pairs that are judged to be suspected of being illegal due to high overlap of grid keys, the complete ordered grid key sequence of the routes involved in the suspected illegal route pair is loaded. The reverse driving direction feature is further introduced to execute the reverse driving judgment logic, so as to identify and remove the legal reverse routes generated by the up and down operation in the same corridor. S4: Output of the final repeated circuit result; Summarize all duplicate violation route pairs that have not been granted reverse exemption, organize the route primary key identifier, route business name, grid overlap rate, and overlap threshold, and generate a standardized duplicate route list to be pushed to the front-end page for display.

2. The method for detecting and reversing the repetition rate of work routes according to claim 1, characterized in that: Step S1 specifically includes: S101: Acquisition and serialization of all waypoint data; After completing the addition of a sanitation operation route, or after adjusting the driving trajectory and points of an existing operation route, click the save command to read the original GPS waypoint sequence corresponding to the route from the full data table of the vehicle's generated waypoints. To ensure accurate reconstruction of the route's spatial orientation, the original GPS waypoint sequence is forced to use the sorting field in the waypoint records as an index, and all the original GPS waypoints read are sorted in ascending order to construct an original ordered GPS waypoint sequence with a clear driving direction. S102: Setting the thinning tolerance and calling the algorithm; Obtain the preset thinning tolerance threshold epsilonMeters; The original ordered GPS waypoint sequence and the thinning tolerance threshold are input together into the piecewise linear thinning algorithm as the initial input data of the algorithm. The Douglas-Peucker polyline thinning algorithm is a polyline geometric simplification algorithm used to remove redundant coordinate points in the trajectory and retain key inflection points of the route. If the vertical distance from the coordinate point to the corresponding driving line segment is greater than the thinning tolerance threshold, it is determined to be a road inflection point and retained; otherwise, it is determined to be a redundant sampling point and removed. The thinning tolerance threshold is a preset judgment threshold, which is used as a standard to determine whether a point needs to be retained. Based on a comprehensive consideration of the GPS positioning drift error of urban sanitation vehicles in the region and the width of urban roads, a thinning tolerance threshold is set to eliminate geometric noise caused by slight vehicle swaying or signal jitter. S103: Polyline thinning based on recursive segmentation and vertical distance determination; The start and end points of the current original ordered GPS waypoint sequence to be processed are marked as non-deletable retention points. Based on this, all intermediate points between the start and end points are traversed, and polyline thinning spatial calculations are performed during the traversal process: S104: Persistent storage and data isolation of thinning results; After the recursive segmentation process is completed, all the key inflection points marked as retained are arranged into a thinned ordered waypoint sequence according to their order in the original ordered GPS waypoint sequence. The thinning calculation results are written to persistent storage media on the physical disk, and the storage of the thinning results adopts an atomic "delete first, insert later" strategy. The newly generated thinned ordered path point sequence is inserted into the thinned path point data table in batches and stored in the database. During the insertion, the metadata corresponding to each thinned point is recorded. Furthermore, the metadata includes route identifier, ordered sequence number after thinning, GCJ-02 coordinates, current thinning tolerance threshold, and thinning algorithm identifier. The sparse waypoint data table and the original ordered GPS waypoint sequence are stored separately in different data tables. Furthermore, the original ordered GPS waypoint sequence is stored in the waypoint table.

3. The method for detecting and reversing the repetition rate of work routes as described in claim 2, characterized in that, Step S103 includes: S1031: Recursive partitioning; The first and last points of the original ordered GPS waypoint sequence of the entire route are not affected by the thinning tolerance threshold judgment and are forcibly retained to ensure that the start and end positions of the route are not lost; Take the start and end points of the current sub-segment, calculate the latitude value corresponding to the geometric midpoint of the line connecting the start and end points, and calculate the meter / degree conversion coefficient in the longitude and latitude directions respectively based on the latitude value of the geometric midpoint. Traverse all intermediate coordinate points p within the current sub-segment, and based on two sets of transformation coefficients, project the latitude and longitude differences of the current sub-segment's start, end, and all intermediate points p to be determined onto a Cartesian coordinate system, converting them into Cartesian coordinate values ​​in meters. The sub-segment is a local straight line segment obtained by the polyline thinning algorithm after the entire polyline of the complete operation trajectory is segmented. The initial sub-segment is the initial baseline segment formed by the start and end points of the complete line. Multiple sub-segments are formed after recursive segmentation. The meter / degree conversion factor in the latitudinal direction is taken as the arc length constant corresponding to one degree of latitude on the Earth's meridian; The meter / degree conversion factor in the longitude direction is the product of the arc length constant and the cosine of the latitude of the geometric midpoint of the line connecting the start and end points of the sub-segment; Calculate the perpendicular distance from all undetermined intermediate points p of the current sub-segment to the line connecting the start and end points of the current sub-segment using the vector cross product method; Specifically, taking the starting point of the sub-segment as the origin, construct the projection vector of the intermediate point p relative to the starting point start and the projection vector of the ending point end relative to the starting point start, calculate the absolute value of the two-dimensional cross product of the projection vector and the two-dimensional cross product of ..., and divide the absolute value by the magnitude of the two-dimensional cross product. The quotient obtained is the vertical deviation distance of the intermediate point in the actual geographic space, in meters. Synchronously record the intermediate point p with the largest vertical distance value during the traversal of the intermediate points of the sub-segments in this round. max and its corresponding maximum vertical distance value d max ; S1032: Determine the vertical distance between recursive branches; Maximum vertical distance value d max If the value is less than or equal to the preset thinning tolerance threshold, discard all intermediate points within the current sub-segment interval and terminate the recursion of the current branch. Maximum vertical distance value d max If the deviation exceeds the preset thinning tolerance threshold, the maximum deviation point p will be... max Mark as a key inflection point and retain it, with p max The point is the dividing boundary. The current sub-segment is divided into a left sub-segment and a right sub-segment. Step S1031 is recursively executed on each of the two sub-segments until there are no intermediate points in any sub-segment within the complete route that meet the thinning tolerance threshold.

4. The method for detecting and reversing the repetition rate of work routes as described in claim 1, characterized in that, Step S2 includes: S201: Grid-based discretization of latitude and longitude coordinates; Perform route identifier deduplication on all the input thinned and ordered waypoint sequences, remove duplicate route identifiers. If there are fewer than two routes after deduplication, terminate the process directly and return an empty result to avoid invalid calculations. After deduplication by route identifier, the sequence of all routes participating in this detection is read from the thinned path point table and then processed into a gridded discretization process. Latitude and longitude values ​​are rounded to decimals according to the rounding rules, and the GPS sampling interval is matched to the urban road environment to capture the spatial overlap features between routes and filter out non-substantial differences caused by slight lateral vehicle offset or GPS positioning jitter. After rounding, each sparse point is mapped to a grid key formed by concatenating a decimal string of latitude and a decimal string of longitude. The grid key serves as the basic unit of operation for subsequent set intersection operations. S202: Grid deduplication and total number of grids within the route After completing the mesh transformation of all sparse points, the mesh sets of each route are aggregated into a mesh set, and the mesh sets of each route are deduplicated. The number of unique grid keys contained in each route after deduplication of the grid key set is recorded as the total number of grid keys for each route. S203: Statistics and repetition rate calculation of shared grids between routes; After obtaining the independent grid set and total number of grids for each route, all routes to be detected are paired up in a fixed order, with each pair being calculated only once. Calculate the intersection size of the set of grid keys held by the two routes of each route pair, that is, the number of independent grid keys shared by the two routes, and calculate the grid overlap rate of the route pair. Grid overlap rate refers to the ratio of the number of grid keys shared by two routes to the minimum value among the total number of grid keys of each route. S204: Screening of suspected violation line pairs based on preset overlap threshold; Obtain the pre-configured overlap threshold, and compare the calculated grid overlap rate of each route pair with the overlap threshold; If the grid overlap rate of a route pair is greater than the overlap threshold, the route pair will be marked as a suspected violation route pair and included in the initial screening results list. If the grid overlap rate of a route pair is less than or equal to the overlap threshold, it will be excluded. After completing the initial screening of route pairs, output a list of all suspected non-compliant route pairs that exceed the overlap threshold; If the initial screening result list is empty, it is directly determined that there is no duplication among all routes to be detected, and subsequent calculations are not triggered.

5. The method for detecting and reversing the repetition rate of work routes as described in claim 1, characterized in that, Step S3 includes: S301: Loading of an ordered grid sequence of suspected non-compliant routes; Iterate through all suspected violation route pairs and obtain the identifiers of the two routes involved in each suspected violation route pair; Using route identifiers as a condition, all the records of the two routes corresponding to each suspected violation route pair are read from the data table of thinned waypoints, and sorted in ascending order. For each thinned point, the continuous latitude and longitude coordinates are converted into discrete grid key values, and a complete and ordered grid key sequence of the route with a clear driving direction is reconstructed. S302: Reverse peer determination based on sequence order; After obtaining the complete ordered grid key sequence of the two routes in a suspected violation route pair, execute the reverse peer judgment logic; Furthermore, the reverse peer determination logic includes two sets of parallel and complementary discrimination mechanisms: strong rules and weak rules. If either set of rules is hit, the suspected violation route pair is identified as a reverse peer route and removed from the list of suspected violation route pairs, and is not regarded as a duplicate route. S303: Output of exemption results and final determination of the violation list; For suspected violation route pairs that do not match any reverse peer judgment rules, retain them as final confirmed duplicate violation route pairs, and output a list of all final confirmed suspected violation route pairs.

6. The method for detecting and reversing the repetition rate of work routes as described in claim 5, characterized in that, In step S302: When the lengths of the complete ordered grid key sequences of the two routes are equal, a strong rule judgment is executed. The ordered grid sequence of the first route is compared in reverse order with the ordered grid sequence of the second route. If the grid keys at all positions are equal, the route is determined to be a reverse parallel route. When the lengths of the complete ordered grid key sequences of the two routes are not equal, weak rule judgment is performed. If the endpoint swapping condition and the grid multiset consistency condition are both satisfied, the route is judged to be a reverse parallel route. Furthermore, the endpoint swap condition is the start and end point condition, where the first grid key of the first route is equal to the last grid key of the second route, and the last grid key of the first route is equal to the first grid key of the second route. The consistency condition for grid multiset is a frequency condition, which means that the types of grid bonds and the frequency of each grid bond in the complete and ordered grid bond sequences of the two routes are exactly the same.

7. The method for detecting and reversing the repetition rate of work routes as described in claim 4, characterized in that, When only the overlap threshold parameter is modified during the detection process, the loading operation of the ordered grid sequence that has been loaded in the original trajectory thinning preprocessing of the operation route in step S1 and the precise determination of the exemption of the reverse route in step S3 will not be re-executed. Instead, it will be re-executed directly from the shared grid statistics and repetition rate calculation of the route in step S203. If the thinning tolerance threshold or mesh accuracy is modified during the detection process, the entire process must be re-executed starting from step S1, the original trajectory thinning preprocessing of the work route.

8. A system for detecting and reversing the repetition rate of work routes, characterized in that, include: Route setting interface, business logic layer, tool layer, data access layer, persistent storage layer; The route setting interface is the interactive entry point for the presentation function. It is used to provide a request call channel to the outside world, receive request parameters from the front end, forward the request to the business logic layer for processing, and return the processing result to the front end. The business logic layer is the core scheduling module, which is used to coordinate the entire process of business processing, write the basic attributes of the route into the main route table, write the original GPS waypoint data into the waypoint table in batches, perform Douglas-Peucker polyline thinning, and write the thinning result into the thinned waypoint table. After receiving the duplicate verification request, the business logic layer is also used to perform deduplication on the input route identifier list, call the data access layer to batch query the sparse point data, complete the initial screening of grid overlap rate, call the exemption rule utility class to perform reverse peer judgment, confirm the final illegal route pair, and output the standardized duplicate route result. The tool layer includes a thinning tool class and an exemption rule tool class, which are used to thin the original ordered GPS waypoint sequence using Douglas-Peucker polylines, identify suspected illegal routes after the initial screening of grid overlap rate, and remove the legal routes from the initial screening results. The thinning tool class has a built-in Douglas-Peucker polyline thinning algorithm. It reads a preset thinning tolerance threshold and is used to perform recursive calculations on the original ordered GPS waypoint sequence, remove redundant sampling points, and retain the first and last points of the route and key inflection points to provide a lightweight calculation data source for route repetition rate determination and reverse exemption. The exemption rule utility class encapsulates a two-layer reverse route determination logic, which is used to identify legal routes traveling back and forth along the same corridor in suspected violation route pairs and remove the legal routes from the suspected violation route pairs; The data access layer includes a route master table mapper, a waypoint table mapper, and a thinned waypoint table mapper, which provide data addition, deletion, batch query, and association matching capabilities, and support all data read and write requirements for route trajectory thinning preprocessing and grid overlap rate batch screening. The route master table mapper is used to provide basic operations for the route master table, including single insertion, batch query, update by identifier, and logical deletion; The waypoint table mapper is used to provide basic operations for the waypoint table, including batch insertion, querying all waypoints by route identifier, and deleting all waypoints by route identifier; The thinning path point mapper is used to provide basic operations for thinning path point tables, including batch insertion, querying all thinning points by route identifier, deleting all old thinning points by route identifier, and batch querying thinning points for multiple routes. Furthermore, the thinned path point mapper also provides batch preliminary screening query of grid overlap rate, including latitude and longitude grid discretization processing, grid deduplication within the route, shared grid statistics between routes, and batch preliminary screening of suspected illegal route pairs based on overlap threshold; The persistent storage layer includes a route master table, a waypoint table, and a thinned waypoint table, which are used to store the basic attributes of the route, the original ordered GPS waypoint sequence, and the lightweight thinned ordered waypoint sequence, respectively. The main route table is used to store the basic business attributes of each sanitation operation route, and is used to display and associate route business information; The basic business attributes of the route include route identifier, route business name, fleet code, starting address and latitude and longitude, ending address and latitude and longitude, route mileage, road extension attributes, planned operation duration, road activation status, and logical deletion flag. The waypoint table is used to store the original ordered GPS waypoint sequence in the GCJ-02 coordinate system collected by sanitation vehicles, as the original input data for the thinning operation. The thinning path point table is used to independently store the ordered path point sequence after thinning, which is simplified by the thinning tool class. It includes route identifier, ordered sequence number after thinning, GCJ-02 coordinates, current thinning tolerance threshold, and thinning algorithm identifier.

9. The operation route repetition rate detection and reverse exemption system as described in claim 8, characterized in that: The route setting interface adopts a RESTful style design, receives request parameters from the front end via the HTTP protocol, forwards the request to the business logic layer for processing, and returns the processing result to the front end in JSON format; The basic attributes of the route include route name, vehicle fleet, start and end addresses, mileage, road grade, and planned operation duration; before the original GPS waypoints are written to the waypoint table in batches, the sorting field in the waypoint record is used as the index to sort all the original GPS waypoints in ascending order. The thinning results are written to the thinning path point table. When storing, an atomic update strategy is adopted: first delete the original old thinning records of the route, and then insert new thinning records in batches. The route master table mapper supports multi-condition combined queries. Furthermore, the multi-conditions include route name, affiliated fleet, and activation status. The route master table mapper supports join table queries for route service names in the duplicate detection process. Furthermore, join table queries refer to associating the route master table with the sparse waypoint table according to the route identifier. The main route table stores the basic business attributes of each sanitation operation route, including route identifier, route business name, fleet code, starting address and latitude and longitude, ending address and latitude and longitude, route mileage, road extension attributes, planned operation duration, road activation status, and logical deletion flag.

10. The operation route repetition rate detection and reverse exemption system as described in claim 8, characterized in that: The exemption rule utility class receives suspected violation route pairs from the business logic layer. Each suspected violation route pair includes a complete ordered grid key sequence of two routes. When the lengths of the complete ordered grid key sequences of the two routes are equal, the strong rule is invoked for determination; when the lengths of the complete ordered grid key sequences of the two routes are unequal, the weak rule is invoked for determination. Strong rule judgment compares the complete ordered grid key sequence of the first route with the reversed complete ordered grid key sequence of the second route. If all grid keys are equal, the two routes are determined to have completely identical spatial grid sets and completely opposite driving directions, and are exempted. The weak rule judgment extracts the first and last grid keys of the suspected violation route for the first route and the second route respectively. When the first grid key of the first route is equal to the last grid key of the second route, the last grid key of the first route is equal to the first grid key of the second route, and the grid key types and frequencies of each grid key of the two routes are exactly the same, it is determined that the spatial grid sets of the two routes are exactly the same and the driving directions are completely opposite, and an exemption is granted.