Vehicle information query method and system
通过对车辆特征进行局部敏感哈希算法的哈希映射,将其散列到多个哈希表的散列桶内,解决了传统车辆信息查询方法效率低下的问题,实现了快速、准确的车辆 Information query.
Patent Information
- Application Number
- CN202210408058.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-04-19
AI Technical Summary
Traditional vehicle information query methods are inefficient in the storage and reading of massive videos and images and cannot meet business needs.
The locally sensitive hash algorithm hash mapped the vehicle features, hashed them into the hash buckets of multiple hash tables, and through hash mapping conversion, the original data set formed by multiple vehicle features is divided into multiple subs Collection, reduce query scope.
It realizes fast query, reduces the amount of query calculation, improves accuracy and real-timeness, and solves the problem of inefficiency of traditional methods.
Smart Images

Figure CN114911965B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a vehicle information query method and system. Background Art
[0002] With the development of economy, the number of motor vehicles is increasing, which leads to the need for increasing video surveillance or improving camera resolution to solve vehicle management problems. However, as the number of video files stored in the vehicle management platform increases, the management and efficient query and identification of vehicle data are particularly important. However, the traditional vehicle information query method requires the storage and reading of massive videos and images, which makes the vehicle database store a lot of data and the search query calculation is large and time-consuming, resulting in low query efficiency and unable to meet business needs.
[0003] Application Contents
[0004] The purpose of this application is to solve the technical problem of low query efficiency of traditional methods. To achieve the above purpose, this application provides a vehicle information query method and system.
[0005] The present application provides a vehicle information query method, comprising:
[0006] Acquire a plurality of vehicle images, and acquire a plurality of vehicle features based on the plurality of vehicle images;
[0007] Performing hash mapping on the multiple vehicle features based on a locality sensitive hashing algorithm, and hashing the multiple vehicle features into hash buckets of multiple hash tables;
[0008] Acquire a vehicle image to be queried, acquire vehicle features to be queried according to the vehicle image to be queried, and perform hash mapping on the vehicle features to be queried according to the local sensitive hash algorithm to obtain a hash bucket number to be queried corresponding to the vehicle features to be queried;
[0009] According to the multiple hash tables, the hash bucket corresponding to the hash bucket number to be queried is queried, and according to the hash bucket, the vehicle characteristics related to the vehicle characteristics to be queried are queried.
[0010] In one embodiment, performing hash mapping on the multiple vehicle features based on a locality sensitive hashing algorithm and hashing the multiple vehicle features into hash buckets of multiple hash tables includes:
[0011] Filter the locality-sensitive hash function family according to the hash function conditions;
[0012] Setting an accuracy threshold, training function parameters of the local sensitive hash function family according to the accuracy threshold and the multiple vehicle features to obtain multiple hash tables, and hashing the multiple vehicle features into hash buckets according to the multiple hash tables;
[0013] The accuracy threshold is represented by the accuracy of the related vehicle features being hashed into the same hash bucket;
[0014] The hash function condition is that for any two points (x, y) in high-dimensional space:
[0015] If d(x,y)≤R, then the probability that h(x)=h(y) is not less than P1;
[0016] If d(x,y)≥cR, then the probability that h(x)=h(y) is no greater than P2;
[0017] Wherein, d(x, y) represents the distance between two points (x, y), R represents the distance threshold between two points (x, y), h represents the hash function, h(x) and h(y) represent the hash transformation of the two points (x, y), c>1, P1>P2.
[0018] In one embodiment, after querying the hash bucket corresponding to the to-be-queried hash bucket number according to the multiple hash tables, and querying the vehicle features related to the to-be-queried vehicle features according to the hash bucket, the method further includes:
[0019] According to a similarity measurement method, similarity is determined between the vehicle feature to be queried and a plurality of vehicle features related to the vehicle feature to be queried, so as to obtain a plurality of similar vehicle features;
[0020] If the to-be-queried vehicle feature and the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, then the to-be-queried vehicle is not a fake-license vehicle.
[0021] In one embodiment, if the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, then the vehicle is a non-cloned license plate vehicle, the method further includes:
[0022] If the vehicle feature to be queried and the multiple similar vehicle features correspond to multiple vehicles and have the same license plate number, then calculating the vehicle feature similarity between the vehicle feature to be queried and each of the similar vehicle features;
[0023] If the vehicle feature similarity is greater than a first judgment threshold, the vehicle to be queried is a non-cloned vehicle.
[0024] In one embodiment, if the vehicle feature similarity is greater than a first judgment threshold, then the vehicle to be queried is a non-copyrighted vehicle, the method further includes:
[0025] If the vehicle feature similarity is less than or equal to the first judgment threshold, then calculating the vehicle driver similarity and vehicle driving position similarity corresponding to the vehicle feature to be queried and each similar vehicle feature;
[0026] Constructing a fake license plate vehicle judgment function according to the vehicle feature similarity, the vehicle driver similarity and the vehicle driving position similarity;
[0027] If the value of the fake license plate vehicle judgment function is less than the second judgment threshold, the vehicle to be queried is a non-fake license plate vehicle;
[0028] If the value of the fake license plate vehicle judgment function is greater than or equal to the judgment threshold, the vehicle to be queried is a fake license plate vehicle;
[0029] Wherein, the fake license plate vehicle judgment function is: Loss = 1-0.6×d1+0.2×d2+0.2×d3;
[0030] d1 represents the vehicle feature similarity, d2 represents the vehicle driver similarity, and d3 represents the vehicle driving position similarity.
[0031] In one embodiment, if the to-be-queried vehicle feature and the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, then the to-be-queried vehicle is a non-cloned license plate vehicle, the method further includes:
[0032] If the vehicle feature to be queried is different from the license plate number corresponding to the multiple similar vehicle features, then the vehicle to be queried is a non-cloned license plate vehicle.
[0033] In one embodiment, the present application provides a vehicle information query system, comprising:
[0034] A data acquisition module, used to acquire a plurality of vehicle images, and acquire a plurality of vehicle features according to the plurality of vehicle images;
[0035] A hash mapping module, configured to perform hash mapping on the plurality of vehicle features based on a locality sensitive hashing algorithm, and hash the plurality of vehicle features into hash buckets of a plurality of hash tables;
[0036] A module for obtaining a hash bucket number to be queried is used to obtain a vehicle image to be queried, obtain vehicle features to be queried according to the vehicle image to be queried, and perform hash mapping on the vehicle features to be queried according to the local sensitive hash algorithm to obtain a hash bucket number to be queried corresponding to the vehicle features to be queried;
[0037] The related information acquisition module is used to query the hash bucket corresponding to the hash bucket number to be queried according to the multiple hash tables, and query the vehicle characteristics related to the vehicle characteristics to be queried according to the hash bucket.
[0038] In one embodiment, the hash map module includes:
[0039] A locality-sensitive hash function family screening module is used to screen the locality-sensitive hash function family according to the hash function conditions;
[0040] A training module, used for setting an accuracy threshold, training function parameters of the local sensitive hash function family according to the accuracy threshold and the multiple vehicle features, obtaining multiple hash tables, and hashing the multiple vehicle features into hash buckets according to the multiple hash tables;
[0041] The accuracy threshold is represented by the accuracy of the related vehicle features being hashed into the same hash bucket;
[0042] The hash function condition is that for any two points (x, y) in high-dimensional space:
[0043] If d(x,y)≤R, then the probability that h(x)=h(y) is not less than P1;
[0044] If d(x,y)≥cR, then the probability that h(x)=h(y) is no greater than P2;
[0045] Wherein, d(x, y) represents the distance between two points (x, y), R represents the distance threshold between two points (x, y), h represents the hash function, h(x) and h(y) represent the hash transformation of the two points (x, y), c>1, P1>P2.
[0046] In one embodiment, the system further comprises:
[0047] A similar vehicle feature acquisition module is used to perform similarity judgment on the vehicle feature to be queried and multiple vehicle features related to the vehicle feature to be queried according to a similarity measurement method to obtain multiple similar vehicle features;
[0048] The first fake license plate vehicle judgment module is used to determine that the vehicle to be queried is a non-fake license plate vehicle if the vehicle feature to be queried and the multiple similar vehicle features correspond to the same vehicle and have the same license plate number.
[0049] In one embodiment, the system further comprises:
[0050] A first feature similarity acquisition module, configured to calculate the vehicle feature similarity between the vehicle feature to be queried and each of the similar vehicle features if the vehicle feature to be queried and the multiple similar vehicle features correspond to multiple vehicles and have the same license plate number;
[0051] The second fake license plate vehicle judgment module is used to determine that the vehicle to be queried is a non-fake license plate vehicle if the vehicle feature similarity is greater than a first judgment threshold.
[0052] In one embodiment, the system further comprises:
[0053] A second feature similarity acquisition module, configured to calculate the vehicle driver similarity and vehicle driving position similarity between the vehicle feature to be queried and each similar vehicle feature if the vehicle feature similarity is less than or equal to the first judgment threshold;
[0054] A duplicate license plate vehicle judgment function construction module, used to construct a duplicate license plate vehicle judgment function according to the vehicle feature similarity, the vehicle driver similarity and the vehicle driving position similarity;
[0055] A third fake license plate vehicle judgment module, configured to determine that the vehicle to be queried is a non-fake license plate vehicle if the value of the fake license plate vehicle judgment function is less than a second judgment threshold;
[0056] A fourth fake license plate vehicle judgment module, configured to determine that the vehicle to be queried is a fake license plate vehicle if the value of the fake license plate vehicle judgment function is greater than or equal to the judgment threshold;
[0057] Wherein, the fake license plate vehicle judgment function is: Loss = 1-0.6×d1+0.2×d2+0.2×d3;
[0058] d1 represents the vehicle feature similarity, d2 represents the vehicle driver similarity, and d3 represents the vehicle driving position similarity.
[0059] In one embodiment, the system further comprises:
[0060] The fifth fake license plate vehicle judgment module is used to determine that the vehicle to be queried is a non-fake license plate vehicle if the license plate number corresponding to the vehicle feature to be queried is different from the license plate number corresponding to the multiple similar vehicle features.
[0061] In the above vehicle information query method and system, the vehicle information query method provided by the present application establishes a vehicle feature database hash table based on the local sensitive hash algorithm for vehicle features such as vehicle license plate number, vehicle model, vehicle color, vehicle type, vehicle driving area, and vehicle driver information. Through hash mapping conversion, the original data set formed by multiple vehicle features is divided into multiple subsets. The relevant vehicle features can be obtained by searching for the vehicle features to be queried in a certain subset, thereby realizing the query of vehicle-related feature information. Furthermore, through the vehicle information query method provided by the present application, the problem of finding relevant features in a very large data set formed by multiple vehicle features is converted into the problem of finding relevant data in a very small set, which reduces the time required for classification and significantly reduces the amount of calculation. Therefore, through the vehicle information query method provided by the present application, the process of querying all vehicle data in the database is reduced, and it can be realized by concentrating on querying a certain subset, realizing fast query, significantly reducing the amount of query calculation, and improving accuracy and real-time performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] Figure 1 It is a schematic diagram of the step flow of the vehicle information query method provided by this application.
[0063] Figure 2 It is a structural diagram of the vehicle information query system provided by this application. DETAILED DESCRIPTION
[0064] The technical solution of the present application is further described in detail below through the accompanying drawings and embodiments.
[0065] See also Figure 1 , the present application provides a vehicle information query method, comprising:
[0066] S10, acquiring a plurality of vehicle images, and acquiring a plurality of vehicle features according to the plurality of vehicle images;
[0067] S20, performing hash mapping on the multiple vehicle features based on a local sensitive hashing algorithm, and hashing the multiple vehicle features into hash buckets of multiple hash tables;
[0068] S30, obtaining a to-be-queried vehicle image, obtaining to-be-queried vehicle features according to the to-be-queried vehicle image, and performing hash mapping on the to-be-queried vehicle features according to a local sensitive hashing algorithm to obtain a to-be-queried hash bucket number corresponding to the to-be-queried vehicle features;
[0069] S40, querying a hash bucket corresponding to the hash bucket number to be queried according to a plurality of hash tables, and querying a vehicle feature related to the vehicle feature to be queried according to the hash bucket.
[0070] In S10, multiple vehicle images can be obtained through high-position video and each checkpoint to construct a vehicle image database. Each vehicle image contains relevant feature information of the vehicle, such as the vehicle model, license plate number, vehicle color, front area, rear area, vehicle position, shooting location, vehicle driver and other relevant feature information of the vehicle. Vehicle information includes relevant feature information of the vehicle such as vehicle model, license plate number, vehicle color, front area, rear area, vehicle position, shooting location, vehicle driver and other relevant feature information of the vehicle. Multiple vehicle features can be a 64-dimensional vector representing the vehicle model, or a 32-dimensional vector representing the license plate number, etc. The specific form can be limited according to actual conditions. In this step, multiple vehicle features represent the relevant feature information of each vehicle, which can be vehicle model, license plate number, vehicle color, vehicle position, local binary pattern (Local Binary Pattern, lbp), Haar-like (such as edge features, linear features, center features and diagonal features) and other features. Multiple vehicle features can be represented in the form of fused features, for example, the fused feature is v=[v1,v2.....v i ]. v1 can be represented as a 64-dimensional vehicle type feature vector, and v2 can be represented as a 32-dimensional license plate number feature vector. Similarly, multiple vehicle feature vectors can form a fusion feature.
[0071] In S20, Locality Sensitive Hashing (LSH) is a fast classification method. Multiple vehicle features are calculated by the locality sensitive hashing algorithm to form a hash table. Through the locality sensitive hashing algorithm, after the related features of multiple vehicle features are subjected to the same mapping transformation, there is a high probability that they are still related in the new data space, and they will fall into the hash bucket of the same hash table after the local hash transformation. After the unrelated features of multiple vehicle features are subjected to the same mapping transformation, there is a high probability that they are still unrelated in the new data space, and they will fall into the hash buckets of different hash tables after the local hash transformation, and will not be scattered into the hash buckets of the same hash table. After hash mapping all the data in the data set formed by multiple vehicle features, multiple hash tables will be formed. Multiple vehicle features will be scattered in the hash buckets of multiple hash tables. Each hash bucket contains some data, and the data in the same hash bucket is likely to be the same. Thus, multiple vehicle features are classified.
[0072] In S30, the vehicle image to be queried can be understood as the vehicle image to be queried. Feature extraction is performed on the vehicle image to be queried to obtain the vehicle features to be queried. The vehicle features to be queried are hash mapped according to the same local sensitive hash function as in step S20 to obtain the corresponding hash bucket number to be queried.
[0073] In S40, according to the hash bucket number to be queried, the corresponding hash bucket in the hash table is found, the data in the hash bucket is extracted, and then linear matching is performed to query the vehicle feature data related to the vehicle feature to be queried, and then the vehicle features related to the vehicle image to be queried can be correspondingly queried.
[0074] The vehicle information query method provided by the present application establishes a vehicle feature database hash table based on the local sensitive hash algorithm for vehicle features such as vehicle license plate number, vehicle model, vehicle color, vehicle type, vehicle driving area, and vehicle driver information. Through hash mapping conversion, the original data set formed by multiple vehicle features is divided into multiple subsets. By searching the vehicle features to be queried in a certain subset, the relevant vehicle features can be obtained, and the query of vehicle-related feature information can be realized. Furthermore, through the vehicle information query method provided by the present application, the problem of finding relevant features in a very large data set formed by multiple vehicle features is converted into the problem of finding relevant data in a very small set, which reduces the time required for classification and significantly reduces the amount of calculation. Therefore, through the vehicle information query method provided by the present application, the process of querying all vehicle data in the database is reduced, and it can be realized by concentrating on a certain subset, realizing fast query, significantly reducing the amount of query calculation, and improving accuracy and real-time performance.
[0075] In one embodiment, S10, a plurality of vehicle images are obtained, and a plurality of vehicle features of the vehicle are obtained according to the plurality of vehicle images. The plurality of vehicle images are identified according to a long short-term memory network and a connection time classifier (LSTM+ctc) to obtain a plurality of license plate number features. The plurality of vehicle images are identified according to a YOLOV4 algorithm, etc. to obtain a plurality of vehicle model features and a plurality of vehicle body colors and other vehicle features.
[0076] In one embodiment, S20, hash mapping multiple vehicle features based on a locality sensitive hashing algorithm, hashing the multiple vehicle features into hash buckets of multiple hash tables, includes:
[0077] S210, screening a local sensitive hash function family according to the hash function condition;
[0078] S220, setting an accuracy threshold, training a local sensitive hash function family according to the accuracy threshold and multiple vehicle features, obtaining multiple hash tables, and hashing the multiple vehicle features into hash buckets according to the multiple hash tables;
[0079] The accuracy threshold is expressed as the accuracy of the related vehicle features being hashed into the same hash bucket;
[0080] The hash function condition is that for any two points (x, y) in high-dimensional space:
[0081] If d(x,y)≤R, then the probability that h(x)=h(y) is not less than P1;
[0082] If d(x,y)≥cR, then the probability that h(x)=h(y) is no greater than P2;
[0083] Wherein, d(x, y) represents the distance between two points (x, y), R represents the distance threshold between two points (x, y), h represents the hash function, h(x) and h(y) represent the hash transformation of the two points (x, y), c>1, P1>P2.
[0084] In this embodiment, d(x, y) may represent Euclidean distance or Manhattan distance, and R may be set to 0.08 to 0.12. The value range of P1 is 0.8 to 0.95, and the value range of P2 is 0.05 to 0.2.
[0085] Multiple hash functions that meet the hash function conditions form a local sensitive hash function family, which further forms a local hash function (R, cR, P1, P2)-sensive. The fusion feature formed by multiple vehicle features is v = [v1, v2.....v i ], which can also be understood as a data set formed by multiple vehicle features. For the hash function, key = h(v), the key data set corresponds to the data data set, and the table composed of data-key corresponding to each other becomes a hash table. The key is the primary key of the data record, and the original data can be found through the key.
[0086] v=[v1,v2.....v i ] is a set of high-dimensional data points, that is, a set of high-dimensional fusion feature points.
[0087] represents the hash function, and the parameters a, b, and w can be obtained through training. The local sensitive hash function family can be represented as g j (v) = {h j1 ,h j2 ,h j3 …,h jk}.
[0088] The accuracy threshold is expressed as the accuracy value of hashing related vehicle features into the same hash bucket. Specifically, it can also be understood as the probability of finding the same vehicle model, or the probability of finding the same vehicle color, or the probability of finding the same vehicle license plate number.
[0089] The accuracy threshold can be set to 99.9% or other values, which can be limited according to actual conditions. Based on multiple vehicle features and the local sensitive hash function family, the best a, b, and w parameters can be continuously trained so that the accuracy of hashing related vehicle features into the same hash bucket reaches the accuracy threshold. By training K hash functions, a trained hash table is obtained, that is, K groups of a, b, and w values. According to the trained hash table, multiple vehicle features are classified, and the number of categories formed is l. The classification process is called hashing, and the label corresponding to each category is the hash bucket number.
[0090] By screening multiple hash functions through the hash function conditions in this embodiment, multiple local sensitive hash functions are obtained to form a local sensitive hash function family, so that each local sensitive hash function is more suitable for the data form of multiple vehicle features in this application, which is more conducive to classifying the data. By setting the accuracy threshold in this embodiment, the query result accuracy can be higher when the trained hash table is queried later. Therefore, through the vehicle information query method of this application, the high-dimensional space characteristics of the local sensitive hash function can be fully utilized to perform hash mapping classification on multiple vehicle features, so that the query speed is fast and the accuracy is high.
[0091] In one embodiment, multiple vehicle features are calculated using K locality-sensitive hash functions and then hashed into corresponding hash buckets.
[0092] For example, if the vehicle model is used as the classification mark of the hash bucket, FAW-Volkswagen, BMW, Audi, etc. can be hashed into different hash buckets and correspond to different hash bucket numbers. For example, all the multiple vehicle features representing FAW-Volkswagen are hashed into one hash bucket, all the multiple vehicle features representing BMW are hashed into another hash bucket, and all the multiple vehicle features representing Audi are hashed into another hash bucket.
[0093] For example, if the vehicle type is used as the classification mark of the hash bucket, small cars, SUVs, MPVs, etc. can be hashed into different hash buckets and correspond to different hash bucket numbers. For example, all the multiple vehicle features representing small cars are hashed into one hash bucket, all the multiple vehicle features representing SUVs are hashed into another hash bucket, and all the multiple vehicle features representing MPVs are hashed into another hash bucket.
[0094] For example, if the vehicle license plate number is used as the classification mark of the hash bucket, then Beijing A123456, Tianjin B234567, Hebei C345678, etc. can be hashed into different hash buckets and correspond to different hash bucket numbers. For example, all the multiple vehicle features representing Beijing A123456 are hashed into one hash bucket, all the multiple vehicle features representing Tianjin B234567 are hashed into another hash bucket, and all the multiple vehicle features representing Hebei C345678 are hashed into another hash bucket.
[0095] When there are multiple identical license plate numbers in the same hash bucket, there may be a fake license plate vehicle. A fake license plate vehicle refers to a vehicle that illegally uses another person's legal motor vehicle license plate. A fake license plate vehicle refers to a fake license plate with the same number on another vehicle, many of which are refurbished old vehicles that have been smuggled out of the vehicle after being scrapped. The fake license plate behavior not only evades the collection of national fees, but also damages the interests of the car owner, and also disrupts the normal traffic order, making the fake license plate vehicle query particularly important.
[0096] In one embodiment, at S40, after searching the hash bucket corresponding to the hash bucket number to be queried according to the plurality of hash tables and searching the vehicle features related to the vehicle features to be queried according to the hash bucket, the method further comprises:
[0097] S410, performing similarity judgment between the vehicle feature to be queried and a plurality of vehicle features related to the vehicle feature to be queried according to a similarity measurement method, to obtain a plurality of similar vehicle features;
[0098] S420: If the characteristics of the vehicle to be queried and the characteristics of multiple similar vehicles correspond to the same vehicle and have the same license plate number, the vehicle to be queried is a non-cloned license plate vehicle.
[0099] In this embodiment, the similarity measurement method can be a similarity coefficient function or a distance function. The similarity coefficient function can be understood as the more similar the two sample points are, the closer the similarity coefficient value is to 1, and the more dissimilar the sample points are, the closer the similarity coefficient value is to 0. The distance function can be understood as treating each sample point as a point in a high-dimensional space, and then using a certain distance to represent the similarity between sample points. Sample points with closer distances are more similar in nature, while sample points with farther distances are more different. The vehicle features to be queried are measured for similarity with multiple vehicle features in the corresponding hash bucket, and multiple vehicle features with greater similarity are selected as multiple similar vehicle features. In one embodiment, similarity measurement is performed based on the Hamming distance calculation method, and the top five vehicle features with the closest similarity are selected as similar vehicle features for duplicate vehicle judgment.
[0100] If the vehicle features to be queried and the vehicles corresponding to multiple similar vehicle features are the same vehicle, and the corresponding license plate numbers are also the same, then the vehicle to be queried is a non-platform vehicle, not a plate-copying vehicle. If it is not a plate-copying vehicle, the vehicle feature data to be queried corresponding to the vehicle to be queried can be added to the database to update the database. The vehicle information query method provided by the present application can obtain multiple similar vehicle features by searching for the vehicle features to be queried in a certain subset through hash mapping conversion, and perform similarity measurement on multiple similar vehicle features, further narrowing the search scope, thereby achieving more accurate query, and the search query time is shortened, thereby improving the query efficiency of the vehicle information query method.
[0101] In one embodiment, at S420, if the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, then the vehicle is a non-cloned license plate vehicle, and the method further includes:
[0102] S430, if the vehicle feature to be queried and the multiple similar vehicle features correspond to multiple vehicles and have the same license plate number, then calculate the vehicle feature similarity between the vehicle feature to be queried and each similar vehicle feature;
[0103] S440: If the vehicle feature similarity is greater than the first judgment threshold, the vehicle to be queried is not a fake license plate vehicle.
[0104] In this embodiment, if the vehicle feature to be queried corresponds to multiple vehicles and has the same license plate number as multiple similar vehicle features, it is necessary to further calculate the vehicle feature similarity between the vehicle feature to be queried and each similar vehicle feature, and further determine whether the multiple vehicles with the same license plate number are the same vehicle. The vehicle feature similarity can be calculated according to a similarity measurement method. In one embodiment, the Euclidean distance method is used to calculate the similarity between the vehicle feature to be queried and each similar vehicle feature, and compare whether the features corresponding to the two vehicles are similar. If the vehicle feature similarity is greater than the first judgment threshold, the vehicle feature to be queried is the same as each similar vehicle feature, and then the corresponding two vehicles are the same vehicle and have the same license plate number, then the vehicle to be queried is a non-copyrighted vehicle. In one embodiment, the value of the first judgment threshold can be set to 95%, 97%, 99%, etc., and can be limited according to actual conditions.
[0105] Through the method steps in this embodiment, further judgments are made for the situation where the license plate numbers are the same but correspond to different vehicles, and vehicles suspected of being fake license plate vehicles are further judged more accurately. Through the vehicle information query method provided by this application, suspected fake license plate vehicles can be queried with high accuracy and good real-time performance. Through hash mapping conversion, the vehicle features to be queried are introduced into a certain subset for search, and the corresponding multiple similar vehicle features are obtained, and the vehicle feature similarity is compared with multiple similar vehicle features, further narrowing the search scope, achieving more accurate query, shortening the search query time, improving the query efficiency of the vehicle information query method, and solving the technical problems of slow and inefficient query speed of fake license plate vehicles in the vehicle database.
[0106] In one embodiment, at S440, if the vehicle feature similarity is greater than the first judgment threshold, then after the queried vehicle is a non-copyrighted vehicle, the following steps are further included:
[0107] S450, if the vehicle feature similarity is less than or equal to the first judgment threshold, calculating the vehicle driver similarity and vehicle driving position similarity corresponding to the query vehicle feature and each similar vehicle feature;
[0108] S460, constructing a fake license plate vehicle determination function based on vehicle feature similarity, vehicle driver similarity, and vehicle driving position similarity;
[0109] S470, if the value of the fake license plate vehicle judgment function is less than the second judgment threshold, the vehicle to be queried is a non-fake license plate vehicle;
[0110] S480, if the value of the fake license plate vehicle judgment function is greater than or equal to the judgment threshold, the vehicle to be queried is a fake license plate vehicle;
[0111] Among them, the judgment function of the fake license plate car is: Loss = 1-0.6×d1+0.2×d2+0.2×d3;
[0112] d1 represents the similarity of vehicle features, d2 represents the similarity of vehicle drivers, and d3 represents the similarity of vehicle driving positions.
[0113] In this embodiment, when the vehicle feature similarity is less than or equal to the first judgment threshold, there is a great difference between the vehicle feature to be queried and the similar vehicle feature. Each vehicle corresponding to a similar vehicle feature will have a corresponding vehicle driver and a vehicle driving position. Further judgment is made based on the vehicle driver similarity and the vehicle driving position similarity. The vehicle driver similarity can be understood as the similarity between the vehicle driver corresponding to the vehicle feature to be queried and the vehicle driver corresponding to the similar vehicle feature. The vehicle driving position similarity can be understood as the similarity between the vehicle driving position corresponding to the vehicle feature to be queried and the vehicle driving position corresponding to the similar vehicle feature. Loss = 1-0.6×d1+0.2×d2+0.2×d3 forms a duplicate vehicle judgment function, and the value of the duplicate vehicle judgment function is compared with the second judgment threshold to determine whether the vehicle to be queried is a duplicate vehicle.
[0114] The second judgment threshold value can be set to 0.1 or 0.05, etc., and can be set according to actual conditions. Through the method steps in this embodiment, further judgment is made for the situation where the similarity of vehicle features is low, and the vehicle suspected of being a fake license plate vehicle is further judged more accurately. In this embodiment, by introducing other vehicle features, such as vehicle driver features, vehicle driving position features, or vehicle color features, fake license plate vehicle judgment is further performed. Through the vehicle information query method provided by this application, other vehicle features can be introduced for auxiliary judgment, and whether it is a fake license plate vehicle can be judged from multiple features of the vehicle. Suspected fake license plate vehicles can be queried with high accuracy and good real-time performance. Furthermore, through the method steps in this embodiment, more accurate queries can be achieved to avoid erroneous judgments, thereby achieving the purpose of real-time and accurate detection of fake license plate vehicles.
[0115] In one embodiment, at S470, if the value of the fake license plate vehicle judgment function is less than the second judgment threshold, then after the queried vehicle is a non-fake license plate vehicle, the method further includes:
[0116] S471, updating the image database according to the vehicle image to be queried.
[0117] In this embodiment, if the vehicle to be queried is not a fake license plate vehicle, the image database can be updated according to the image of the vehicle to be queried. In one embodiment, the vehicle image database is updated once a week, and the data in the database is updated, which can continuously update and improve the vehicle database and provide a basis for the traffic police department to enforce the law.
[0118] In one embodiment, at S420, if the vehicle characteristics to be queried and the multiple similar vehicle characteristics correspond to the same vehicle and have the same license plate number, then the vehicle to be queried is a non-copycat vehicle, and the method further includes:
[0119] S421: If the license plate numbers corresponding to the characteristics of the vehicle to be queried are different from those of multiple similar vehicle characteristics, the vehicle to be queried is a non-cloned license plate vehicle.
[0120] In this embodiment, the vehicle feature to be queried corresponds to one vehicle, and multiple similar vehicle features correspond to multiple vehicles. If the license plate numbers of each vehicle are different, they are considered to be non-copycat vehicles. If the vehicle to be queried is a non-copycat vehicle, the image database can be updated according to the image of the vehicle to be queried.
[0121] See also Figure 2 In one embodiment, the present application provides a vehicle information query system 100. The vehicle information query system 100 includes a data acquisition module 10, a hash mapping module 20, a hash bucket number acquisition module 30 to be queried, and a related information acquisition module 40. The data acquisition module 10 is used to acquire multiple vehicle images, and acquire multiple vehicle features based on the multiple vehicle images. The hash mapping module 20 is used to perform hash mapping on multiple vehicle features based on a local sensitive hashing algorithm, and hash the multiple vehicle features into hash buckets of multiple hash tables. The hash bucket number acquisition module 30 to be queried is used to acquire a vehicle image to be queried, acquire the vehicle features to be queried based on the vehicle image to be queried, and perform hash mapping on the vehicle features to be queried based on the local sensitive hashing algorithm to obtain the hash bucket number to be queried corresponding to the vehicle features to be queried. The related information acquisition module 40 is used to query the hash bucket corresponding to the hash bucket number to be queried based on multiple hash tables, and query the vehicle features related to the vehicle features to be queried based on the hash bucket.
[0122] In this embodiment, the relevant description of the data acquisition module 10 can refer to the relevant description of S10 in the above embodiment. The relevant description of the hash mapping module 20 can refer to the relevant description of S20 in the above embodiment. The relevant description of the hash bucket number acquisition module 30 to be queried can refer to the relevant description of S30 in the above embodiment. The relevant description of the relevant information acquisition module 40 can refer to the relevant description of S40 in the above embodiment.
[0123] In one embodiment, the hash mapping module 20 includes a local sensitive hash function family screening module (not labeled in the figure) and a training module (not labeled in the figure). The local sensitive hash function family screening module is used to screen the local sensitive hash function family according to the hash function condition. The training module is used to set an accuracy threshold, train the function parameters of the local sensitive hash function family according to the accuracy threshold and multiple vehicle features, obtain multiple hash tables, and hash multiple vehicle features into hash buckets according to the multiple hash tables. Among them, the accuracy threshold is expressed as the accuracy of the related vehicle features hashed into the same hash bucket;
[0124] The hash function condition is that for any two points (x, y) in high-dimensional space:
[0125] If d(x,y)≤R, then the probability that h(x)=h(y) is not less than P1;
[0126] If d(x,y)≥cR, then the probability that h(x)=h(y) is no greater than P2;
[0127] Wherein, d(x, y) represents the distance between two points (x, y), R represents the distance threshold between two points (x, y), h represents the hash function, h(x) and h(y) represent the hash transformation of the two points (x, y), c>1, P1>P2.
[0128] In this embodiment, the description of the locality sensitive hash function family screening module can refer to the description of S210 in the above embodiment. The description of the training module can refer to the description of S220 in the above embodiment.
[0129] In one embodiment, the vehicle information query system 100 further includes a similar vehicle feature acquisition module (not labeled in the figure) and a first duplicate license plate vehicle judgment module (not labeled in the figure). The similar vehicle feature acquisition module is used to perform similarity judgment on the vehicle feature to be queried and multiple vehicle features related to the vehicle feature to be queried according to a similarity measurement method to obtain multiple similar vehicle features. The first duplicate license plate vehicle judgment module is used to determine that if the vehicle feature to be queried and multiple similar vehicle features correspond to the same vehicle and have the same license plate number, the vehicle to be queried is a non-duplicate license plate vehicle.
[0130] In this embodiment, the relevant description of the similar vehicle feature acquisition module can refer to the relevant description of S410 in the above embodiment. The relevant description of the first license plate vehicle determination module can refer to the relevant description of S420 in the above embodiment.
[0131] In one embodiment, the vehicle information query system 100 further includes a first feature similarity acquisition module (not labeled in the figure) and a second duplicate license plate vehicle judgment module (not labeled in the figure). The first feature similarity acquisition module is used to calculate the vehicle feature similarity between the vehicle feature to be queried and each similar vehicle feature if the vehicle feature to be queried and the multiple similar vehicle features correspond to multiple vehicles and have the same license plate number. The second duplicate license plate vehicle judgment module is used to determine that the vehicle to be queried is a non-duplicate license plate vehicle if the vehicle feature similarity is greater than a first judgment threshold.
[0132] In this embodiment, the description of the first feature similarity acquisition module can refer to the description of S430 in the above embodiment. The description of the second license plate vehicle identification module can refer to the description of S440 in the above embodiment.
[0133] In one embodiment, the vehicle information query system 100 further includes a second feature similarity acquisition module (not labeled in the figure), a duplicate vehicle judgment function construction module (not labeled in the figure), a third duplicate vehicle judgment module (not labeled in the figure) and a fourth duplicate vehicle judgment module (not labeled in the figure). The second feature similarity acquisition module is used to calculate the vehicle driver similarity and vehicle driving position similarity corresponding to the vehicle feature to be queried and each similar vehicle feature if the vehicle feature similarity is less than or equal to the first judgment threshold. The duplicate vehicle judgment function construction module is used to construct a duplicate vehicle judgment function based on the vehicle feature similarity, the vehicle driver similarity and the vehicle driving position similarity. The third duplicate vehicle judgment module is used to determine that if the value of the duplicate vehicle judgment function is less than the second judgment threshold, the vehicle to be queried is a non-duplicate vehicle. The fourth duplicate vehicle judgment module is used to determine that if the value of the duplicate vehicle judgment function is greater than or equal to the judgment threshold, the vehicle to be queried is a duplicate vehicle.
[0134] Among them, the judgment function of the fake license plate car is: Loss = 1-0.6×d1+0.2×d2+0.2×d3;
[0135] d1 represents the similarity of vehicle features, d2 represents the similarity of vehicle drivers, and d3 represents the similarity of vehicle driving positions.
[0136] In this embodiment, the relevant description of the second feature similarity acquisition module can refer to the relevant description of S450 in the above embodiment. The relevant description of the duplicate car judgment function construction module can refer to the relevant description of S460 in the above embodiment. The relevant description of the third duplicate car judgment module can refer to the relevant description of S470 in the above embodiment. The relevant description of the fourth duplicate car judgment module can refer to the relevant description of S480 in the above embodiment.
[0137] In one embodiment, the vehicle information query system 100 further includes a fifth fake license plate vehicle judgment module (not marked in the figure). The fifth fake license plate vehicle judgment module is used to determine that the vehicle to be queried is a non-fake license plate vehicle if the license plate number corresponding to the vehicle characteristics to be queried is different from that of multiple similar vehicle characteristics.
[0138] In this embodiment, the relevant description of the fifth license plate vehicle determination module can refer to the relevant description of S421 in the above embodiment.
[0139] In the above-mentioned various embodiments, the specific order or hierarchy of steps in the disclosed process is an example of an exemplary method. Based on design preferences, it should be understood that the specific order or hierarchy of steps in the process can be rearranged without departing from the scope of protection of the present disclosure. The attached method claims provide the elements of various steps in an exemplary order and are not intended to be limited to the specific order or hierarchy described.
[0140] Those skilled in the art may also understand that the various illustrative logical blocks, modules and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly demonstrate the interchangeability of hardware and software, the various illustrative components, modules and steps described above have generally described their functions. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the described functions for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.
[0141] The various illustrative logic blocks or modules described in the embodiments of the present application can be implemented or operated by a general-purpose processor, a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic, a discrete hardware component, or the design of any combination of the above functions. The general-purpose processor can be a microprocessor, and optionally, the general-purpose processor can also be any traditional processor, controller, microcontroller or state machine. The processor can also be implemented by a combination of computing devices, such as a digital signal processor and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a digital signal processor core, or any other similar configuration.
[0142] The steps of the method or algorithm described in the embodiments of the present application can be directly embedded in the software module executed by the hardware, the processor, or a combination of the two. The software module can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a removable disk, a CD-ROM or other storage media of any form in the art. Exemplarily, the storage medium can be connected to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Alternatively, the storage medium can also be integrated into the processor. The processor and the storage medium can be arranged in an ASIC, and the ASIC can be arranged in a user terminal. Optionally, the processor and the storage medium can also be arranged in different components in the user terminal.
[0143] The specific implementation methods described above further illustrate the purpose, technical solutions and beneficial effects of the present application in detail. It should be understood that the above description is only the specific implementation method of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.
Claims
1. A vehicle information query method, characterized in that: include: Acquire a plurality of vehicle images, and acquire a plurality of vehicle features based on the plurality of vehicle images; Performing hash mapping on the multiple vehicle features based on a locality sensitive hashing algorithm, and hashing the multiple vehicle features into hash buckets of multiple hash tables; Acquire a vehicle image to be queried, acquire vehicle features to be queried according to the vehicle image to be queried, and perform hash mapping on the vehicle features to be queried according to the local sensitive hash algorithm to obtain a hash bucket number to be queried corresponding to the vehicle features to be queried; According to the multiple hash tables, query the hash bucket corresponding to the hash bucket number to be queried, and according to the hash bucket, query the vehicle characteristics related to the vehicle characteristics to be queried; After querying the hash bucket corresponding to the hash bucket number to be queried according to the multiple hash tables, and querying the vehicle features related to the vehicle features to be queried according to the hash bucket, the method further includes: performing similarity judgment on the vehicle features to be queried and multiple vehicle features related to the vehicle features to be queried according to a similarity measurement method to obtain multiple similar vehicle features; If the vehicle feature to be queried and the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, then the vehicle to be queried is a non-copyrighted vehicle; After the vehicle to be queried is a non-cloned vehicle if the vehicle feature to be queried and the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, the method further includes: if the vehicle feature to be queried and the multiple similar vehicle features correspond to multiple vehicles and have the same license plate number, calculating the vehicle feature similarity between the vehicle feature to be queried and each of the similar vehicle features; If the vehicle feature similarity is greater than a first judgment threshold, the vehicle to be queried is a non-fake license plate vehicle; If the vehicle feature similarity is greater than the first judgment threshold, the vehicle to be queried is a non-copycat vehicle, and the method further includes: if the vehicle feature similarity is less than or equal to the first judgment threshold, calculating the vehicle driver similarity and vehicle driving position similarity corresponding to the vehicle feature to be queried and each similar vehicle feature; Constructing a fake license plate vehicle judgment function according to the vehicle feature similarity, the vehicle driver similarity and the vehicle driving position similarity; If the value of the fake license plate vehicle judgment function is less than the second judgment threshold, the vehicle to be queried is a non-fake license plate vehicle; If the value of the fake license plate vehicle judgment function is greater than or equal to the judgment threshold, the vehicle to be queried is a fake license plate vehicle; The duplicate license plate vehicle judgment function is: Loss=1-(0.6×d1+0.2×d2+0.2×d3); d1 represents the vehicle feature similarity, d2 represents the vehicle driver similarity, and d3 represents the vehicle driving position similarity.
2. The vehicle information query method according to claim 1, characterized in that: The method of performing hash mapping on the multiple vehicle features based on the local sensitive hashing algorithm and hashing the multiple vehicle features into hash buckets of multiple hash tables includes: screening the local sensitive hash function family according to the hash function condition; setting an accuracy threshold, training the function parameters of the local sensitive hash function family according to the accuracy threshold and the multiple vehicle features to obtain multiple hash tables, and hashing the multiple vehicle features into hash buckets according to the multiple hash tables; wherein the accuracy threshold is represented by the number of related vehicle features hashed to the same an accuracy rate within the hash bucket; the hash function condition is that for any two points (x, y) in the high-dimensional space: if d(x, y) ≤ R, then the probability of h(x) = h(y) is not less than P1; if d(x, y) ≥ cR, then the probability of h(x) = h(y) is not greater than P2; wherein d(x, y) represents the distance between the two points (x, y), R represents the distance threshold between the two points (x, y), h represents the hash function, h(x) and h(y) represent the hash transformation of the two points (x, y), c>1, and P1>P2.
3. The vehicle information query method according to claim 1, characterized in that: After the vehicle to be queried is a non-cloned vehicle if the vehicle feature to be queried and the multiple similar vehicle features correspond to the same vehicle and have the same license plate number, the method also includes: if the vehicle feature to be queried and the multiple similar vehicle features correspond to different license plate numbers, the vehicle to be queried is a non-cloned vehicle.
4. A vehicle information query system, characterized in that: include: A data acquisition module, used to acquire a plurality of vehicle images, and acquire a plurality of vehicle features according to the plurality of vehicle images; A hash mapping module, configured to perform hash mapping on the plurality of vehicle features based on a locality sensitive hashing algorithm, and hash the plurality of vehicle features into hash buckets of a plurality of hash tables; A module for obtaining a hash bucket number to be queried is used to obtain a vehicle image to be queried, obtain vehicle features to be queried according to the vehicle image to be queried, and perform hash mapping on the vehicle features to be queried according to the local sensitive hash algorithm to obtain a hash bucket number to be queried corresponding to the vehicle features to be queried; A related information acquisition module, configured to query the hash bucket corresponding to the hash bucket number to be queried according to the multiple hash tables, and query the vehicle features related to the vehicle features to be queried according to the hash bucket; The system further comprises: a similar vehicle feature acquisition module, configured to perform similarity judgment on the vehicle feature to be queried and a plurality of vehicle features related to the vehicle feature to be queried according to a similarity measurement method, to obtain a plurality of similar vehicle features; A first fake license plate vehicle judgment module, configured to determine that the vehicle to be queried is a non-fake license plate vehicle if the vehicle characteristics to be queried and the multiple similar vehicle characteristics correspond to the same vehicle and have the same license plate number; The system further comprises: a first feature similarity acquisition module, configured to calculate the vehicle feature similarity between the vehicle feature to be queried and each of the similar vehicle features if the vehicle feature to be queried and the multiple similar vehicle features correspond to multiple vehicles and have the same license plate number; A second fake license plate vehicle judgment module, used for judging that the vehicle to be queried is a non-fake license plate vehicle if the vehicle feature similarity is greater than a first judgment threshold; The system further comprises: a second feature similarity acquisition module, configured to calculate the vehicle driver similarity and vehicle driving position similarity corresponding to the vehicle feature to be queried and each similar vehicle feature if the vehicle feature similarity is less than or equal to the first judgment threshold; A duplicate license plate vehicle judgment function construction module, used to construct a duplicate license plate vehicle judgment function according to the vehicle feature similarity, the vehicle driver similarity and the vehicle driving position similarity; A third fake license plate vehicle judgment module, configured to determine that the vehicle to be queried is a non-fake license plate vehicle if the value of the fake license plate vehicle judgment function is less than a second judgment threshold; The fourth cloned vehicle judgment module is used to determine that if the value of the cloned vehicle judgment function is greater than or equal to the judgment threshold, the vehicle to be queried is a cloned vehicle; wherein the cloned vehicle judgment function is: Loss = 1-(0.6×d1+0.2×d2+0.2×d3); d1 represents the vehicle feature similarity, d2 represents the vehicle driver similarity, and d3 represents the vehicle driving position similarity.
5. The vehicle information query system according to claim 4, characterized in that: The hash mapping module includes: a local sensitive hash function family screening module, which is used to screen the local sensitive hash function family according to the hash function condition; a training module, which is used to set an accuracy threshold, train the function parameters of the local sensitive hash function family according to the accuracy threshold and the multiple vehicle features, obtain multiple hash tables, and hash the multiple vehicle features into hash buckets according to the multiple hash tables; wherein the accuracy threshold is expressed as the accuracy of the related vehicle features being hashed into the same hash bucket. Accuracy; the hash function condition is that for any two points (x, y) in the high-dimensional space: if d(x, y) ≤ R, then the probability of h(x) = h(y) is not less than P1; if d(x, y) ≥ cR, then the probability of h(x) = h(y) is not greater than P2; wherein d(x, y) represents the distance between the two points (x, y), R represents the distance threshold between the two points (x, y), h represents the hash function, h(x) and h(y) represent the hash transformation of the two points (x, y), c>1, P1>P2.
6. The vehicle information query system according to claim 4, characterized in that: The system further comprises: a fifth fake license plate vehicle judging module, which is used for judging that the vehicle to be queried is a non-fake license plate vehicle if the license plate number corresponding to the vehicle feature to be queried is different from that of the plurality of similar vehicle features.
Citation Information
Patent Citations
Modified local sensitive hash vehicle retrieval method based on multitask deep learning
CN108108657A