Drunk driving investigation point intelligent site selection method
By analyzing historical data on drunk driving checkpoints and using clustering algorithms to determine drunk driving checkpoint locations, the problem of relying on experience for checkpoint locations was solved, enabling scientific and reasonable checkpoint location settings and improving checkpoint efficiency and effectiveness.
Patent Information
- Application Number
- CN202511689649.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-18
- Publication Date
- 2026-02-10
AI Technical Summary
In the current technology, the setting of drunk driving checkpoints mainly relies on the experience of traffic management personnel, which is highly subjective, resulting in poor rationality, poor efficiency and effectiveness in enforcement, and may also lead to a waste of human and material resources.
By analyzing historical data on drunk driving vehicles passing through checkpoints, clustering algorithms are used to determine drunk driving checkpoint locations. Site selection is based on objective data, including data extraction, clustering, and Euclidean distance calculation, to form reasonable checkpoint locations.
This improved the rationality and effectiveness of drunk driving checkpoints, reduced the waste of manpower and resources, and enabled data-driven scientific site selection.
Smart Images

Figure CN121504535A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of intelligent traffic control, in particular to a method for intelligently selecting a drunk driving investigation site. BACKGROUND
[0002] Drunk driving is extremely prone to causing serious traffic accidents and poses a serious threat to people's lives and safety. When investigating drunk driving, a reasonable investigation site can improve the efficiency of investigation. However, in the prior art, the traffic management department mainly relies on the management experience of traffic management personnel in setting the drunk driving investigation site, which is highly subjective and cannot guarantee rationality. Moreover, the investigation quantity and effect cannot be well guaranteed, and once the setting is unreasonable, it will cause waste of manpower and resources. SUMMARY
[0003] In order to solve the problem that the setting of the drunk driving investigation site in the prior art is mainly based on the experience of the staff and is highly subjective, the present application provides a method for intelligently selecting a drunk driving investigation site, which can objectively analyze the drunk driving investigation site based on historical data and effectively improve the rationality of the setting of the drunk driving investigation site.
[0004] The technical solution of the present application is as follows: a method for intelligently selecting a drunk driving investigation site, characterized in that it comprises the following steps: S1: obtaining drunk driving investigation records in the past BC months according to a preset backtracking period BC to find all drunk driving vehicles; In the historical toll gate passing data on the day when all the drunk driving vehicles committed drunk driving violations, data is extracted according to a preset extraction time T, and the data corresponding to each vehicle is recorded as: a set of analyzed toll gate passing data; Each set of analyzed toll gate passing data includes all toll gate passing data within a T time length from the time when the drunk driving vehicle was investigated; S2: for each set of analyzed toll gate passing data, find the toll gate passing data sequence corresponding to the drunk driving trip when each drunk driving vehicle was investigated, and record it as: drunk driving data sequence; The drunk driving data sequence includes the toll gate data in the path of the drunk driving trip when the drunk driving vehicle was investigated; S3: for each drunk driving data sequence, extract the toll gate longitude and latitude of the first passing data of each data sequence as the basic data for clustering, and record it as: basic longitude and latitude point; S4: based on a clustering algorithm, cluster all the basic longitude and latitude points to obtain M cluster centers; Set the longitude and latitude corresponding to the M cluster centers as the drunk driving investigation site setting.
[0005] Further characterized in that: It also includes the following steps: S5: cyclically execute steps S1-S4 according to a preset data update period UPD; In step S4, the clustering process of all the basic longitude and latitude points includes the following steps: a1: number all the basic longitude and latitude points: 1-N; Initialize the longitude and latitude point count j=1; a2: take out the basic longitude and latitude point numbered j and set it as the cluster center; a3: determine whether j+1 is greater than N; If j+1>N, execute step:7; Otherwise, execute a4; a4: get the basic longitude and latitude point numbered j+1, denoted as: the to-be-calculated longitude and latitude point; Calculate the Euclidean distance d between each cluster center and the to-be-calculated longitude and latitude point; a5: compare each d with a preset distance threshold Dmax; If the Euclidean distance d between the to-be-calculated longitude and latitude point and a certain cluster center is ≤Dmax, then record the cluster center as: the to-be-adjusted cluster center, put the to-be-calculated longitude and latitude point into the cluster where the adjusted cluster center is located, and execute step a6; Otherwise, if the Euclidean distance between the to-be-calculated longitude and latitude point and all cluster centers is greater than Dmax, then take the to-be-calculated longitude and latitude point as a new cluster center; cyclically execute steps a3-a5; a6: calculate the average of the to-be-calculated longitude and latitude point and the to-be-adjusted cluster center longitude and latitude point, record the longitude and latitude average as: the adjusted longitude and latitude point; replace the to-be-adjusted cluster center with the adjusted longitude and latitude point as a new cluster center; Cyclically execute steps a3-a6; a7: stop clustering; count the longitude and latitude of all cluster centers; The distance threshold Dmax is set to 5km; In step S2, the extraction method of the drunk driving data sequence includes the following steps: b1: obtain each vehicle's to-be-analyzed tollgate passing data set one by one, and extract the collection time stamps corresponding to all the tollgate passing data included therein; b2: arrange all the tollgate passing data in ascending order according to the collection time stamps to obtain a sorted tollgate data set; b3: for the sorted tollgate data set, assume that it includes Num tollgate passing data, then the sorted collection time stamp set corresponding to the sorted tollgate data set is {TS1, TS2, …, TS Num}; Initialize i = 1; b4: compare i and Num; If i > Num, execute step b8; Otherwise, execute step b5; b5: calculate the time interval of the collection timestamps TS i and TS i+1 , denoted as: the to-be-confirmed time interval t; t = |TS i -TS i+1 |; 1 b6: compare the to-be-confirmed time interval t and the preset interval threshold tMax; If t > tMax, place TS i and TS i+1 into two different sub-sets respectively; execute step b7; Otherwise, if t ≤ tMax, place TS i and TS i+1 into the same sub-set; execute step b7; b7: i = i + 1; Loop execute steps b4-b7; b8: stop the extraction operation, find the collection timestamp sub-set where TS Num is located in all sub-sets, denoted as: the drunk driving time sub-set of this time; b9: arrange all the tollgate passing vehicle data corresponding to the drunk driving time sub-set of this time in ascending order into the same set to obtain the drunk driving data sequence of this time; The interval threshold tMax is set to 120 minutes; In step S1, the extraction time T = 4 hours; the backtracking period BC is set to 3 months.
[0006] The method provided by the application finds the drunk driving vehicle through the drunk driving vehicle processing record, locates the drunk driving trip data sequence of the drunk driving vehicle through the historical passing vehicle data of the tollgate on the day when the drunk driving vehicle is processed, and then finds the departure point neighboring tollgate of the drunk driving trip of the drunk driving vehicle processed. The departure point neighboring tollgates of the drunk driving trip data sequences of multiple drunk driving vehicles are clustered, the clustering center of the clustering result represents the position where the drunk driving trip of the drunk driving vehicle in the same area is most likely to pass through, and the position is set as the drunk driving processing point of the area, which can effectively improve the processing effect of the drunk driving processing point. In the method, the historical passing vehicle data of the drunk driving vehicle is calculated to find the drunk driving processing point, so that the selection process of the drunk driving processing point is independent of personal experience and follows objective data to ensure that the result is more objective. BRIEF DESCRIPTION OF DRAWINGS
[0007] Figure 1 This is a flowchart of the intelligent site selection method for drunk driving checkpoints proposed in this application. Detailed Implementation
[0008] like Figure 1 As shown, this application includes a method for intelligent location selection of drunk driving checkpoints, which includes the following steps.
[0009] S1: According to the preset backtracking period BC, obtain the drunk driving investigation records within the past BC months to find all drunk driving vehicles.
[0010] The drunk driving detection record includes fields for the type of license plate of the vehicle being investigated, the license plate number, and the time of the drunk driving detection.
[0011] From the historical checkpoint vehicle data of all drunk driving violations on the day of the violation, data is extracted according to the preset extraction time T, and the data corresponding to each vehicle is recorded as: the set of checkpoint vehicle data to be analyzed. Each set of checkpoint vehicle data to be analyzed includes: all checkpoint vehicle data within a past time period T, up to the time when a drunk driving vehicle was detected.
[0012] The specific extraction duration T and backtracking period BC are set according to the actual situation of each city. Based on the rate at which the body metabolizes alcohol, drinking within 4 hours will be detected. To reduce the system's computational load, the extraction duration is set to T = 4 hours in this embodiment. The backtracking period BC is set to ensure sufficient drunk driving data for analysis; the specific backtracking period is set according to the number of drunk driving vehicles in each city. If there are many drunk driving vehicles, the backtracking period can be shorter. In this embodiment, BC is set to 3 months.
[0013] Specifically, each time a drunk driving case is detected based on drunk driving records from the past three months, the system retrieves all vehicle passage data from checkpoints within the four hours preceding the day the drunk driving case was detected, from historical checkpoint data. The specific fields in the checkpoint vehicle passage data include: license plate type, license plate number, passage time, checkpoint longitude, and checkpoint latitude. Based on the checkpoint's latitude and longitude, the route taken by the drunk driving vehicle can be identified.
[0014] In this method, high-incidence areas of drunk driving are identified by analyzing the routes taken by vehicles caught driving under the influence. Therefore, it's necessary to first analyze the routes taken by each drunk driver. Since this analysis isn't based on the specific travel path of a single vehicle, but rather on the intersection of the travel routes of multiple vehicles for trend analysis, a clear path for any individual vehicle isn't required. Therefore, this application sets an extraction time T to infer the travel path of the drunk vehicle from the point of consumption to the location where it was caught. Then, from this set of checkpoint vehicle data to be analyzed for time T, the data sequence of the drunk driving incident is roughly found, and the location of the consumption point is analyzed based on this data sequence. The specific analysis process is shown below.
[0015] S2: For each set of checkpoint vehicle data to be analyzed, find the checkpoint vehicle data sequence corresponding to each drunk driving incident, denoted as: the drunk driving incident data sequence. The drunk driving incident data sequence includes the checkpoint data along the route of the drunk driving vehicle during the incident.
[0016] Specifically, the method for extracting the data sequence of a drunk driving incident includes the following steps.
[0017] b1: Obtain the set of vehicle passage data corresponding to each vehicle to be analyzed, and extract the collection timestamps corresponding to all the vehicle passage data included in the set.
[0018] b2: Sort all checkpoint vehicle data in ascending order according to the collection timestamp to obtain the sorted checkpoint data set; by sorting by time, ensure that the sorted checkpoint data set can reflect the travel sequence of drunk driving vehicles.
[0019] b3: For the sorted checkpoint data set, assuming it includes Num checkpoint vehicle passage data, then the set of sorted collection timestamps corresponding to the sorted checkpoint data set is {TS1, TS2, ..., TS...} Num Each timestamp corresponds to one vehicle passage data point at the checkpoint. Initialize the checkpoint data counter i=1.
[0020] b4: Compare i and Num; If i > Num, then proceed to step b8; Otherwise, proceed to step b5.
[0021] b5: Calculate the data collection timestamp TS i and TS i+1 The time interval is denoted as: the time interval to be confirmed, t. t=|TS i -TS i+1 |; b6: Compare the time interval t to be confirmed with the preset interval threshold tMax; In this application, an interval threshold tMax is set to segment two trips. That is, in the sorted checkpoint data set, if the time interval between the collection of vehicle passage data from two adjacent checkpoints exceeds 120 minutes, it indicates that the drunk driving vehicle stopped for an extended period, constituting two separate trips. The specific tMax value is set based on empirical values. In this embodiment, the interval threshold tMax is set to 120 minutes.
[0022] If t > tMax, it indicates that there was a long stop in the middle, and TS will be... i and TS i+1 Place them into two different subsets respectively; proceed to step b7; Otherwise, if t ≤ tMax, then the intermediate stop is considered not to be a long-term stop, and TS is set to... i and TS i+1 Place them into the same subset; proceed to step b7.
[0023] b7: i = i + 1; Repeat steps b4 to b7; check the time interval of all adjacent timestamps.
[0024] b8: After all timestamps have been calculated, stop the extraction operation and find TS in all subsets. Num The set of timestamps that the drunk driving incident occurred in is denoted as: the set of timestamps for that incident.
[0025] b9: Arrange all the vehicle data from checkpoints corresponding to the timestamp subset of the drunk driving incident in ascending order and place them into the same set to obtain the data sequence of the drunk driving incident; The data in the checkpoint vehicle passage data set to be analyzed is retrieved by looking back from the time when drunk driving vehicles were detected. Therefore, the last checkpoint vehicle passage data TS is considered to be in time. Num It's the location closest to the drunk driving checkpoint, with a timestamp of TS. Num The subset of checkpoint vehicle passage data to which the drunk driving trip belongs represents the travel itinerary. The latitude and longitude of the checkpoint at the first vehicle passage data point in this subset are determined to be the location closest to the drinking area. By comprehensively analyzing the latitude and longitude of the first checkpoint data point for all drunk driving trips, the locations where drunk driving vehicles frequently appear can be determined.
[0026] S3: For each drunk driving data sequence, extract the latitude and longitude of the checkpoint for the first vehicle passage data in each data sequence, and use it as the basic data for clustering, denoted as: basic latitude and longitude point.
[0027] S4: Based on the clustering algorithm, all basic latitude and longitude points are clustered to obtain M cluster centers; the latitude and longitude corresponding to the M cluster centers are set as drunk driving checkpoints.
[0028] In this method, clustering algorithms are used to analyze the frequent locations of drunk driving vehicles. Existing clustering algorithms can be used. In this embodiment, the Quick Bundles algorithm is chosen, which is an efficient algorithm for trajectory clustering. Its core idea is to cluster trajectory data through rapid grouping and distance metrics, making it suitable for the large-scale trajectory data analysis scenario described in this application.
[0029] Step S4, the process of clustering all basic latitude and longitude points, includes the following steps: a1: Number all basic latitude and longitude points: 1~N; Initialize the latitude and longitude point counter j=1.
[0030] a2: Extract the base latitude and longitude point numbered j and set it as the cluster center.
[0031] a3: Determine if j+1 is greater than N; If j+1>N, then proceed to step 7; Otherwise, execute a4.
[0032] a4: Obtain the basic latitude and longitude point numbered j+1, denoted as: latitude and longitude point to be calculated; Calculate the Euclidean distance d between the latitude and longitude point to be calculated and each cluster center.
[0033] a5: Compare each d with the preset distance threshold Dmax; the specific Dmax value is set according to the actual situation of the city. In this embodiment, the distance threshold Dmax is set to 5km.
[0034] If the Euclidean distance d between the latitude and longitude point to be calculated and a certain cluster center is less than or equal to Dmax, then the cluster center is denoted as the cluster center to be adjusted. The latitude and longitude point to be calculated is placed in the cluster where the cluster center to be adjusted is located, and step a6 is executed. Otherwise, if the Euclidean distance between the latitude and longitude point to be calculated and all cluster centers is greater than Dmax, then the latitude and longitude point to be calculated is used as a new cluster center; repeat steps a3 to a5.
[0035] Within a city, each administrative district may have its own designated areas for drunk driving. Using Dmax, different drinking areas can be grouped, with similar driving trajectories appearing in the same cluster. Dissimilar trajectories are quickly grouped using Dmax and assigned to different clusters.
[0036] a6: Calculate the average of the latitude and longitude points to be calculated and the latitude and longitude points of the cluster centers to be adjusted, and record the average latitude and longitude points as: the adjusted latitude and longitude points; replace the cluster centers to be adjusted with the adjusted latitude and longitude points as the new cluster centers; Repeat steps a3 to a6.
[0037] Because the division of the data sequence for drunk driving incidents is only a rough division, the basic latitude and longitude points are only checkpoints that are relatively close to the drinking area. This method gradually converges the drinking area by using a large number of basic latitude and longitude points from the data sequence of drunk driving incidents, and finally obtains a more accurate location for drunk driving detection.
[0038] a7: After all the basic latitude and longitude points have been included in the calculation, stop clustering; count the latitude and longitude of all cluster centers.
[0039] Given N originating points with latitude and longitude coordinates, and M cluster centers obtained through clustering, the latitude and longitude coordinates of these M points represent the calculated locations of drunk driving checkpoints.
[0040] S5: To ensure the data reflects the latest situation of drunk driving in the city, this application also sets a data update cycle (UPD) to update the data regularly. In this embodiment, the UPD is set to 3 months. The set of vehicle passage data to be analyzed at the checkpoints is updated every three months. That is, steps S1 to S4 are executed cyclically according to the preset data update cycle (UPD).
[0041] By using the technical solution of this invention, historical checkpoint data of drunk driving violations is extracted, and a time threshold is set to determine the checkpoint data sequence for the trip in which a drunk driving violation occurred. A latitude and longitude clustering method based on the fast-bundling algorithm is then applied. This invention facilitates traffic management departments in scientifically and rationally setting drunk driving checkpoints, enabling them to shift from relying on "experience values" to data-driven "calculated values."
Claims
1. A method for intelligent location selection of drunk driving checkpoints, characterized in that, It includes the following steps: S1: According to the preset backtracking period BC, obtain the drunk driving investigation records within the past BC months to find all drunk driving vehicles; From the historical checkpoint vehicle data of all drunk driving violations on the day of the violation, data is extracted according to the preset extraction time T, and the data corresponding to each vehicle is recorded as: the set of checkpoint vehicle data to be analyzed. Each set of vehicle passage data to be analyzed includes: all vehicle passage data from checkpoints within a past time period T, up to the time when a drunk driving vehicle was detected. S2: For each set of checkpoint vehicle data to be analyzed, find the checkpoint vehicle data sequence corresponding to each drunk driving vehicle that was caught driving under the influence of alcohol, and denot it as: the data sequence of the drunk driving incident. The data sequence for the drunk driving incident includes checkpoint data along the route of the drunk driving vehicle during the trip in which the drunk driving was detected. S3: For each of the drunk driving data sequences, extract the latitude and longitude of the checkpoint for the first vehicle passage data in each data sequence, and use it as the basic data for clustering, denoted as: basic latitude and longitude point; S4: Based on the clustering algorithm, all the basic latitude and longitude points are clustered to obtain M cluster centers; Set the latitude and longitude corresponding to the M cluster centers as drunk driving checkpoints.
2. The intelligent location selection method for drunk driving checkpoints according to claim 1, characterized in that: It also Includes the following steps: S5: Execute steps S1 to S4 repeatedly according to the preset data update cycle UPD.
3. The intelligent site selection method for drunk driving checkpoints according to claim 1, characterized in that: Step S4, the process of clustering all the basic latitude and longitude points, includes the following steps: a1: Number all the aforementioned basic latitude and longitude points: 1~N; Initialize the latitude and longitude point count j=1; a2: Extract the basic latitude and longitude point numbered j and set it as the cluster center; a3: Determine if j+1 is greater than N; If j+1>N, then proceed to step 7; Otherwise, execute a4; a4: Obtain the basic latitude and longitude point numbered j+1, denoted as: latitude and longitude point to be calculated; Calculate the Euclidean distance d between each cluster center and the latitude and longitude point to be calculated; a5: Compare each d with the preset distance threshold Dmax; If the Euclidean distance d between the latitude and longitude point to be calculated and a certain cluster center is less than or equal to Dmax, then the cluster center is denoted as the cluster center to be adjusted. The latitude and longitude point to be calculated is placed in the cluster where the cluster center to be adjusted is located, and step a6 is executed. Otherwise, if the Euclidean distance between the latitude and longitude point to be calculated and all cluster centers is greater than Dmax, then the latitude and longitude point to be calculated is taken as a new cluster center; repeat steps a3~a5. a6: Calculate the average value of the latitude and longitude point to be calculated and the latitude and longitude point of the cluster center to be adjusted, and record the average value of the latitude and longitude points as: the adjusted latitude and longitude point; replace the cluster center to be adjusted with the adjusted latitude and longitude point as the new cluster center; Repeat steps a3 to a6; a7: Stop clustering; calculate the latitude and longitude of all cluster centers.
4. The intelligent site selection method for drunk driving checkpoints according to claim 3, characterized in that: The distance threshold Dmax is set to 5km.
5. The intelligent site selection method for drunk driving checkpoints according to claim 1, characterized in that: In step S2, the method for extracting the data sequence of the drunk driving incident includes the following steps: b1: Obtain the set of vehicle passage data corresponding to each vehicle at the checkpoint to be analyzed, and extract the collection timestamps corresponding to all the vehicle passage data at the checkpoints included therein; b2: Sort all the vehicle passage data at the checkpoints in ascending order according to the collection timestamps to obtain the sorted checkpoint data set; b3: For the sorted checkpoint data set, assuming it includes Num checkpoint vehicle passage data, then the set of sorted collection timestamps corresponding to the sorted checkpoint data set is {TS1, TS2, ..., TS...} Num }; Initialize i = 1; b4: Compare i and Num; If i > Num, then proceed to step b8; Otherwise, proceed to step b5; b5: Calculate the data collection timestamp TS i and TS i+1 The time interval is denoted as: the time interval to be confirmed, t. t=|TS i -TS i+1 |; b6: Compare the time interval t to be confirmed with the preset interval threshold tMax; If t > tMax, then TS i and TS i+1 Place them into two different subsets respectively; proceed to step b7; Otherwise, if t≤tMax, then TS i and TS i+1 Place them into the same subset; proceed to step b7; b7: i = i + 1; Repeat steps b4 to b7. b8: Stop the extraction operation and find TS in all subsets. Num The subset of timestamps in which the drunk driving incident occurred is denoted as: the set of timestamps for that particular drunk driving incident; b9: Arrange all the vehicle passage data corresponding to the timestamp subset of the drunk driving incident in ascending order and place them into the same set to obtain the data sequence of the drunk driving incident.
6. The intelligent site selection method for drunk driving checkpoints according to claim 5, characterized in that: The interval threshold tMax is set to 120 minutes.
7. The intelligent location selection method for drunk driving checkpoints according to claim 1, characterized in that: In step S1, the extraction time T = 4 hours; the backtracking period BC is set to 3 months.