Abnormal vehicle detection method, device and equipment
By judging the time difference and number of position points of the vehicle at different location points in the management system, and using the minimum pass time and preset thresholds to distinguish normal vehicles from license plate vehicles, the management error problem caused by the same license plate mark is solved, and the accuracy of the management system is improved.
Patent Information
- Application Number
- CN202111410662.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2041-11-19
AI Technical Summary
In the prior art, since the license plate marks of normal vehicles and licensed vehicles are the same, it is difficult to distinguish the management system, resulting in management errors.
By obtaining the time difference between the target vehicle at two position points and the number of position points passing through, using the minimum pass time and the preset number threshold, whether the vehicle is an abnormal vehicle, and distinguishing between normal vehicles and delegate vehicles.
Effectively identify vehicles with license plates, reduce management errors, and improve the accuracy of the management system.
Smart Images

Figure CN114140780B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent transportation, and in particular to a method, device and equipment for detecting abnormal vehicles. Background Art
[0002] Vehicles equipped with cloned license plates are called "cloned vehicles." Clone vehicles are considered unusual vehicles and require prompt detection and effective management. Clone license plates are fake license plates with the same license plate markings as the real license plate, installed on the vehicle.
[0003] For specific places such as roads, a large number of cameras (such as analog cameras or network cameras, etc.) are usually deployed. These cameras can collect images of vehicles traveling on the road, and analyze the vehicle's license plate identification based on the image. Vehicles with the same license plate identification are identified as the same vehicle, and the vehicle's road driving behavior is managed based on the vehicle's road driving behavior, thereby regulating the vehicle's road driving behavior.
[0004] However, since the license plate identifier of the real license plate of the normal vehicle is the same as the license plate identifier of the cloned license plate of the abnormal vehicle, when vehicles with the same license plate identifier are confirmed as the same vehicle, the normal vehicle and the abnormal vehicle may be identified as the same vehicle, and management errors may occur when managing the vehicle. For example, management measures for abnormal vehicles may be applied to normal vehicles, resulting in management errors. Summary of the Invention
[0005] The present application provides a method for detecting abnormal vehicles, the method comprising:
[0006] If the target vehicle travels from a first position point to a second position point, obtaining a first time point at which the target vehicle is at the first position point, a second time point at which the target vehicle is at the second position point, and the number of target position points passed by the target vehicle from the first position point to the second position point;
[0007] If the difference between the second time point and the first time point is less than the minimum travel time between the first position point and the second position point, determining that the target vehicle is an abnormal vehicle;
[0008] If the difference between the second time point and the first time point is not less than the minimum passage time, and the minimum number of position points between the first position point and the second position point is greater than the sum of the target position point number and the preset number threshold, the target vehicle is determined to be an abnormal vehicle.
[0009] The present application provides a device for detecting abnormal vehicles, the device comprising:
[0010] an acquisition module, configured to acquire, if a target vehicle travels from a first location point to a second location point, a first time point at which the target vehicle is at the first location point, a second time point at which the target vehicle is at the second location point, and the number of target location points passed by the target vehicle from the first location point to the second location point;
[0011] A determination module is used to determine that the target vehicle is an abnormal vehicle if the difference between the second time point and the first time point is less than the minimum passage time between the first position point and the second position point; if the difference between the second time point and the first time point is not less than the minimum passage time, and the minimum number of position points between the first position point and the second position point is greater than the sum of the number of target position points and a preset number threshold, then determine that the target vehicle is an abnormal vehicle.
[0012] The present application provides an abnormal vehicle detection device, comprising: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; wherein the processor is used to execute the machine-executable instructions to implement the above-mentioned abnormal vehicle detection method.
[0013] The present application provides a machine-readable storage medium, which stores machine-executable instructions that can be executed by a processor; wherein the processor is used to execute the machine-executable instructions to implement the above-mentioned abnormal vehicle detection method.
[0014] The present application provides a computer program, which is stored in a machine-readable storage medium. When a processor executes the computer program, it prompts the processor to implement the above-mentioned abnormal vehicle detection method.
[0015] It can be seen from the above technical solution that in the embodiment of the present application, based on the minimum passage time and the minimum number of position points between the first position point and the second position point, if the difference between the second time point when the target vehicle is at the second position point and the first time point when the target vehicle is at the first position point is less than the minimum passage time, the target vehicle is determined to be an abnormal vehicle; if the difference is not less than the minimum passage time, and the minimum number of position points is greater than the sum of the number of target position points (i.e., the number of position points passed by the target vehicle from the first position point to the second position point) and the preset number threshold, the target vehicle is determined to be an abnormal vehicle. The above method can identify whether the target vehicle is an abnormal vehicle (i.e., a cloned license plate vehicle with a cloned license plate), thereby distinguishing between normal vehicles with real license plates and abnormal vehicles with cloned license plates. Although the license plate identifier of the real license plate of the normal vehicle is the same as the license plate identifier of the cloned license plate of the abnormal vehicle, normal vehicles and abnormal vehicles can be identified as different vehicles, which reduces the occurrence of management errors when managing vehicles, for example, reducing the number of times management measures for abnormal vehicles are applied to normal vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments of the present application or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0017] Figure 1 This is a schematic diagram of the network topology of the location points in one embodiment of the present application;
[0018] Figure 2 It is a flowchart of a method for detecting an abnormal vehicle in one embodiment of the present application;
[0019] Figure 3 It is a flowchart of a method for detecting an abnormal vehicle in one embodiment of the present application;
[0020] Figure 4 This is a schematic diagram of filtering historical data in one embodiment of the present application;
[0021] Figure 5 is a schematic diagram of a network topology in one embodiment of the present application;
[0022] Figure 6 It is a flowchart of a method for detecting an abnormal vehicle in one embodiment of the present application;
[0023] Figure 7 It is a structural schematic diagram of an abnormal vehicle detection device in one embodiment of the present application;
[0024] Figure 8 It is a hardware structure diagram of an abnormal vehicle detection device in one embodiment of the present application. DETAILED DESCRIPTION
[0025] The terms used in the embodiments of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The singular forms "a," "the," and "the" used in this application and claims are also intended to include plural forms unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0026] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the word "if" used may also be interpreted as "at the time of" or "when" or "in response to determining".
[0027] Before introducing the technical solutions of the embodiments of the present application, the technical terms related to the present application are first introduced.
[0028] Location points: For specific places such as roads (such as highway toll booths, traffic checkpoints, and highways), a large number of cameras (such as analog cameras or network cameras) are usually deployed. These cameras can capture images of vehicles traveling on the road. Each camera corresponds to a location point, that is, the location of the camera is recorded as a location point, which can also be called a checkpoint. In other words, by deploying cameras at a large number of location points, images of vehicles traveling on the road can be collected through these cameras.
[0029] See also Figure 1 The diagram shows the network topology of the location points. The network topology can be configured by the user based on experience or learned by an algorithm. There is no restriction on this. As long as the network topology can be obtained, the network topology can include all location points, that is, all location points constitute the network topology. Figure 1 In the figure, six position points (such as position point A, position point B, position point C, position point D, position point E, and position point F, etc.) are taken as an example. In actual applications, the number of position points is much greater than six.
[0030] The camera deployed at each location point can capture images of vehicles passing through the location point and analyze features such as the license plate identification, vehicle color, and vehicle appearance based on the images. The camera can also send vehicle data to a storage device, which stores the vehicle data in a historical database. The vehicle data stored in the historical database is called historical data. The historical data includes a large number of data records, each of which is a piece of vehicle data and can include the license plate identification, vehicle features (such as vehicle color, vehicle appearance, etc.), the image of the vehicle, the acquisition time (indicating that the image of the vehicle was acquired by the camera at the acquisition time, indicating that the vehicle was at the location point at the acquisition time), and the information of the location point (which can be the identifier of the location point, such as location point A, location point B, etc., or the latitude and longitude coordinates of the location point, taking the identifier of the location point as an example). Of course, the data record can also include other content, which is not limited to this.
[0031] Normal and abnormal vehicles: Vehicles with real license plates are called normal vehicles, while vehicles with cloned license plates are called abnormal vehicles. In this embodiment, abnormal vehicles refer to cloned license plates. Clone license plates are fake license plates with the same license plate identifier as the real license plate, installed on the cloned vehicle.
[0032] Specify statistical period: You can use the 24 hours of a day (such as 0:00-24:00) as a specified statistical period, or the 7*24 hours of a week as a specified statistical period. There is no restriction on this.
[0033] In an embodiment of the present application, a method for detecting abnormal vehicles is proposed. This method can be applied to a management device. The management device and storage device can be deployed on the same device. That is, the management device directly obtains vehicle data from a historical database and analyzes whether a vehicle is abnormal based on the vehicle data. The management device and storage device can also be deployed on different devices. That is, the management device and storage device are connected to each other. The management device can obtain vehicle data from the historical database of the storage device and analyze whether a vehicle is abnormal based on the vehicle data.
[0034] See also Figure 2 FIG. 1 is a flow chart of the abnormal vehicle detection method, which may include:
[0035] Step 201: If the target vehicle travels from a first position point to a second position point, obtain a first time point when the target vehicle is at the first position point, a second time point when the target vehicle is at the second position point, and the number of target position points passed by the target vehicle from the first position point to the second position point.
[0036] For example, the target vehicle is any vehicle, the first location point is any location point among all location points, and the second location point is any location point among all location points, and the second location point is different from the first location point. Assuming that the target vehicle is vehicle s1 (i.e., license plate identifier s1), the first location point is location point A, and the second location point is location point D, then: all data records corresponding to vehicle s1 are obtained from the historical database, each data record including license plate identifier s1, collection time, and location point identifier. Sort these data records in order from the collection time. Assume that the location point identifier in the first data record is location point A, the location point identifier in the second data record is location point B, the location point identifier in the third data record is location point D, and the location point identifier in the fourth data record is location point C. And so on, when vehicle s1 travels from location point A to location point D, the first time point is the collection time in the first data record, and the second time point is the collection time in the third data record. The number of target location points is 2, that is, when traveling from location point A to location point D, it passes through location point B and location point D in sequence, passing through 2 location points.
[0037] Step 202: Determine whether the difference between the second time point and the first time point is less than the minimum travel time between the first location point and the second location point. If not, proceed to step 203; if so, proceed to step 204.
[0038] For example, the minimum travel time between the first location point and the second location point may be determined first. The minimum travel time may be configured based on experience or obtained using a certain algorithm, and there is no limitation on this.
[0039] For example, after obtaining the second time point and the first time point, the difference between the second time point and the first time point can be calculated. If the difference is not less than the minimum travel time, step 203 can be executed; if the difference is less than the minimum travel time, step 204 can be executed.
[0040] Step 203 : Determine whether the minimum number of location points between the first location point and the second location point is greater than the sum of the target location point number and a preset number threshold. If so, proceed to step 204 .
[0041] Exemplarily, the minimum number of position points between the first position point and the second position point may be determined. The minimum number of position points may be configured based on experience or obtained using a certain algorithm, and there is no limitation to this.
[0042] For example, after obtaining the number of target location points that the target vehicle passes through when traveling from the first location point to the second location point, the sum of the number of target location points and a preset number threshold (which can be configured based on experience and is not limited to 2 or 3, for example) can be calculated. If the minimum number of location points is greater than the sum of the number of target location points and the preset number threshold, step 204 can be executed.
[0043] Step 204: Determine whether the target vehicle is an abnormal vehicle (ie, a vehicle with a cloned license plate).
[0044] In summary, if the difference between the second time point and the first time point is less than the minimum travel time between the first and second location points, the target vehicle can be determined to be an abnormal vehicle. Alternatively, if the difference between the second time point and the first time point is not less than the minimum travel time between the first and second location points, and the minimum number of location points between the first and second location points is greater than the sum of the number of target location points and a preset number threshold, the target vehicle can be determined to be an abnormal vehicle.
[0045] In a possible implementation, for step 203, if the result of the judgment is no, that is, the minimum number of position points is not greater than the sum of the target number of position points and the preset number threshold, the following step 205 may also be included (step 205 is an optional step. Figure 2 Step 205 is not shown in FIG. 1 ):
[0046] Step 205: Determine whether the target vehicle is a normal vehicle, that is, the target vehicle is not a vehicle with a fake license plate.
[0047] In summary, if the difference between the second time point and the first time point is not less than the minimum travel time between the first position point and the second position point, and the minimum number of position points between the first position point and the second position point is not greater than the sum of the target position point number and the preset number threshold, then the target vehicle is determined to be a normal vehicle.
[0048] In one possible implementation, the minimum travel time is the minimum travel time corresponding to a specified statistical period, and the minimum number of location points is the minimum number of location points corresponding to a specified statistical period, that is, for a specified statistical period, the minimum travel time and the minimum number of location points between the first location point and the second location point are determined.
[0049] In another possible implementation, the minimum travel time is the minimum travel time corresponding to the target time period, and the minimum number of location points is the minimum number of location points corresponding to the target time period, that is, for the target time period, the minimum travel time and the minimum number of location points between the first location point and the second location point are determined.
[0050] For example, for a specified statistical period, the specified statistical period can be divided into multiple time periods. There is no restriction on the division method, and multiple time periods can be divided arbitrarily. For example, the specified statistical period (such as 0:00-24:00) is evenly divided into 4 time periods, time period 1 (0:00-6:00), time period 2 (6:00-12:00), time period 3 (12:00-18:00), time period 4 (18:00-24:00). For another example, the specified statistical period (such as 0:00-24:00) is divided into 5 time periods according to the peak traffic hours, time period 1 (0:00-7:00), time period 2 (7:00-9:00), time period 3 (9:00-17:00), time period 4 (17:00-19:00), time period 4 (19:00-24:00), that is, time period 2 and time period 4 are peak traffic hours. Of course, the above are just examples of division methods.
[0051] After dividing the designated statistical period into multiple time periods, for each time period (such as time period 1-time period 4), determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the time period, such as time period 1 corresponds to the minimum travel time t1 and the minimum number of location points n1, time period 2 corresponds to the minimum travel time t2 and the minimum number of location points n2, time period 3 corresponds to the minimum travel time t3 and the minimum number of location points n3, and time period 4 corresponds to the minimum travel time t4 and the minimum number of location points n4.
[0052] On this basis, after obtaining the first time point and the second time point, if the specified statistical period is divided into multiple time periods, a target time period is selected from the multiple time periods based on the first time point or the second time point. For example, if a target time period is selected from multiple time periods based on the first time point, the time period at the first time point is used as the target time period. If a target time period is selected from multiple time periods based on the second time point, the time period at the second time point is used as the target time period. After obtaining the target time period, the minimum travel time and the minimum number of location points corresponding to the target time period can be determined. In steps 201 to 205, the minimum travel time refers to the minimum travel time corresponding to the target time period, and the minimum number of location points refers to the minimum number of location points corresponding to the target time period.
[0053] In one possible implementation, the minimum travel time and the minimum number of location points between a first location point and a second location point can be determined. That is, if the designated statistical period is not divided into multiple time periods, the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the designated statistical period are determined. In this case, the minimum travel time and the minimum number of location points can be determined based on all data within the designated statistical period. Alternatively, if the designated statistical period is divided into multiple time periods, the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to each time period can be determined. In this case, the minimum travel time and the minimum number of location points can be determined based on all data within the time period. In summary, the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period can be determined. The statistical time period can be the entire time period of the designated statistical period, or, if the designated statistical period is divided into multiple time periods, any time period within the multiple time periods. For example, if the statistical time period is the designated statistical period, the minimum travel time and the minimum number of location points corresponding to the designated statistical period can be determined based on all data within the designated statistical period. When the statistical time period is a certain time period, the minimum travel time and the minimum number of location points corresponding to the time period can be determined based on all data within the time period.
[0054] Exemplarily, in order to determine the minimum travel time and the minimum number of location points between a first location point and a second location point corresponding to a statistical time period, the following method can be adopted: determine at least one adjacent point pair that a target path between the first location point and the second location point passes through, and based on the travel time and the number of adjacent point pairs that the target path passes through, determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period; wherein the travel time of the adjacent point pairs is determined based on sample data corresponding to the statistical time period in a historical database, the sample data includes the collection time of the sample vehicle at each location point in the network topology within the statistical time period, the adjacent point pair includes two adjacent location points, and the travel time is determined based on the collection time of the sample vehicle at the two adjacent location points.
[0055] Exemplarily, the process of determining the travel time of adjacent point pairs based on sample data corresponding to the statistical time period in the historical database may include but is not limited to: for any adjacent point pair, obtaining M (M is a positive integer) data pairs matching the adjacent point pair, each data pair including the collection moments when the sample vehicle is at two adjacent position points in the adjacent point pair within the statistical time period; for each data pair, determining the travel time based on the two collection moments in the data pair; and determining the minimum value of the travel times corresponding to the M data pairs as the travel time of the adjacent point pair.
[0056] Exemplarily, based on the travel time of adjacent point pairs and the number of adjacent point pairs passed by the target path, the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period are determined, which may include but is not limited to: based on the sum of the travel time of all adjacent point pairs passed by each path between the first location point and the second location point, the path with the smallest sum of travel time is selected as the target path, the sum of the travel time of all adjacent point pairs passed by the target path is determined as the minimum travel time corresponding to the statistical time period (i.e., the minimum travel time between the first location point and the second location point), and the total number of all adjacent point pairs passed by the target path is determined as the minimum number of location points corresponding to the statistical time period (i.e., the minimum number of location points between the first location point and the second location point).
[0057] Exemplarily, to obtain sample data corresponding to a statistical time period, historical data corresponding to the statistical time period may be selected from a historical database. The historical data includes the collection times of the sample vehicle at each location within the statistical time period. The historical data is filtered, and the remaining historical data is determined as the sample data. Filtering the historical data may include, but is not limited to, at least one of the following: for any sample vehicle, if the travel time of the sample vehicle passing through two adjacent location points is less than a preset travel time threshold, filtering the historical data of the sample vehicle passing through the two adjacent location points. For two adjacent location points, if the total number of data pairs corresponding to the two adjacent location points is less than a preset number threshold, filtering all data pairs corresponding to the two adjacent location points, where the data pairs include the historical data of the sample vehicle passing through the two adjacent location points. For two adjacent location points, all data pairs corresponding to the two adjacent location points are obtained; based on the travel time corresponding to each data pair, X1 data pairs with short travel time are filtered (i.e., starting from the data pair with the shortest travel time, X1 data pairs with short travel time are selected in sequence), and X2 data pairs with long travel time are filtered (i.e., starting from the data pair with the longest travel time, X2 data pairs with long travel time are selected in sequence), where X1 and X2 are both positive integers. For two location points, if the total number of abnormal vehicles passing between the two location points is greater than the abnormal number threshold, all data pairs corresponding to the two location points are filtered. Of course, the above is only an example of the filtering method and there is no limitation to it.
[0058] Exemplarily, determining the minimum travel time and the minimum number of location points between a first location point and a second location point corresponding to a statistical time period may include, but is not limited to: determining whether a data update condition has been met; and if so, determining the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period. If the total number of abnormal vehicles passing between the first location point and the second location point is greater than a threshold number of abnormalities, then the data update condition is determined to be met; or if the time between the current time point and the last data update time point reaches a preset update time point, then the data update condition is determined to be met, where the last data update time point is the time point at which the minimum travel time and the minimum number of location points were last determined.
[0059] It can be seen from the above technical solution that in the embodiment of the present application, based on the minimum passage time and the minimum number of position points between the first position point and the second position point, if the difference between the second time point when the target vehicle is at the second position point and the first time point when the target vehicle is at the first position point is less than the minimum passage time, the target vehicle is determined to be an abnormal vehicle; if the difference is not less than the minimum passage time, and the minimum number of position points is greater than the sum of the number of target position points (i.e., the number of position points passed by the target vehicle from the first position point to the second position point) and the preset number threshold, the target vehicle is determined to be an abnormal vehicle. The above method can identify whether the target vehicle is an abnormal vehicle (i.e., a cloned license plate vehicle with a cloned license plate), thereby distinguishing between normal vehicles with real license plates and abnormal vehicles with cloned license plates. Although the license plate identifier of the real license plate of the normal vehicle is the same as the license plate identifier of the cloned license plate of the abnormal vehicle, normal vehicles and abnormal vehicles can be identified as different vehicles, which reduces the occurrence of management errors when managing vehicles, for example, reducing the number of times management measures for abnormal vehicles are applied to normal vehicles.
[0060] The following describes the technical solutions of the embodiments of the present application in conjunction with specific application scenarios.
[0061] If the specified statistical period is divided into multiple time periods, for each time period (such as time period 1, time period 2, time period 3 and time period 4), the minimum travel time and the minimum number of location points corresponding to the time period between any two location points can be determined. For the convenience of description, time period 1 is taken as an example. The implementation methods of other time periods are similar to this, and will not be repeated in this embodiment. Of course, in actual applications, the minimum travel time and the minimum number of location points corresponding to the specified statistical period between any two location points can also be determined by replacing the historical data matching time period 1 with all historical data (that is, there is no need to distinguish the time period in which the historical data is located). This will not be repeated in this embodiment. See Figure 3 As shown, in order to determine the minimum travel time and the minimum number of location points corresponding to time period 1, the following steps can be used:
[0062] Step 301: Select historical data matching time period 1 from a historical database. This historical data includes the collection times when the sample vehicle was at various locations in the network topology within time period 1. Filter the historical data matching time period 1, and determine the remaining historical data as sample data matching time period 1. This yields sample data matching time period 1. This sample data includes the collection times when the sample vehicle was at various locations in the network topology within time period 1. In subsequent processes, the collection times in the historical data or sample data refer to the collection times within time period 1.
[0063] Exemplarily, the historical database can store a large amount of historical data, which includes a large number of data records. Each data record can be a vehicle data, which can include license plate identification, collection time, location point identification, etc. See Table 1 for an example of historical data.
[0064] Table 1
[0065] License Plate Identification Collection time Location point identification, etc. License plate identification s1 pt11 Location A License plate identification s1 pt12 Location B License plate identification s1 pt13 Position C License plate identification s1 pt14 Position point D License plate identification s1 pt15 Position point E License plate identification s1 pt16 Position point F License plate identification s2 pt21 Location A License plate identification s2 pt22 Position C License plate identification s2 pt23 Position point E License plate identification s2 pt24 Position point F … … …
[0066] Assuming that the historical data shown in Table 1 matches time period 1, the vehicle corresponding to the license plate identification in the historical data is called a sample vehicle. Then the historical data includes the collection time of the sample vehicle s1 (i.e., the license plate identification is s1) at each position point, the collection time of the sample vehicle s2 at each position point, and so on.
[0067] After obtaining the historical data that matches time period 1, the historical data can be filtered, for example, by using at least one of the following methods to filter the historical data. For example, method 1 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data; method 2 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data; method 3 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data; method 1 and method 2 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data; method 1 and method 3 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data; method 2 and method 3 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data; or method 1, method 2, and method 3 can be used to filter the historical data, and the remaining historical data after filtering is used as sample data. There is no restriction on this filtering method, and the remaining historical data after filtering is completed is used as sample data.
[0068] Method 1: For any sample vehicle, if the travel time of the sample vehicle passing through two adjacent location points is less than a preset time threshold, the historical data of the sample vehicle passing through the two adjacent location points is filtered.
[0069] For example, for sample vehicle s1, sample vehicle s1 corresponds to multiple data records, as shown in Table 1. The location points can be sorted according to the collection time corresponding to each data record, such as sorting the location points in ascending order of collection time, or sorting the location points in descending order of collection time. Assuming the sorting result is location point A, location point B, location point C, location point D, location point E, and location point F, then location point A and location point B are adjacent location points, location point B and location point C are adjacent location points, location point C and location point D are adjacent location points, location point D and location point E are adjacent location points, and location point E and location point F are adjacent location points.
[0070] Determine the travel time of the sample vehicle s1 passing through position points A and B (i.e., the difference between pt12 and pt11). If the travel time is less than a preset time threshold (which can be configured based on experience), filter the historical data of the sample vehicle s1 at position points A and B, that is, delete the data records (license plate identification s1+pt11+position point A) and the data records (license plate identification s1+pt12+position point B). If the travel time is not less than the preset time threshold, retain the historical data of the sample vehicle s1 at position points A and B.
[0071] Then, determine the travel time of the sample vehicle s1 passing through position point B and position point C (i.e., the difference between pt13 and pt12). If the travel time is less than the preset time threshold, filter the historical data of the sample vehicle s1 at position point B and position point C. If the travel time is not less than the preset time threshold, retain the historical data of the sample vehicle s1 at position point B and position point C, and so on.
[0072] Obviously, for sample vehicle s1, method 1 can be used to filter the historical data of sample vehicle s1 passing through two adjacent location points. Similarly, method 1 can be used to filter the historical data of other sample vehicles (such as sample vehicle s2, sample vehicle s3, etc.) passing through two adjacent location points. I will not go into details here.
[0073] Method 2: For two adjacent location points, if the total number of data pairs corresponding to the two adjacent location points is less than a preset number threshold, all data pairs corresponding to the two adjacent location points are filtered. Each data pair may include historical data of the sample vehicle passing through the two adjacent location points.
[0074] For example, for the sample vehicle s1, as shown in Table 1, each position point can be sorted according to the collection time, and the two adjacent position points after sorting form an adjacent point pair (that is, the adjacent point pair includes two adjacent position points), thereby obtaining multiple adjacent point pairs, for example, adjacent point pair 1 (position point A and position point B), adjacent point pair 2 (position point B and position point C), adjacent point pair 3 (position point C and position point D), adjacent point pair 4 (position point D and position point E), and adjacent point pair 5 (position point E and position point F).
[0075] For sample vehicle s2, as shown in Table 1, the position points can be sorted according to the collection time. After sorting, two adjacent position points form a neighboring point pair. For example, neighboring point pair 6 (position point A and position point C), neighboring point pair 7 (position point C and position point E), and neighboring point pair 5 (position point E and position point F). Obviously, neighboring point pair 5 determined based on the historical data of sample vehicle s2 is the same as neighboring point pair 5 determined based on the historical data of sample vehicle s1. They are the same neighboring point pair.
[0076] Similarly, based on the historical data of all sample vehicles, each location point can be sorted, resulting in multiple adjacent point pairs. Adjacent point pairs determined based on the historical data of different sample vehicles may overlap, and this process will not be described in detail. In summary, after performing the above processing based on the historical data of all sample vehicles, multiple adjacent point pairs can be obtained, each of which includes two adjacent location points.
[0077] For each adjacent point pair, which includes two adjacent position points, the total number of data pairs corresponding to the adjacent point pair can be counted. For example, taking adjacent point pair 1 as an example, adjacent point pair 1 includes position point A and position point B. If the sample vehicle s1 travels from position point A to position point B (that is, it passes through position point A and position point B in sequence, and does not pass through other position points between position point A and position point B), then the historical data of the sample vehicle s1 at position point A and the historical data at position point B are a data pair of adjacent point pair 1. In actual applications, the sample vehicle s1 may travel from position point A to position point B multiple times (such as K times, K is a positive integer greater than 1), that is, the historical data of the sample vehicle s1 includes K historical data at position point A and K historical data at position point B, and these historical data correspond to K data pairs.
[0078] Similarly, if the sample vehicle s2 travels from position point A to position point B, the historical data of the sample vehicle s2 at position point A and the historical data of the sample vehicle s2 at position point B are a data pair of adjacent point pair 1.
[0079] Similarly, for adjacent point pair 1, the total number of data pairs corresponding to adjacent point pair 1 can be counted based on historical data (after sorting the historical data of the sample vehicles according to the collection time, if the historical data includes the historical data of position point A and the historical data of position point B in sequence, then it corresponds to one data pair).
[0080] In summary, the total number of data pairs corresponding to adjacent point pair 1 can be obtained. For each data pair, the data pair includes historical data of the sample vehicle at location point A and historical data of the sample vehicle at location point B. Based on this, if the total number of data pairs corresponding to adjacent point pair 1 is less than a preset number threshold (which can be configured based on experience), all data pairs corresponding to adjacent point pair 1 are filtered. For example, the historical data of sample vehicle s1 at location points A and B are filtered, that is, the data record (license plate identifier s1 + pt11 + location point A) and the data record (license plate identifier s1 + pt12 + location point B) are deleted. The historical data of sample vehicle s2 at location points A and B are filtered, and so on. If the total number of data pairs corresponding to adjacent point pair 1 is not less than the preset number threshold, all data pairs corresponding to adjacent point pair 1 are retained.
[0081] It should be noted that for data pairs, the data pair includes the historical data of location point A and the historical data of location point B. The historical data here must be the historical data of two adjacent location points. For example, if the historical data of a sample vehicle is sorted by collection time and includes the historical data of location point A and the historical data of location point B, then the historical data of location point A and the historical data of location point B are the historical data of two adjacent location points and form a data pair. However, if the historical data of a sample vehicle is sorted by collection time and includes the historical data of location point A, location point C, and location point B, then the historical data of location point A and location point B are not the historical data of two adjacent location points and are not a data pair for adjacent point pair 1.
[0082] Obviously, method 2 can be used to filter the historical data of all data pairs of adjacent point pair 1, or retain the historical data of all data pairs of adjacent point pair 1. Similarly, method 2 can be used to filter the historical data of all data pairs of other adjacent point pairs (such as adjacent point pair 2, adjacent point pair 3, etc.), or retain the historical data of all data pairs of other adjacent point pairs. I will not go into details here.
[0083] To sum up, by setting a preset number threshold, the historical data of all data pairs of adjacent point pairs can be filtered. That is, when the number of vehicles passing through an adjacent point pair is small, the historical data of all data pairs of this adjacent point pair is filtered, and this adjacent point pair is no longer retained, thereby reducing the interference of unreasonable data.
[0084] Method 3: For two adjacent location points, obtain all data pairs corresponding to the two adjacent location points; based on the travel time corresponding to each data pair, filter X1 data pairs with short travel time, and filter X2 data pairs with long travel time. For example, sort each data pair based on the travel time corresponding to each data pair, and sort each data pair in order of travel time from small to large, or sort each data pair in order of travel time from large to small, and then take sorting each data pair in order of travel time from small to large as an example. Based on the sorting result, the first X1 data pairs can be filtered, and the last X2 data pairs can be filtered, where X1 and X2 are both positive integers, that is, the X1 data pairs with short travel time can be filtered, the X2 data pairs with long travel time can be filtered, and the data pairs with travel time in the middle can be retained.
[0085] For example, multiple adjacent point pairs can be obtained based on the historical data of all sample vehicles, each of which includes two adjacent position points. The method for obtaining adjacent point pairs is described in Method 2 and will not be repeated here.
[0086] For each adjacent point pair, all data pairs corresponding to the adjacent point pair can be counted based on historical data. Taking adjacent point pair 1 as an example, adjacent point pair 1 includes position point A and position point B. The data pairs corresponding to adjacent point pair 1 include historical data of the sample vehicle at position point A and historical data of the sample vehicle at position point B. The method of obtaining the data pairs corresponding to each adjacent point pair refers to method 2 and will not be repeated here.
[0087] After obtaining all data pairs corresponding to adjacent point pairs (using adjacent point pair 1 as an example), the travel duration corresponding to each data pair can be determined. This is the difference between the collection time when the sample vehicle was at location B (based on historical data obtained for the sample vehicle at location B) and the collection time when the sample vehicle was at location A (based on historical data obtained for the sample vehicle at location A). For example, as shown in Table 1, the data pairs corresponding to sample vehicle s1 include "license plate s1 + pt11 + location A" and "license plate s1 + pt12 + location B." The travel duration corresponding to this data pair is the difference between pt12 and pt11.
[0088] After obtaining the travel time corresponding to each data pair, all data pairs can be sorted in ascending order of travel time. Based on the sorting results, the first X1 data pairs can be filtered, and the next X2 data pairs can be filtered. For each data pair to be filtered, the data pair can include historical data of the sample vehicle at location A and historical data of the sample vehicle at location B. In other words, the historical data of the sample vehicle at location A and the historical data of the sample vehicle at location B need to be filtered.
[0089] For example, X1 can be configured based on experience, such as 1, 2, 3, etc., or it can be determined based on the travel time of all data pairs, and there is no restriction on this. X2 can be configured based on experience, such as 1, 2, 3, etc., or it can be determined based on the travel time of all data pairs, and there is no restriction on this. When determining the values of X1 and X2 based on the travel time of all data pairs, see Figure 4 As shown, this can be achieved as follows:
[0090] The travel times of all data pairs are sorted to obtain t1, t2, t3, t4, t5, t6, and t7 in sequence. If the difference between t2 and t1 is greater than the preset threshold, and the difference between t3 and t2 is not greater than the preset threshold, it means that t2 is the first travel time when the travel time shows a stable linear growth. The data pair corresponding to t1 needs to be filtered, that is, the value of X1 is 1. If the difference between t3 and t2 is greater than the preset threshold, and the difference between t4 and t3 is not greater than the preset threshold, it means that t3 is the first travel time when the travel time shows a stable linear growth. The data pair corresponding to t1 and t2 needs to be filtered, that is, the value of X1 is 2, and so on.
[0091] If the difference between t7 and t6 is greater than the preset threshold, and the difference between t6 and t5 is not greater than the preset threshold, it means that t6 is the last passage time when the passage time shows a stable linear growth. The data pair corresponding to t7 needs to be filtered, that is, the value of X2 is 1. If the difference between t6 and t5 is greater than the preset threshold, and the difference between t5 and t4 is not greater than the preset threshold, it means that t5 is the last passage time when the passage time shows a stable linear growth. The data pair corresponding to t7 and t6 needs to be filtered, that is, the value of X2 is 2, and so on.
[0092] Obviously, method 3 can be used to filter the data pairs of adjacent point pair 1, that is, filter the X1 data pairs with shorter travel time, and filter the X2 data pairs with longer travel time, and retain the data pairs with the travel time in the middle (that is, filter the remaining data pairs). Similarly, method 3 can be used to filter the data pairs of other adjacent point pairs (such as adjacent point pair 2, adjacent point pair 3, etc.), which will not be repeated here.
[0093] In summary, by filtering the X1 data pairs with shorter travel time and filtering the X2 data pairs with longer travel time, the interference of invalid data pairs is removed. That is, the data pairs with shorter travel time and longer travel time are both invalid data pairs, which reduces the interference of unreasonable data and retains the most appropriate data pairs.
[0094] In summary, historical data can be filtered based on methods 1, 2, and 3. Of course, other methods can also be used to filter historical data, and there is no limitation to this. The remaining historical data after filtering is determined as sample data that matches time period 1, and subsequent steps are performed based on the sample data.
[0095] Step 302: Determine the travel time of each adjacent point pair based on the sample data (i.e., the sample data matching time period 1). The adjacent point pair may include two adjacent position points. The sample data may include the collection time when the sample vehicle is at each position point within time period 1. The travel time may be determined based on the collection time when the sample vehicle is at the two adjacent position points.
[0096] For example, for any adjacent point pair, M data pairs matching the adjacent point pair can be obtained. For each data pair, the data pair can include the collection moments when the sample vehicle was at two adjacent locations in the adjacent point pair, that is, the data pair includes two collection moments (both of which are within time period 1). For each data pair, the travel duration is determined based on the two collection moments in the data pair, that is, the travel duration corresponding to the data pair. The minimum value of the travel durations corresponding to the M data pairs is determined as the travel duration of the adjacent point pair.
[0097] For example, a plurality of adjacent point pairs can be obtained based on the sample data of all sample vehicles, and each adjacent point pair includes two adjacent position points. The method for obtaining adjacent point pairs can be referred to in step 301, and the historical data can be replaced with the sample data, which will not be described in detail here. After obtaining a plurality of adjacent point pairs, for each adjacent point pair, all data pairs corresponding to the adjacent point pair can be determined based on the sample data of all sample vehicles, that is, M data pairs matching the adjacent point pair, and each data pair can include the collection time when the sample vehicle is at two adjacent position points in the adjacent point pair. For example, taking adjacent point pair 1 as an example, adjacent point pair 1 includes position point A and position point B, and M data pairs matching adjacent point pair 1 can be obtained, and the data pairs include sample data of the sample vehicle at position point A (such as the collection time) and sample data of the sample vehicle at position point B (such as the collection time). The method for obtaining the data pairs can be referred to in step 301, which will not be described in detail here.
[0098] Exemplarily, for each adjacent point pair, after obtaining M data pairs corresponding to the adjacent point pair, for each data pair, the passage time corresponding to the data pair is determined based on the two collection moments in the data pair, and the minimum value of the passage time corresponding to the M data pairs is determined as the passage time of the adjacent point pair.
[0099] Taking adjacent point pair 1 as an example, for each data pair in the M data pairs, calculate the difference between the collection time when the sample vehicle in the data pair is at position point B and the collection time when the sample vehicle in the data pair is at position point A. This difference is the travel time corresponding to the data pair, so that M travel times can be obtained. Then, the minimum value of the M travel times is used as the travel time of adjacent point pair 1.
[0100] In summary, in step 302, the travel time of each adjacent point pair can be obtained.
[0101] Step 303: For any two location points in the network topology (which may or may not be adjacent location points), determine at least one adjacent point pair that the target path between the two location points passes through, and based on the travel time and the number of adjacent point pairs that the target path passes through, determine the minimum travel time and the minimum number of location points between the two location points corresponding to time period 1.
[0102] For example, for any two location points in the network topology, based on the sum of the travel times of all adjacent point pairs passed by each path between the two location points, the path with the smallest sum of travel times can be selected as the target path, the sum of the travel times of all adjacent point pairs passed by the target path is determined as the minimum travel time, and the total number of all adjacent point pairs passed by the target path is determined as the minimum number of location points.
[0103] For example, see Figure 1 As shown, the network topology includes location point A, location point B, location point C, location point D, location point E and location point F. After obtaining all adjacent point pairs, we can construct Figure 5 The network topology shown is used to display all adjacent point pairs and the travel time of adjacent point pairs.
[0104] See also Figure 5 As shown, two position points with a direct connection relationship constitute an adjacent point pair, and the adjacent point pair has a direction. For example, when the arrow direction is from position point A to position point B, it represents the adjacent point pair "position point A-position point B", that is, traveling from position point A to position point B. When the arrow direction is from position point B to position point A, it represents the adjacent point pair "position point B-position point A", that is, traveling from position point B to position point A.
[0105] See also Figure 5 As shown, t1 is the travel time of the adjacent point pair "position point A-position point B", t2 is the travel time of the adjacent point pair "position point B-position point C", t3 is the travel time of the adjacent point pair "position point C-position point D", t4 is the travel time of the adjacent point pair "position point E-position point D", and so on.
[0106] For any two locations in the network topology, such as location point A-location point B (or location point C, location point D, location point E, location point F), location point B-location point A (or location point C, location point D, location point E, location point F), location point C-location point A (or location point B, location point D, location point E, location point F), location point D-location point A (or location point B, location point C, location point E, location point F), location point E-location point A (or location point B, location point C, location point D, location point F), location point F-location point A (or location point B, location point C, location point D, location point E), and location point F-location point A (or location point B, location point C, location point D, location point E). Taking location point A-location point D as an example, the following method can be used to obtain the minimum travel time and the minimum number of location points:
[0107] See also Figure 5 As shown, position point A-position point D includes the following paths: ABCD, AED. Based on the above two paths, the sum of the travel time of ABCD is t1+t2+t3, and the sum of the travel time of AED is t7+t4. If t1+t2+t3 is less than t7+t4, then the target path between position point A and position point D is ABCD. If t1+t2+t3 is greater than t7+t4, then the target path between position point A and position point D is AED.
[0108] For example, if the target path is ABCD, the minimum travel time is determined based on the sum of the travel times of all adjacent point pairs passed by the target path. For example, the minimum travel time can be t1+t2+t3, or (t1+t2+t3)*w, where w is a value greater than 0 and less than 1. In addition, the minimum number of position points is determined based on the total number of 3 of all adjacent point pairs passed by the target path. For example, the minimum number of position points can be 3. If the target path is AED, the minimum travel time is determined based on the sum of the travel times of all adjacent point pairs passed by the target path. For example, the minimum travel time can be t7+t4, or (t7+t4)*w. In addition, the minimum number of position points is determined based on the total number of 2 of all adjacent point pairs passed by the target path. For example, the minimum number of position points can be 2.
[0109] It should be noted that in practical applications, the path with the smallest sum of travel times is typically the path with the fastest driving speed. In real-world road conditions, the fewer traffic lights there are, the faster the driving speed, which means the fewer location points there are. Based on this, in this embodiment, the total number of adjacent point pairs passed by the path with the smallest sum of travel times can be determined as the minimum number of location points.
[0110] To sum up, for time period 1, the minimum travel time and the minimum number of location points between any two location points in the network topology can be determined. For time period 2, the minimum travel time and the minimum number of location points between any two location points in the network topology can be determined, and so on. I will not repeat them here.
[0111] In one possible implementation, considering that changes in the road environment can affect vehicle travel, the minimum travel time and the minimum number of location points can be periodically determined to ensure that the minimum travel time and the minimum number of location points are closer to the actual road environment. In other words, steps 301-303 can be executed periodically. On this basis, if the time between the current time point and the last data update time point (i.e., the time point when the minimum travel time and the minimum number of location points were last determined) reaches a preset update time period (e.g., one month, two months, etc.), it is determined that the data update condition has been met, and steps 301-303 need to be re-executed to obtain the updated minimum travel time and the minimum number of location points.
[0112] In one possible implementation, the travel times and trajectories of abnormal vehicles (i.e., vehicles with fake license plates) are highly random. Theoretically, the probability of an abnormal vehicle appearing between two locations is very small, almost zero. That is, the number of abnormal vehicle appearances should be less than the abnormality threshold. If the number of abnormal vehicle appearances exceeds the abnormality threshold, it indicates that the road environment between the two locations has changed (e.g., the road conditions have improved or deteriorated), and the minimum travel time and minimum number of location points need to be re-determined to avoid misjudgments. On this basis, if the total number of abnormal vehicles passing between the two locations is greater than the abnormality threshold, it is determined that the data update condition has been met, and steps 301-303 need to be re-executed to obtain the updated minimum travel time and minimum number of location points.
[0113] It should be noted that if the total number of abnormal vehicles passing between two location points is greater than the abnormal number threshold, when redetermining the minimum travel time and the minimum number of location points, for step 301, at least one of methods 1 to 3 can be used to filter the historical data. On this basis, method 4 can also be used to filter the historical data. After the filtering is completed, the remaining historical data will be used as sample data.
[0114] Method 4: For two location points (they can be adjacent or non-adjacent, there is no restriction), if the total number of abnormal vehicles passing between the two location points is greater than the abnormal number threshold, all data pairs corresponding to the two location points are filtered.
[0115] As described above, the probability of an abnormal vehicle appearing between two locations is very small, almost zero. If the number of abnormal vehicle appearances exceeds the abnormality threshold, it indicates that the road environment between the two locations has changed. In other words, the data between the two locations may be invalid data. Therefore, all data pairs corresponding to the two locations can be obtained and filtered. The method for obtaining all data pairs corresponding to the two locations can be seen in step 301 and will not be repeated here.
[0116] In one possible implementation, based on the minimum travel time and minimum number of location points corresponding to each time period (e.g., the minimum travel time and minimum number of location points corresponding to time period 1, the minimum travel time and minimum number of location points corresponding to time period 2, and so on), it is possible to detect whether a vehicle is an abnormal vehicle. The vehicle to be detected is called a target vehicle. Based on the minimum travel time and minimum number of location points corresponding to each time period, see Figure 6 As shown, the following steps are used to detect whether the target vehicle is an abnormal vehicle.
[0117] Step 601: If the target vehicle travels from a first position point to a second position point, obtain a first time point when the target vehicle is at the first position point, a second time point when the target vehicle is at the second position point, and the number of target position points passed by the target vehicle from the first position point to the second position point.
[0118] For example, all data records corresponding to the target vehicle can be obtained from the historical database. Each data record includes the license plate identification s1, the collection time, and the location point identification. These data records are sorted in order from the front to the back of the collection time. It is assumed that the sorting result is: license plate identification s1+pt1+location point A, license plate identification s1+pt2+location point B, license plate identification s1+pt3+location point F, license plate identification s1+pt4+location point D, license plate identification s1+pt5+location point E, license plate identification s1+pt6+location point C.
[0119] The first position point is any position point among all position points, such as position point B, and the second position point is any position point among all position points, such as position point F. Then, the first time point when the target vehicle is at the first position point is pt2, and the second time point when the target vehicle is at the second position point is pt3. The number of target position points passed by the target vehicle when traveling from the first position point to the second position point is 1.
[0120] In one possible implementation, before step 601, vehicle features corresponding to the target vehicle (such as vehicle color, vehicle model, vehicle appearance, etc.) can be obtained, and normal vehicle features corresponding to the license plate identification of the target vehicle are selected from a feature management library (used to store normal vehicle features of normal vehicles). If the vehicle features corresponding to the target vehicle are different from the normal vehicle features, such as the vehicle color is different, the target vehicle is directly determined to be an abnormal vehicle, and step 601 is no longer executed. If the vehicle features corresponding to the target vehicle are the same as the normal vehicle features, step 601 and subsequent steps are executed to determine whether the target vehicle is an abnormal vehicle.
[0121] Step 602: Select a target time period from all time periods based on the first time point, for example, the time period at the first time point is used as the target time period. Alternatively, select a target time period from all time periods based on the second time point, for example, the time period at the second time point is used as the target time period.
[0122] Step 603: Determine the minimum travel time and minimum number of locations between the first and second locations corresponding to the target time period. For example, if the target time period is time period 1, determine the minimum travel time and minimum number of locations between locations B and F corresponding to time period 1.
[0123] Step 604: Determine whether the target vehicle is an abnormal vehicle or a normal vehicle based on the first time point, the second time point, the number of target location points, the minimum travel time, and the minimum number of location points.
[0124] Case 1: If the difference between the second time point and the first time point is less than the minimum travel time between the first position point and the second position point, it can be determined that the target vehicle is an abnormal vehicle.
[0125] For example, the target vehicle is at position point B at the first time point pt2 and at position point F at the second time point pt3. The minimum travel time from position point B to position point F is known. If the difference between pt3 and pt2 is less than the minimum travel time, it means that the target vehicle cannot travel from position point B to position point F within this period of time. In other words, the target vehicle arrives from position point B to position point F within an unreasonable time. The vehicle at position point B and the vehicle at position point F are not the same vehicle, that is, the target vehicle is an abnormal vehicle.
[0126] Case 2: If the difference between the second time point and the first time point is not less than the minimum travel time between the first position point and the second position point, and the minimum number of position points between the first position point and the second position point is greater than the sum of the target position point number and the preset number threshold, then the target vehicle is determined to be an abnormal vehicle.
[0127] For example, the target vehicle is at position point B at the first time point pt2 and at position point F at the second time point pt3. The number of target position points passed from position point B to position point F is 1. The minimum travel time from position point B to position point F is known, and the minimum number of position points from position point B to position point F is known. If the difference between pt3 and pt2 is not less than the minimum travel time, the number of position points needs to be analyzed.
[0128] Assume that the minimum number of location points from location point B to location point F is 5, which means that at least 5 location points must be passed before traveling from location point B to location point F, and assume that the preset number threshold is 2 (which can be configured based on experience). Then, since the target number of location points (that is, the actual number of location points) for traveling from location point B to location point F is 1, and the minimum number of location points 5 is greater than the sum of the target number of location points 1 and the preset number threshold 2, it means that the location points passed by the target vehicle do not conform to the actual situation in geographical space. The vehicle at location point B and the vehicle at location point F are not the same vehicle, that is, the target vehicle is an abnormal vehicle.
[0129] Case 3: If the difference between the second time point and the first time point is not less than the minimum travel time between the first position point and the second position point, and the minimum number of position points between the first position point and the second position point is not greater than the sum of the target position point number and the preset number threshold, then the target vehicle is determined to be a normal vehicle.
[0130] As can be seen from the above technical solutions, in the embodiments of the present application, big data analysis can be performed on historical data in advance to deduce the minimum travel time and the minimum number of location points between any two location points that are consistent with actual vehicle use, without the need for manual data management. The minimum travel time and the minimum number of location points are deduced from peak, flat, and low-peak time periods, respectively, to get as close as possible to the vehicle's driving environment and speed during that period, solving a series of problems that affect vehicle speed and trajectory, such as tidal lanes, large differences in peak hours in the morning and evening, and time-sharing single cycles. By performing big data analysis on historical data, the minimum number of location points that need to be passed when passing between any two location points is deduced. By comparing the difference between the number of target location points between the two location points during the actual passing of the vehicle and the minimum number of location points deduced by big data, it is a comparison based on geographic space, which solves the situation in the cloned car scene where normal vehicles and abnormal vehicles do not appear on the road in the same time period. The reference data used in spatiotemporal and geospatial analysis (i.e., minimum travel time and minimum number of location points) are all derived from regular big data calculations. These data are automatically adjusted as road conditions and other factors change, making them more realistic for actual driving conditions. At the data usage level, vehicle passing records associated with previously analyzed abnormal vehicles are filtered out to reduce the impact of unreasonable abnormal vehicle passing data on big data route calculations. A secondary match is performed on the results of spatiotemporal and geospatial analysis. If the number of abnormal vehicles at the same location within a certain time period exceeds a threshold, these vehicles are filtered out to reduce the impact of changes in passing times due to factors such as road environment adjustments on the accuracy of the analysis results.
[0131] Based on the same application concept as the above method, an abnormal vehicle detection device is proposed in the embodiment of the present application, see Figure 7 FIG. 1 is a schematic diagram of the structure of the device, which may include:
[0132] an acquisition module 71 for acquiring, if the target vehicle travels from a first location point to a second location point, a first time point at which the target vehicle is at the first location point, a second time point at which the target vehicle is at the second location point, and the number of target location points passed by the target vehicle from the first location point to the second location point;
[0133] Determination module 72 is used to determine that the target vehicle is an abnormal vehicle if the difference between the second time point and the first time point is less than the minimum passage time between the first position point and the second position point; if the difference between the second time point and the first time point is not less than the minimum passage time, and the minimum number of position points between the first position point and the second position point is greater than the sum of the number of target position points and a preset number threshold, then determine that the target vehicle is an abnormal vehicle.
[0134] In one possible embodiment, the determination module 72 is also used to determine that the target vehicle is a normal vehicle if the difference between the second time point and the first time point is not less than the minimum travel time between the first position point and the second position point, and the minimum number of position points between the first position point and the second position point is not greater than the sum of the target position point number and a preset number threshold.
[0135] In a possible embodiment, the acquisition module 71 is also used to select a target time period from the multiple time periods based on the first time point or the second time point if the specified statistical period is divided into multiple time periods; wherein the minimum passage time is the minimum passage time corresponding to the target time period; wherein the minimum number of location points is the minimum number of location points corresponding to the target time period.
[0136] In one possible implementation, the determination module 72 is further configured to determine a minimum travel time and a minimum number of location points between the first location point and the second location point corresponding to a statistical time period; wherein the statistical time period is a complete time period of a specified statistical period, or, when the specified statistical period is divided into multiple time periods, the statistical time period is any time period of the multiple time periods; when the determination module determines the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period, it is specifically configured to: determine at least one adjacent point pair passed by a target path between the first location point and the second location point, and determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period based on the travel time and the number of adjacent point pairs passed by the target path; wherein the travel time of the adjacent point pairs is determined based on sample data corresponding to the statistical time period in a historical database, the sample data including the collection time of a sample vehicle at each location point in the network topology within the statistical time period, the adjacent point pair including two adjacent location points, and the travel time is determined based on the collection time of the sample vehicle at the two adjacent location points.
[0137] In a possible embodiment, the determination module 72 is specifically used to determine the travel time of adjacent point pairs based on sample data corresponding to the statistical time period in the historical database, for any adjacent point pair, to obtain M data pairs matching the adjacent point pair, each data pair including the collection moments when the sample vehicle is at two adjacent position points in the adjacent point pair within the statistical time period; for each data pair, the travel time is determined based on the two collection moments in the data pair; and the minimum value of the travel times corresponding to the M data pairs is determined as the travel time of the adjacent point pair.
[0138] In one possible embodiment, the determination module 72 determines the minimum travel time and the minimum number of position points corresponding to the statistical time period between the first position point and the second position point based on the travel time of the adjacent point pairs and the number of adjacent point pairs passed by the target path, and is specifically used to: based on the sum of the travel time of all adjacent point pairs passed by each path between the first position point and the second position point, select the path with the smallest sum of travel time as the target path, determine the sum of the travel time of all adjacent point pairs passed by the target path as the minimum travel time corresponding to the statistical time period, and determine the total number of all adjacent point pairs passed by the target path as the minimum number of position points corresponding to the statistical time period.
[0139] In a possible embodiment, the determination module 72 is further used to: select historical data that matches the statistical time period from a historical database, the historical data including the collection time of the sample vehicle at each location point within the statistical time period; filter the historical data, and determine the remaining historical data as the sample data; wherein, filtering the historical data includes at least one of the following: for any sample vehicle, if the travel time of the sample vehicle passing through two adjacent location points is less than a preset time threshold, then filter the historical data of the sample vehicle passing through the two adjacent location points; for two adjacent location points, if the travel time of the sample vehicle passing through the two adjacent location points is less than a preset time threshold, then filter the historical data of the sample vehicle passing through the two adjacent location points; If the total number of data pairs corresponding to the points is less than a preset number threshold, all data pairs corresponding to the two adjacent position points are filtered; wherein, the data pairs include historical data of sample vehicles passing through the two adjacent position points; for two adjacent position points, all data pairs corresponding to the two adjacent position points are obtained; based on the travel time corresponding to each data pair, X1 data pairs with shorter travel time are filtered, and X2 data pairs with longer travel time are filtered, where X1 and X2 are both positive integers; for two position points, if the total number of abnormal vehicles passing between the two position points is greater than the abnormal number threshold, all data pairs corresponding to the two position points are filtered.
[0140] In one possible embodiment, the determination module 72 determines the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period, and is specifically used to: determine whether the data update condition has been met; if so, determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period; wherein, if the total number of abnormal vehicles passing between the first location point and the second location point is greater than the abnormal number threshold, it is determined that the data update condition has been met; or, if the time between the current time point and the last data update time point reaches the preset update time, it is determined that the data update condition has been met, and the last data update time point is the time point when the minimum travel time and the minimum number of location points were last determined.
[0141] Based on the same application concept as the above method, an abnormal vehicle detection device (such as a management device) is proposed in the embodiment of the present application, see Figure 8 As shown, the abnormal vehicle detection device may include: a processor 81 and a machine-readable storage medium 82, wherein the machine-readable storage medium 82 stores machine-executable instructions that can be executed by the processor 81; the processor 81 is used to execute the machine-executable instructions to implement the abnormal vehicle detection method disclosed in the above example of this application.
[0142] Based on the same application concept as the above method, an embodiment of the present application also provides a machine-readable storage medium, on which a number of computer instructions are stored. When the computer instructions are executed by a processor, the abnormal vehicle detection method disclosed in the above example of the present application can be implemented.
[0143] The machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that may contain or store information, such as executable instructions, data, and the like. For example, the machine-readable storage medium may be: RAM (Random Access Memory), volatile memory, non-volatile memory, flash memory, a storage drive (such as a hard disk drive), a solid-state drive, any type of storage disk (such as a CD, DVD, etc.), or similar storage media, or a combination thereof.
[0144] Based on the same application concept as the above method, an embodiment of the present application also provides a computer program, which is stored in a machine-readable storage medium. When the processor executes the computer program, it prompts the processor to implement the abnormal vehicle detection method disclosed in the above example of the present application.
[0145] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email transceiver, game console, tablet computer, wearable device, or any combination of these devices.
[0146] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0147] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0148] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0149] Furthermore, these computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0150] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0151] The foregoing is merely an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should all be included within the scope of the claims of the present application.
Claims
1. A method for detecting abnormal vehicles, characterized in that: The method comprises: If the target vehicle travels from a first position point to a second position point, obtaining a first time point at which the target vehicle is at the first position point, a second time point at which the target vehicle is at the second position point, and the number of target position points passed by the target vehicle from the first position point to the second position point; If the difference between the second time point and the first time point is less than the minimum travel time between the first position point and the second position point, determining that the target vehicle is an abnormal vehicle; If the difference between the second time point and the first time point is not less than the minimum travel time, and the minimum number of position points between the first position point and the second position point is greater than the sum of the target number of position points and a preset number threshold, then the target vehicle is determined to be an abnormal vehicle; Before obtaining the first time point at which the target vehicle is at the first location point and the second time point at which the target vehicle is at the second location point, the method further includes: determining a minimum travel time and a minimum number of location points between the first location point and the second location point corresponding to a statistical time period; wherein the statistical time period is a complete time period of a specified statistical period, or, when the specified statistical period is divided into multiple time periods, the statistical time period is any time period among the multiple time periods; The step of determining the minimum travel time and the minimum number of locations between the first location point and the second location point corresponding to the statistical time period includes: Determining at least one adjacent point pair that a target path between a first location point and a second location point passes through, and determining a minimum travel time and a minimum number of location points between the first location point and the second location point corresponding to a statistical time period based on the travel time of the adjacent point pairs and the number of adjacent point pairs that the target path passes through; Among them, the travel time of adjacent point pairs is determined based on sample data corresponding to the statistical time period in the historical database, and the sample data includes the collection time of the sample vehicle at each position point in the network topology within the statistical time period. The adjacent point pairs include two adjacent position points, and the travel time is determined based on the collection time of the sample vehicle at the two adjacent position points.
2. The method according to claim 1, characterized in that After obtaining a first time point at which the target vehicle is at the first position and a second time point at which the target vehicle is at the second position, the method further includes: If the designated statistical period is divided into multiple time periods, selecting a target time period from the multiple time periods based on the first time point or the second time point; The minimum travel time is the minimum travel time corresponding to the target time period; The minimum number of location points is the minimum number of location points corresponding to the target time period.
3. The method according to claim 1, characterized in that The process of determining the travel time of adjacent point pairs based on the sample data corresponding to the statistical time period in the historical database includes: For any adjacent point pair, obtain M data pairs that match the adjacent point pair, each data pair includes the collection time when the sample vehicle is at two adjacent position points in the adjacent point pair within the statistical time period; For each data pair, the travel time is determined based on the two collection moments in the data pair; The minimum value among the travel times corresponding to the M data pairs is determined as the travel time of the adjacent point pair.
4. The method according to claim 1, wherein The determining, based on the travel time and the number of adjacent point pairs passed by the target path, the minimum travel time and the minimum number of position points between the first position point and the second position point corresponding to the statistical time period, includes: Based on the sum of travel times of all adjacent point pairs passed by each path between the first location point and the second location point, a path with the smallest sum of travel times is selected as the target path; The sum of the travel times of all adjacent point pairs passed by the target path is determined as the minimum travel time corresponding to the statistical time period, and the total number of all adjacent point pairs passed by the target path is determined as the minimum number of position points corresponding to the statistical time period.
5. The method according to claim 1, characterized in that The method further comprises: Selecting historical data corresponding to the statistical time period from a historical database, the historical data including the collection time of the sample vehicle at each location within the statistical time period; Filtering the historical data and determining the remaining historical data as the sample data; wherein filtering the historical data includes at least one of the following: For any sample vehicle, if the travel time of the sample vehicle passing through two adjacent location points is less than a preset travel time threshold, the historical data of the sample vehicle passing through the two adjacent location points is filtered; For two adjacent location points, if the total number of data pairs corresponding to the two adjacent location points is less than a preset number threshold, all data pairs corresponding to the two adjacent location points are filtered; wherein the data pairs include historical data of the sample vehicle passing through the two adjacent location points; For two adjacent location points, all data pairs corresponding to the two adjacent location points are obtained; based on the travel time corresponding to each data pair, X1 data pairs with shorter travel time are filtered, and X2 data pairs with longer travel time are filtered, where X1 and X2 are both positive integers; For two location points, if the total number of abnormal vehicles passing between the two location points is greater than the abnormal number threshold, all data pairs corresponding to the two location points are filtered.
6. The method according to claim 1, characterized in that Determining a minimum travel time and a minimum number of location points between the first location point and the second location point corresponding to a statistical time period includes: Determining whether a data update condition has been met; if so, determining a minimum travel time and a minimum number of location points between the first location point and the second location point corresponding to a statistical time period; Among them, if the total number of abnormal vehicles passing between the first position point and the second position point is greater than the abnormal number threshold, it is determined that the data update condition has been met; or, if the time between the current time point and the last data update time point reaches the preset update time length, it is determined that the data update condition has been met, and the last data update time point is the time point when the minimum passage time and the minimum number of position points were last determined.
7. A device for detecting abnormal vehicles, characterized in that: The device comprises: an acquisition module, configured to acquire, if a target vehicle travels from a first location point to a second location point, a first time point at which the target vehicle is at the first location point, a second time point at which the target vehicle is at the second location point, and the number of target location points passed by the target vehicle from the first location point to the second location point; a determination module, configured to determine that the target vehicle is an abnormal vehicle if the difference between the second time point and the first time point is less than the minimum travel time between the first position point and the second position point; and to determine that the target vehicle is an abnormal vehicle if the difference between the second time point and the first time point is not less than the minimum travel time, and the minimum number of position points between the first position point and the second position point is greater than the sum of the number of target position points and a preset number threshold; The determination module is further configured to determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period; the statistical time period is a complete time period of a specified statistical period, or, when the specified statistical period is divided into multiple time periods, the statistical time period is any time period of the multiple time periods; the determination module is configured to determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period by: determining at least one adjacent point pair passed by a target path between the first location point and the second location point, and determining the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period based on the travel time and the number of adjacent point pairs passed by the target path; the travel time of the adjacent point pairs is determined based on sample data corresponding to the statistical time period in a historical database, the sample data including the collection time of the sample vehicle at each location point in the network topology within the statistical time period, the adjacent point pair including two adjacent location points, and the travel time is determined based on the collection time of the sample vehicle at the two adjacent location points.
8. The device according to claim 7, It is characterized by: in, The acquisition module is further configured to, if the designated statistical period is divided into multiple time periods, select a target time period from the multiple time periods based on the first time point or the second time point; wherein the minimum travel time is the minimum travel time corresponding to the target time period; wherein the minimum number of location points is the minimum number of location points corresponding to the target time period; The determination module determines the travel duration of adjacent point pairs based on sample data corresponding to the statistical time period in the historical database, specifically for any adjacent point pair, obtaining M data pairs matching the adjacent point pair, each data pair including the collection moments of the sample vehicle at two adjacent positions in the adjacent point pair within the statistical time period; for each data pair, determining the travel duration based on the two collection moments in the data pair; and determining the minimum value of the travel durations corresponding to the M data pairs as the travel duration of the adjacent point pair; The determining module determines the minimum travel time and the minimum number of location points corresponding to the statistical time period between the first location point and the second location point based on the travel time of the adjacent point pairs and the number of adjacent point pairs passed by the target path, and is specifically configured to: select, based on the sum of the travel time of all adjacent point pairs passed by each path between the first location point and the second location point, the path with the smallest sum of the travel time as the target path, determine the sum of the travel time of all adjacent point pairs passed by the target path as the minimum travel time corresponding to the statistical time period, and determine the total number of all adjacent point pairs passed by the target path as the minimum number of location points corresponding to the statistical time period; Wherein, the determination module is further used to: select historical data that matches the statistical time period from the historical database, the historical data including the collection time of the sample vehicle at each location point within the statistical time period; filter the historical data, and determine the remaining historical data as the sample data; wherein, filtering the historical data includes at least one of the following: for any sample vehicle, if the travel time of the sample vehicle passing through two adjacent location points is less than a preset time threshold, then filter the historical data of the sample vehicle passing through the two adjacent location points; for two adjacent location points, if the data corresponding to the two adjacent location points are less than a preset time threshold, then filter the historical data of the sample vehicle passing through the two adjacent location points; If the total number of data pairs is less than a preset number threshold, all data pairs corresponding to the two adjacent location points are filtered; wherein the data pairs include historical data of sample vehicles passing through the two adjacent location points; for two adjacent location points, all data pairs corresponding to the two adjacent location points are obtained; based on the travel time corresponding to each data pair, X1 data pairs with shorter travel time are filtered, and X2 data pairs with longer travel time are filtered, where X1 and X2 are both positive integers; for two location points, if the total number of abnormal vehicles passing between the two location points is greater than the abnormal number threshold, all data pairs corresponding to the two location points are filtered; Among them, when the determination module determines the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period, it is specifically used to: determine whether the data update condition has been met; if so, determine the minimum travel time and the minimum number of location points between the first location point and the second location point corresponding to the statistical time period; wherein, if the total number of abnormal vehicles passing between the first location point and the second location point is greater than the abnormal number threshold, it is determined that the data update condition has been met; or, if the time between the current time point and the last data update time point reaches the preset update time length, it is determined that the data update condition has been met, and the last data update time point is the time point when the minimum travel time and the minimum number of location points were last determined.
9. An abnormal vehicle detection device, characterized in that: The abnormal vehicle detection device includes: a processor and a machine-readable storage medium, wherein the machine-readable storage medium stores machine-executable instructions that can be executed by the processor; wherein the processor is used to execute the machine-executable instructions to implement the method steps described in any one of claims 1-7.
Citation Information
Patent Citations
Vehicle abnormal behavior identification method and device
CN107204114A
Vehicle detection method, device and equipment and storage medium
CN111402574A
Abnormal license plate selection method and device
CN111767776A